ST_Loft

Updated at:

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 Name

Description

geom2d

A geometry object of the Polygon2D type.

line3d

A geometry object of the LineString3D type.

chamfer

The number of segments for chamfer smoothing.

Description

This function lofts or extrudes a 2D polygon along a 3D path. The corners of the 3D path are chamfered using Bezier curves. If you set the chamfer parameter to a larger value, more meshgeom vertices are generated.

Effect diagram

A 2D polygon with a hole is lofted along a 3D path. The chamfer parameter is set to 4.A 2D polygon lofted along a 3D path.

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 ...