[Be...] Posted Monday at 03:37 PM Share Posted Monday at 03:37 PM 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 Wednesday at 08:41 AM Share Posted Wednesday at 08:41 AM 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 Wednesday at 07:28 PM Share Posted Wednesday at 07:28 PM ^^ 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...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in