Wednesday, December 19, 2007

Datum planes where to launch the sketcher, mouse interactivity

Added to the drawing area the XYZ datum planes from where the user can select the plane where he will draw the shape with the sketcher.
Added mouse interactivity to the shapes drawn, the user can make operations like dynamic rotations.

Thursday, December 13, 2007

Drawn the coordinate system


Drawn an XYZ axis with labels using a trihedron shape, started working at repositioning/rescaling the drawing system when the application window is modified.
Changing the view to top, left, bottom etc. applies well on the displayed shapes.

Will continue with adding 3 datum planes on the XYZ axis and implement sectioning when the mouse is over a shape.

Tuesday, December 11, 2007

Added an OCAF Line driver



Adding an OCAF Line drawing driver and displaying the shape was similar with the Rectangle, it went quickly. Will continue with drawing the XYZ axis using the line shape and drawing the datum planes using the rectangle shape.

All the source codes were updated on Sourceforge.

Moved the development on a core2 computer. Will make some performance tests to see if OpenCascade scales properly on 2 cores.

Suceeded to draw a 3D rectangle


Finally succeeded to draw a 3D rectangle using TdataStd attributes form OCAF and generating with TNaming_Builder a TNaming_NamedShape. The topological shape was created by making Edges from Points, connected the Edges into an Wire and finally creating a Face from the Wire.

A very useful functionality for debugging was to add the DFBrowser functionality to the application used for displaying the OCAF label and attribute hierarchy.

Looked at Catia V5 usability, functionality and features. It looks very good. Easy to use and intuitive.

The next step in development will be to add a line drawing OCAF driver and draw XYZ axis and 3 datum planes (XY, YX,ZX).

Monday, December 10, 2007

The OCAF attribute TDataStd_Geometry

It seems that the TDataStd_Geometry attribute cannot be used consistently with the TDataStd_Real. If for the later to create/retrieve a child label with an attribute it is possible to say:

TDataStd_Real::Set(L.FindChild(1), x);

for TDataStd_Geometry such a method is not implemented. Creating an TDataStd_Geometry is made like this:

- setting a point on a label:
TDF_Label childLabel = L.FindChild(1);
TNaming_Builder B(childLabel);
B.Generated(BRepBuilderAPI_MakeVertex(xCoord));
Handle_TDataStd_Geometry geometry = TDataStd_Geometry::Set(childLabel);
geometry->SetType(TDataStd_POINT);

- retrieving the point:
Handle(TDataStd_Geometry) firstPointGeometry;
gp_Pnt firstPoint;
if (!Label().FindChild(1).FindAttribute(TDataStd_Geometry::GetID(), firstPointGeometry)) return 1;
firstPointGeometry->Point(Label().FindChild(1), firstPoint);

Wednesday, November 28, 2007

Started development

The OCAF presented samples where a driver is implemented for each basic shape seemed to me not the best idea at the first view. Now after studying it and analyzing some complex use cases with parametric models I decided that the solution is ok, established an application architecture solution and I will start developing it.
This developed version is estimated to take around 3 days and I will consider it the first version that can be released as an concept of the future application. The features that will be implemented were posted in an previous post.

Tuesday, November 27, 2007

Drawing datum planes

I am still looking at the OCAF architecture looking for a solution to create a scalable application.

The solution that I look for is how to create a general driver that can draw any shapes and that can be applied in most drawing situations. This solution would be applicable for drawing the datum components and also the work area drawn shapes.
Studied the TFunctionDrivers, the driver table, the TFunction_Function class, connection of these classes and their usage in the undo model. Looked/think at the design patterns that this classes implement.
Not made yet an estimation for implementing the functionalities for the release version, I have to find a solution first to make a proper estimation.

Sunday, November 25, 2007

Next release functionalities to be implemented

Established the functionalities to be implemented for the next release version. The following use case will be implemented:

- File->New Part is chosen by the user,
- When the working area is shown draw the 3 axis datum planes, the sketch and extrude tools are displayed in the toolbar,
- Choose sketch and enter to 2D,
- Draw a rectangle (also the mouse drag functionality is implemented here),
- Apply sketch and return to the 3D view,
- Apply extrude on the rectangle and raise a box (also surface selection is implemented here).

An estimation will be made based on this use case considering the functionalities that are currently implemented.

Published source codes

Configured the SVN access and uploaded the project source codes on Sourceforge.
The sources can be viewed on web at the address: http://narocad.svn.sourceforge.net/viewvc/narocad/
The repository address to download the source codes with a SVN client like TortoiseSVN is:
https://narocad.svn.sourceforge.net/svnroot/narocad

Saturday, November 24, 2007

Application stable

Advanced further with the application development: added window drawing/redrawing functionality, undo/redo commands, possibility to change the object view (left, right, top, bottom, axonometric, front, back). At this moment the application is stable and working properly.

From this moment I can say that the application development can start. The next development steps will be to refactor the application and after that start adding new functionalities at the application skeleton.
I am starting now to reevaluate the tasks, the development schedule and deadlines and add the source codes to Sourceforge.

Wednesday, November 21, 2007

The OpenCascade application works


Succeeded to create a C++/CLI application that uses the OpenCascade library and the OCAF engine. Will continue with improving the source codes, code cleanup, improvements to the GUI and adding more functionalities (zooming, rotating, changing the perspective). Hope to release tomorrow, November 22, a first release version of the application.
The next step after the first release will be scheduling development tasks and establish weekly releases/functionalities to be delivered.

Tuesday, November 20, 2007

Drawn a box

After several failed attempts to make it run from the first shot with all the OpenCascade components included, changed the approach: removed all the components and succeeded to draw a box. Will move forward by adding the class hierarchy from the application and after that the OCAF engine. Task estimated to be finished until tomorrow, November 22.

Sunday, November 18, 2007

Code structure made, not working yet

Finally succeeded to implement an OpenCascade framework application with C++/CLI and OCAF. The class structure and collaboration started to look well, it should be easily extensible. There are problems at runtime, the OCAF document creation fails at application start even if I used the implementation from the sample applications.
It should take one more day to solve this problem and other small problems that might appear at runtime.