Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

How to change the setting of a 2D Cam from perspectiv to orthographic

#1
Hello,

i want to create a 2D cam with orthographic view.
i know it is possible to do it manuell by uncheck the checkbox in the camera settings.

Is there a way to change the camera to an orthographic camera via the python api ?

I did not find the command in the example:
https://robodk.com/doc/en/PythonAPI/robo....Cam2D_Add

best regards,
Jonas
#2
You can switch the camera settings to Orthographic or perspective using the API by calling these functions:
Code:
# Change to perspective view:
camera.setParam("Settings","Perspective")

# Change to orthographic view:
camera.setParam("Settings","Orthographic")
#3
(10-14-2024, 04:18 PM)Albert Wrote: You can switch the camera settings to Orthographic or perspective using the API by calling these functions:
Code:
# Change to perspective view:
camera.setParam("Settings","Perspective")

# Change to orthographic view:
camera.setParam("Settings","Orthographic")

That works.
Thank you!
#4
Great, thank you for your feedback!
  




Users browsing this thread:
1 Guest(s)