Hello,
I try to integrate OpenScad with my product.
The aim is to control OpenScad animation from an external program.
This program produces somes variables, updates them in time, like angle of a
beam.
I want to see in OpenScad a moving beam with angle corresponding to the
variable
How can connect an external program to control OpenScad variables and
animation ?
If variables are not accessible it could be only control $t from external,
or just control animation widget or by CLI...
I could even develop some code but I need some advices...
What can be done ?
a+
Vicnet
--
View this message in context: http://forum.openscad.org/Animation-external-control-tp14234.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
This code might help get you started, but the output from OpenSCAD is saved
as a png image file:
http://forum.openscad.org/Bug-in-Animate-tp13528p13533.html
--
View this message in context: http://forum.openscad.org/Animation-external-control-tp14234p14236.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
vicnet wrote
Hello,
I try to integrate OpenScad with my product.
The aim is to control OpenScad animation from an external program.
This program produces somes variables, updates them in time, like angle of
a beam.
I want to see in OpenScad a moving beam with angle corresponding to the
variable
How can connect an external program to control OpenScad variables and
animation ?
If variables are not accessible it could be only control $t from external,
or just control animation widget or by CLI...
I could even develop some code but I need some advices...
What can be done ?
a+
Vicnet
Check out this thread:
http://forum.openscad.org/Animating-gif-with-3D-rotation-td14011.html
http://forum.openscad.org/Animating-gif-with-3D-rotation-td14011.html
Especially this post
http://forum.openscad.org/Animating-gif-with-3D-rotation-tp14011p14029.html
in which a python script runscad.py (see my signature below) is used to run
OpenScad in console to produce animation gifs.
This is not controlling an opened Openscad with external program as what you
described, but might give you some idea.
Another approach is to save your variables in a .scad file and use it or
include it as usual.
$ Runsun Pan, PhD
$ libs: doctest , faces ( git ), offline doc ( git ),runscad.py( 1 , 2 , git );
$ tips: hash( 1 , 2 ), sweep , var , lerp , animGif
--
View this message in context: http://forum.openscad.org/Animation-external-control-tp14234p14239.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Thanks runrun and Trygon for your suggestion.
It could be a easy first step integration.
I will try this.
a+
Vicnet
--
View this message in context: http://forum.openscad.org/Animation-external-control-tp14234p14242.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Hello,
I check the source code and update of $t is quite similar to modify source
code and reload it.
When animation is run, $t is updated, and source is get from editor and
recompiled.
Except file loading, it is the same thing (get text and compile) with
auto-reload function if var are modified in scad source directly.
a+
Vicnet
--
View this message in context: http://forum.openscad.org/Animation-external-control-tp14234p14245.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Hello,
To improve animation on bigger model or to be faster, OpenScad should cache
'frame compilation' to avoid recalculation when time change.
Something like that:
a+
Vicnet
--
View this message in context: http://forum.openscad.org/Animation-external-control-tp14234p14249.html
Sent from the OpenSCAD mailing list archive at Nabble.com.