[Be...] Posted August 25 Share Posted August 25 Hello,  I was wondering if there were any command to adapt the zoom and position in a 3D view?  I am looking for something similiar to : gom.script.view.adjust_view_to_element_by_front_view. But that would allow me to control the centering and zooming of the corresponding 3D view.  Kind regards,  Benjamin Link to comment Share on other sites More sharing options...
[Ma...] Posted August 27 Share Posted August 27 Hello Benjamin, there is a command gom.script.view.set_view_cartesian: # Example gom.script.view.set_view_cartesian(camera_position=gom.Vec3d(-100,0,0), view_direction=gom.Vec3d(0,1,0), up_direction=gom.Vec3d(0,0,-1)) print(gom.script.view.set_view_cartesian.__doc__) view.set_view_cartesian (Record Current 3D View) - Set View (Cartesian) Parameters: Name | Description | Type | Optional ---------------------------------------------------------------------------------------- camera_position | defines the camera position | Core::Types::BaVec<3,double> | No view_direction | defines the view direction | Core::Types::BaVec<3,double> | No up_direction | defines the up direction | Core::Types::BaVec<3,double> | No scale | defines the scale factor | double | Yes use_animation | defines the use of animation | bool | Yes widget | defines the name of widget | QString | Yes  Hope this helps! Best regards, Matthias  Link to comment Share on other sites More sharing options...
[De...] Posted August 27 Share Posted August 27 ^^ These hidden functions are gold. i've been using  gom.script.view.set_xp_yp_zp ( up_axis='Z+', use_animation=False, widget='3d_view') gom.script.view.adapt_zoom (use_animation=False) gom.script.report.create_report_page...  Link to comment Share on other sites More sharing options...
[Be...] Posted yesterday at 09:50 AM Author Share Posted yesterday at 09:50 AM Hello Matthias,  thanks for the reply, this is exactly what I needed.  I agree with Devon, this is much appreciated and will unlock some crazy features on our side, in term of report automation 🙂  Thanks & einen schönen Tag noch.  Benjamin   1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in