This topic describes the ST_Loft function. This function lofts or extrudes a 2D polygon along a 3D path.
Syntax
meshgeom ST_Loft(geometry geom2d, geometry line3d, int4 chamfer);Parameters
| Parameter | Description |
|---|---|
| geom2d | The geometry object, which can only be a 2D polygon. |
| line3d | The geometry object, which can be a 3D linestring. |
| chamfer | The number of segments for chamfering. |
Description
This function lofts or extrudes a 2D polygon along a 3D path. The corners of the 3D path are chamfered by using Bezier curves. If you set the chamfer parameter to a larger value, more meshgeom vertices are generated.
Effect diagram
The following figure shows that a 2D polygon with holes is lofted along a 3D path with the chamfer parameter set to 4. 

Examples
SELECT ST_AsText(ST_Loft(
'POLYGON((0 0, 1 0, 1 1, 0 0), (0.5 0.5, 0.6 0.5, 0.6 0.6, 0.5 0.5))',
'LINESTRING(0 0 0, 10 0 0, 10 10 0, 10 10 10)', 5));
---------------------------------------------------------------
MESHGEOM(PATCH(POLYGON Z ((0 -0.333333333333333 0.666666666666667,0 0.666666666666667 -0.333333333333333,0 -0.333333333333333 -0.333333333333333 ...