Wednesday, December 30, 2009
Last changes so far
Those states will be exposed as command line with a similar with Lua scripting.
So for now are tested to work the next actions: Circle, Line, Rectangle. Working but crashing randomly are: Boolean operations, Cylinder, Cone. And with not (known) reason: Extrude.
Anyway: those actions are not exposed yet in a easy way for user so you will not be affected. Just if you want to enable the actions for now you have to explicitly activate via Control-Space.
Wednesday, December 23, 2009
Modifiers new infrastructure
WPF Layout
The next steps will be to map OpenCascade to render on the WPF areas, then wire the events, put the grid and tree view list as controls and if not working replace them with WPF versions of them.
Friday, December 18, 2009
GUI restructuring
Decided to replace the main Form with a WPF one, for now the WPF form is built in parallel with the current form. Succeeded also to integrate the Weifen Luo docking control on it. Evaluating if there is any point on keeping the docking control and windows or to replace them with WPF versions together with the main form.
After integrating all these elements the next step will be to map OpenCascade to render on the forms and also wire the toolbar events.
Thursday, December 17, 2009
Lua and Non Related Changes
The other change done this days is about how attributes worked to be identified and what can be the problems that persons might get using the old code. The tree of nodes can get attributes of any given type as long as they are registered. In fact that can make to appear a class of problems. One of the problem is that the conflicting names. NaroCAD used Integer, Real and Color names for storing specific values that may be too generic. This is really great as long as other person wanting to add their custom type will not colide with already defined types. Right now, because we did not write in C++, but in C#, there is a very simple way to create a type that do not collide: use the Reflection .NET API and picking the name and hashing from there. In the past there was a probability (very small, but it could) make that even you had different strings, the generated hashes may collide.
Right now, Type.GetHashCode() have no coliding value as is unique for type IDs. Also is really great because the code will not make you define a custom constant and to write some "magic code".
So to define in past your interpreter the code was like:
public RealInterpreter() : base(nameId) { }
static int nameId = AttributeInterpreterFactory.Register
Right now the code is:
public RealInterpreter() : base() { }
And the registering can be done anywhere else just in case of using deserialize/save to disk and no associated string constant (InterpreterNames.Real) needed.
Tuesday, December 15, 2009
Looking still for improving the Lua integration
Note: I'm on irc://irc.freenode.net at #narocad room for persons that wants to talk lively and don't use Skype or want for simple topics like install fails on your machine or setup the build environment. I will not be all time online but when I will be I will respond :)
GUI improvements
Analyzed WPF with SCSF integration and also started evaluating the Ribbon control for a possible integration on the interface.
Monday, December 14, 2009
Looking for improving the Lua integration
Lua right now works at the model level, so to make better integration it should be made as a modifier. For this there are two options: make a Lua only action that is defined, or one more intrusive that all actions will give descriptions to Lua working. The second approach is tricky for actions like: extrude that at their selves depends on other shapes, or for shapes that are not right defined restrictions. An extrude in itself right now it asks for a shape to be extruded, but the modifier creates an face that was clicked. I will have to think more for a proper design/solution.
Thursday, December 10, 2009
NaroCAD 1.2.1 RC released
Note: It may take some time until is uploaded as the uploaded archive did seem to not work. When I will upload it (again) this notice will be removed.
Bug fixing
35 more bugs remained to be solved. The most important one that would be good to be solved on this week is Delete on intersected shapes. Currently after Delete the intersection is regenerated so the shape doesn't disappear.
Wednesday, December 9, 2009
Async UI and automatically applicable UI
If you know Joel Spolsky, he presents very good reasons why user interfaces are complex. The quote that is the most important in my oppinion from all topic is this: "A bunch of tiny frustrations, and a bunch of tiny successes. But they added up. Even something which seems like a tiny, inconsequential frustration affects your mood. Your emotions don't seem to care about the magnitude of the event, only the quality."
Using various interfaces, I am likely attracted with Mac OS X/GNOME interfaces: they stride to be minimalist at first and try to hide to user most of options. Also, they emphatize with automatically apply UI and the buttons are tend to be "reversed" compared with older applications on Windows. The reason that most persons are right-handed persons and they will more likely hit the right-most button if they will not look at what is it.
Some reasons of being minimalist as interface is to not overwhelm the user from one side, and picking defaults that (almost) always work on the other side. The reason of applying automatically the interface is great that you will mostly change your options and you will save a step by clicking again on OK (if you not click wrong on cancel and have a frustration). Another reason in NaroCAD at least is that some options are really frustrating when you pick a wrong checkbox and close. You will have to open again options, to go back to that specific Options' page, and uncheck your options. If you click a wrong option and you see the results right away, you don't lose the "context" by closing the dialog and move back.
So based with tha good faith and following the giants in UI design, I've applied most of that knowledge on NaroCAD. Today I've just finished an automatically applying non-modal Options dialog. In this way you can test if your Solver options (the component that is used for autoaligning your mouse point to various references like corner points, paralel lines, paralel planes) without going back and forth. Also the dialog have in bottom-left corner an Undo/Redo arrows pair, so if you get wrong some arguments and you just found that the defaults are better, you may use the defaults right away applying the Undo. Also the Undo will say which page was changed when the undo is applied.
The dialog of Cut Preview was also changed to be asynchronous also, so you can rotate right now the scene as much as you preview the cut.
You may download the latest build from here.
Lua wrong arguments crash fixed
Monday, December 7, 2009
Fixing Regressions
Latest developments did make some shapes/tools to not work. Hopefully that problems were addressed today. Some testing may be still needed, but the code is really close to previous exposed functionality.
To speedup launching of visual tools, I've made a dialog to launch visual modifiers. To launch them, you should press Control + Space from the SVN version (or wait for the next version).
Also, it was setup a Mercurial source tree for NaroCAD project in parallel with SVN. Using Mercurial may in future simplify cases like working in experimental features and branching. Mercurial is a distributed VCS which means that you can commit in your separate branch without depending on sourceforge for some time. To understand Mercurial, you may look to a very similar (but a bit more complex) system (Git) .
Closed Iteration 1.11
Among the new features added in the iteration 1.11:
- AutoSave functionality - restoring in the case of a crash,
- AutoUpdate functionality,
- Added Torus solid,
- Implemented a Direction tool - shows the direction of a Face,
- Add/Remove nodes to spline tools,
- Copy/Paste with Reference, the duplicated shapes are influenced by changes to original shapes,
- Drawing of line parallel to face, Drawing of line normal to face,
- Lua automatic tests, increased the number of commands exported,
- Offset 2D and Offset 3D features,
- Cleaned up and improved the Save/Open/Export/Import functionality,
- Improved bug tracker to send more than one file at a time.
Sunday, December 6, 2009
Extrude Preview
C# compiling note: To include various classes over the project, you can do it by "using" keyword and a namespace. Removing unused "using" in most files of the NaroCAD project reduces fairly significant the compiling time from around 8 seconds to 7 seconds in a 2.13 GHz dual-core machine (that may depend on your CPU speed, disk drive, cache sizes, how your sourcecode is organized, etc.) but in fact an improvement say just this: if you use Visual C# newer than 2005, always do a "Sort and Remove" refactor option as it will save later some of your time.
Saturday, December 5, 2009
Refactorings... and again Refactorings
NaroCAD is built as MVC, in multiple levels, but in short, the primitives are stored persistently in a structure named Document. This document have a tree which is somehow similar with XML DOM (but indexed a bit differenly to have better access time), and livecycle (like Undo, Redo). The tree nodes can store arbitrary data, or as needed it can store shapes that based on that data, to builds visual OpenCascade shapes. Those high level shapes are stored in two ways: as model with specific OpenCascade code named Functions and as OpenCascade View, if a document have an attached OpenCascade Context the view show/hide, color, etc. is done automatically (using a custom attribute) based on propagation, changing in attributes that are on the node. So making those lines short, A document attached to OpenCascade, it will wrap it with high level primitives and tools (like Extrude, Circle, etc.)
To make them appear in the final document, users expect a preview, so for this there is a separate component that do only visual work (that at the end will create to you a shape like circle you wanted). This component describe actions that users do click that are named Modifiers. A modifier starts from the moment you click the button in toolbar and continues until user press escape or click on other toolbar button.
For some shapes it simply work as to create the shape in-place and to simply update the dependent data lively. For older code or for cases when the code was not thought as that way, the OpenCascade code was done by hand. So by this, some actions did use a AIS_Interactive visual shape that was updated as Circle first, Cylinder after and added/removed manually to OpenCascade's cotnext.
The refactor did start from observation that is much easier to use NaroCAD's framework to add a circle in Document (and document will do by itself the circle live-cycle) than to write it's OpenCascade code. Also we remove the copy/paste code of creating circle. In case that circle code will have a small issue, the fix should be done wherever the code was the same in preview. Want to clean your scene from when your action starts? Document.Revert(); is just enough in all cases. No if(TemporaryShape!=null){ Context.Remove(TemporaryShape, true); }
How many shapes are affected by this refactor? The code affects around 30 modifiers in code, but this new model in all cases reduce the code line count, make all code to not be OCC like but more C#/NaroCAD framework like. The other advantage is that if your final shape is not right defined, it can be reveted the code without having the possibility that by mistake some temporary shapes are remaining in OCC context.
Badly Understood Freedom ...
Friday, December 4, 2009
Bug submit working again
For example code in Arc action like:
var centerCoord = new OCgp_Ax2();
centerCoord.SetAxis(_axis);
var circle = new OCgp_Circ(centerCoord, radius);
var edge = new OCBRepBuilderAPI_MakeEdge(circle).Edge();
OCTopoDS_Wire circleWire = new OCBRepBuilderAPI_MakeWire(edge).Wire();
TemporaryShape = new OCAIS_Shape(circleWire);
TemporaryShape.SetColor(OCQuantity_NameOfColor.Quantity_NOC_RED);
Context.Display(TemporaryShape, true);
Becomes:
Document.Revert();
Document.Transact();
_temporary = new NodeBuilder(Document.Root, FunctionNames.Circle);
_temporary.Dependency[0].Axis3D = _axis;
_temporary.Dependency[1].Real = radius;
_temporary.Color = Color.Red;
_temporary.ExecuteFunction();
Thursday, December 3, 2009
Line parallel to face
Will continue with implementing a snap to grid in sketching mode to improve the sketching capabilities.
Lua improvements
Tuesday, December 1, 2009
Nightly build created
Offset 3D
The offset shape is parametrically influenced by the modifications on source objects. Implemented also descriptor for offset so that the offset can be changed in the property grid.
Monday, November 30, 2009
Other small improvements on usability
Inherited copies are used in Repeat Pattern tool as default. The new behavior will create multiple small shapes that you can modify individually. If you will want the old behavior, that creates a monolithic shape, you will have to uncheck the "Reference Inherited Clone" check box when the setup dialog will appear.
Improved usability
Line normal to Face
An encountered problem here is that our mouse point generator generates points on the faces over which the mouse passes so in this case it starts generating points on the clicked Face, in order to start drawing the line upwards the user must pass the mouse over some other Face in other plane that the one clicked. We should find a way to improve the point generating algorithm.
I have eventually net
Today I did did worked on update and seems to work but I will test it and I hope by tomorrow to make an nightly build with Update activated. By this it will be created most probably two builds: nightly build and a stable build. The nightly build will be updated nightly and the updates will make you to have a blog-to-date fixed version. Also, the updates will be changes day by day so you will not download all days the OCC distribution so it will be the recommended build for you if you care on your last features are on blog. But more on this when the nightly build will be posted.
Saturday, November 28, 2009
Inherited Copy and what it means
For those cases enters Inherited Copy. An inherited copy is shape that clones a source shape but all changed attribute are overridden to the source.
Let's expain with a simple case: lets take a shape S that have attributes: A, B, C (like color, transparency, transform, etc.). We clone with Reference Copy. Let's name this shape D (D comes from destination). When you change in S attributes A, B or C, they apply to shape D automatically. But if you change ever any of D attributes, like supposedly B, the following changes of S.B will not change D.B, only S.A and S.C.
It's easy? Isn't so?
To create inherited clones, just use Control + Shift + V.
2D Offset tool improvements
Added code to generate interior offsets to shapes. Found a very interesting classifier class: IntTools_Context that among other methods has IsValidPointForFace that classifies the position of a point related to a face.
Tried also improving the external shape offset to generate the same shape and not rounded shape duplications but couldn't find a possibility to implement it. Some custom algorithm needs to be built.
On the screenshot an interior offset can be seen. It looks exactly like the external shape (a face was generated and then extruded). The exterior offset has rounded corners.
Lua Unit tests
For you as user will mean no visible change but for us will mean another way to reduce crashes and problems you may encounter.
Friday, November 27, 2009
Offset
A screenshot with the currently implemented functionality:
To implement this tool used BRepOffsetAPI_MakeOffset with GeomAbs_JoinType set as GeomAbs_Arc.
Editing precise
The solution was to create a custom dialog as the shown one. To edit it you just need to press Shift on the point you want to edit and this dialog appears. The Remove button appears for multipoints shapes. Hope you will enjoy using it...
Thursday, November 26, 2009
Multi-File bug reports and cleaning file management
The last release included auto-save support enabled by default. For simplify developers work, this autosaved file was sent as a bug report. Even is great for developers that gets more information to reproduce your problem, you may have cases when your don't want to report what you work with Naro. Or another case, you want to show a specific screenshot or extra logging (a virus maybe :) ). For both of those cases it was implemented.
Step and Brep formats are setup out of Save/Open entries. Save to Step have the following behavior: if you have selected a shape, it will save only it to Step, elsewhere it will save the entire scene.
I will try to solve the issues of Updater to make easier to users to upgrade their machines. I will try to make also a nightly build repository that you can test all Blog/SVN builds and you can drive with your feedback as did murd the last day.
Wednesday, November 25, 2009
Export to step working
I will work to improve the editing component to make possible to make precise point editing.
Direction
Today tried a cool way to check on Naro geometry:
- export the Naro model to STEP
- load on Draw Test Harness the geometry using a command like:
stepread extrude.step ex
2
1
2
2
2
3
0
- apply commands to visualize normals and to check the model:
checkshape ex_4
bopcheck ex_4
bopargcheck ex_4 -c // check if shape is a valid Cut argument
normals ex_4 50
Tuesday, November 24, 2009
Undo/Redo on external shapes
Enjoy importing from now your Step files in Naro!
Face Direction
Improved auto-restore
Monday, November 23, 2009
Parallelism
Will continue implementing a Direction tool. This will be used to display the direction of a face allowing the user to change its direction. This will be also used to research on faces to see what causes some cuts through solids to generate shell like results.
Being Agile
- Working software is the primary measure of progress.
- Continuous attention to technical excellence and good design enhances agility.
- Simplicity - the art of maximizing the amount of work not done - is essential.
- At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly.
Interesting concept: Underdo your competition
Friday, November 20, 2009
NaroCAD 1.2 Released!
In 1.2 version compared to the 1.2 RC1 version enabled a new functionality: recovery functionality in case of a crash.
Thursday, November 19, 2009
Auto save enabled
Auto saving your work is done at every step so you will have an autosave.naroxml file that store your entire scene, in your running Naro folder.
AutoSave makes possible to expose to user in bug reporting the document he worked on. This can be more intuitive for developers when we try to reproduce crashes/bugs. This feature will be enabled from the next release (1.2.1), so is just another reason to try the latest Naro and give your feedback.
Also the tools like NaroLinker, NaroUpdater were reviewed today. NaroLinker have a bug actually that do stop to add classes and I was not able yet to fix it.
The next days I will try to improve the update concept, can be improved to make a save only once at some minutes, also, some testing will not trouble anyone for this new code.
Wednesday, November 18, 2009
NaroCAD 1.2 RC1 lauched
Among the features added at the new version are:
- Fixed around 40 bugs,
- Added editing with Drag and drop for 2D shapes. When no tool activated when clicking Line, Circle, Ellipse, Rectangle, Arc, Spline marker points appear and can be dragged with the mouse,
- Implemented Chamfer 3D to be applied on solids, Chamfer 2D to be applied on wires,
- Implemented diameter and length Dimensions,
- Implemented pattern repeat. A shape can be repeated and rotated a number of times having a guideline,
- Implemented Mirror relative to a line and to a point,
- Improved the error logging all errors are logged with log4net,
- Stabilized the intersection algorithm and data tree structure. Undo, Redo, Save, Open are fixed.
This version will enter now under more testing and bug fixing.
Tuesday, November 17, 2009
Bug fixing
Fixed the majority of bugs related to Dimension. Closed bugs related to selection type closing when changing between tools or incorrect display in toolbar of active selection type. The bugs related to intersection algorithm were all closed.
Will work at bug fixing until the end of the week. At this moment 28 bugs remained to fix.
Monday, November 16, 2009
Cut Preview - usability gets better
Right now Cut makes all scene semi-transparent and will explicitly show what the Cut will affect. Hope you will enjoy this way to work with cut operation.
Fixed Dimensions
Closed Iteration
- Added editing with Drag and drop for 2D shapes. When no tool activated when clicking Line, Circle, Ellipse, Rectangle, Arc, Spline marker points appear and can be dragged with the mouse,
- Implemented Chamfer 3D to be applied on solids, Chamfer 2D to be applied on wires,
- Implemented diameter and length Dimensions,
- Implemented pattern repeat. A shape can be repeated and rotated a number of times having a guideline,
- Implemented Mirror relative to a line and to a point,
- Improved the error logging all errors are logged with log4net,
- Stabilized the intersection algorithm and data tree structure. Undo, Redo, Save, Open are fixed.
Will continue with a week of bug fixing and if no major bugs found will make a release version or at least a build.
Saturday, November 14, 2009
Dimensions
On circle it seems to work well. On edges it still needs improvements as the dimension orientation is not properly detected.
For the graphical representation used the OpenCascade AIS_LengthDimension and AIS_DiameterDimension classes. In order to use this type of AIS objects in the data tree had to implement a new type of interpreter that holds and displays this type of objects.
Friday, November 13, 2009
Bugfixes
Lines can be drawn continuously right now. Lua script with lines do auto-face.
Dimensions
Succeeded to implement some prototype code that represents radius and diameter for a circle and length dimension for a segment.
Tomorrow will implement the dimension tool code to detect what type of geometry is selected and what is the dimension representation appropriate for it (ex: for circle - diameter, for edge - length). As graphical representation will use the OpenCascade interactive classes for dimensions but because they don't look very advanced and configurable probably in the future will implement also some custom graphical representation for dimensions.
Implemented Chamfer, Chamfer 2D
Thursday, November 12, 2009
Editing shapes for remaining shapes
Wednesday, November 11, 2009
Latest new bugs are fixed
Lua created lines right now do autogroup.
Also a small bug on help that do not show on patterns was also addressed.
Data tree improvements
In the last 2 days worked at strengthening the unit tests for the data tree by implementing use cases and data integrity checks. With this occasion found and fixed some of the bugs that were affecting Undo/Redo. The problems were mainly created by the face intersection functionality integration with the data tree. Now the Undo, Redo, Save, Open should work better.
Will continue reviewing the data tree code/architecture. If no major problems found will continue with implementing Dimensions and the Chamfer tool.
Editing for shapes almost done
I will work to fix those issues, a help related issue (that the mapping of help do not work just right) and after this I will continue with work. So today I will just work on polish and bug fixing of just implemented code.
Tuesday, November 10, 2009
Undo, Redo, face intersection fixing
Succeed to find and fix the problem. After fixing it seems that Undo Redo started to work well.
A problem that will be left for the bug fixing week (next week) will be to investigate the Delete crash. It might be related to this problem.
Will continue with improving the unit tests and check if the data tree behaves well when using shape intersections and Undo Redo. If everything is ok will think how to refactor the code and improve the performance. One more day of work will be dedicated to this task, if needed will be extended to 2 days.
Monday, November 9, 2009
Initial work on editing 2D Shapes
But the most natural wanting is to edit them visually. The concept skeleton I am still considering some small changes so hopefully it will work smooth.
Error logging improvements
Updated the unit test codes for the data tree and shape intersection algorithm, reviewed the new face splitter code. Will continue with making unit test cases for data tree that fail and solve bugs at it.
Table made by Lua script
There are created a lot of shapes, there and stressing both 2D and basic operations like Extrude in it.
At the end it creates a table which can be seen here. Also there is a 3D transparent view of it. This was done somehow easier as I could filter the extrudes and setup transparency for make this view.
See bellow and hope you like it:
Sunday, November 8, 2009
Properties dialog for Linear Pattern
Hope it will make easier to edit the linear patterns shapes.
Friday, November 6, 2009
Mirroring and repeat pattern
How it work?
- Pick your shape first
- Pick the point (for Mirror Point) or line (for Mirror Line or Repeat Pattern)
In case of Repeat Pattern you are asked how many times to make a complete (360 degrees, 2*PI) rotations and in how many steps should translate the length of the whole line.
See screenshot for Repeat Pattern of one of the initial rectangles, 1 complete turn and 10 steps. If you simply want translated along with a line (to make stairs without rotation) you will need to put 0 (zero) for complete turns when the dialog will appear.
Thursday, November 5, 2009
Continue work on Mirroring
Right now there is mirroring up-and-running at model level so I will need to create the related visual code. It works against a point and a edge. So expect it to work it soon.
Wednesday, November 4, 2009
Initial work on Mirroring
An annoyance in NaroLinker that it makes you not be able to use too nice your machine was removed: all commands used in build are launched silently.
Why am I so happy that Windows 7 was launched?
The same thing applies to Windows Vista compared with Windows 7. The backslash of public opinion of Vista, was the same backslash that Windows 95 has (it was considered bloated, slow). The improvements of hardware made the new Windows 98 (which in fact was Windows 95 with small updates on UI) to be more positive.
In some extend the same thing happens with Vista: it brings new technology, a bit incompatible with XP "old OS". Was a bit slow for it's start. Do you think anyway that Vista was ever considered a slow release? Or Windows 98, or XP, or any OS from Microsoft? Look in history of more or less independent reviewers that Vista do not perform so bad, if you don't believe me, look here.
The good think is that virtually all programs that run on Vista, run on Windows 7. If you do all upgrades to your Vista machine, you will have installed already .NET 3.5 (the same version as Windows 7 does), the same IE8. In fact NaroCAD never had more problems on Windows 7 than on Vista, and no crash was because was Windows 7.
This launch of Windows 7 will push much more people to leave the beloved XP away, and makes also Vista to be really a great deal. You can buy Vista Home Basic in OEM at really bargain prices. I found a shop (in Spain) that sells it as low as 30 euros (care that we talk about OEM, so you should buy a new hard drive or video card with it at least). This is incomparable with an OEM price of 90 euros of Windows 7 upgrade price (see here). And the good thing is that you get (almost) the same OS (that version do not have included SP1, so I had to wait a bit to apply all upgrades), but as of today all new hardware you buy is Windows Vista compatible.
If Windows7 +1 will be technology compatible with Windows 7, it will just mean that if you can wait another three years and buy at that time Windows7, at a very good price with no big compatibilities issues that Windows 8 will have at their prime time.
Tuesday, November 3, 2009
NaroCAD 1.2 released
There is a lot of new functionality that you needed and right now it is here. It covers all major tool functionality (like pipe, spline, cone, sphere, boolean operations), it got a lot of polish in UI and usability, lua scripting for generating scenes faster etc.
We, the NaroCAD team, really want you to try this new release version and give your mark on it. With your feedback, and who knows, your contributions we can make one of the best free-opensource CAD systems out there. Being written in C#/.NET makes the code easy to understand besides our team's willingness to help in all problems you may have with this codebase.
If you think that a new functionality is still needed, you may join the NaroCAD Feedback sessions or simply report a bug. We value your feedback and hope that you will like this release.
You can download the 1.2 Beta release version from Sourceforge page: http://sourceforge.net/projects/narocad/
Sunday, November 1, 2009
Face splitter refactor and why was done
Splitter in itself was the first shape that creates other shapes, meaning small "pies" over an area that shapes actually intersect.The actual refactor targets just that issue, and gets out the splitter out of tree, as is much more a helper code. By doing this, the splitter will work more or less like the solver component (so as an scene utility). Because splitter required kinda big refactor, was a good reason to also cut out (some) parts of code in smaller pieces. The shapes are created right now in a separate assembly, and is not mixed with property grid assembly one. This will mean for anyone that will look to the code a bit more clear where to find stuff. This code moving does not change functionality more than the splitter related one.
An installer nice thing: NaroCad will use ngen at the end of instalation translating in waiting for around a minute at the end of installing (the biggest thing is to compile wrappers, so using NaroLinker may improve the compiling time), but startup time will simply halve. So you will "feel" NaroCAD as being more responsive when next releases will happen.
Friday, October 30, 2009
Fixes over cut, serializing, and others
We are close with that bugs but we aren't still to do a release. This means that we will want to make it in some days next week, who knows, maybe Monday but also we want that you to not find big crashes or miss of functionality. In fact the functionality that splits faces that gives problems is a huge gain from user point of view to define islands and sections of a shape.
Thursday, October 29, 2009
Magic point improvements
Tuesday, October 27, 2009
Bug fixing
As main directions that remained to be fixed are:
- the Undo Redo still needs fixing,
- the magic points needs improvements so that the solver detects edges and surfaces (improvements are needed especially at curves like arc, surfaces like cylindrical),
- because of the parametric propagation a node that references another node (like Extrude is referring a Rectangle node) is using a hidden node named SubShape node that describes the referenced node. We have to find and implement a guideline to establish when a node that references another node should hide the target. Ex: Extrude when applied on a rectangle should hide the referenced rectangle, when applied on the face of another Extrude should not hide it.
Currently in the bug list there are 12 more bugs and 7 bugs with enhancement priority (the enhancements will be not closed for this beta release). Closed around 49 bugs.
Thursday, October 22, 2009
Code cleanup and bug fix
Also the construction: Dependency.Child(id) is replaced with Dependency[id] everywhere in code. It does the same but the construction is shorter.
At the end there was a bug that applying fillet on two lines will make that the logic of auto-face to not work. Right now the code was made to be specific per shape and permit that fillet lines to be considered as a part of auto-face logic. Also it makes easy to add another shapes as part of auto-face logic (I will try to add arc as the next shape to be considered).
New wrappers for BRepCheck_Analyzer, several fixes
The Hidden On/Off works now. This tool is useful, when the model is displayed as wireframe the user can see how the model looks inside after several operations that affects its structure.
Fixed bugs at Fillet 3D, Fillet2D on wires, fixed exceptions thrown by the parallel line solver algorithm.
Will continue with fixing issues related to magic points on curves, Fillet2d applied on the edges of a Face.
Wednesday, October 21, 2009
Hopefully the last Undo-Redo bug fixed
Undo-Redo have no known bugs for some time. At least not in areas like: computing diff between the previous Undo point and the actual point. Still, because some constructions were able to have some complex cases, like: the dependencies should be deserialized first before the shape itself, a lot of functionality was exposed and sometimes with some very good side effects, but sometimes with unexpected ones.
This last bug was really tricky and it was like this: every time an attribute is changed in the Naro document tree, there is an emit of an notification. This can be very useful to make propagations. Sometimes, this thing is not desirable, in case of Cut Through All operation, some changes may turn as an infinite loop. That makes that some attributes were able to be disabled to be notified. Without knowing, disabling this, makes that another operation to not happen. To be more precise, the diff marking. The Undo operation is implemented to not query the entire tree every time, but only the nodes that emits notifications of changing. By doing this, there is a big performance increase in complex nodes setup.
Based on this, hopefully this more complex Undo/Redo setups are fixed and it gives the status of making Undo-Redo operations more reliable.
Arc fixing, improved face picker
Improved a lot the face picking mechanism: instead of selected faces mechanism now it uses highlighted faces mechanism to detect the face that the mouse is over. Picking a shape with a tool like Extrude that uses the FacePicker is improved. Added also code to change color of the faces that are targeted by the face picker.
Tuesday, October 20, 2009
Fixed Spline and update issues
I will continue to work on bug fixing regarding Undo/Redo and any document related issues.
Monday, October 19, 2009
Continue working on Undo-Redo cycle
Saturday, October 17, 2009
Bug fixing on document/tree data
Thursday, October 15, 2009
Bug fixing
Wednesday, October 14, 2009
Improving open code...
Right now the applying of Undo/Redo or File/Open will do it in case of references to deserialize in advance the references, by this will remove one more assumption and it's following problems. Anyway, there are still bugs there, but I hope to address them today.
Monday, October 12, 2009
Review splitter functionality cause of bug fixing
Bug fixing
Fixed the translation code. Translating from property grid and the translation tool work properly even if applied on models depending on other models. Also at Undo the transformations are applied correctly and the proper object position is restored.
Will continue with improving and fixing the shape intersection algorithm and integration with tools. Will also improve the Cut functionality and fix bugs related to it.
Friday, October 9, 2009
Updated installer
So based on this, if you still have crash on starting Naro, you may use the installer from here: https://sourceforge.net/projects/narocad/
Also, this build is a snapshot of current nightly build, so a lot of small crashes that you've encountered in your past, are fixed. Based on this, this version appears to be the recommended install version for now and a good way to report other errors based on this.
Bug fixing
Working at fixing bugs at the most important tools. Fixed Cut to depth. Fixed some of the propagation errors.
We're starting to get close to a beta release.
Thursday, October 8, 2009
Face splitter and propagation fixes
It happen that because of various refactors, the propagation had an explosion of regenerations when happen a parametric propagation. This was caused that are two entities that store the shape that are equivalent form (the TopoDSInterpreter which stores the OpenCascade shape and NamedShapeInterpreter which stores the OCC View corresponding AIS_Shape). Right now it will happen only one of them, so right now just model notifications are emited for propagation purposes.
IronPython was removed as Lua offer everything that IPy has, only just Lua is better integrated, so there is no point to keep both.
Wednesday, October 7, 2009
Transformations working
By starting with the idea of bxtrx, I've implemented eventually and the transforms are back again working.
Remove internal wires
Tried to implement a remove internal wire/face algorithm.
The DrawTestHarness solution found until now that seems to work well:
circle c1 0 0 0 50
circle c2 0 0 0 25
circle c3 0 0 0 10
fit
mkedge ec1 c1 0 2*pi
mkedge ec2 c2 0 2*pi
mkedge ec3 c3 0 2*pi
wire wc1 ec1
wire wc2 ec2
wire wc3 ec3
mkplane p1 wc1
mkplane p2 wc2
mkplane p3 wc3
bcut result p1 p2
bfuse aux p1 p2
bfuse result aux p3
sprops result
RemoveIntWires t result 7853
donly t
The equivalent wrapper code:
// Calculate the result shape area
var prop = new OCGProp_GProps();
OCBRepGProp.SurfaceProperties(finalShape, prop);
var mass = prop.Mass();
// Remove internal area on the resulted shape
OCShapeUpgrade_RemoveInternalWires shapeUpgrade = new OCShapeUpgrade_RemoveInternalWires(finalShape);
shapeUpgrade.MinArea(mass);
shapeUpgrade.RemoveFaceMode(true);
shapeUpgrade.Perform();
if (shapeUpgrade.Status(OCShapeExtend_Status.ShapeExtend_DONE1) ||
shapeUpgrade.Status(OCShapeExtend_Status.ShapeExtend_DONE2))
{
// If operation succeeded replace the result shape with
// the one with no internal wires
finalShape = shapeUpgrade.GetResult();
}
The wrapper code doesn't work for the moment, it generates the same shape as the original one. Will move to solve higher priority bugs and come back at this algorithm soon.
Tuesday, October 6, 2009
Bug looking
Today I've clean up a big file at least removing the calls to command line that are no longer used.
Extrude tool improvement
Worked at improving the Face intersection algorithm and its integration with other tools. Refactored Extrude and added better integration with shape intersection, extruded Faces that are not intersected with other Faces are removed from the intersection candidate list.
Still thinking how to handle the situation when some shapes are intersected and one of the intersection results is extruded, currently all shapes remain in the scene nothing is hidden.
Saturday, October 3, 2009
Updated installer to 1.2PRE2
The issue was that the 1.2 uses Tcl/Tk libraries and they were added to installer. Anyone who has installed OpenCascade was able to run NaroCAD 1.2PRE without problems, but for the rest of users, it was a startup crash, hopefully it will not happen.
Take the 1.2PRE2 release from Sourceforge: https://sourceforge.net/projects/narocad/
I will work after this to fix the transformation issues and with your feedback we will make NaroCAD 1.2 to rock!
Friday, October 2, 2009
Installer issues in 1.2PRE
Just if you will want to use 1.2PRE installer and you don't have installed OpenCascade, please download it from here: http://www.opencascade.org/getocc/download/ (registration required). If supposedly it still do not start with your machine, you may need to download Visual C++ Runtime 2008 SP1.
NaroCAD installer comes with a mini distribution of OpenCascade, but seems that adding extra code features to current codebase may increased the dependencies and make it to not be enough what is bundled.
I still work on this issue and I really hope to be solved tomorrow.
Thursday, October 1, 2009
Shape intersection improvements
Bug fixing
Tuesday, September 29, 2009
Bug fixing part V
So today I've get the bxtrx work a bit forward as he shows the problem. The problem is about propagating transformations. In fact the transforms did not propagate, only the shape creation. This makes odd effects like applying Undo and then Redo to appear as shapes do translate randomly or even break. Devasted helped me with his advices on transformation work and review the changes done, so hope to behave right.
The first part of the day I've did fix a developer debug tool which exposes in a clean way all NaroCAD document tree. Hopefully will simplify some cases of visual hints do not help.
Bug fixing
Enabled all the functionality implemented until now and will continue fixing bugs and make all tools working properly.
Monday, September 28, 2009
Rendering with Sunflow
Some shapes are not drawed right, but I don't know if is NaroCAD bug, OCC triangularization bug or Sunflow bug.
I've picked rendering because there were some requests of make printing in NaroCAD, and as there is not such a large work in that, the pursposed solution was to capture the OpenGL screen and to save it to file (or to print it). It may sound handy but it will not guarantee a lot of issues, the biggest for me was that it should be just hacky to take OpenGL surface and render it to a file, it should mean at least to hack OpenCascade code.
The choices I've had so far for rendering were Sunflow, PovRay and Yafray. The Povray is huge, making to add a huge bargain to installer, Yafray is nice but I found it hard to use (from command line and to integrate it) and Sunflow was the balance between two: it was the smallest of three (it use 1M), but requires Java, which is one of the most downloaded runtimes over the internet. Also sunflow have a very easy material (named shader) setup. So the rendering goes as this: you pick the shape, you pick the shader, and you will get all at once.
I think that are still bugs, in those dialogs, but is a fully working concept. Also I've not found a proper way to pick FOV (Field of View) from OCC view. If you will find a proper way to get it, please send it via email, and I will fix it to get it right away.
Sunday, September 27, 2009
Shape intersection
Currently the intersection algorithm is disabled on NaroCad until an Extrusion bug is fixed (Extrude sometimes picks a different intersection shape than the desire one). Also the display of the structure in the tree view needs some improvements to give access to the user to the initial shapes that generated the intersected shape. Planning to finish working at this algorithm into one more day of work and in parallel to add also wrappers for the Meshing algorithms.
Interesting that after trying at least 10-20 OpenCascade algorithms/solutions for intersecting/breaking/healing/combining wires, edges, faces, shapes, shape analysis, shape upgrade, closed area detection, closer wire extraction the only solution that worked in all cases for making a Face intersection algorithm was extremely simple: fuse all shapes and explore the resulting faces. Also Face colliding detection was made by using BRepAlgoAPI_Common algorithm and see if Face exploring iterator holds anything. The problem with these solutions is that they are not the fastest, the advantage is that they work well and cover most usage cases.