DiscussionsIssue archiveOther usage issues

Archived discussion

Triangulation color

Other usage issuesSat, 06/13/2015 - 14:522 replies

Browse this forum
QuestionAuthor

I am using the following code to build a triangulation:

Handle(Poly_Triangulation) polys = new Poly_Triangulation(tab, trian);
Handle(AIS_Triangulation) triang = new AIS_Triangulation(polys);

triang->Attributes()->ShadingAspect()->Aspect()->SetEdgeOn();
triang->Attributes()->ShadingAspect()->Aspect()->SetInteriorStyle(Aspect_IS_EMPTY);
triang->Attributes()->ShadingAspect()->Aspect()->SetEdgeColor(Quantity_NOC_DARKGREEN);
triang->Attributes()->ShadingAspect()->Aspect()->SetEdgeLineType(Aspect_TOL_SOLID);
triang->Attributes()->ShadingAspect()->Aspect()->SetEdgeWidth(1.0);

In 6.8.0 worked as expected, i.e., mesh with dark green edge and no interior.

In 6.9.0 I get a solid brown color mesh.

Discussion

2 archived replies

Posts are displayed in their archived order.

01Commenter-1

Dear Author,
The attributes management has been slightly changed in 6.9.0 to prevent ambiguous actions, which previously might work but have hidden side effects (e.g. breaking design of presentation attributes).
Please refer to OCCT6.9.0 Release Notes:

Summary: Remove AIS_Drawer class and transfer its Link() logic to Prs3d_Drawer.
...
Link() is not auto-created, so its attributes should not be used before setting of Link to Drawer (before Display() call by default). It is necessary to set custom aspects explicitly with SetApsectX methods. If attributes are not set, the default value or value from Link() will be used.

Best regards
FSR

02Author

Thanks it is working now. (ShadingAspect after display().)