Ideas on how to append attributes to object?

how to append like OCAF or other OCC data scheme or something to maybe a AIS shape or TF Shape?
I would like to append attributes to object so that individual shapes would have attributes like object type, fill, color, material etc.

Mikhail MPV's picture

  Dear John,

Normally the reverse dependency is implemented. In OCAF all the visualization attributes are stored to support save/open or undo/redo for displayed shapes too. Please, take a look at TPrsStd_AISPresentation class and the whole TPrsStd package created for this.

Regards,

Mikhail.

 

john wick's picture

thanks for pointing the way, appreciate it. One more question to bother you about. Do you have a example on this that I could look at?

Mikhail MPV's picture

You can consider some samples provided with OCCT sources:

  • samples/ocafsamples/TPrsStd_Sample.cxx  - just a piece of example code
  • samples/OCCTOverview - a simple application based on OCAF features