Sunday, November 30, 2008

Did you notice?

I liked NaroCAD project. It is flexible but have some misses. I tried to make some changes in it's code and I've start with simpler things.

I had working to add a line and a circle tool in sketcher. The line was pretty easy because I've started from the rectangle. Anywhere I've see the word: rectangle, I put line and adapting the code. The things go easier as much as I've did that.

I continue with circle. The circle seems harder so I did it as much as I could and at the end I went blocked. But seems fixed from the main developer of Naro (btrx).

Another small touches were: a splash screen which was fun to be done and I hopethat I will add from time to time things like that :)

I think that some things can be done, mostly on UI side like making an toolbar editor. If you like the CAD coding and you know a bit of OpenCascade there are a lot of places you can help. I will try to add in the third iteration the middle point highlight and touching the UI bits.

Friday, November 28, 2008

Closed Iteration 2 ( application version 0.0.2)

Closed Iteration 2 (application version 0.0.2) started the Iteration 3 (application version 0.0.3). On Iteration 2 succeeded to deliver more than estimated, it went well.

Updated the documentation. Made a User Manual that shows how to use the NaroCAD features, the file is in the NaroCAD project folder.
Finished implementing the Circle drawing at the Sketcher. Worked at implementing the Cut feature with Ocaf, made the code but it doesn't work properly and didn't upload it completely on SVN. Moved the task to be finished in Iteration 3, I need to think more on this task because the Cut through all shapes alters all the data hierarchy not only one shape.

Prepared the tasks for the Iteration 3.
Updated the Project Roadmap.
The User Manual.

Thursday, November 27, 2008

Finished Extrude, Fillet with Ocaf

Investigated and solved strange behavior and crashes at Extrude and Fillet implemented with Ocaf, both features worked well before, the same algorithms were used.

The improvements added:
- improved the code for detecting shape selection in neutral point/local context,
- found and solved a flaw on the Extrude/Fillet algorithm with Ocaf: the Extrude/Fillet was applied on the selected object located in the data tree, the problem was that when only a face of a shape was selected the face couldn't be found in the data tree (where stored shapes are not decomposed). Solved the problem by creating a hidden Ocaf shape with that face and use that shape as reference for the Extrude,
- fixed the code so that the Extrude and Fillet implemented with Ocaf works properly together with the Cut feature not implemented with Ocaf.

Cleaned the code and uploaded everything on SVN. The functionality (excepting the Cut feature) now supports Undo/Redo and is prepared for parametric modeling. The objects when selected are also selected in the tree view list.

Will continue with preparations to close the 0.0.2 iteration in the following order: make documentation, see if the drawing Circle functionality is finished and if not finish it, implement Cut with Ocaf, implement the functionality that when a shape is selected in the tree view the visual object is selected.

Wednesday, November 26, 2008

Extrude, Fillet with Ocaf

Added Extrude and Fillet operations to the Ocaf data tree. It works properly to Undo/Redo the operations on the data structure. Moved the code for these operations to the OcafDirvers package.

Remained to implement the Cut feature with Ocaf. This looks a little more complex because at the current implementation the Cut is made through all the shapes, theoretically it may modify all the data from the data tree not only one shape as it happened until now for the other operations.

The source code is not yet uploaded on SVN because the Cut feature on visual objects doesn't work properly together with the two other features implemented with Ocaf.

TreeMenu selection

Implemented a mechanism that detects in the data tree the object that is currently selected in the window. Added also code to select in the TreeView the data corresponding to the selected object. This will be used for operations like Extrude, Cut to detect on what data the transformation takes place.

The object detection is made like the following: the selected shape is extracted from the InteractiveObject, the OCAF tree structure is traversed looking for OCTNaming_NamedShape attributes from which extract the shape, compare the shapes using the IsSame() method to see if they are identical. Will implement also the reversed process: detect the InteractiveObject that represents the selected data from the tree.

Monday, November 24, 2008

Undo/Redo with OCAF

Implemented the Undo/Redo mechanism for simple shapes drawn like rectangle.
Studied the new OCAF concept added in the OpenCascade 6.3.0, the TObj model. This implements over the raw OCAF layer a more abstract layer closer to the business layer and more appropriate for an object oriented application. The concept looks very good, would save a lot of work but the lack of samples and explanations would probably lead to a lot of research work to understand it.

Decided to work on the OCAF task as the following:
- finish implementing the Extrude, Cut, Fillet with the standard OCAF layer (make them undoable and storable) as planned for the iteration getting a better understanding of this mechanism,
- meanwhile think at the TObj model and see how this can be used to make the OCAF usage simpler.

Sunday, November 23, 2008

OCAF data model

