Forum archiveIssue archiveOther usage issues

Archived discussion

AIS_Shaded mode with contours...

Other usage issuesSun, 04/11/2010 - 17:582 replies

Browse this forum
QuestionAuthor

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!

Discussion

2 archived replies

Posts are displayed in their archived order.

01Commenter-1

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.

02Commenter-1

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