3d to 2d
-
Anyone have any suggestions on how i can go from an extruded shape back to 2d, like how i can make an extruded cylinder back to a circle? I'm asking since I'm trying to generate .svg files.
-
@Maria-Alzate Just for your information, as part of the last release, there's a new project() function which can project a 3D shape to a 2D shape.
-
@z3dev oh ok good to know! Thank you!
-
@gilboonet Thank you ! I will give this a try!
-
I made a function (vol2surf) that returns a shape from a volume and an axis, but it's gross and wasn't fully tested. You'll maybe get a shape that needs winding reversal. code : https://github.com/gilboonet/gilboonet.github.io/blob/master/demos/gigi.js run : https://jscad.xyz/#https://raw.githubusercontent.com/gilboonet/gilboonet.github.io/master/demos/gigi.js
-
@Maria-Alzate sadly, no.
there's a concept call 'projection', which projects the outlines of a 3D shape to a plane, which becomes basically 2D. this functionality has been requested several times over the years, but there has never been a implementation provided.
https://github.com/jscad/OpenJSCAD.org/issues/99
i think others are basically taking a very thin slice, converting the points into 2D, and creating a 2D shape from the points.
however, this doesn't work if there are holes in the 3D shape.