Hide face from box shape in the view in Open CASCADE

86 Views Asked by At

I am using XCAFPrs_AISObject to store the main shape (the box shape) and use TDocStd_Document to store shape labels; both main shape and sub shapes. Here I saved main shape label and add faces as child as sub-shapes.

Now I want to hide a face from the view which is a sub-shape. But I could not find any possible solution for that. There was a forum thread discussing to hide shape using AISColored_shape. But that does not work for me. https://dev.opencascade.org/content/display-how-hide-face-within-aiscolored-shape

I have tried the following code snippet.

Handle(XCAFPrs_AISObject) thePrs;
Handle(AIS_ColoredDrawer) aDrawer = thePrs->CustomAspects(theSubShape);
aDrawer->SetHidden(true);
Handle(AIS_InteractiveContext) context;
context->UpdateCurrentViewer();

It would be very helpful if anyone can help me on this.

I got an answer by posting this question in Open CASCADE forum. But I could not get a satisfactory answer.

It would be very helpful if someone in here can give an answer to this question.

PS: I could not find any solution yet. It would be very helpful if someone can give an answer for this.

0

There are 0 best solutions below