AIS_Shaded mode with contours...

I want to display my model in AIS_Shaded mode, but with contours ( like in AIS_WireFrame ). Can I switch OCC to this display mode? Or can I set some additional property to AIS_Shape? I've checked AIS_Shape interface, but couldn't find any appropriate method. Please, help me!

EricThompson's picture

Here's something you can try:

1) Derive your own class from AIS_Shape
2) Override the Compute method.
3) In your version of Compute, call AIS_Shape::Compute, passing the mode as AIS_Shaded, then call it again with the mode as AIS_WireFrame.

Note: I've never tried this, so I can't promise it will work. It's just a thought for you to try if you want.

EricThompson's picture

Okay, after some looking, I don't think my previous suggestion will work. It appears that each call to AIS_Shape::Compute erases everything that was in the presentation. However, the following variation may work:

1) Derive your own class from AIS_Shape
2) Override the Compute method.
3) In your version of Compute, call AIS_Shape::Compute, passing the mode as AIS_Shaded.
4) Call StdPrs_WFDeflectionShape::Add(aPresentation,myshape,myDrawer); to add the wireframe graphics