Suggestion!

what do you think it's the best way to display a polygon ? Some segments of the polygon should be display with a dotted line style, some others with a solid line.
The segments (for selection) should appear as a single object.

Suggestions?

Thanks in advance
QbProg

François Lauzon's picture

Hello Thomas,
since you want different style for different segment of your polygon, I suggest you derive your own class from AIS_InteractiveObject and you use low-level Graphic3D stuff to display your polygon and polygon segment like you want. A good start you be to do like the AIS_Shape, leave the selection stuff as is and just redo the Compute method (have a look at the source code of the classes used by AIS_Shape to have an idea of how to do it).

Good Luck,
Francois.

QbProg's picture

Thank you! I've tryied it and it worked! I used AIS_InteractiveObject, since I don't need selection support.

I will do something similar for Triangle Mesh (since I was unable in MeshVS to hide triangle Edges).

Good bye

François Lauzon's picture

Hello Thomas,
since you want different style for different segment of your polygon, I suggest you derive your own class from AIS_InteractiveObject and you use low-level Graphic3D stuff to display your polygon and polygon segment like you want. A good start would be to do like the AIS_Shape, leave the selection stuff as is and just redo the Compute method (have a look at the source code of the classes used by AIS_Shape to have an idea of how to do it).

Good Luck,
Francois.