
Fri, 11/18/2022 - 12:46
Forums:
HI :) I am developing in .net.
Trihedron continues to move. I want to fix it.
I'd like to change the location of Trihedron.
I want to change the location of the ViewCube.
code
//ViewCube
Handle(AIS_ViewCube) aisViewCube = new AIS_ViewCube;
aisViewCube->SetBoxColor(Quantity_NOC_GRAY75);
//aisViewCube->SetFixedAnimationLoop(false);
aisViewCube->SetDrawAxes(false);
aisViewCube->SetSize(55);
aisViewCube->SetFontHeight(12);
aisViewCube->SetTransformPersistence(
new Graphic3d_TransformPers(
Graphic3d_TMF_TriedronPers,
Aspect_TOTP_LEFT_UPPER,
Graphic3d_Vec2i(45, 85)));
myAISContext()->Display(aisViewCube, false);
//aisTrihedron
Handle(Geom_Axis2Placement) axis = new Geom_Axis2Placement(gp::XOY());
Handle(AIS_Trihedron) aisTrihedron = new AIS_Trihedron(axis);
aisTrihedron->SetDatumDisplayMode(Prs3d_DM_WireFrame);
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, "");
aisTrihedron->SetLabel(Prs3d_DP_YAxis, "");
aisTrihedron->SetLabel(Prs3d_DP_ZAxis, "");
aisTrihedron->SetTransformPersistence(
new Graphic3d_TransformPers(Graphic3d_TMF_ZoomPers, axis->Ax2().Location()));
aisTrihedron->Attributes()->SetZLayer(Graphic3d_ZLayerId_Topmost);
aisTrihedron->SetInfiniteState(true);
myAISContext()->Display(aisTrihedron, Standard_False);
This is the current screen.
Attachments:
Fri, 11/18/2022 - 12:48
I am developing in .net.