Tuesday, December 30, 2008
GUI
Succeeded to remake the GUI of NaroCad with flexible layout, property grid and tree list view. Remaking the layout was problematic because of the WeifenLuo controls that need to be used as forms with dock parameter passed, the SCSF architecture concept works with user controls.
The application is still unstable, crashes during usage. Will work today and tomorrow at making it work properly.
Thursday, December 18, 2008
GUI work
Tomorrow will work at making the existent code to use these new controls, to populate the grid, render open cascade content on the windows. Will also work at closing the iteration 0.0.4.
Tuesday, December 16, 2008
GUI remake
Played with the latest version of Google Sketchup and looked also at Rhino to see how they organized their workspace and what are the helpers used when using the application.
Finished the projection
Finished implementing the projection of the 3D object in the 2D plane where the Sketcher draws. It needs enhancements like projecting all the objects from the space.
Will continue with adding the layout control and the object property control. Task estimated to take 2-3 days. On the layout will be added also a command line window where some command usage helper can be introduced.
Monday, December 15, 2008
New wrapper update
Implemented at Naro the projection code, obtained the projection TopoDS_Shape on the drawing plane, now looking for a way to represent TopoDS_Shapes as AIS2D_InteractiveObjects.
Friday, December 12, 2008
Wrapper update, made some fixes
Uploaded also the new modules wrapped but didn't include them in the wrapper release. Next week will make some hardware upgrade and will try to make a new release that includes the new wrappers.
Today will work at finishing the projection implementation and also start working at the GUI changes. Probably will not close the iteration today (Friday), will close it on Sunday trying to finish these 2 tasks.
Tuesday, December 9, 2008
Still working at wrappers
After finishing this task this will start integrating the layout control and a property grid control into the project and try to finish this GUI improvement on the current iteration.
Friday, December 5, 2008
Compiled the new wrappers
Thursday, December 4, 2008
Package wrapping
Now working at compiling the new wrapper by adjusting the generated code, task estimated to take at least 2-4 hours.
Projection (2)
Tuesday, December 2, 2008
Projection
After that will continue with adding wrappers for step and iges, task estimated to take 1 day and start remaking the GUI.
Sunday, November 30, 2008
Did you notice?
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)
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
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
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
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
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
Will continue with implementing an Extrude operation registration with OCAF.
Thursday, November 20, 2008
Status report November 20
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
Monday, November 17, 2008
Status report November 17
Friday, November 14, 2008
Status report November 14 (2)
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
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
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
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
Saturday, November 1, 2008
Status report October 31
Thursday, October 30, 2008
Status report October 30
One more problem appeared: In order to make an Extrude I need to use the BRepFeat_MakePrism class that is located in a package that is not wrapped. I will continue with wrapping this package and hopefully this will the last step on building the extruded shape. The BRepFeat package is important it contains many useful functions for 3D modeling, it has to be wrapped anyway. This task is estimated to take one day of work.
Wednesday, October 29, 2008
Status report October 29
Tuesday, October 28, 2008
Status report October 27
Sunday, October 26, 2008
Status report October 26 (2)
Status report October 26
if I read the currently selected object: OCAIS_InteractiveObject selectedInteractive = context.Current();
and try to get the underlying shape of the interactive object: OCAIS_Shape shape = selectedInteractive as OCAIS_Shape;
the cast fails even if the OCAIS_Shape class is derived from the OCAIS_InteractiveObject class. Need to investigate further how this cast works at the internal native handle and maybe also implement a DownCast method (or some equivalent) that exists at the OpenCascade header level.
Started adding on Sourceforge bugs at the Wrapper category.
Saturday, October 25, 2008
Status report October 25
Thursday, October 23, 2008
Status report October 23 (2)
Worked at implementing the Extrude feature. Added code in the application to draw only objects from the Ocaf tree. Also made some code to detect the selected object. Will connect this code with a Dictionary that connects the shapes with the TreeNodes in order to select both of them when one of them is selected.
Added also some code to draw Planes and a Trihedron to be used as drawing helpers.
Still have the problem that the drawn Ocaf shapes are not selectable by mouse. Will continue working at this issue.
Wednesday, October 22, 2008
Status report October 22
Added a tree list control on the modeling module that is registered at application startup. I could represent some of the data elements in the tree view. The algorithm needs some improvements to show user friendly info. Will finish this code and use it in the application, it is useful to monitor what happens with the data tree during the application usage.
Tuesday, October 21, 2008
Status report October 21
Finally succeeded to implement a rectangle drawing operation with the Sketcher that adds the shape drawn to the Ocaf data tree and when changing back to the 3d view the shape is drawn from the Ocaf tree.
Implemented also the message display service that will be used in the application when messages will be displayed to the user.
Will continue with the tasks remained to make for the 0.0.1 release. The biggest problem that remained to be solved is the "Extrude" feature that raises the 2D shape into a 3D model.
An estimation of the tasks from Sourceforge remained to make for the 0.0.1 release is:
- add an Extrude feature to the application, task estimated to take 16 hours,
- make an architecture explanation document, estimated to take 3 hours,
- finish the toolbar layout improvement, 2 hours,
- more tuning is needed for the application Gui/functionality - the open cascade drawing windows don't fit exactly in the windows form, the resizing doesn't work properly, task estimated to take 1 day of work,
- make the architecture explanations document 2 - 3 hours.
As a low priority tasks that would be nice to make:
- on the Sketcher window make the projection of the 3D solid to show the user where is the sketching plane located, estimated to take 3-6 hours (this task will be probably left out),
- display the Ocaf tree on the left side of the wiew, estimate to take 2 - 4 hours.
The risks that might delay the tasks:
- the extrude feature was never used until now, there might appear wrapper problems, it can cause delays of 1-3 days.
In order to finish all these tasks 4 more days of work are needed. It seems until now that the initial estimation accuracy was half the time the real implementation needed.
Saturday, October 18, 2008
Status report October 17-18
One more problem found: in order to display the data added in the Ocaf tree there is an TPrsStd_AISPresenter that works only for 3D contexts and I would like to use it also for 2D contexts to display AIS2D_InteractiveObjects. I will have to implement some code to duplicate that functionality. Task estimated to take 2-3 hours, hoping to appear no other problems on this.
Thursday, October 16, 2008
Status report October 16
Wednesday, October 15, 2008
Status report October 15
Started adding the Ocaf content at the application: implemented an Ocaf application class on the Ocaf module stored the application in the common context, added code to create an Ocaf document for each modeling started, the document and the Root label are stored in a local context. Started implementing the Ocaf functionality at drawing.
An estimation of the tasks from Sourceforge remained to make for the 0.0.1 release is:
- finish adding OCAF content, task 50% made, remained to work about 4 more hours to finish it,
- add an message display mechanism, estimated to take 1-2 hours,
- refine the Sketcher functionality, integrate Ocaf into it and make transitions with the 3d window, estimated to take about 6 - 8 hours,
- add an extrude feature to the application, task estimated to take 16 hours,
- make an architecture explanation document, estimated to take 3 hours,
- finish the toolbar layout improvement, 1 hour,
As a low priority tasks that would be nice to make:
- on the Sketcher window make the projection of the 3D solid to show the user where is the sketching plane located, estimated to take 2-4 hours,
- display the Ocaf tree on the left side of the wiew, estimate to take 2 - 3 hours.
The risks that might delay the tasks:
- the extrude feature was never used until now, there might appear wrapper problems, it can cause delays of 1-3 days,
- integrating Ocaf problems might introduce 1 day delay.
It seems that in order to finish all these tasks there are needed 4-5 working days. A realistic deadline might be set for Tuesday October 21.
Tuesday, October 14, 2008
Status report October 14 (2)
The problem explanation is the following:
- because the C++/CLI wrapper dll is built using some CRT components it needs to have the vcredist installed on the system. The version uploaded on SVN is built with VisualStudio2005 SP1 and needs vcredist 2005 SP1. Will think if the wrappers should be compiled with VS2005 or 2008 and will prepare a Release version to be distributed,
- it seems that there are different redists for VS2005 and VS2005 SP1, so the proper vcredist version needs to be installed,
- currently the project is linked against the debug version of the wrappers assembly, this will not work on systems with no VS2005 because the debug version of the CRT is not distributed with vcredist. To make it work replace the debug dll with an release dll.
Status report October 14
Finally suceeded to make the new workflow function properly. When a Sketched or a 3d surface is enabled the Toolbars are changed automatically, when working in two windows and changing between the windows the Toolbars also change. The import works properly, the shape is inserted in the active window. There is some problem with the Toolbars that their position changes when showing and hiding other toolbars and the layout looks strange. This will be fixed.
From this point I will continue making the tasks proposed for the revision 0.0.1 and also reevaluate the time needed to finish it.
Monday, October 13, 2008
Status report October 12
A lot of tasks remained to be finished: integrate the OCAF functionality, finish the toolbar display when changing the views, add the extrude feature, polish all the added functionality.
It is obvious that I will not succeed releasing on Monday 13th. At the end of Monday will reevaluate the tasks remained to be done and make an estimation of the schedule slip. Probably the delay will be around two days.
Saturday, October 11, 2008
Status report October 11
Friday, October 10, 2008
Status report October 10
It will be difficult to finish in time the 0.0.1 release but will try to keep the schedule.
Thursday, October 9, 2008
Status report October 9
From tomorrow will continue finishing the tasks for the Release 0.0.1 planned for Monday.
Wednesday, October 8, 2008
Status report October 8
Started making a module that contains a child WorkItem that will contain and manage a 2D and 3D WorkItems. This will be useful for keeping common data for the two use cases and will simplify having multiple operations in the same time (like drawing two Parts in the same time each in its own window). Task estimated to be finished tomorrow.
Tuesday, October 7, 2008
Status report October 7
Started working at improving the toolbar display, implemented a service at the application that shows and hides Toolbars. Will use this to show and hide only the Toolbars used in the active view. To finish this task around 2 more hours are needed.
The task list made for the Release 0.0.1 is posted on Sourceforge.
Monday, October 6, 2008
Status report October 6
Moved the code from trunk to branch and moved the latest code made wit SCSF on trunk.
Verified that the trunk builds properly and also updated references. Will continue with making the project more stable and compatible with Visual Studio Express and Sharp Develop.
Made updates on the wrappers, solved some errors on passing parameters by reference from wrappers to the native code. Tomorrow will build a new version of wrappers and upload them on SVN.
Started making on Sourceforge a list of tasks to be made until Monday October 13 when planning to finish the Release 0.0.1. That version should allow drawing with the Sketcher a rectangle on a 2D plane (selected on the face of an object) and raise the rectangle in the 3D space to build a solid object (apply an extrude feature), the operations should be made with OCAF and will be undoable. Hope to have no problems with the wrappers on applying an extrude, this feature is untested until now.
Friday, October 3, 2008
Status report October 3
Started uploading on SVN the latest wrappers, by tomorrow everything should be uploaded. Started uploading also the compiled dlls. Ported all the source codes (including the Naro from trunk) on OpenCascade 6.3.0 wrappers.
Ported the Sketcher module, added the code that registers dynamically the Sketcher in the menu and makes the toolbars, implemented half of the Sketcher commands. Remained to implement the mouse events, the rectangle 2D commands and make code cleanup.
Tomorrow will work at finishing the Sketcher and make a code cleanup. Over the weekend will establish the remaining tasks to make the 0.0.1 release. Will see if the release can be scheduled for the end of next week.
Thursday, October 2, 2008
Status report October 2
Tomorrow will update the tasks on Sourceforge and reschedule the deadlines. Estimate to finish porting the 2D drawing code on 2 days. Will continue with the tasks established last week. While porting, if new issues will be found will also update the wrappers.
Wednesday, October 1, 2008
Status report October 1
The previously C# Naro from trunk crashes after porting because it contains OCAF code. Found and solved the problem at OCAF wrappers and started recompiling the wrappers.
Tomorrow will continue with rebuilding the wrappers and finish porting the previous version of Naro from trunk. This task should take half a day. When this task is finished will continue with the tasks scheduled last week.
The problem at OCAF was caused by some pure virtual functions from native code that are designed to be implemented by the user, functions that are used internally. In order to duplicate this functionality at the wrappers I had to implement some code that forwards the native function calls into the managed wrappers equivalent functions using function pointers connected to managed delegates.
Tuesday, September 30, 2008
Status report September 30
Ported the previous version of C++/CLI Naro to OpenCascade 6.3.
Started porting the new version of Naro made with SCSF to the new wrappers. The visualization works properly but the importer crashes, there are some small changes needed at the wrappers.
Tomorrow will work at recompiling the wrappers with the small changes, and finish porting the previous C# Naro application and the current SCSF Naro application. This task should take about half a day. After that will continue with the tasks scheduled last week.
Monday, September 29, 2008
Status report September 29
Tried to generate wrappers also for the new visualization package named NIS but there is a lot of handmade code to be made there so for the moment left the package out of wrapping.
Prepared the code generator, generated the wrapper files and started compiling the generated codes. I think that by tomorrow, if no special problems will arise, the wrappers will be compiled successfully and uploaded on SVN.
Sunday, September 28, 2008
Status report September 27
The result of the analysis:
- at file level, classes signature: from the 14587 there are 454 different files, 501 new files added and removed 64. The code changes are not very big: some char* changed to const car*, some virtual keywords removed, many new data types and handlers added. From the functionality point of view the changes are not so big: some layer management added, some code patches, small changes at the visualization code,
- the documentation is almost unchanged, added small texts about the new functionality: something like added a page of text describing projections,
- the sample code applications are unchanged.
Tomorrow will work at updating the wrappers to support the new OpenCascade version. Task estimated to take 2 days. The update is important because the application is at the point where OCAF will be inserted and the new version of OC claims that there are many improvements added to OCAF.
After finishing this task will continue with the tasks scheduled last week.
Friday, September 26, 2008
Status report September 26
Made a Rectangle 2D class and made also a test OpenCascade solution where created a 2D and a 3D view. On this application will test what happens when OpenCascade 2d/3d views are assigned to the same Form and also will test the 2D drawing functionality. When the code will be ok will add the files into the SCSF NaroCad project.
Studied also the OpenCascade documentation about 2D drawing and analyzed the sample applications to see if the solution implemented previously is ok.
Tomorrow will continue working at porting the Sketcher. The tasks that remained to be made: decide if the current 2D drawing code is properly implemented, implement a rectangle driver that allows storing the rectangle shape into OCAF, port the 2D drawing code to the application, make transitions between the 3D and 2d views.
Thursday, September 25, 2008
Work status September 25
Finished the Load from file functionality.
Implemented the Selection mechanism for selecting vertices, edges, faces and solids.
Started working at porting the Sketcher functionality (2D drawing) together with adding OCAF functionality in the application. All the newly created shapes will be added in the OCAF tree and the operations will support Undo/Redo.
Hope to finish this task in about 2 days. Some of the subtasks of this task are: implement a Rectangle2D class derived from AIS2D_InteractiveObject to be drawn on the screen, implement a rectangle driver that allows storing the rectangle shape into OCAF, port the 2D drawing code to the application, make transitions between the 3D and 2d views.
In parallel with this task will also work at making a roadmap and a release estimation.
The tasks made and under development are posted on Sourceforge. More tasks will be added there.
Wednesday, September 24, 2008
Work status September 24 (2)
Added at the application a new module that imports BREP files. The module automatically adds itself to the File->Import menu.
The files are loaded properly. Will work again at this functionality when the OCAF will be added, at that time the loaded module will have to be added at the root Label to support Undo/Redo.
The source files are still loaded under \branches\newcode\ folder.
Tomorrow will work at finalize the unfinished tasks and also at adding new tasks to be done on the release version 0.0.1.
Progress report September 24 (1)
Finished implementing the object manipulation commands: fit all, dynamic zooming, dynamic panning, global panning, front, top, left, back, right, bottom, axo, dynamic rotation, reset, hidden on, hidden off.
Made a part of zoom window command. Remained to implement drawing a helper rectangle that shows the selected area.
Started on Sourceforge a Release 0.0.1 task. Started adding there small tasks to be finished to have this release version and an estimation and progress for them. These days will finish adding all the tasks and make a final estimation for the 0.0.1 Release version.
Tuesday, September 23, 2008
Progress report September 23
Today implemented the commands that manipulate the model (top, left, right, etc).
Added also the code that splits the working view in 1 to 4 windows, the commands are automatically added to the menu by the loaded module.
Next tasks to be done:
- enable the tree view from the left, estimated to take 1-2 hours,
- add commands and finish existing commands that involve mouse move events and GDI drawing, estimated to take 3-4 hours,
- port the code that loads from file as a module, task estimated to take 2-4 hours,
- make a situation with the tasks to be done and post a project roadmap on Sourceforge and maybe also on the web page, task estimated to take 2-3 hours.
I hope in two days to have everything ported from the previous C# application and start porting the previous code from the C++/CLI original project (the 2D drawing).
Monday, September 22, 2008
Progress report September 22
Continued the work at porting Naro to SCSF.
Today implemented a service that allows modules that load to add their own toolbar with their own commands. At the Modeling module loading added code to create its own toolbar dynamically and it worked.
Implemented also the window redrawing event and the OpenCascade content appeared.
The latest code version is on SVN \branches\newcode\.
Next tasks to be done:
- execute/port the commands generated by the loaded toolbar (zoom, rotate, pan, etc), task estimated to take a few hours,
- enable the tree view from the left, estimated to take 1-2 hours.
Hope to finish some of these tasks today.
When these are finished will continue with adding the load from file module.
Sunday, September 21, 2008
Work progress September 21
Will continue working at the Command infrastructure of the application and implement the redrawing, rotate, zoom, etc commands. Task estimated to take half a day up to a day.
Saturday, September 20, 2008
Work progress September 20
Friday, September 19, 2008
Work progress September 19
Started preparing the Command infrastructure of the application.
Tomorrow will work at finishing these two tasks.
Thursday, September 18, 2008
Work progress September 18
Started working at implementing this module.
Next tasks to be done at implementing the Part module:
- port the 3D modeling view on the right side of the Drawing Part module view, on the left will be loaded a tree view control,
- port the model manipulation functionality (rotate, zoom, etc).
Wednesday, September 17, 2008
Work progress September 17
The next step is to port the 3D drawing code on the Deck workspace, task estimated to take 1-2 days. This will be made a separate module.
Thursday, September 11, 2008
Work progress September 11
The architecture will be like the following:
- the main application contains a Shell and a menu,
- the View Layout module that contains on the Left an IconTabbedWorkspace (containing the tree view) and on Right a DeckWorkspace with the UserControl that can split in 4 views. Different user operations like Drawing a Part, Making an Assembly, Make a Drawing will use a view with this Layout on which they load their custom tabs,
- each set of functionality (like model manipulation or selections) will be packed into a module that registers at loading a toolbar with the functionality that it provides and the menu entries; the main application has access to the UIExtension sites and can show/hide any of the registered toolbars,
- each use case, like Drawing a Part, will start by launching an child ControlledWorkItem that has access to the Application Model (the OCAF tree), at the application context and active view,
- the View will generate loosely coupled events that will be listened by the running child WorkItem or internally by the tree view.
Studied the Tree views that similar applications have. Actually in the tree view they represent the model through the sketches and the features applied to them. Looked how the features are attached to sketches and what happens if a sketch or a feature is deleted.
Will continue with implementing this concept and porting existing code on it.
Wednesday, September 10, 2008
Work progress September 10
Tomorrow will continue working at the layout and at module splitting.
Tuesday, September 9, 2008
Started porting Naro to SCSF
Tomorrow will start coding by splitting the code into modules that load at application startup.
Monday, September 8, 2008
Work progress September 8
The functionality that I plan to achieve in the next two weeks is to have a modular application that allows drawing a 2D shape and raising it on 3D having the possibility to Undo the operations. As an extra feature the drawn object should be visible in a tree view. The modules will be plugged in the application at startup.
The next tasks that I am planning to do are the following:
- include one of these frameworks into the application: modify the application to be split on modules loaded at startup, implement loading a STEP file as the first module/plugin of the application, task that should take 2-3 days using Spring.Net or less with SCSF,
- in parallel make a document describing the application architecture that will be updated weekly and make a page with the application roadmap, task that takes 1-2 days,
- start adding new functionality to the application: review the undo/redo mechanism and implement it properly in the application, port the 2D drawing from the C++/CLI version (task that should take 2-4 days), add an object tree view (task that should take 2-4 days), add a 3D functionality like Extrude to be applied on a 2D shape.
Friday, September 5, 2008
Work progress September 5
Currently I am pretty puzzled not having an idea what decision to take on which framework to use or how to combine them to obtain the functionality needed.
Will study more on Internet about use cases with these frameworks and hope to have a clear image/point about what path to follow until the end of the weekend.
The possibilities that I see now (not having a deep understanding of the frameworks) are:
- SCSF that offers much of the functionality needed but limits the usage on Windows, the advantage is also that I have some knowledge about it,
- Spring.Net with Spring.Net RichClient that might have the functionality needed, at a first view it seems to cover the application needs, don't know yet how well it supports Windows-based applications,
- a combination like Windsor container for Dependency Injection and something like Mono.AddIn for extending it or StructureMap to implementh both DI and plugins. At the first look these doesn't seem to deliver the functionality delivered by SCSF.
On the other hand I would like to hurry implementing OpenCascade functionality that probably will create the biggest problems in application development.
Hope to have a more clear idea at the end of the weekend.
Work progress September 4
Read blogs to see user experiences with some of the application frameworks.
Thursday, September 4, 2008
Work progress September 3
Looked at Windsor Container sample codes and made a quick review on StructureMap. The Plugin and Pluggable attributes/concepts from the later look interesting.
Will continue with looking at StructureMap and at Spring.Net.
Tuesday, September 2, 2008
Work progress September 2 (2)
Not found yet a software factory offering similar functionality as SCSF.
Work progress September 2
Because of the license restrictions from SCSF started searching for alternative software factories that might provide similar functionality. The main functionality needs are: enable modular architecture, dependency injection, oriented towards testability and plugability. The Windsor Container probably will be chosen. Also parts from Caliburn might be useful. They don't offer that much functionality like the one provided by SCSF but they are of great help.
The tasks that will be made:
- spend two days evaluating/learning Windsor and Caliburn also think how much it would take to implement an EventBroker like and Command mechanism, search for other alternatves,
- decide for a solution and make an estimate/roadmap.
Friday, August 22, 2008
Work progress 22 August
Didn't succeed to write a document about these but I understood the concepts and I am ready to start working on coding and documenting.
Thursday, August 21, 2008
Work progress 21 August
Wednesday, August 20, 2008
Work progress 20 August
Worked at the application architecture. Studied more about the SCSF concepts. Tomorrow should start working at the application architecture document.
Monday, August 18, 2008
Work progress 18 August
Studied the SCSF concepts like WorkItem, Shell, Workspace, UIExtensionSite, Command, DependencyInjection, ObjectBuilder, SmartPart. The concepts are exceptional, I will apply them at Naro.
Will continue working in parallel on two directions:
- work at the application architecture and make a concept document, task estimated to take 2-3 days, also will look for other equivalent open source/free software factories,
- continue with adding more documents on the current code and code cleanup: add a document describing the wrapper architecture, make a document on the application architecture, cleanup and refactor code, task estimated to take 2-3 days in parallel with the architecture work.
Between these tasks will also do some research on the OCAF document saving functionality.
Friday, August 15, 2008
Work progress 15 August
Started working also at some document that specifies how to solve compiling errors that might appear when wrapping files.
Added code at Naro to load files and succeeded to load STEP files into it. It seems that the wrappers worked correctly, no crashes.
Continued working at the saving with OCAF feature. This doesn't work yet.
Will continue working at finishing the file saving feature and also cleanup the new functions from NaroCad to upload the code, task estimated to take one more day. Will also work at the application architecture design.
Thursday, August 14, 2008
Work progress 14 August
Tomorrow will work at finishing these tasks and also work at the application architecture structure. I would like to use a framework like SCSF from Microsoft or at least the Windsor Container to create a loosely coupled architecture. Will study to see if these can be used in an open source project.
Wednesday, August 13, 2008
Work progress 13 August
Will continue working at the Naro architecture design to integrate OCAF functionality.
Tuesday, August 12, 2008
Work progress 12 August
Installed a Virtual PC with XP and Visual C# Express 2008 and tested the compiling. It worked well.
Worked at improving the OCAF package wrapper. The problem here was that for StdDocument there are native virtual methods called internally that must be implemented by the developer; because the class is wrapped the internal native call is passed internally and not passed to the wrappers and had to make some tricks to solve it.
Will continue with working at integrating the OCAF in Naro and also work at the application design, task estimated to take 2-4 days. While adding this code will also improve the Naro folder structure and will add some explanation txt file describing the folder structure.
Monday, August 11, 2008
Work progress 11 August
- wrapper cleanup, removed all the references to the previous wrappers, the code now uses only the new wrappers. Built Debug and Release versions of Naro to test that it builds properly and used the build to see how it behaves and how much resources it uses,
- tested the newly inserted OCAF module and started integrating the Undo/Redo mechanism in Naro. Found a problem at the Document creation. Inserted by hand code for an Application constructor and rebuilt the wrappers.
Tomorrow for half a day will review/organize the plugin/command folders and update the documents describing the build process, also will check that everything builds properly. In parallel with it will work at integrating the OCAF package, schedule new tasks and make an estimation for them.
Sunday, August 10, 2008
Work progress 8 August
Compiled Naro with this library.
Will continue with working about half a day on cleaning the Naro code and making documents on how to built it.
After this task will start working at integrating OCAF in the application and implement an Undo Redo mechanism. This task together with the architectural design work is estimated to take about 3-4 days.
Thursday, August 7, 2008
Work progress 7 August
Investigated also making the OCAF module a separate assembly but didn't succeed. The problem is caused by the fact that the native classes whithin an assembly are by default private; a theoretical solution would be to make them public (an visible for other assemblies) using the pragma make_public. This directive works properly on a small test application but when used on the wrappers it doesn't work properly. Somehow because of the many include files private symbols are generated before the make_public directive.
Tomorrow will continue investigating the issue for half a day and take a decision how to move forward. A possibility would be to continue investigating another possibility would be to try linking with WPO off and use the generated assembly for further development.
Wednesday, August 6, 2008
Work progress 6 August
It seems that the linker gives errors because of the big number of files and has not enough memory to link everything.
The investigated solutions are the following:
- make the OCAF module as a separate assembly. On this solution the problem is that the base classes (that have a native pointer as member) are located in a different assembly and the base classes symbols need to be exported explicitly. Added the exporting pragmas, the symbols are properly exported but the problem continues: more errors are generated the cause being some inconsistent attribute errors. Solutions found on Internet on this problem are not applicable on this amount of files automatically generated. This path needs more research,
- another solution would be to disable Whole Program Optimization so that the Optimizations are made in the compiler instead of the linker requiring less memory (but also the assmbly is optimized less). Succeeded to build a full wrapper in release mode using this compiling configuration. Will try also to build it in debug mode.
Because the Solution 1 needs a lot of research (possibly can take 1-2 weeks and there is possibility not to work) and because the wrappers are not the product that we focus on, decided to use Solution 2 to build the dll with WPO off as a temporary solution that allows us to move forward with NaroCAD development.
Will continue with cleaning and uploading the code, prepare the wrapper dlls to be used by Naro (in release and debug mode), build Naro with the new wrappers and check the running speed, update the documentation about the project and how to build it, tasks estimated to take 2 days.
Work progress 5 August
Will work at generating a separate assembly for ApplicationFramework, task that should be finished in 1 day. There is a possibility not to succeed making this module a separate assembly because encountered problems when passing native pointers between separate assemblies.
Monday, August 4, 2008
Work progress 4 August
There are some OCAF wrapped packages that give linking errors. Not solved yet the problem, it generates some error that looks like a corrupted OpenCascade library. The library will be detected by adding libraries one at a time but the investigation took a lot due to the long compiling time.
Work progress 1 August
The next development steps are the following:
- finish wrapping the OCAF package, task estimated to take 1.5 - 2 days,
- work at cleaning up the work made until now: compile a release version of the wrappers, cleanup the NaroCad source codes that use the new wrappers and update them on SVN, remove all the references to the old wrappers, update the documents describing the building process and verify building with VisualStudio Express, task estimated to take 2 days.
Thursday, July 31, 2008
Work progress 31 July
Started working at the ApplicationFramework wrappers. In 1-2 days also these wrappers should be finished. With these wrappers the wrapping task should be finished. Will improve them while working at Naro.
After wrapping will continue with working at the application architecture. This task should take 2-4 days.
Wednesday, July 30, 2008
Work progress 30 July
Uploaded and built the latest wrappers.
The wrapping situation is the following:
- the FoundationClasses module contains 22 wrapped packages out of 43 packages,
- the ModelingAlgorithms module contains 61 wrapped packages out of 107 packages,
- the ModelingData module contains 44 wrapped packages out of 45 packages,
- the Visualization module contains 28 wrapped packages out of 31 packages,
- the Draw module is not wrapped,
- the DataExchange module is not wrapped,
- the ApplicationFramework module is not wrapped.
Around 10 - 20 packages from the ApplicationFramework need wrapping, task estimated to take 1-2 days.
Ported successfully the MakeBottle tutorial to the wrappers. The tutorial uses visualization but also many geometry and topology operations.
Next tasks to be done:
- port Naro to wrappers, task that should take 1 day,
- wrap needed classes from the ApplicationFramework module, task that should take 1-2 days,
- some wrapper improvements, task that should take 1-2 days. Compiling and linking takes more than an hour, that should be improved. Probably the dll will be uploaded on SVN. Also the project should be split in 3-4 dlls but at latest try encountered problems at referencing base classes with native pointers from another assemblies.
Tuesday, July 29, 2008
Work progress 29 July
To build the wrappers dll takes around one hour, luckily I installed a trial IncrediBuild and gathered together 5 cores to build with.
Tomorrow will work at making the MakeBottle tutorial with the wrappers. Also will work at porting Naro to see if it works.
Also tomorrow will start uploading the new wrappers and make a situation with them. Many of the OpenCascade modules are almost covered by wrappers.
Friday, July 25, 2008
Work progress 25 July
Next steps in development:
- port Naro to the wrappers, task that should take a day,
- wrap the OCAF/Application Framework packages, there are around 8 packages with dependencies, task that should be solved in one day,
- work at the application architecture: study the Mono AddIn, SCSF, CSLA, Windsor framework concepts, task that should take around 2-3 days.
NaroCad Plugins
NaroCAD Plugin System
A must have is a screenshot, taken from the current SVN code.
To understan it is somehow simple, and you should understand the following concepts:
Node
Link
Signals (Provider links)
Slots (Required links)
Node provider list
Solver
Node
A node is a class that is derived from: NaroCommands.Node and is a component.
In the sample there are following nodes:
an OptionsDialog
OptionsPage
MenuBar
DocumentList
FileSave
FileLoad
DocumentView
They may run independently as much as they don't need data from other compoents.
Links
For making the components to be connected they need a LinkBase implementation
The links are of two ways:
provider nodes named Signals
consumer nodes named Slots
The default relation of one link is to connect One to Many. So one signal may be connecting to as many slots, and one slot may receive signals from as many signals. For making one signal or slot to accept only one connection (cause of design causes), the connection has an attribute of being exclusive. So, every new reconnection between signals or slots will remove the old one.
To add to a node connections, you should override the method CreateConnection:
Creating a signal:
public override void CreateConnections()
{
ProvideLink("Link.Form.Main");
}
Creating a slot:
public override void CreateConnections()
{
RequireLink("Link.Naro.Document");
}
You may create as many signals and slots for one component, depending of your needs.
Providers
Sometimes some nodes are common components and are needed any time. They can be found in the provider lists or may be added easily:
Adding a provider node:
ProviderList.Get.AddProvider(new MainMenuProvider()); //add directly a node
ProviderList.Get.AddProvider("Options", new Options.OptionsPreferencesProvider()); //add a node with a specified name
To obtain a specific provider, you should eventually convert to it's type, if is not enough to you to work with a NaroCommands.Node class as following line:
Options.OptionsPreferencesProvider optionsProvider =
ProviderList.Get.Item("Options") as Options.OptionsPreferencesProvider;
In this code, optionsProvider may be null if at the „Options” label is stored another type than the needed one.
Solver
The solver creates based on the Node name, a node and automatically build dependencies to it to complete the node links.
(Work in progress)
The solver do only one thing: will assure that connections (signals and slots) of every node are connected. Based on that you may work with objects without care about connecting the nodes manually. The solver stores too a repository of all node names, so you can build a node by name, without care of which assembly (class library or executable) is the originator.
The implementation is right now in the polish stage and will get an improvement soon as matter of how to work with and how to work with the solver.
Thursday, July 24, 2008
Progress report 24 July
Tomorrow will work at porting Naro to the wrappers.
Wednesday, July 23, 2008
Progress report 23 July
Yess! I suceeded to display an OpenCascade window using the wrappers (a triedron can be seen on the top left of the screenshot).
In order to do that I made some manual adjustments at the code. Tomorrow I will apply the manual modifications at all classes from the framework, task that will take around half a day. The detected problems that need changes are the following: the constructors that receive native handle parameters need to allocate the internal handle, allocate native objects before calling non handle constructors with them, replace the AspectHandle with IntPtr and extract the pointer with IntPtr.ToPointer().
I am glad that it works, it is good that nothing crashed. I will think how to make some checks for memory leaks.
In parallel with wrappers started thinking at how to organize the project as an agile project to improve the progress monitoring and accelerate deliveries. On this week I am planning to do something about it.
Started also thinking at the application architecture: studying concepts, frameworks, patterns and factories like CSLA for BusinessLogic, CAB and SCSF for smart client, for IoC the WindsorContainer, ObjectBuilder.
Next steps: tomorrow I will work at improving the wrappers and use them to see if i find any bugs. Other tasks planned for this week: port Naro on the wrappers, wrap the OCAF/ApplicationFramework from OpenCascade to include undo/redo and storing in Naro, improve the project reporting/planning/progress tracking, think at the application architecture.
Tuesday, July 22, 2008
Progress report 22 July
Tomorrow will work at porting the MakeBottle OpenCascade tutorial to use the wrappers as a test; during porting will adjust the wrappers and repair errors.
Monday, July 21, 2008
Progress report 21 July
Scheduled for tomorrow by the end of the day to finish wrapping everything including AIS and start making some visual test application with the new wrappers.
Saturday, July 19, 2008
Progress report 19 July
The situation is like this:
- the FoundationClasses module contains 14 wrapped packages out of 43 packages,
- the ModelingAlgorithms module is not wrapped,
- the ModelingData module contains 3 wrapped packages out of 45 packages,
- the Visualization module contains 13 wrapped packages out of 31 packages,
- the Draw module is not wrapped,
- the DataExchange module is not wrapped,
- the ApplicationFramework module is not wrapped.
Will continue with making a test with the wrappers to see if they work properly.
There is one unwrapped package named AIS from the Visualization module that is needed for displaying shapes. To wrap this one it is needed to wrap another 35 packages that it depends on, task estimated to take 2-3 days.
Friday, July 18, 2008
Progress report 18 July
Will continue with making a test with the wrappers to see if they work properly.
Thursday, July 17, 2008
Progress report 17 July
Hope tomorrow to finish the remaining 6 packages and start working at making some visual OpenCascade quick test application to see if it works properly. If everything ok will port Naro to the generated wrappers code.
Wednesday, July 16, 2008
Progress report 16 July
Reproduced this problem on a simple project and could solve the error by using #pragma make_public(type). Trying to apply the solution on the OpenCascade wrappers project the linker generates "Custom attributes are not consistent" on several files.
There are two possibilities to solve the problem:
- investigate further the attribute inconsistency and try to generate separate dlls for the OCC packages,
- or put all the wrapper files into one solution and generate one dll for all the wrappers.
Will continue with investigating the attribute inconsistency for half a day and if no acceptable solution will be found probably will put all the wrappers into the same solution and generate one big dll with all of them.
Tuesday, July 15, 2008
Progress report 15 July
Generated wrappers for 19 other packages (a total of 30 packages generated until now) for the Visualization and ModelingData modules. These packages don't compile yet, there are redefinition errors caused by the package splitting.
Tomorrow will work at compiling these packages, hope to finish in one more day. After that will continue with making a test application that uses the Visualization package to see if everything works ok.
Will add also some improvements to the code: the abstract methods will not be generated at all, for classes that don't hold internally a handle but a regular pointer should add some boolean that tells if the attached pointer should be released or not.
Monday, July 14, 2008
Progress report 14 July
Will work at adjusting the generator.
Friday, July 11, 2008
Progress report 11 July
Started organizing the files on projects so that for each package a dll is generated. The compiled packages are built on the FoundationClasses.dll. Made also a wrappers.txt file where I made a situation with wrapped packages and packages to be wrapped.
Added and uploaded on SVN a quick test C# project that uses the dll.
Will review the code to see if everything ok; if it is ok will start generating more packages.
Thursday, July 10, 2008
Progress report 10 July (2)
Double pi = 3.14159265358979323846;
private bool TestCircleClass()
{
// Create an indefinite circle
OCgp_Circ circ = new OCgp_Circ();
Double radius = 10.0;
Double calculusError = 0.5;
// test the radius methods
circ.SetRadius(radius);
if (Math.Abs(radius - circ.Radius()) > calculusError)
{
return false;
}
// test the length
if (Math.Abs(2 * pi * radius - circ.Length()) > calculusError)
{
return false;
}
// test the area
if (Math.Abs(pi * radius * radius - circ.Area()) > calculusError)
{
return false;
}
// test location
OCgp_Pnt p = new OCgp_Pnt(100, 200, 300);
circ.SetLocation(p);
OCgp_Pnt internalPnt = circ.Location();
if ((p.X() != internalPnt.X()) || (p.Y() != internalPnt.Y()) || (p.Z() != internalPnt.Z()))
{
return false;
}
Console.WriteLine("Circle tests OK");
return true;
}
Progress report 10 July
Need to add code to generate the destructors and rebuild. Will also make some test codes to see if the generated dll can be used in a C# project.
Wednesday, July 9, 2008
Progress report 9 July
Added for compiling all the classes from the gp package and the packages it depends on (MMgt, Quantity, Standard, TColGp, TCollection, TColStd) a total of 731 files and started compiling and adjusting the generator. It seems that there are 3 types of errors that need adjustment at the generator.
Hope to finish adjusting tomorrow the code generator and build the packages. After that will make a test project to see if it the wrappers work well.
Progress report 8 July
Will continue with generator adjustments and compiling. Hope to succeed building these packages.
Tuesday, July 8, 2008
Progress report 7 July
I'm making the final adjustments to the code generator, operation that should take half a day and after that I will start wrapping.
Friday, July 4, 2008
Wrapping progress
// build a managed object passing a managed string
OCStandard_Type standardType = new OCStandard_Type("test");
// call managed methods
UInt32 t = standardType.IsImported();
Int32 sz = standardType.Size();
// call methods that return managed Strings built from native char*
String s = standardType.Name();
Made marshaling for the String^ to be received as parameter and also to be returned by functions. It remained to add to the code generator some constructor that builds a managed object receiving as parameter a native class and that should cover the functionality needed for the wrappers and will start wrapping. Another improvement will be added: the native types will be changed with managed types like: Standard_Boolean -> bool.
There is one problem that couldn't be solved completely: although the marshaling from native char* to managed String^ works ok, the marshaling from String^ parameters to native char* creates problems because it is needed to allocate a char* buffer (because the managed String holds internally a wchar) and some of the native classes that receive char* parameters store internally the pointers. If the allocated buffer is released then the internal pointers points to an invalid area:
// Constructor of the Standard_Type wrapper
OCStandard_Type::OCStandard_Type(String^ aName)
{
// the managed pointer is pinned
pin_ptr
// the wchar is converted to char* and passed to the native constructor
nativeHandle = new Handle_Standard_Type(new Standard_Type(TCollection_AsciiString((Standard_ExtString)tmp).ToCString()));
// the allocated char* buffer is released when returning, if the native class
// doesn't copy the char* internally it will point to an invalid area
// found some cases of native classes implemented incorrectly that hold internally
// the char* pointer passed as parameter
}
Tomorrow will continue with:
- finish and test with C# the constructor that receives a native handle as parameter,
- modify the generator to replace the native types with their correspondent from .Net, the marshaling for strings is made,
- made some code cleanup at the generator to prepare it for uploading on SVN,
- generate again the gp package and the 4 packages it depends on to see if more problems are encountered.
If everything goes with no problems will start generating wrappers for more packages.