Saturday, November 14, 2009


Implemented the Dimension tool. It detects if a shape is circle and generates a DiameterDimension, if it is an edge it generates an EdgeDimension. Implemented also realtime drawing so that the dimension text moves after the mouse when drawn until a click shows the location. The text display the circle diameter value and the edge length.

On circle it seems to work well. On edges it still needs improvements as the dimension orientation is not properly detected.

For the graphical representation used the OpenCascade AIS_LengthDimension and AIS_DiameterDimension classes. In order to use this type of AIS objects in the data tree had to implement a new type of interpreter that holds and displays this type of objects.


Yorik said...

Hmm, very cleaver solution for placing the text...

bxtrx said...

Will be interesting to see how can we edit the Dimension text letting aside the Property Grid. Probably will display a dialog box when double clicking the Dimension.