Haskell-Things / ImplicitCAD

A math-inspired CAD program in haskell. CSG, bevels, and shells; 2D & 3D geometry; 2D gcode generation...
https://implicitcad.org/
GNU Affero General Public License v3.0
1.32k stars 140 forks source link

openscad quasiquote #480

Open aavogt opened 7 months ago

aavogt commented 7 months ago

I like circle($fn=6), but I don't see it in the haskell api. While it is possible to encode such optional arguments in haskell, I think a quasiquoter would be better.

hex1 d = [scad| circle(d, $fn=6) |] -- too light
hex2 d = [scad2d| circle($$d, $fn=6) |] -- too heavy
hex3 d = [scad| circle($(d), $fn=6) |] -- just right?