AIS_Shape edge colouring

TLohi

CAD practitioner
Hi all,

I would like to have some help with AIS_InteractiveObject visualization.
At the moment when I visualize TopoDS_Solid as AIS_Shape, shape is full orange. I would like that edges of shapes would be different colour for example black, but I don't know how to achieve this.

Thanks
-TLohi
 

JSlyadne

Administrator
Staff member
Hi all,

I would like to have some help with AIS_InteractiveObject visualization.
At the moment when I visualize TopoDS_Solid as AIS_Shape, shape is full orange. I would like that edges of shapes would be different colour for example black, but I don't know how to achieve this.

Thanks
-TLohi
Hi TLohi,

The presentation attributes of presentable objects are handled by Prs3d_Drawer object. A drawer can be either global as a property of AIS context or individual of AIS object. So, to change a presentable aspect of lines you should do smth like that

drawer->SetLineAspect(new Prs3d_LineAspect(...));
 

TLohi

CAD practitioner
I managed to achieve what I wanted.

It was that simple:

//get default drawer from context
Handle(Prs3d_Drawer) drawer = myContext->DefaultDrawer();

//set faces edges visible
drawer->SetFaceBoundaryDraw(true);
 

Attachments

  • before.png
    before.png
    12.4 KB · Views: 1
  • after.png
    after.png
    16.5 KB · Views: 1
Top