Extrude shape which is not in the (x,z) plane

Hi everybody,

i’d like to extrude a shape defined by three points pt1,pt2,pt3. The plane defined by theses three points is not in the (x,z) plane.

This is a draft of what i want

d is the depth of the extrusion.

Is it possible to do this without any projections on the (x,z) plane ?

Thanks for your answers


@bvaisman this does not answer your question directly but just to be clear there are two extrusions available ExtrudeShape and ExtrudePolygon and there are differences

ExtrudePolygon needs the polygon (to be extruded) to be in the (x, z) plane, the extrusion is along y only the ends of the extrusion will be a filled polygon which will be drawn correctly even if the polygon is convex, the polygon can contain holes.

ExtrudeShape needs the shape (to be extruded) to be in the (x, y) plane, the extrusion can be along any path, the ends can be filled (capped) or not. When the shape is convex capped ends will not be filled correctly, the shape cannot contain holes. This extrusion allows scaling and rotation of the shape along the extrusion.

Unfortunately neither extrude from shapes in other planes.

You could use Creating Ribbons | Babylon.js Documentation (a ribbon underlays ExtrudeShape) as a ribbon will allow you to determine the start and end points of the multiple paths needed to create a ribbon.

1 Like