Finished studying in detail the OCAF documentation from the OpenCascade library. Decided that will use for the data model standard attributes having for each object a label having as child labels containing the attributes of the object. The current data structure of Naro was built on this model, the structure will remain unchanged.

Will continue with implementing an Extrude operation registration with OCAF.

Thursday, November 20, 2008

Status report November 20

Started working at registering with OCAF the shape transformation operations fact that will allow undoing shape transformations. Studied in higher detail the OCAF source files.

Wednesday, November 19, 2008

Status report November 19

Succeeded to implement the Cut feature. I made a screenshot with a complex shape drawn with Naro using Extrude, Cut and Fillet.

Will continue with the tasks allocated for the current iteration:
- add the shape modification to the OCAF data tree,
- add functionality improvements: it would be helpful when Sketching on a surface to center the Sketcher on the selected shape and maybe also to display in the Sketcher the face to draw on, add also minor improvements at the existing functionality, refactor the code.

Status report November 18

Implemented the Cut feature, nothing crashes but it seems to work incorrectly, when an Extruded solid is cut it only remains the base face cut from it. I will continue playing one more day with the functionality, there are big chances to finish it.

Monday, November 17, 2008

Status report November 17

Implemented an Fillet feature ported from the old code. Started implementing the Cut/Remove feature.

Friday, November 14, 2008

Status report November 14 (2)

Solved the resizing problem, now the drawing window can be resized.
Implemented the Extrusion on a selected surface from a solid. Verified the project to compile and run under Visual Studio Express.

Made a project roadmap page.
Established the tasks for the Release 0.0.2. List will be updated with more tasks if there will be enough time to make them.

Status report November 14

Installed on a Virtual Machine with nothing on it an OpenCascade 6.3.0 and a Visual Studio Express 2008. Updated the NaroCAD project to compile properly with VSExpress. Added on the .sln folder two .txt files: one describing hot to build the project with VSExpress2008 the other how to debug the project using WinDbg. Now the project should compile with no problems with Visual Studio Expresss 2008. There should be no problems compiling with Sharp Develop, will have to verify that.

Made a new folder /trunk/docs/ where uploaded an ProjectDescription document (for OpenOffice .odt and also .pdf format). The document contains explanations covering elements that should be understood when working at the project. The document doesn't explain the SCSF concepts.

Will continue until the end of the day adding small improvements at the application:

- currently it is possible to select a face, draw on it and extrude the shape. I will work at adding some code to allow extruding a selected face,
- it is needed to implement the resize, the drawing controls should resize when the parent window resizes,
- update the Sourceforge task list and make a roadmap,
- add other minor improvements.

Thursday, November 13, 2008

Status report November 13

Made the first draft of a document explaining the project structure and functionality. Will review it and probably put it as pdf or OpenOffice document in the project folder.

Started building a release version of wrappers. I am thinking to make some installer that puts the wrappers assembly and prerequisites for the users that don't want to compile the wrappers project and want to use only the NaroCad project.

Wednesday, November 12, 2008

Status report November 12

Finally succeeded, after a full day of trying and modifying, to draw on the selected plane. The solution is quite cumbersome, the good point is that it seems to work well. Drawing a shape can be made also on the faces of an extruded shape.

Will continue with making some documentation on the project architecture, task that should take about half a day. Will made also minor improvements to finish the 0.0.1 release by the end of the weekend.

Thursday, November 6, 2008

Status report November 6

Succeeded to make an extrude on a user drawn shape.

At this moment all the functionality proposed for version 0.0.1 is implemented. Will continue now finalizing the code: cleanup on the code, finalize the improvements at current functionality, make documentation, make project roadmap. The remaining tasks are displayed on Sourceforge.

Wednesday, November 5, 2008

Status report November 5

Succeeded to make one small step forward: could make an extrude on a shape built from code. Will continue with implementing code that extrudes a selected shape.

Tuesday, November 4, 2008

Status report November 4

After rebuilding OpenCascade and Wrappers on debug mode succeeded to configure WinDbg to debug native source code. Found the reason of the crash at the MakePrism function: from the shapes passed as parameters one of them is of type Shell and the other Solid and the FUSE operation fails on these two types of shapes. Solved this problem, the code doesn't crash but nothing is displayed. Will continue investigating this problem.

Status report November 3

Worked at solving the Extrude error that appears at the application: recompiled Open Cascade in debug mode and also the wrappers and tried different debugging methods to access the native code from OpenCascade that crashes in order to understand the reason that causes the crash. Didn't succeed to find the problem. Will continue working at solving this issue and also will start making some documentation.

Saturday, November 1, 2008

Status report October 31

Finished packaging two more modules from OpenCascade that contain functionality needed for 3D modeling. Compiled the new packages and finished implementing the Extrude functionality into Naro. The code compiles properly but it crashes at runtime. Solving this issue can take from one hour to 1-2 days.