Loop Class
A Loop is a curve chain that is the boundary of a closed (planar) loop.
@see Curve Collections learning article.
Extends
Methods
| Name | Description | |
|---|---|---|
| constructor(): Loop | ||
| announceToCurveProcessor(processor: RecursiveCurveProcessor, indexInParent: number = -1): void | Invoke processor.announceLoop(this, indexInParent) |
|
| cloneEmptyPeer(): Loop | Create a new Loop with no children |
|
| cloneStroked(options?: StrokeOptions): Loop | Create a loop with the stroked form of this loop. | |
| dgnBoundaryType(): number | Return the boundary type (2) of a corresponding MicroStation CurveVector | |
| dispatchToGeometryHandler(handler: GeometryHandler): any | Second step of double dispatch: call handler.handleLoop(this) |
|
| isSameGeometryClass(other: GeometryQuery): boolean | Test if other is a Loop |
|
| create(...curves: CurvePrimitive[]): Loop Static | Create a loop from a variable length list of CurvePrimitives. | |
| createArray(curves: CurvePrimitive[]): Loop Static | Create a loop from an array of CurvePrimitives. | |
| createPolygon(points: IndexedXYZCollection | Point3d[]): Loop Static | Create a loop from an array of coplanar points. |
Inherited methods
| Name | Inherited from | Description |
|---|---|---|
| allTangents(spacePoint: Point3d, options?: TangentOptions): undefined | CurveLocationDetail[] Inherited | CurveChain | Return all points P on the contained curves such that the line containing spacePoint and P is tangent to the |
| checkForNonLinearPrimitives(): boolean Inherited | CurveChain | Return true if the curve collection has any primitives other than LineSegment3d and LineString3d |
| childIndex(target: CurvePrimitive, alsoSearchProxies?: boolean): undefined | number Inherited | CurveChain | Return the index where target is found in the array of children. |
| clone(): CurveCollection Inherited | CurveChain | Return a deep copy. |
| cloneTransformed(transform: Transform): undefined | CurveCollection Inherited | CurveChain | Create a deep copy of transformed curves. |
| cloneWithExpandedLineStrings(): CurveCollection Inherited | CurveChain | Create a deep copy with all linestrings broken down into multiple LineSegment3d. |
| closestPoint(spacePoint: Point3d, _extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail): undefined | CurveLocationDetail Inherited | CurveChain | Return the closest point on the contained curves. |
| closestTangent(spacePoint: Point3d, options?: TangentOptions): undefined | CurveLocationDetail Inherited | CurveChain | Return the point P on the contained curves such that the line containing spacePoint and P is tangent to the |
| collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLineStrings: boolean = false): CurvePrimitive[] Inherited | CurveChain | Return an array containing all CurvePrimitives in the instance. |
| cyclicCurvePrimitive(index: number, cyclic: boolean = true): undefined | CurvePrimitive Inherited | CurveChain | Return the curve primitive at the given index, optionally using modulo to map index to the cyclic indexing. |
| emitTangents(spacePoint: Point3d, announceTangent: (tangent: CurveLocationDetail) => any, options?: TangentOptions): void Inherited | CurveChain | Announce all points P on the contained curves such that the line containing spacePoint and P is tangent to |
| endPoint(result?: Point3d): undefined | Point3d Inherited | CurveChain | Return the end point of the curve chain (end point of the last child). |
| endPointAndDerivative(result?: Ray3d): undefined | Ray3d Inherited | CurveChain | Return the end point and derivative of the last child of the curve chain. |
| extendRange(range: Range3d, transform?: Transform): void Inherited | CurveChain | Invoke curve.extendRange(range, transform) for each child |
| findParentOfDescendant(descendant: AnyCurve): undefined | CurveCollection Inherited | CurveChain | Return the immediate parent of the input curve in the instance, or undefined if it is not a descendant. |
| getChild(i: number): undefined | CurvePrimitive Inherited | CurveChain | Return a child by index |
| getPackedStrokes(options?: StrokeOptions): undefined | GrowableXYZArray Inherited | CurveChain | Stroke the chain into a simple xyz array. |
| isAlmostEqual(other: GeometryQuery): boolean Inherited | CurveChain | Test for exact structure and nearly identical geometry. |
| isAnyRegion(): this is AnyRegion Inherited | CurveChain | Type guard for AnyRegion |
| isLoop(): this is Loop Inherited | CurveChain | Type guard for Loop |
| isPath(): this is Path Inherited | CurveChain | Type guard for Path |
| isPhysicallyClosedCurve(tolerance: number = Geometry.smallMetricDistance, xyOnly: boolean = false): boolean Inherited | CurveChain | Whether the chain start and end points are defined and within tolerance. |
| maxGap(): number Inherited | CurveChain | Return the max gap between adjacent primitives in Path and Loop collections. |
| primitiveIndexAndFractionToCurveLocationDetailPointAndDerivative(index: number, fraction: number, cyclic: boolean = false, result?: CurveLocationDetail): undefined | CurveLocationDetail Inherited | CurveChain | Evaluate an indexed curve at a fraction. |
| projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): undefined | Range1d Inherited | CurveChain | Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters |
| range(transform?: Transform, result?: Range3d): Range3d Inherited | CurveChain | Return the range of the entire GeometryQuery tree. |
| reverseChildrenInPlace(): void Inherited | CurveChain | Reverse each child curve (in place). |
| reverseInPlace(): void Inherited | CurveChain | Same as reverseChildrenInPlace. |
| startPoint(result?: Point3d): undefined | Point3d Inherited | CurveChain | Return the start point of the curve chain (start point of the first child). |
| startPointAndDerivative(result?: Ray3d): undefined | Ray3d Inherited | CurveChain | Return the start point and derivative of the first child of the curve chain. |
| sumLengths(): number Inherited | CurveChain | Return the sum of the lengths of all contained curves. |
| tryAddChild(child: AnyCurve): boolean Inherited | CurveChain | Add a child curve. |
| tryTransformInPlace(transform: Transform): boolean Inherited | CurveChain | Apply transform recursively to children |
| tryTranslateInPlace(dx: number, dy: number = 0.0, dz: number = 0.0): boolean Inherited | CurveChain | Try to move the geometry by dx,dy,dz. |
| areAlmostEqual(a: GeometryQuery, b: GeometryQuery): boolean Static Inherited | CurveChain | Apply instance method isAlmostEqual if both are defined. |
| createCurveLocationDetailOnAnyCurvePrimitive(source: GeometryQuery, fraction: number = 0.5): undefined | CurveLocationDetail Static Inherited | CurveChain | Find any CurvePrimitive in the source and evaluate it at the given fraction. |
Properties
| Name | Type | Description | |
|---|---|---|---|
| curveCollectionType Readonly | "loop" | String name for schema properties | |
| isInner | boolean | Tag value that can be set to true for user code to mark inner and outer loops. |
Inherited properties
| Name | Type | Inherited from | Description |
|---|---|---|---|
| _curves Protected Inherited | CurvePrimitive[] | CurveChain | The curve primitives in the chain. |
| children Accessor Inherited ReadOnly | CurvePrimitive[] | CurveChain | Return the array of CurvePrimitive |
| geometryCategory Readonly Inherited | "curveCollection" | CurveChain | String name for schema properties |
| isAnyRegionType Accessor Inherited ReadOnly | boolean | CurveChain | Return true for planar region types: * Loop* ParityRegion* UnionRegion |
| isClosedPath Accessor Inherited ReadOnly | boolean | CurveChain | Return true for a single-loop planar region type, i.e. Loop.* This is NOT a test for physical closure of a Path. |
| isOpenPath Accessor Inherited ReadOnly | boolean | CurveChain | Return true for a Path, i.e. a chain of curves joined head-to-tail |
Defined in
- curve/Loop.ts Line 25
Last Updated: 28 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.