[OpenSCAD] eval( ) ???

runsun runsun at gmail.com
Tue May 12 20:41:29 EDT 2015


What do you guys think to have an eval() to evaluate code ?I am thinking that
this would help in area where "function as a variable"  is needed, which
openscad can't do.For example, we can have a module call Line from point P
to Q :

> module Line ( [P,Q], 
*
> formula="sin(x)"
*
> , 
*
> scope=["x",[0,90,180,270]]
*
>   ){      formula to be converted to points :     points0 = 
*
> eval( formula, scope )
*
>     (some other processings to use points0): points = ....    faces= ....   
> polyhedron( points= points, faces=faces)} 

Once this is set, we can have all kinds of different shapes of Lines,
generating from this single Line module.




-----

$  Runsun Pan, PhD 

$ -- OpenScad_DocTest: doc and unit test ( Github , Thingiverse  ) 

$ -- hash parameter model: here , here 

$ -- Linux Mint 17.1 Rebecca x64  + OpenSCAD 2015.03.15/2015.04.01.nightly 




--
View this message in context: http://forum.openscad.org/eval-tp12627.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20150512/55c5d83d/attachment-0002.html>


More information about the Discuss mailing list