miho / JCSG

Java implementation of BSP based CSG (Constructive Solid Geometry)
Other
177 stars 52 forks source link

[FEATURE ADD] Add SVG loading and extrusion #34

Open madhephaestus opened 7 years ago

madhephaestus commented 7 years ago

I have this feature ready to go as well as #32 and can do a clean-room import of this code if the API additions to CSG I made in #33 are approved. This includes a generic bezier path extraction in 2 dimensions for full featured SVG loading (lines and curves). I have used this feature to create an SVG in inkscape, then extrude it in JCSG. The SVG loader can detect when objects are "holes" and semi-intelligently remove holes on the fly. For a functioning example:

https://github.com/Technocopia/Graphics/blob/master/Graphics/SimplifiedLogo/simplified%20logo.svg

becomes

https://github.com/Technocopia/Graphics/blob/master/Graphics/SimplifiedLogo/simplified_logo.stl