
Wed, 11/16/2022 - 11:36
Hello everyone,
I want a trihedron which should not be zoomed in or out, I mean, trihedron should be same size when zoom in or out. Actually I managed that with "SetTransformPersistence" but doesn't work exactly as I want. For example I give a point as (300,0,0) and will create a trihedron on this point. Without setting transform persistence, everthing is okay and trihedron is really on this point. But when I set the transform persistence, trihedron size will be fixed but when I zoom in or out, trihedron looks totally on different point. I attached a photo for example. Thanks in advance and can't wait to see your replies.
My code:
auto originTrihedron = gp_Pnt(originX, originY, originZ);
gp_Ax2 position;
position.SetLocation(originTrihedron);
position.Rotate(gp_Ax1(originTrihedron, gp_Dir(1, 0, 0)), originA * M_PI / 180);
position.Rotate(gp_Ax1(originTrihedron, gp_Dir(0, 1, 0)), originB * M_PI / 180);
position.Rotate(gp_Ax1(originTrihedron, gp_Dir(0, 0, 1)), originC * M_PI / 180);
Handle_Geom_Axis2Placement axis = new Geom_Axis2Placement(position);
Handle(AIS_Trihedron) ais_trihedron_shape = new AIS_Trihedron(axis);
ais_trihedron_shape->SetTransformPersistence(new Graphic3d_TransformPers(Graphic3d_TMF_ZoomPers, originTrihedron));
or
ais_trihedron_shape->SetTransformPersistence(new Graphic3d_TransformPers(Graphic3d_TMF_ZoomPers));
both version doesn't work
Wed, 11/16/2022 - 12:57
Dear Batuhan,
solution is like code below;