
Wed, 04/03/2024 - 17:39
Hello community.
In my application, I have a custom treatment to generate back faces as single shapes because front and back faces should be distinguished as single entities when the user select a front / back face of a surface shape.
Thus I specified my view calling the "SetBackFacingModel" method with "Graphic3d_TypeOfBackfacingModel_BackCulled".
The problem now is that I wanted to add an AIS_Manipulator object, but it uses disks made with "Prs3d_ToolDisk" which is a surface and requires back faces to be not culled.
Is there a way to leave the view with the "Graphic3d_TypeOfBackfacingModel_BackCulled" parameter, but inform the AIS_Manipulator that I want him to display back faces (whereas the best in my opinion should have been that the AIS_Manipulator use a torus instead of a disk).
I tried to create a Graphic3d_AspectFillArea3d in which I called SetFaceCulling(Graphic3d_TypeOfBackfacingModel_DoubleSided) that i sent to the "Attributes()->SetBasicFillAreaAspect(...)" method of my manipulator without success.
Thank you for your answers ❤
Wed, 04/03/2024 - 18:05
You have forced specific culling mode for entre View and now trying to replace it within
AIS_Manipulator
. Instead, you are supposed to change culling mode for yourAIS_Shape
(or override defaults withinAIS_InteractiveContext
).Wed, 04/03/2024 - 19:01
OK, I already tried to set the culling mode for my AIS object without success, but maybe I didn't do the right way.
I use a XCAFPrs_AISObject and, to define colors, a XCAFDoc_ColorTool for each TopoDS_Face of the TopoDS_Shape drawn.
Thu, 04/04/2024 - 08:51
So how exactly you are trying to apply aspects to your
XCAFPrs_AISObject
? Before or after presentation was computed?In Draw:
Note that if you are using
XCAFDoc_VisMaterial
, you'll need to setXCAFDoc_VisMaterial::FaceCulling()
property instead.Thu, 04/04/2024 - 10:57
Waaah, it does the job !! I didn't know I need to specify the face culling parameter on the shading aspect. Thank you very much !! You're the man (or the woman) ;)