Friday, October 30, 2009

Fixes over cut, serializing, and others

We want to release soon 1.2 and was expected to be done this week but some (blocker) bugs makes us to rethink our position. By blocker we mean that over some complexity the Cut goes to recursive infinite call, also it does mean that some undo/redo work was completely wrong. Those two days was a complete team work by targeting those hard issues.

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

Added points on edge detection as magic points and also reimplemented the parallelism detection. Fixed the bugs and crashes at magic points and added more magic points at cone and cylinder. Some screenshots:

Diagonal detection:

Point on a position that continues an edge:

Point on edge detection:

Tuesday, October 27, 2009

Bug fixing

Continued fixing bugs 4-8 bugs a day. Fixed bugs related to Fillet2D, Fillet 3D, Property Grid, Tree View, Ellipse crash, Cut, shape intersection algorithm.

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

In the previous day was pointed out a bug that was because of wrong marking nodes. This code was mainly used when it was wanted that a shape to be hidden. Right now there is a Hide function that simplify the code of setting up a shape to invisible. Also this code was applied everywhere so it remove in other shapes some hiding bugs.

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

Wrapped and compiled the BRepCheck_Analyzer package. This package contains tools for checking the validity of a shape. Added this functionality to the MakeFace function that now checks if the generated faces are valid. This solves some of the bugs related to wire grouping as a Face and also at the AutoGroup functionality.

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

Fixed related to Arc made from Radius Start End. Made also code refactoring at Arc.

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

There are fixed bugs regarding spline usage (creating invalid splines were able to crash Naro as it was try to make autogroup with them. Also a small update issue on deleted shapes. Both right now are fixed. Also I've reviewed the bugs regarding internal model of deleting.

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

Cris pointed out a problem that some faces remain not deleted still, even I thought that was fixed. The cause was that the removal of shapes is done automatically by NaroCAD as long as there is no consistency breakup. It happen that FaceSplitter keeps references to face shapes and their deletion was erroneous (they remains hidden but leaky) so right now is fixed. I look along for other associated issues.

Saturday, October 17, 2009

Bug fixing on document/tree data

I was looking to solve all bugs related with loading/undo-redo cycle. There is only onle harder bug in this category and I hope to find why is happening (the situation that an undo step will override some values out of the undo changes, the worst of this bug is not to find what was doing it, but I think at least in future, the fix should enforce that an undo operation to not change anything that Undo step states). For now I've fixed a bug that deleting a shape was not removed internally, but was just hidden from the user eye point of view, which breaks the face splitter. Based on design, the face spliiter being a part of the tree, on the actual code, was removed too at some specific operations (like save/open). Right now Face Splitter and some other future shapes that may need to not be deleted if they are invisible (like constraints!?), they may get by design this extra attribute and to not break the delete code.

Thursday, October 15, 2009

Bug fixing

Fixed and closed around 15 bugs related to Cut and 2D shape drawing. Will continue fixing bugs at all tools. Around 40-50 more bugs to solve until a beta release version can be made.

Wednesday, October 14, 2009

Improving open code...

Old open code have been making some assumption like: shapes can refer other shapes (for example Extrude) that have a lower index of creation. This works fairly right if we don't count Face-Splitter. Face splitter by default is setup as being node with index 0.

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

Splitter face code have some documents related problems. I've considered a refactor but for now there are many dependencies involved and I'm not completely sure if this is the way to go. I will have to decide with bxtrx if is right or not. This refactor should reduce the dependencies between the splitter and the document. Based at least on the skills gained today about how works the splitter implementation, will simplify for me the debugging experience for tomorrow when the refactor may introduce new bugs.

Bug fixing

Today fixed the arc exceptions, improved the solver parallelism detection algorithm.
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

Based on bxtrx's bug fix, the installer should work on all machines that were still crashing. The issue was that Scintilla lexer was not added by default and the users that do have installed other applications, for example TurtoiseSVN, will not encounter any problem, as Scintilla was installed with that.

So based on this, if you still have crash on starting Naro, you may use the installer from here:

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

Found and fixed the problem at the installer that it was failing on some systems.
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

I've did debugging and removed all crashes found by me regarding face splitter. It still do not work completely right in File->Open case, but at least it removes the crases. Also, in case of crashes it does not give a huge messagebox meaningless error, but it will only fail this part of the document. This is grat mostly in case that are serialization bugs that happen when creating/applying an undo/redo operation.

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

Transformations were bad implemented in the idea that some objects override the base objects that they were based on. By this, only applying Undo/Redo or a simple(r) extrude makes everything to be moved to origin or to other point.

By starting with the idea of bxtrx, I've implemented eventually and the transforms are back again working.

Remove internal wires

The functionality of the MakeFace tool is that it groups wires into faces (it is also used by the AutoGroup algorithm) and I also added the functionality that it groups several faces (selected with shift+click) into a bigger face to allow extruding them in one shot. In order to extrude the generated face a problem is to cleanup the internal wires and faces.
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
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);

if (shapeUpgrade.Status(OCShapeExtend_Status.ShapeExtend_DONE1) ||
// 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

The last two days I've mostly have no progress, probably because I've felt not so good. I've starting to track why is used TCL, no reason so far, after this I continue to look on found bugs and the single fix I've done in this days was a one liner, but what was the strange of that patch, was that the original code should work in its original form.

Today I've clean up a big file at least removing the calls to command line that are no longer used.

Extrude tool improvement

Continued fixing tools for the beta release that we plan to make this week.

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

NaroCAD installer was updated to use the missing dependencies. This IS NOT THE FINAL 1.2 RELEASE, but for most users that could not start NaroCAD, they can do it right away (of course they may be hit by another bugs).

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:

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

The most frequent bug report was that NaroCAD crash at startup. The reason is that it did not find OpenCascade. From scratch I've thought that is not happening, but it seem that it does.

Just if you will want to use 1.2PRE installer and you don't have installed OpenCascade, please download it from here: (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

Still working at fixing and improving the application usage use case. The shape intersection algorithm integrates well with Extrude so that after an intersection shape is extruded if more shapes are added to the intersection the initial Extrude is not affected and refers the same base shape. Will continue testing its integration with Cut, also planning to hide the shapes on which a Feature like Extrude is applied. The Face Generation/Groping and Ungrouping will also be checked to see if it works well and then move to Fillet2D.

Bug fixing

It seem that the transformation refactor gives a lot of regressions, so I did tried to refactor. Still I jump in others problems so I will need to rethink and fix my code for now. I will continue on transform issues.