Fri, 07/22/2022 - 18:41
Forums:
Hi, I am creating a function to display the Triedron in the <0.0,0.0,0.0> point. The triedron is displayed fine with correct colors , but without "X" , "Y", "Z" labels How to fix? Where I am wrong? Thanks in advance, for any suggestion
This is the code:
Handle_AIS_Trihedron MyOcc::createTrihedron()
{
Handle_Geom_Axis2Placement axis = new Geom_Axis2Placement(gp::XOY());
Handle_AIS_Trihedron aisTrihedron = new AIS_Trihedron(axis);
aisTrihedron->SetDatumDisplayMode(Prs3d_DM_Shaded);
aisTrihedron->SetDrawArrows(true);
aisTrihedron->Attributes()->DatumAspect()->LineAspect(Prs3d_DP_XAxis)->SetWidth(2.5);
aisTrihedron->Attributes()->DatumAspect()->LineAspect(Prs3d_DP_YAxis)->SetWidth(2.5);
aisTrihedron->Attributes()->DatumAspect()->LineAspect(Prs3d_DP_ZAxis)->SetWidth(2.5);
aisTrihedron->SetDatumPartColor(Prs3d_DP_XAxis, Quantity_NOC_RED2);
aisTrihedron->SetDatumPartColor(Prs3d_DP_YAxis, Quantity_NOC_GREEN2);
aisTrihedron->SetDatumPartColor(Prs3d_DP_ZAxis, Quantity_NOC_BLUE2);
aisTrihedron->SetLabel(Prs3d_DP_XAxis, "X" );
aisTrihedron->SetLabel(Prs3d_DP_YAxis, "Y");
aisTrihedron->SetLabel(Prs3d_DP_ZAxis, "Z");
aisTrihedron->SetTextColor(Quantity_NOC_BLACK);
aisTrihedron->SetSize(70);
aisTrihedron->SetTransformPersistence(new Graphic3d_TransformPers(Graphic3d_TMF_ZoomPers, axis->Ax2().Location()));
aisTrihedron->Attributes()->SetZLayer(Graphic3d_ZLayerId_Topmost);
aisTrihedron->SetInfiniteState(true);
return aisTrihedron;
}