Perspective Viewport Properties
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Perspective Viewport Properties
Am I missing something or is there no way to adjust the Perspective Camera Properties. Most CAD programs have a way to adjust the Lens properties which make more or less skew in relation to say a wide angle lens or a normal say 50mm lens. I find the default perspective to be way to wide angle and blown out. Would like to be able to change this.
Re: Perspective Viewport Properties
Check out the documentation for the class SoPerspectiveCamera
With our python interface you're able to change some settings there. As start point you can use this line:
But make sure that you have switch to perspective mode before.
With our python interface you're able to change some settings there. As start point you can use this line:
Code: Select all
from pivy import coin
camera=Gui.ActiveDocument.ActiveView.getCameraNode()
camera.heightAngle.setValue(...)
Re: Perspective Viewport Properties
Hi,
Looks like the option heightAngle is no more accessible. Is there in the meantime something easier to change the viewangle directly in Freecad?
lg
HoWil
Looks like the option heightAngle is no more accessible. Is there in the meantime something easier to change the viewangle directly in Freecad?
lg
HoWil
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Perspective Viewport Properties
Works here:HoWil wrote:Looks like the option heightAngle is no more accessible.
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10665 (Git)
Build type: Release
Branch: master
Hash: 47847513a85ff6615774ef628230f79e37471daf
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Note:
* camera.heightAngle attribute is not listed in autocompleter, you have to type it in manually. This isn't the only place where it happens btw, but attributes of coin nodes are especially well hidden. They don't appear in dir(camera) and camera.__dict__.
* angle is in radians.
Re: Perspective Viewport Properties
THX. All I needed to know !DeepSOIC wrote: Note:
* camera.heightAngle attribute is not listed in autocompleter, you have to type it in manually. This isn't the only place where it happens btw, but attributes of coin nodes are especially well hidden. They don't appear in dir(camera) and camera.__dict__.
* angle is in radians.
Re: Perspective Viewport Properties
After all these years does somebody know if there is a GUI for camera properties, __including__ these lens properties? If not, would it be a welcome thing to have? If yes, is there some module/marcro/source code known that comes most close as a starting point? Did someone already dig into such project?
EDIT: created feature request https://forum.freecadweb.org/viewtopic.php?f=8&t=56554
EDIT: created feature request https://forum.freecadweb.org/viewtopic.php?f=8&t=56554
Read my profile in order to get more detail about my tools and preferences.
-
- Posts: 161
- Joined: Mon Feb 01, 2021 7:22 pm
Re: Perspective Viewport Properties
I agree, most of the responses to this feature request are answers about moving the camera, which is not the same as the camera focal length. Being able to set the focal length of the perspective camera is a must have feature for rendering small parts.atererus wrote: ↑Thu Mar 11, 2021 2:39 pm After all these years does somebody know if there is a GUI for camera properties, __including__ these lens properties? If not, would it be a welcome thing to have? If yes, is there some module/marcro/source code known that comes most close as a starting point? Did someone already dig into such project?
EDIT: created feature request https://forum.freecadweb.org/viewtopic.php?f=8&t=56554
Re: Perspective Viewport Properties
Try searching the web for pivy that are python library that expose coin3d methods.
Probably necrobumping after 1 year a post already necrobumped after 3 years or so is not a way to obtain an answer.
Or trying to see what was answered to the feature request.
Regards
Carlo D
Probably necrobumping after 1 year a post already necrobumped after 3 years or so is not a way to obtain an answer.
Or trying to see what was answered to the feature request.
Regards
Carlo D
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
Re: Perspective Viewport Properties
Please provide me with links to *FreeCad* articles about all kind camera parameters. Position, focal length distortion etc ... I while ago I started working on scripts, but stumbled on not having enough information. Internet is quite slow here (30 Kb/s downto 5 Kb/s) and it is not fun searching that way, so please do the search for me, and I'll restart, ans continue working on a camera GUI.
Read my profile in order to get more detail about my tools and preferences.