[OpenSCAD] Configuration selection

runsun runsun at gmail.com
Fri Sep 14 16:45:11 EDT 2018


The  associative array
<https://github.com/runsun/OpenSCAD_Tips/blob/master/snippets.md#hash> * 
might be an option:

models = [ "A", [  dim_a,1, dim_b, 2 ]
              , "B", [  dim_a,3, dim_b, 4 ]
              , ...
              ];

data = hash( models, "A");  
dim_a = hash( data, "dim_a");
dim_b = hash( data, "dim_b");




-----

$  Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText  ( OpenSCAD lexer ); $ Tips ; $ Snippets 

--
Sent from: http://forum.openscad.org/



More information about the Discuss mailing list