
Wed, 05/04/2016 - 09:12
Forums:
Hello!
I need to create a gizmo in the visualizer for selected objects.
Something like in attached picture.
Are there some general tips on how to do this with OpenCASCADE?
Or at least how draw any shape on screen which will be attached to the "camera" and not changes its size when zoomed/rotated?
Attachments:
Wed, 05/04/2016 - 11:47
Hello!
This may not be the best way
Have a look at OpenGl_Trihedron for drawing it (this doesn't include selection). ViewerTest_OpenGlCommands.cxx has example of using OpenGl_Element.
For creating plane from part transformation
Handle(Geom_Axis2Placement) shapeCoordSystemPlacement = new Geom_Axis2Placement(gp::XOY());
shapeCoordSystemPlacement->Transform(AIS_Shape->Transformation());
Handle(Geom_Plane) axe_xy_plane = new Geom_Plane(shapeCoordSystemPlacement->Location(), shapeCoordSystemPlacement->Direction());
Handle(Geom_Plane) axe_xz_plane = new Geom_Plane(shapeCoordSystemPlacement->Location(), shapeCoordSystemPlacement->YDirection());
Handle(Geom_Plane) axe_yz_plane = new Geom_Plane(shapeCoordSystemPlacement->Location(), shapeCoordSystemPlacement->XDirection());
For other calculations use http://cvl-robot.hateblo.jp/entry/2015/12/07/164319
Wed, 05/04/2016 - 12:50
Thank you very much, Daniel! You helped me a lot :)
Wed, 05/04/2016 - 15:19
Dear Alex,
You can try the new interactive object AIS_Manipulator.
This object is not yet available in OCCT master, but it can be retrieved from the branch CR27038_3 of official git repository.
You are welcome to our support services if you need any help!
Best regards
FSR
Thu, 05/05/2016 - 07:05
Oh, that is really great! Thank you all for help!
Wed, 05/04/2016 - 15:32
Thats great news
Thu, 05/05/2016 - 10:32
AIS_Manipulator sounds exciting indeed...
Mon, 12/18/2017 - 23:54
You mean a gimbal.. not a gizmo