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

runsun runsun at gmail.com
Sun Sep 16 01:09:48 EDT 2018


Add my version for completeness. It's part of my lib so I'll only post the
function signature here
'cos the lib needs to be downloaded anyway. 

It takes a different approach, requiring any 3 points (PQR) in the 3D space.

function arcPts(   
                pqr 
                , n=6 // # of points produced
                , rad= undef  // radius, default = dPQ
                , a = undef    // angle, default = aPQR 
                , a2 = undef  // a 2nd angle, if given, start from a pt
defined by a and rad
                                    // , then move upward away from plane
PQR 
                , ratio= 1     // If given, replace rad.
                )

See the following pic for demo, which is generated with  this code
<https://bitbucket.org/runsun/scadx/src/master/demos/demo_arcPts.scad>  .
<http://forum.openscad.org/file/t602/180916-demo_arcPts.png> 










-----

$  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