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 | Test if other is an instance of 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): AnyCurve | 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 variable length list of CurvePrimitives | |
createArray(curves: CurvePrimitive[]): Loop Static | Create a loop from an array of curve primitives | |
createPolygon(points: Point3d[] | IndexedXYZCollection): Loop Static | Create a loop from an array of points |
Inherited methods
Name | Inherited from | Description |
---|---|---|
checkForNonLinearPrimitives(): boolean | CurveChain | return true if the curve collection has any primitives other than LineSegment3d and LineString3d |
childIndex(target: undefined | CurvePrimitive, alsoSearchProxies?: boolean): undefined | number | CurveChain | Return the index where target is found in the array of children |
clone(): CurveCollection | CurveChain | Return a deep copy. |
cloneTransformed(transform: Transform): undefined | CurveCollection | CurveChain | Create a deep copy of transformed curves. |
cloneWithExpandedLineStrings(): CurveCollection | CurveChain | Create a deep copy with all linestrings expanded to multiple LineSegment3d. |
closestPoint(spacePoint: Point3d): undefined | CurveLocationDetail | CurveChain | Return the closest point on the contained curves |
collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLineStrings: boolean = false): CurvePrimitive[] | CurveChain | Return an array containing only the curve primitives. |
cyclicCurvePrimitive(index: number, cyclic: boolean = true): undefined | CurvePrimitive | CurveChain | Return the [index] curve primitive, optionally using modulo to mapindex to the cyclic indexing. |
extendRange(range: Range3d, transform?: Transform): void | CurveChain | invoke curve.extendRange(range, transform) for each child |
getChild(i: number): undefined | CurvePrimitive | CurveChain | Return a child by index |
getPackedStrokes(options?: StrokeOptions): undefined | GrowableXYZArray | CurveChain | Stroke the chain into a simple xyz array. |
isAlmostEqual(other: GeometryQuery): boolean | CurveChain | test for exact structure and nearly identical geometry. |
maxGap(): number | 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 | CurveChain | Evaluate an indexed curve at a fraction. |
projectedParameterRange(ray: Ray3d | Vector3d, lowHigh?: Range1d): undefined | Range1d | CurveChain | Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of projection. |
range(transform?: Transform, result?: Range3d): Range3d | CurveChain | return the range of the entire (tree) GeometryQuery |
reverseChildrenInPlace(): void | CurveChain | Reverse each child curve (in place) |
sumLengths(): number | CurveChain | Return the sum of the lengths of all contained curves. |
tryAddChild(child: undefined | AnyCurve): boolean | CurveChain | add a child curve. |
tryTransformInPlace(transform: Transform): boolean | CurveChain | Apply transform recursively to children |
tryTranslateInPlace(dx: number, dy: number = 0.0, dz: number = 0.0): boolean | CurveChain | try to move the geometry by dx,dy,dz |
areAlmostEqual(a: undefined | GeometryQuery, b: undefined | GeometryQuery): boolean Static | CurveChain | apply instance method isAlmostEqual if both are defined. |
createCurveLocationDetailOnAnyCurvePrimitive(source: undefined | GeometryQuery, fraction: number = 0.5): undefined | CurveLocationDetail Static | CurveChain | * Find any curve primitive in the source. |
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 | CurvePrimitive[] | CurveChain | The curve primitives in the chain. |
children Accessor ReadOnly | CurvePrimitive[] | CurveChain | Return the array of CurvePrimitive |
geometryCategory Readonly | "curveCollection" | CurveChain | String name for schema properties |
isAnyRegionType Accessor ReadOnly | boolean | CurveChain | Return true for planar region types: * Loop * ParityRegion * UnionRegion |
isClosedPath Accessor 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 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: 20 June, 2023