Replies: 1 comment
-
Yes - let's imagine this surface is a 2D function on a grid: every x-y location has a corresponding z height. Now you just need to build a cube where this surface becomes the top face. You only need to add four verts: the lower corners. Then for each of the four sides of your surface you assemble an indexed side face polygon including two of the new verts. Use our |
Beta Was this translation helpful? Give feedback.
-
Imagine, we have a zero-thickness surface (like a slightly crumpled paper, or earth surface with hills and ravines) described as a mesh: points + triangles.
And now we want to create a solid manifold object from it by extruding in Z direction by some amount.
Current implementation of the Manifold offers Extrude() that only takes array of 2D polygons as input.
So, the simplest straightforward solution I can imagine is creating lots of triangle prisms for each mesh triangle and then applying a union operation on them. That looks ugly and probably too slow even with the ultra-fast Manifold engine.
Smarter way is to navigate through all the triangles, find border edges (half-edges with no pair), build 2.5D-contours and use them to make walls. Then somehow add tops and bottoms for each of the contours. The latter part seems not that easy for me.
Maybe I missing something and there is something hidden deep in the Manifold that might help solving this?
Beta Was this translation helpful? Give feedback.
All reactions