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 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.
-
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
-
@gilboonet Thank you ! I will give this a try!
-
@z3dev oh ok good to know! Thank you!
-
@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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login