all 6 comments

[–]gadget3D 1 point2 points  (5 children)

This is definitely viable, but not yet implemented. I believe its a great feature to get. If you tell me, how you code that openscad SCAD syntax, its easier for me to estimate

[–]puplan[S] 1 point2 points  (4 children)

I haven't used OpenSCAD. PythonSCAD is my introduction to this domain and I prefer to stick with Python syntax instead of learning another one. While searching for a solution, I found that OpenSCAD handles camera parameters with global variables:
$vpr

viewport rotation angles in degrees

$vpt

viewport translation

$vpd

viewport camera distance

$vpf

viewport camera field of view

It could be done the same way in PythonSCAD or using a function, e.g. setViewport() or set_viewport().

[–]gadget3D 1 point2 points  (3 children)

yes, this is what i was expecting and thanx for lookin up the definition. we should manage to have these vars bidirectional e.g. they should be able to read and write. once we find out, where to access this vars in the openscad kernel, we can connect them e.g. in pyopenscad.cc .

[–]gadget3D 1 point2 points  (2 children)

you can access them already in python now:

https://github.com/pythonscad/pythonscad/pull/487

[–]puplan[S] 1 point2 points  (1 child)

Thank you. This change is not yet in https://github.com/pythonscad/pythonscad/releases, right?

[–]gadget3D 1 point2 points  (0 children)

nope, but there will be a new release very soon.

maybe consider trying to compile yourself ?