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

Support `import` of SVG/STL #443

Open kyletreece opened 11 months ago

kyletreece commented 11 months ago

Hi there!

I got the error in the title of this issue when trying to run extopenscad for an scad script that includes a call to the import function, specifically to import in an SVG file. Seems like the openscad import function is not supported in implicitCAD. Is this true, or is there some other way to bring in SVG files?

Thanks in advance for your help!

sorki commented 10 months ago

Hi!

Seems like the openscad import function is not supported in implicitCAD. Is this true, or is there some other way to bring in SVG files?

Yes this is true. We currently don't have support for importing SVG/STL.

Reminds me of the previous attempt to make text rendering working by @isovector at https://github.com/isovector/cad-models/blob/master/src/Text.hs so maybe if you convert SVG into polygon this could work although there might a better way that would avoid direct sampling and instead treated SVG as a first class citizen that would only be sampled during rendering.

kyletreece commented 10 months ago

Ok got it, thank you for the reply!

sorki commented 10 months ago

I've altered the title a bit and gonna keep this open as a reminder for us. Also labeled as Good first issue.