Friday, January 30, 2009

Closed iteration 0.0.6

Today added code that shows a tree list with the objects drawn. Also when an object is selected in the drawing area it is selected also on the tree list and its properties are displayed in the property grid.

On this iteration succeeded to make code that redraws the shapes when their properties are changed, added color property to objects, at the rectangle added width and height, built a layer of objects that handle internally OCAF operations, finished implementing the tree view that shows a list with the objects drawn, improved the property grid, partially implemented also the code that selects drawn objects when they are clicked in the tree view, improved the grid and GUI. Started adding Tango icons at the application, started cleaning up the code.

Tomorrow will prepare the list with the tasks for iteration 0.0.7 also will work at making a document with explanations about knowledge gained until now about OCAF, explanations also about the implemented drivers and the implemented descriptor layer.

Among the tasks that will be included in the next iteration are:
- finish implementing Cut with OCAF,
- improve the Cut and Extrude,
- add code to propagate changes on related entities: when an extrude is applied on a shape if the shape is changed also the extrude has to be redrawn,
- code refactoring and cleanup,
- add a logging mechanism,
- finish implementing the selection mechanism that selects a shape when an item is selected in the tree view (the selection should be stored at the OCAF level, currently it is made only at the visual level).


entery said...

Hi Bxtrx
Sorry Im kind of newbie to OCC. So this may sound i little bit stupid. I just wonder; Say if you have two objects A and B and you "fuse" them togheter with OCBRepAlgoAPI_Fuse, Can you still tell them apart, by clicking on them? Or is this information lost?

Best Regards


bxtrx said...

Hi entery,

I am also a newbie in this field and didn't use fuse until now.

Strictly answering your question I think the information is lost but your approach seems to me incomplete.
From my work with OCAF until now I would see the solution to a fuse implemented like this: the two shapes are stored with OCAF on two Labels as named shapes with evolution PRIMITIVE, then you make the fuse and store the result on another Label. In this way the operations are Undoable and also you have info about the original shapes this allowing you to implement a selection mechanism on them separately. With OCAF TNaming classes you can also iterate through previous states of a shape. My knowledge on this is not very deep, I am also currently studying OCAF.

There are some explanations exactly on how to implement a fuse operation in the OCC deocumentation -> ApplicationFramework -> ocaf.pdf section 5.1 but probably it is difficult to understand from there from the first shot all the concepts. Another solution would be to implement a mechanism like OCAF but that would be probably on long term more difficult than learning/using OCAF.

Best regards,