Tuesday, February 3, 2009

Parametric modeling

Investigated how to propagate automatically a modification into the OCAF hierarchy in order to enable parametric modeling. Looked at the TDF, TNaming classes also at the TFunction classes.

The problem is to find a way to get a list of Labels that hold references to the modified Label and regenerate the models that these Labels hold. Made tests with TDF_Tool.OutReferences and OutReferers and these doesn't seem to be made for this purpose. Also couldn't find a TFunction mechanism to propagate changes automatically. On the forum there are no details related to this. Internally also the TDF helpers seem to be implemented with a loop through all labels, they use filters but don't seem to have an optimized way to search for some referenced label.
In order to handle this problem I implemented a solver function that loops through the labels and identifies the ones that hold references to the modified ones. Will think also if it is an improvement to hold a back reference between labels.
Solved the Undo/Redo problem at the shape modification. This task was scheduled for next week, but solved it.

Tomorrow will finish implementing the shape regeneration code and will continue with the Extrude.

No comments: