[OpenSCAD] Modify the viewport without reopening OpenSCAD

Juan C.Cilleruelo juanc.cilleruelo at gmail.com
Fri Jul 26 13:33:20 EDT 2019


Hello all!

I have an external program that opens OpenSCAD giving it as parameter a 
filename with the instructions.

When the data on my program is changed, I modify only the target file 
and OpenSCAD, because is in "Autoreload = True", draws the new graphic 
again.

Until this point, all works well. Actually, all works very well. But I 
think I need new functionality or a trick.


My program works on various levels, and when the user goes down a level 
needs to change the viewport with the mouse to see the sub-part properly.

As it run now, when the user goes up the previous level, the viewport is 
now the changed level, this is, the appropriate for the sub-part, not 
the appropriate for the current part.


{***********************************************************************************}

What I need is: When the user goes down to a sublevel, save the current 
viewport, and when the user returns to this level, restore the saved 
viewport.

{***********************************************************************************}


If it's possible without close and reopen OpenSCAD.

My program makes some changes in the registry before calling OpenSCAD. 
I've see State registry variable that saves some info. But I don't know 
his format, nor the values saved nor if I the modifications in this 
value are immediate or is necessary reopen OpenSCAD.


Thank you all for your help.




More information about the Discuss mailing list