Hello. I’m trying to create a polygon from a set of points in space. For example, a wall, where you have the XYZ coordinates of each corner and the thickness. I’ve been trying PolygonMeshBuilder, ExtrudePolygon and other methods, but they all work in the XOY plane, so I need to rotate and translate the mesh to the intended location. I’ve also seen Create Custom Meshes - Babylon.js Documentation but that’s not the case, because I don’t have the facets. Finally, I’ve been able to build one face with a ribbon, but now I need to either extrude it or build the other faces. I may be wrong about any of these options. Is there an easy way to build this kind of bodies? Thank you.
BABYLON.MeshBuilder.ExtrudeShapeCustom was able to create a halfpipe shape along a path. It worked really well. But I’m not sure from your description if this is the best approach for you or not. Another link I like is mathematics of ribbons: Mathematics and Ribbons - Babylon.js Documentation
A couple of other options… Blender can export/import by loadAsset, and it has really excellent extrude options. But… I’m thinking you have some points and need to wrap them in mesh?
Thinking… build a wall from the points… sounds like a ribbon.
Info on code design at Developing Build a House from a Floorplan - Babylon.js Documentation
Thank you @aFalcon and @JohnK for your replies. I’ve been reading the articles about floor plans, I find them too complex for what I want to achieve (individual walls), but I’ll continue analyzing them. I may stick to the ribbons and leave them without extruding for now.
But I see a shading problem when building plain ribbons: Babylon.js Playground
Edit: I found the solution,