Hi All,

Could someone please take the time to explain to me how to use the TNaming_Builder class.

Basically I have a label with a TNaming_NamedShape attribute which corresponds to a TopoDS_Compound. Now to this compound I want to add (for example) a new vertex. I use the BRep_Builder class to do this. Now I need to inform my label that the shape (i.e. the TopoDS_Compound) has been modified. I lloked at the TNaming_Builder class and this seems to have some functions which could be useful, however I am not sure how to use it.

Thankyou for any help.


Sergey RUIN's picture

Hi Simon,

If you just want to store your compound under a label you can use TNaming_Builder like this:

TNaming_Builder aBuilder(aLabel); //This clear NamedShape if any stored under the label

aBuilder.Generated(aNewCompound); //Set the value of the NamedShape attribute.

But if you want to store the history of modification of your compound you need to call the next method of TNaming_Builder instead of Generated:

aBuilder.Modify(anOldCompound, aNewCompound);

Best Regards