rectangleEdgeTransform MethodStatic
If data is one of several forms of a rectangle, return its edge Transform.
- Points are considered a rectangle if, within the first 4 points:- vectors from 0 to 1 and 0 to 3 are perpendicular and have a non-zero cross product
- vectors from 0 to 3 and 1 to 2 are the same
 
rectangleEdgeTransform(data: IndexedXYZCollection | Point3d[] | AnyCurve, requireClosurePoint: booleantrue): undefined | Transform
@returns Transform with origin at one corner, x and y columns extending along two adjacent sides, and unit normal in z column. If not a rectangle, return undefined.
| Parameter | Type | Description | 
|---|---|---|
| data | IndexedXYZCollection | Point3d[] | AnyCurve | points in one of several formats: * LineString * Loop containing rectangle content * Path containing rectangle content * Array of Point3d[] * IndexedXYZCollection | 
| requireClosurePoint | boolean | whether to require a 5th point equal to the 1st point. | 
Returns - undefined | Transform
Transform with origin at one corner, x and y columns extending along two adjacent sides, and unit normal in z column. If not a rectangle, return undefined.
Defined in
- curve/RegionOps.ts Line 570
Last Updated: 24 June, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.