[OpenSCAD] Creating pie (pizza slice) shape (need a dynamic length array)

Torsten Paul Torsten.Paul at gmx.de
Sun Sep 16 11:45:02 EDT 2018


On 09/16/2018 05:38 PM, TLC123 wrote:
>                  polygon(
>                      concat(
>                          [[0,0]],
>                          [for(i=[start:step:end+step])
>                              [cos(min(end,i))*r,sin(min(end,i))*r]]  ));} >
The concat() is not needed anymore with the latest list comprehension
updates. It's possible to combine multiple generator expressions
or just simple values, e.g.:

polygon([
	[0,0],
	for(i=[start:step:end+step]) [cos(min(end,i))*r,sin(min(end,i))*r]
]);

ciao,
   Torsten.



More information about the Discuss mailing list