Fri, 12/06/2019 - 04:08
I have a TopoDS_Face on XY plane to present as a platform. What I want is, when I look from above the platform, it's solid. But when I look form below the platform, it's transparent.
I try the following code, it did't works
Handle(AIS_Shape) m_Platform = new AIS_Shape(aTopoDS_Shape_Platform); m_Platform->SetColor(Quantity_NOC_LIGHTGRAY); Handle(Graphic3d_AspectFillArea3d) aAspect = new Graphic3d_AspectFillArea3d; Graphic3d_MaterialAspect ama(Graphic3d_NOM_TRANSPARENT); aAspect->SetBackMaterial(ama); m_Platform->Attributes()->SetBasicFillAreaAspect(aAspect); m_Context->Display(m_Platform, AIS_Shaded, 0, Standard_True);
Sun, 12/08/2019 - 21:55
Don't use Graphic3d_PresentationAttributes::BasicFillAreaAspect() - this property has another purpose and is not used by regular presentation builder.
What you are looking for is Prs3d_Drawer::SetShadingAspect() in most cases.
Mon, 12/09/2019 - 04:17
Thank you !
It works now