@itwin/core-geometry 5.10.2 → 5.11.0-dev.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/lib/cjs/bspline/BSplineCurve.d.ts +1 -1
- package/lib/cjs/bspline/BSplineCurve.js +1 -1
- package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipNode.d.ts +2 -2
- package/lib/cjs/clipping/BooleanClipNode.js +2 -2
- package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.d.ts +8 -2
- package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js +8 -2
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.d.ts +26 -24
- package/lib/cjs/clipping/ClipPrimitive.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js +44 -35
- package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js +1 -1
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ClipVector.d.ts +4 -3
- package/lib/cjs/clipping/ClipVector.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipVector.js +4 -3
- package/lib/cjs/clipping/ClipVector.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts +2 -2
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +2 -2
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/curve/RegionOps.d.ts +1 -1
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +1 -1
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/serialization/BentleyGeometryFlatBuffer.d.ts +5 -2
- package/lib/cjs/serialization/BentleyGeometryFlatBuffer.d.ts.map +1 -1
- package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js +5 -2
- package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.d.ts +21 -5
- package/lib/cjs/solid/RotationalSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RotationalSweep.js +27 -4
- package/lib/cjs/solid/RotationalSweep.js.map +1 -1
- package/lib/cjs/solid/SolidPrimitive.d.ts +7 -1
- package/lib/cjs/solid/SolidPrimitive.d.ts.map +1 -1
- package/lib/cjs/solid/SolidPrimitive.js +8 -1
- package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve.d.ts +1 -1
- package/lib/esm/bspline/BSplineCurve.js +1 -1
- package/lib/esm/bspline/BSplineCurve.js.map +1 -1
- package/lib/esm/clipping/BooleanClipNode.d.ts +2 -2
- package/lib/esm/clipping/BooleanClipNode.js +2 -2
- package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.d.ts +8 -2
- package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPlane.js +8 -2
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.d.ts +26 -24
- package/lib/esm/clipping/ClipPrimitive.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.js +44 -35
- package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.js +1 -1
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ClipVector.d.ts +4 -3
- package/lib/esm/clipping/ClipVector.d.ts.map +1 -1
- package/lib/esm/clipping/ClipVector.js +4 -3
- package/lib/esm/clipping/ClipVector.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts +2 -2
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +2 -2
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/curve/RegionOps.d.ts +1 -1
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +1 -1
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/serialization/BentleyGeometryFlatBuffer.d.ts +5 -2
- package/lib/esm/serialization/BentleyGeometryFlatBuffer.d.ts.map +1 -1
- package/lib/esm/serialization/BentleyGeometryFlatBuffer.js +5 -2
- package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.d.ts +21 -5
- package/lib/esm/solid/RotationalSweep.d.ts.map +1 -1
- package/lib/esm/solid/RotationalSweep.js +26 -4
- package/lib/esm/solid/RotationalSweep.js.map +1 -1
- package/lib/esm/solid/SolidPrimitive.d.ts +7 -1
- package/lib/esm/solid/SolidPrimitive.d.ts.map +1 -1
- package/lib/esm/solid/SolidPrimitive.js +6 -0
- package/lib/esm/solid/SolidPrimitive.js.map +1 -1
- package/package.json +3 -3
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.RotationalSweep = void 0;
|
|
7
|
+
exports.RotationalSweep = exports.RotationalSweepConstructiveFrameOptions = void 0;
|
|
8
8
|
const StrokeOptions_1 = require("../curve/StrokeOptions");
|
|
9
9
|
const Geometry_1 = require("../Geometry");
|
|
10
10
|
const Angle_1 = require("../geometry3d/Angle");
|
|
@@ -12,6 +12,23 @@ const Matrix3d_1 = require("../geometry3d/Matrix3d");
|
|
|
12
12
|
const Transform_1 = require("../geometry3d/Transform");
|
|
13
13
|
const SolidPrimitive_1 = require("./SolidPrimitive");
|
|
14
14
|
const SweepContour_1 = require("./SweepContour");
|
|
15
|
+
/**
|
|
16
|
+
* Options for [[RotationalSweep.getConstructiveFrame]].
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
class RotationalSweepConstructiveFrameOptions extends SolidPrimitive_1.SolidPrimitiveConstructiveFrameOptions {
|
|
20
|
+
/**
|
|
21
|
+
* Though the y-axis of the frame returned by [[RotationalSweep.getConstructiveFrame]] is perpendicular to the
|
|
22
|
+
* contour plane, it can point in one of two directions. This option allows the caller to control this direction.
|
|
23
|
+
* * If `false` (default), the y-axis of the frame is the normal reported by the contour. This direction is
|
|
24
|
+
* independent of the solid's sweep direction.
|
|
25
|
+
* * If `true`, the y-axis of the frame is aligned to the solid's sweep direction: specifically, it points in the
|
|
26
|
+
* direction of positive sweep. With this choice, columns 0, 1 of the returned frame can be used to construct the
|
|
27
|
+
* `vector0` and `vector90` vectors needed to construct a centerline arc for the solid.
|
|
28
|
+
*/
|
|
29
|
+
alignToSweep;
|
|
30
|
+
}
|
|
31
|
+
exports.RotationalSweepConstructiveFrameOptions = RotationalSweepConstructiveFrameOptions;
|
|
15
32
|
/**
|
|
16
33
|
* A RotationalSweep is:
|
|
17
34
|
* * A planar contour (any Loop, Path, or parityRegion)
|
|
@@ -34,8 +51,8 @@ class RotationalSweep extends SolidPrimitive_1.SolidPrimitive {
|
|
|
34
51
|
this._sweepAngle = sweepAngle;
|
|
35
52
|
}
|
|
36
53
|
/**
|
|
37
|
-
* Create a rotational sweep.
|
|
38
|
-
* @param contour profile to sweep, coplanar with axis
|
|
54
|
+
* Create a rotational sweep. All input objects are CAPTURED.
|
|
55
|
+
* @param contour profile to sweep, coplanar with axis.
|
|
39
56
|
* @param axis rotation axis.
|
|
40
57
|
* @param sweepAngle signed angular sweep.
|
|
41
58
|
* @param capped whether to cap the surface to make a solid.
|
|
@@ -54,8 +71,14 @@ class RotationalSweep extends SolidPrimitive_1.SolidPrimitive {
|
|
|
54
71
|
* * z direction along the rotation ray.
|
|
55
72
|
* * y direction perpendicular to the base contour plane.
|
|
56
73
|
*/
|
|
57
|
-
getConstructiveFrame() {
|
|
74
|
+
getConstructiveFrame(options) {
|
|
58
75
|
const contourPerpendicular = this._contour.localToWorld.matrix.columnZ();
|
|
76
|
+
if (options?.alignToSweep) {
|
|
77
|
+
const center = this._contour.curves.range().diagonalFractionToPoint(0.5); // ASSUME: contour range center is off the axis
|
|
78
|
+
const toCenter = this._normalizedAxis.perpendicularPartOfVectorToTarget(center);
|
|
79
|
+
if (this._normalizedAxis.direction.tripleProduct(toCenter, contourPerpendicular) < 0)
|
|
80
|
+
contourPerpendicular.negate(contourPerpendicular);
|
|
81
|
+
}
|
|
59
82
|
const axes = Matrix3d_1.Matrix3d.createRigidFromColumns(contourPerpendicular, this._normalizedAxis.direction, Geometry_1.AxisOrder.YZX);
|
|
60
83
|
if (axes) {
|
|
61
84
|
return Transform_1.Transform.createOriginAndMatrix(this._normalizedAxis.origin, axes);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RotationalSweep.js","sourceRoot":"","sources":["../../../src/solid/RotationalSweep.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAS/F,0DAAuD;AACvD,0CAAkD;AAClD,+CAA4C;AAE5C,qDAAkD;AAGlD,uDAAoD;AACpD,qDAAkD;AAClD,iDAA8C;AAE9C;;;;;;;;GAQG;AACH,MAAa,eAAgB,SAAQ,+BAAc;IACjD,wCAAwC;IACxB,kBAAkB,GAAG,iBAAiB,CAAC;IAE/C,QAAQ,CAAe;IACvB,eAAe,CAAQ;IACvB,WAAW,CAAQ;IAC3B,YAAoB,OAAqB,EAAE,cAAqB,EAAE,UAAiB,EAAE,MAAe;QAClG,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QACtC,IAAI,CAAC,WAAW,GA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------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Solid\n */\n\nimport { AnyCurve } from \"../curve/CurveTypes\";\nimport { CurveCollection } from \"../curve/CurveCollection\";\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\nimport { StrokeOptions } from \"../curve/StrokeOptions\";\nimport { AxisOrder, Geometry } from \"../Geometry\";\nimport { Angle } from \"../geometry3d/Angle\";\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\nimport { Matrix3d } from \"../geometry3d/Matrix3d\";\nimport { Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { SolidPrimitive } from \"./SolidPrimitive\";\nimport { SweepContour } from \"./SweepContour\";\n\n/**\n * A RotationalSweep is:\n * * A planar contour (any Loop, Path, or parityRegion)\n * * An axis vector.\n * * The planar contour is expected to be in the plane of the axis vector.\n * * The contour may have points and/or lines that are on the axis, but otherwise is entirely on one side of the axis.\n * * A sweep angle.\n * @public\n */\nexport class RotationalSweep extends SolidPrimitive {\n /** String name for schema properties */\n public readonly solidPrimitiveType = \"rotationalSweep\";\n\n private _contour: SweepContour;\n private _normalizedAxis: Ray3d;\n private _sweepAngle: Angle;\n private constructor(contour: SweepContour, normalizedAxis: Ray3d, sweepAngle: Angle, capped: boolean) {\n super(capped);\n this._contour = contour;\n this._normalizedAxis = normalizedAxis;\n this._sweepAngle = sweepAngle;\n }\n /**\n * Create a rotational sweep.\n * @param contour profile to sweep, coplanar with axis (CAPTURED).\n * @param axis rotation axis.\n * @param sweepAngle signed angular sweep.\n * @param capped whether to cap the surface to make a solid.\n */\n public static create(contour: AnyCurve, axis: Ray3d, sweepAngle: Angle, capped: boolean): RotationalSweep | undefined {\n if (!axis.direction.normalizeInPlace())\n return undefined;\n const sweepable = SweepContour.createForRotation(contour, axis);\n if (!sweepable)\n return undefined;\n return new RotationalSweep(sweepable, axis, sweepAngle.clone(), capped);\n }\n /**\n * Return a coordinate frame (right handed unit vectors).\n * * origin at origin of rotation ray.\n * * z direction along the rotation ray.\n * * y direction perpendicular to the base contour plane.\n */\n public getConstructiveFrame(): Transform | undefined {\n const contourPerpendicular = this._contour.localToWorld.matrix.columnZ();\n const axes = Matrix3d.createRigidFromColumns(contourPerpendicular, this._normalizedAxis.direction, AxisOrder.YZX);\n if (axes) {\n return Transform.createOriginAndMatrix(this._normalizedAxis.origin, axes);\n }\n return undefined;\n }\n /** Return clone of (not reference to) the axis vector. */\n public cloneAxisRay(): Ray3d {\n return this._normalizedAxis.clone();\n }\n /** Return (REFERENCE TO) the swept curves. */\n public getCurves(): CurveCollection {\n return this._contour.curves;\n }\n /** Return (REFERENCE TO) the swept curves with containing plane markup. */\n public getSweepContourRef(): SweepContour {\n return this._contour;\n }\n /** Return the sweep angle. */\n public getSweep(): Angle {\n return this._sweepAngle.clone();\n }\n /** Test if `other` is a `RotationalSweep` */\n public isSameGeometryClass(other: any): boolean {\n return other instanceof RotationalSweep;\n }\n /** Test for same axis, capping, and swept geometry. */\n public override isAlmostEqual(other: GeometryQuery): boolean {\n if (other instanceof RotationalSweep) {\n return this._contour.isAlmostEqual(other._contour)\n && this._normalizedAxis.isAlmostEqual(other._normalizedAxis)\n && this._sweepAngle.isAlmostEqual(other._sweepAngle)\n && this.capped === other.capped;\n }\n return false;\n }\n /** Return a deep clone */\n public clone(): RotationalSweep {\n return new RotationalSweep(this._contour.clone(), this._normalizedAxis.clone(), this._sweepAngle.clone(), this.capped);\n }\n /**\n * Transform the contour and axis.\n * * This fails if the transformation is singular.\n */\n public tryTransformInPlace(transform: Transform): boolean {\n if (transform.matrix.isSingular())\n return false;\n if (this._contour.tryTransformInPlace(transform)) {\n this._normalizedAxis.transformInPlace(transform);\n if (transform.matrix.determinant() < 0.0)\n this._sweepAngle.setRadians(-this._sweepAngle.radians);\n return this._normalizedAxis.direction.normalizeInPlace();\n }\n return false;\n }\n /**\n * Return a transformed clone.\n * * This fails if the transformation is singular.\n */\n public cloneTransformed(transform: Transform): RotationalSweep | undefined {\n const result = this.clone();\n return result.tryTransformInPlace(transform) ? result : undefined;\n }\n /** Dispatch to strongly typed handler `handler.handleRotationalSweep(this)`. */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleRotationalSweep(this);\n }\n /** Return a transform that rotates around the rotational axis by a fraction of the total sweep. */\n public getFractionalRotationTransform(vFraction: number, result?: Transform): Transform {\n const radians = this._sweepAngle.radians * vFraction;\n const rotation = Transform.createFixedPointAndMatrix(this._normalizedAxis.origin,\n Matrix3d.createRotationAroundVector(this._normalizedAxis.direction, Angle.createRadians(radians),\n result ? result.matrix : undefined) as Matrix3d);\n return rotation;\n }\n /**\n * Return the curves of a constant-v section of the solid.\n * @param vFraction fractional position along the sweep direction\n */\n public constantVSection(vFraction: number): CurveCollection | undefined {\n const section = this._contour.curves.clone();\n section.tryTransformInPlace(this.getFractionalRotationTransform(vFraction));\n return section;\n }\n /** Extend range using sampled points on the surface. */\n public extendRange(range: Range3d, transform?: Transform) {\n const degreeStep = 360 / 32;\n const options = StrokeOptions.createForCurves();\n options.angleTol = Angle.createDegrees(degreeStep);\n const strokes = this._contour.curves.cloneStroked(options);\n const numStep = Geometry.stepCount(degreeStep, this._sweepAngle.degrees, 4, 32);\n const stepTransform = Transform.createIdentity();\n if (transform) {\n const compositeTransform = Transform.createIdentity();\n for (let i = 0; i <= numStep; i++) {\n transform.multiplyTransformTransform(\n this.getFractionalRotationTransform(i / numStep, stepTransform), compositeTransform,\n );\n strokes.extendRange(range, compositeTransform);\n }\n } else {\n for (let i = 0; i <= numStep; i++)\n strokes.extendRange(range, this.getFractionalRotationTransform(i / numStep, stepTransform));\n }\n }\n /** Return true if the sweep axis and contour are not coplanar. */\n public override get isSkew(): boolean {\n return !this._normalizedAxis.direction.isPerpendicularTo(this._contour.localToWorld.matrix.columnXCrossColumnY(), true);\n }\n /** Specify if the sweep forms a closed volume. */\n public get isClosedVolume(): boolean {\n return this.capped || this._sweepAngle.isFullCircle;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RotationalSweep.js","sourceRoot":"","sources":["../../../src/solid/RotationalSweep.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAS/F,0DAAuD;AACvD,0CAAkD;AAClD,+CAA4C;AAE5C,qDAAkD;AAGlD,uDAAoD;AACpD,qDAA0F;AAC1F,iDAA8C;AAE9C;;;GAGG;AACH,MAAa,uCAAwC,SAAQ,uDAAsC;IACjG;;;;;;;;OAQG;IACI,YAAY,CAAW;CAC/B;AAXD,0FAWC;AAED;;;;;;;;GAQG;AACH,MAAa,eAAgB,SAAQ,+BAAc;IACjD,wCAAwC;IACxB,kBAAkB,GAAG,iBAAiB,CAAC;IAE/C,QAAQ,CAAe;IACvB,eAAe,CAAQ;IACvB,WAAW,CAAQ;IAC3B,YAAoB,OAAqB,EAAE,cAAqB,EAAE,UAAiB,EAAE,MAAe;QAClG,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QACtC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IACD;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAAC,OAAiB,EAAE,IAAW,EAAE,UAAiB,EAAE,MAAe;QACrF,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE;YACpC,OAAO,SAAS,CAAC;QACnB,MAAM,SAAS,GAAG,2BAAY,CAAC,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAChE,IAAI,CAAC,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,OAAO,IAAI,eAAe,CAAC,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,KAAK,EAAE,EAAE,MAAM,CAAC,CAAC;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------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Solid\n */\n\nimport { CurveCollection } from \"../curve/CurveCollection\";\nimport { AnyCurve } from \"../curve/CurveTypes\";\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\nimport { StrokeOptions } from \"../curve/StrokeOptions\";\nimport { AxisOrder, Geometry } from \"../Geometry\";\nimport { Angle } from \"../geometry3d/Angle\";\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\nimport { Matrix3d } from \"../geometry3d/Matrix3d\";\nimport { Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { SolidPrimitive, SolidPrimitiveConstructiveFrameOptions } from \"./SolidPrimitive\";\nimport { SweepContour } from \"./SweepContour\";\n\n/**\n * Options for [[RotationalSweep.getConstructiveFrame]].\n * @public\n */\nexport class RotationalSweepConstructiveFrameOptions extends SolidPrimitiveConstructiveFrameOptions {\n /**\n * Though the y-axis of the frame returned by [[RotationalSweep.getConstructiveFrame]] is perpendicular to the\n * contour plane, it can point in one of two directions. This option allows the caller to control this direction.\n * * If `false` (default), the y-axis of the frame is the normal reported by the contour. This direction is\n * independent of the solid's sweep direction.\n * * If `true`, the y-axis of the frame is aligned to the solid's sweep direction: specifically, it points in the\n * direction of positive sweep. With this choice, columns 0, 1 of the returned frame can be used to construct the\n * `vector0` and `vector90` vectors needed to construct a centerline arc for the solid.\n */\n public alignToSweep?: boolean;\n}\n\n/**\n * A RotationalSweep is:\n * * A planar contour (any Loop, Path, or parityRegion)\n * * An axis vector.\n * * The planar contour is expected to be in the plane of the axis vector.\n * * The contour may have points and/or lines that are on the axis, but otherwise is entirely on one side of the axis.\n * * A sweep angle.\n * @public\n */\nexport class RotationalSweep extends SolidPrimitive {\n /** String name for schema properties */\n public readonly solidPrimitiveType = \"rotationalSweep\";\n\n private _contour: SweepContour;\n private _normalizedAxis: Ray3d;\n private _sweepAngle: Angle;\n private constructor(contour: SweepContour, normalizedAxis: Ray3d, sweepAngle: Angle, capped: boolean) {\n super(capped);\n this._contour = contour;\n this._normalizedAxis = normalizedAxis;\n this._sweepAngle = sweepAngle;\n }\n /**\n * Create a rotational sweep. All input objects are CAPTURED.\n * @param contour profile to sweep, coplanar with axis.\n * @param axis rotation axis.\n * @param sweepAngle signed angular sweep.\n * @param capped whether to cap the surface to make a solid.\n */\n public static create(contour: AnyCurve, axis: Ray3d, sweepAngle: Angle, capped: boolean): RotationalSweep | undefined {\n if (!axis.direction.normalizeInPlace())\n return undefined;\n const sweepable = SweepContour.createForRotation(contour, axis);\n if (!sweepable)\n return undefined;\n return new RotationalSweep(sweepable, axis, sweepAngle.clone(), capped);\n }\n /**\n * Return a coordinate frame (right handed unit vectors).\n * * origin at origin of rotation ray.\n * * z direction along the rotation ray.\n * * y direction perpendicular to the base contour plane.\n */\n public getConstructiveFrame(options?: RotationalSweepConstructiveFrameOptions): Transform | undefined {\n const contourPerpendicular = this._contour.localToWorld.matrix.columnZ();\n if (options?.alignToSweep) {\n const center = this._contour.curves.range().diagonalFractionToPoint(0.5); // ASSUME: contour range center is off the axis\n const toCenter = this._normalizedAxis.perpendicularPartOfVectorToTarget(center);\n if (this._normalizedAxis.direction.tripleProduct(toCenter, contourPerpendicular) < 0)\n contourPerpendicular.negate(contourPerpendicular);\n }\n const axes = Matrix3d.createRigidFromColumns(contourPerpendicular, this._normalizedAxis.direction, AxisOrder.YZX);\n if (axes) {\n return Transform.createOriginAndMatrix(this._normalizedAxis.origin, axes);\n }\n return undefined;\n }\n /** Return clone of (not reference to) the axis vector. */\n public cloneAxisRay(): Ray3d {\n return this._normalizedAxis.clone();\n }\n /** Return (REFERENCE TO) the swept curves. */\n public getCurves(): CurveCollection {\n return this._contour.curves;\n }\n /** Return (REFERENCE TO) the swept curves with containing plane markup. */\n public getSweepContourRef(): SweepContour {\n return this._contour;\n }\n /** Return the sweep angle. */\n public getSweep(): Angle {\n return this._sweepAngle.clone();\n }\n /** Test if `other` is a `RotationalSweep` */\n public isSameGeometryClass(other: any): boolean {\n return other instanceof RotationalSweep;\n }\n /** Test for same axis, capping, and swept geometry. */\n public override isAlmostEqual(other: GeometryQuery): boolean {\n if (other instanceof RotationalSweep) {\n return this._contour.isAlmostEqual(other._contour)\n && this._normalizedAxis.isAlmostEqual(other._normalizedAxis)\n && this._sweepAngle.isAlmostEqual(other._sweepAngle)\n && this.capped === other.capped;\n }\n return false;\n }\n /** Return a deep clone */\n public clone(): RotationalSweep {\n return new RotationalSweep(this._contour.clone(), this._normalizedAxis.clone(), this._sweepAngle.clone(), this.capped);\n }\n /**\n * Transform the contour and axis.\n * * This fails if the transformation is singular.\n */\n public tryTransformInPlace(transform: Transform): boolean {\n if (transform.matrix.isSingular())\n return false;\n if (this._contour.tryTransformInPlace(transform)) {\n this._normalizedAxis.transformInPlace(transform);\n if (transform.matrix.determinant() < 0.0)\n this._sweepAngle.setRadians(-this._sweepAngle.radians);\n return this._normalizedAxis.direction.normalizeInPlace();\n }\n return false;\n }\n /**\n * Return a transformed clone.\n * * This fails if the transformation is singular.\n */\n public cloneTransformed(transform: Transform): RotationalSweep | undefined {\n const result = this.clone();\n return result.tryTransformInPlace(transform) ? result : undefined;\n }\n /** Dispatch to strongly typed handler `handler.handleRotationalSweep(this)`. */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleRotationalSweep(this);\n }\n /** Return a transform that rotates around the rotational axis by a fraction of the total sweep. */\n public getFractionalRotationTransform(vFraction: number, result?: Transform): Transform {\n const radians = this._sweepAngle.radians * vFraction;\n const rotation = Transform.createFixedPointAndMatrix(this._normalizedAxis.origin,\n Matrix3d.createRotationAroundVector(this._normalizedAxis.direction, Angle.createRadians(radians),\n result ? result.matrix : undefined) as Matrix3d);\n return rotation;\n }\n /**\n * Return the curves of a constant-v section of the solid.\n * @param vFraction fractional position along the sweep direction\n */\n public constantVSection(vFraction: number): CurveCollection | undefined {\n const section = this._contour.curves.clone();\n section.tryTransformInPlace(this.getFractionalRotationTransform(vFraction));\n return section;\n }\n /** Extend range using sampled points on the surface. */\n public extendRange(range: Range3d, transform?: Transform) {\n const degreeStep = 360 / 32;\n const options = StrokeOptions.createForCurves();\n options.angleTol = Angle.createDegrees(degreeStep);\n const strokes = this._contour.curves.cloneStroked(options);\n const numStep = Geometry.stepCount(degreeStep, this._sweepAngle.degrees, 4, 32);\n const stepTransform = Transform.createIdentity();\n if (transform) {\n const compositeTransform = Transform.createIdentity();\n for (let i = 0; i <= numStep; i++) {\n transform.multiplyTransformTransform(\n this.getFractionalRotationTransform(i / numStep, stepTransform), compositeTransform,\n );\n strokes.extendRange(range, compositeTransform);\n }\n } else {\n for (let i = 0; i <= numStep; i++)\n strokes.extendRange(range, this.getFractionalRotationTransform(i / numStep, stepTransform));\n }\n }\n /** Return true if the sweep axis and contour are not coplanar. */\n public override get isSkew(): boolean {\n return !this._normalizedAxis.direction.isPerpendicularTo(this._contour.localToWorld.matrix.columnXCrossColumnY(), true);\n }\n /** Specify if the sweep forms a closed volume. */\n public get isClosedVolume(): boolean {\n return this.capped || this._sweepAngle.isFullCircle;\n }\n}\n"]}
|
|
@@ -29,6 +29,12 @@ export type SolidPrimitiveType = "box" | "cone" | "sphere" | "linearSweep" | "ro
|
|
|
29
29
|
* @public
|
|
30
30
|
*/
|
|
31
31
|
export type AnySolidPrimitive = Box | Cone | Sphere | LinearSweep | RotationalSweep | RuledSweep | TorusPipe;
|
|
32
|
+
/**
|
|
33
|
+
* Options for [[SolidPrimitive.getConstructiveFrame]], extended by subclasses.
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
export declare class SolidPrimitiveConstructiveFrameOptions {
|
|
37
|
+
}
|
|
32
38
|
/**
|
|
33
39
|
* Base class for SolidPrimitive variants.
|
|
34
40
|
* * The base class holds capped flag for all derived classes.
|
|
@@ -52,7 +58,7 @@ export declare abstract class SolidPrimitive extends GeometryQuery {
|
|
|
52
58
|
* * The particulars of origin and orientation are specific to each SolidPrimitive type.
|
|
53
59
|
* * The returned Transform is generally rigid (no preservation of skew, mirror, or scale in the solid's definition).
|
|
54
60
|
*/
|
|
55
|
-
abstract getConstructiveFrame(): Transform | undefined;
|
|
61
|
+
abstract getConstructiveFrame(_options?: SolidPrimitiveConstructiveFrameOptions): Transform | undefined;
|
|
56
62
|
/**
|
|
57
63
|
* Return true if the solid's local coordinate axes lack full orthogonality.
|
|
58
64
|
* * Skew typically takes the form of a local z-axis that is not perpendicular to the local xy-plane.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolidPrimitive.d.ts","sourceRoot":"","sources":["../../../src/solid/SolidPrimitive.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,aAAa,GAAG,iBAAiB,GAAG,YAAY,GAAG,WAAW,CAAC;AAE5H;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,GAAG,GAAG,IAAI,GAA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,GAAG,YAAY,GAAG,WAAW,CAAC;AAE5H;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,GAAG,GAAG,IAAI,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,UAAU,GAAG,SAAS,CAAC;AAE7G;;;GAGG;AACH,qBAAa,sCAAsC;CAAG;AAEtD;;;;GAIG;AACH,8BAAsB,cAAe,SAAQ,aAAa;IACxD,yCAAyC;IACzC,SAAgB,gBAAgB,WAAW;IAC3C,yCAAyC;IACzC,kBAAyB,kBAAkB,EAAE,kBAAkB,CAAC;IAChE,wHAAwH;IACxH,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC;IAC3B,SAAS,aAAa,MAAM,EAAE,OAAO;IAIrC,sCAAsC;IACtC,IAAW,MAAM,IAAI,OAAO,CAE3B;IACD,IAAW,MAAM,CAAC,MAAM,EAAE,OAAO,EAEhC;IACD,qDAAqD;aACrC,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IACjF;;;;OAIG;aACa,oBAAoB,CAAC,QAAQ,CAAC,EAAE,sCAAsC,GAAG,SAAS,GAAG,SAAS;IAC9G;;;;OAIG;IACH,IAAW,MAAM,IAAI,OAAO,CAE3B;IACD;;;;;;OAMG;IACH,aAAoB,cAAc,IAAI,OAAO,CAAC;CAC/C"}
|
|
@@ -4,8 +4,15 @@
|
|
|
4
4
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.SolidPrimitive = void 0;
|
|
7
|
+
exports.SolidPrimitive = exports.SolidPrimitiveConstructiveFrameOptions = void 0;
|
|
8
8
|
const GeometryQuery_1 = require("../curve/GeometryQuery");
|
|
9
|
+
/**
|
|
10
|
+
* Options for [[SolidPrimitive.getConstructiveFrame]], extended by subclasses.
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
class SolidPrimitiveConstructiveFrameOptions {
|
|
14
|
+
}
|
|
15
|
+
exports.SolidPrimitiveConstructiveFrameOptions = SolidPrimitiveConstructiveFrameOptions;
|
|
9
16
|
/**
|
|
10
17
|
* Base class for SolidPrimitive variants.
|
|
11
18
|
* * The base class holds capped flag for all derived classes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolidPrimitive.js","sourceRoot":"","sources":["../../../src/solid/SolidPrimitive.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAO/F,0DAAuD;AA8BvD;;;;GAIG;AACH,MAAsB,cAAe,SAAQ,6BAAa;IACxD,yCAAyC;IACzB,gBAAgB,GAAG,OAAO,CAAC;IAG3C,wHAAwH;IAC9G,OAAO,CAAU;IAC3B,YAAsB,MAAe;QACnC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IACD,sCAAsC;IACtC,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACD,IAAW,MAAM,CAAC,MAAe;QAC/B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IASD;;;;OAIG;IACH,IAAW,MAAM;QACf,OAAO,KAAK,CAAC;IACf,CAAC;CASF;AA1CD,wCA0CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Solid\n */\n\nimport { CurveCollection } from \"../curve/CurveCollection\";\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { Box } from \"./Box\";\nimport { Cone } from \"./Cone\";\nimport { LinearSweep } from \"./LinearSweep\";\nimport { RotationalSweep } from \"./RotationalSweep\";\nimport { RuledSweep } from \"./RuledSweep\";\nimport { Sphere } from \"./Sphere\";\nimport { TorusPipe } from \"./TorusPipe\";\n\n/**\n * Describes the concrete type of a [[SolidPrimitive]]. Each type name maps to a specific subclass and can be used for\n * type-switching in conditional statements.\n * - \"box\" => [[Box]]\n * - \"cone\" => [[Cone]]\n * - \"sphere\" => [[Sphere]]\n * - \"linearSweep\" => [[LinearSweep]]\n * - \"rotationalSweep\" => [[RotationalSweep]]\n * - \"ruledSweep\" => [[RuledSweep]]\n * - \"torusPipe\" => [[TorusPipe]]\n * @public\n */\nexport type SolidPrimitiveType = \"box\" | \"cone\" | \"sphere\" | \"linearSweep\" | \"rotationalSweep\" | \"ruledSweep\" | \"torusPipe\";\n\n/**\n * Union type of all subclasses of [[SolidPrimitive]].\n * @public\n */\nexport type AnySolidPrimitive = Box | Cone | Sphere | LinearSweep | RotationalSweep | RuledSweep | TorusPipe;\n\n/**\n * Base class for SolidPrimitive variants.\n * * The base class holds capped flag for all derived classes.\n * @public\n */\nexport abstract class SolidPrimitive extends GeometryQuery {\n /** String name for schema properties. */\n public readonly geometryCategory = \"solid\";\n /** String name for schema properties. */\n public abstract readonly solidPrimitiveType: SolidPrimitiveType;\n /** Flag indicating whether cap region is considered closed (i.e. a planar region, rather than just a wire in space). */\n protected _capped: boolean;\n protected constructor(capped: boolean) {\n super();\n this._capped = capped;\n }\n /** Whether this is a capped solid. */\n public get capped(): boolean {\n return this._capped;\n }\n public set capped(capped: boolean) {\n this._capped = capped;\n }\n /** Return a cross section at specified vFraction. */\n public abstract constantVSection(_vFraction: number): CurveCollection | undefined;\n /**\n * Return a Transform from the solid's local coordinate system to world.\n * * The particulars of origin and orientation are specific to each SolidPrimitive type.\n * * The returned Transform is generally rigid (no preservation of skew, mirror, or scale in the solid's definition).\n */\n public abstract getConstructiveFrame(): Transform | undefined;\n /**\n * Return true if the solid's local coordinate axes lack full orthogonality.\n * * Skew typically takes the form of a local z-axis that is not perpendicular to the local xy-plane.\n * * This property is always `false` for a [[RuledSweep]].\n */\n public get isSkew(): boolean {\n return false;\n }\n /**\n * Return true if this is a closed volume\n * * LinearSweep, Box, Cone only depend on capped.\n * * Sphere affected by capped and latitude sweep\n * * TorusPipe and RotationalSweep affected by capped and sweep\n * * RuledSweep is affected by capped and match of first, last contour\n */\n public abstract get isClosedVolume(): boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SolidPrimitive.js","sourceRoot":"","sources":["../../../src/solid/SolidPrimitive.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAO/F,0DAAuD;AA8BvD;;;GAGG;AACH,MAAa,sCAAsC;CAAG;AAAtD,wFAAsD;AAEtD;;;;GAIG;AACH,MAAsB,cAAe,SAAQ,6BAAa;IACxD,yCAAyC;IACzB,gBAAgB,GAAG,OAAO,CAAC;IAG3C,wHAAwH;IAC9G,OAAO,CAAU;IAC3B,YAAsB,MAAe;QACnC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IACD,sCAAsC;IACtC,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACD,IAAW,MAAM,CAAC,MAAe;QAC/B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IASD;;;;OAIG;IACH,IAAW,MAAM;QACf,OAAO,KAAK,CAAC;IACf,CAAC;CASF;AA1CD,wCA0CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Solid\n */\n\nimport { CurveCollection } from \"../curve/CurveCollection\";\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { Box } from \"./Box\";\nimport { Cone } from \"./Cone\";\nimport { LinearSweep } from \"./LinearSweep\";\nimport { RotationalSweep } from \"./RotationalSweep\";\nimport { RuledSweep } from \"./RuledSweep\";\nimport { Sphere } from \"./Sphere\";\nimport { TorusPipe } from \"./TorusPipe\";\n\n/**\n * Describes the concrete type of a [[SolidPrimitive]]. Each type name maps to a specific subclass and can be used for\n * type-switching in conditional statements.\n * - \"box\" => [[Box]]\n * - \"cone\" => [[Cone]]\n * - \"sphere\" => [[Sphere]]\n * - \"linearSweep\" => [[LinearSweep]]\n * - \"rotationalSweep\" => [[RotationalSweep]]\n * - \"ruledSweep\" => [[RuledSweep]]\n * - \"torusPipe\" => [[TorusPipe]]\n * @public\n */\nexport type SolidPrimitiveType = \"box\" | \"cone\" | \"sphere\" | \"linearSweep\" | \"rotationalSweep\" | \"ruledSweep\" | \"torusPipe\";\n\n/**\n * Union type of all subclasses of [[SolidPrimitive]].\n * @public\n */\nexport type AnySolidPrimitive = Box | Cone | Sphere | LinearSweep | RotationalSweep | RuledSweep | TorusPipe;\n\n/**\n * Options for [[SolidPrimitive.getConstructiveFrame]], extended by subclasses.\n * @public\n */\nexport class SolidPrimitiveConstructiveFrameOptions {}\n\n/**\n * Base class for SolidPrimitive variants.\n * * The base class holds capped flag for all derived classes.\n * @public\n */\nexport abstract class SolidPrimitive extends GeometryQuery {\n /** String name for schema properties. */\n public readonly geometryCategory = \"solid\";\n /** String name for schema properties. */\n public abstract readonly solidPrimitiveType: SolidPrimitiveType;\n /** Flag indicating whether cap region is considered closed (i.e. a planar region, rather than just a wire in space). */\n protected _capped: boolean;\n protected constructor(capped: boolean) {\n super();\n this._capped = capped;\n }\n /** Whether this is a capped solid. */\n public get capped(): boolean {\n return this._capped;\n }\n public set capped(capped: boolean) {\n this._capped = capped;\n }\n /** Return a cross section at specified vFraction. */\n public abstract constantVSection(_vFraction: number): CurveCollection | undefined;\n /**\n * Return a Transform from the solid's local coordinate system to world.\n * * The particulars of origin and orientation are specific to each SolidPrimitive type.\n * * The returned Transform is generally rigid (no preservation of skew, mirror, or scale in the solid's definition).\n */\n public abstract getConstructiveFrame(_options?: SolidPrimitiveConstructiveFrameOptions): Transform | undefined;\n /**\n * Return true if the solid's local coordinate axes lack full orthogonality.\n * * Skew typically takes the form of a local z-axis that is not perpendicular to the local xy-plane.\n * * This property is always `false` for a [[RuledSweep]].\n */\n public get isSkew(): boolean {\n return false;\n }\n /**\n * Return true if this is a closed volume\n * * LinearSweep, Box, Cone only depend on capped.\n * * Sphere affected by capped and latitude sweep\n * * TorusPipe and RotationalSweep affected by capped and sweep\n * * RuledSweep is affected by capped and match of first, last contour\n */\n public abstract get isClosedVolume(): boolean;\n}\n"]}
|
|
@@ -98,7 +98,7 @@ export declare abstract class BSplineCurve3dBase extends CurvePrimitive {
|
|
|
98
98
|
get order(): number;
|
|
99
99
|
/**
|
|
100
100
|
* Return the number of Bezier spans in the curve. Note that this number includes the number of null
|
|
101
|
-
* spans at repeated
|
|
101
|
+
* spans at repeated knots.
|
|
102
102
|
*/
|
|
103
103
|
get numSpan(): number;
|
|
104
104
|
/** Return the number of poles. */
|
|
@@ -110,7 +110,7 @@ export class BSplineCurve3dBase extends CurvePrimitive {
|
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
112
|
* Return the number of Bezier spans in the curve. Note that this number includes the number of null
|
|
113
|
-
* spans at repeated
|
|
113
|
+
* spans at repeated knots.
|
|
114
114
|
*/
|
|
115
115
|
get numSpan() {
|
|
116
116
|
return this._bcurve.numSpan;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BSplineCurve.js","sourceRoot":"","sources":["../../../src/bspline/BSplineCurve.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAEhG,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EA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E,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Bspline\n */\n\nimport { VariantCurveExtendParameter } from \"../curve/CurveExtendMode\";\nimport { CurveIntervalRole, CurveLocationDetail } from \"../curve/CurveLocationDetail\";\nimport { CurvePrimitive } from \"../curve/CurvePrimitive\";\nimport { CurveOffsetXYHandler } from \"../curve/internalContexts/CurveOffsetXYHandler\";\nimport { PlaneAltitudeRangeContext } from \"../curve/internalContexts/PlaneAltitudeRangeContext\";\nimport { LineString3d } from \"../curve/LineString3d\";\nimport { OffsetOptions } from \"../curve/OffsetOptions\";\nimport { StrokeCountMap } from \"../curve/Query/StrokeCountMap\";\nimport { StrokeOptions } from \"../curve/StrokeOptions\";\nimport { Geometry, PlaneAltitudeEvaluator } from \"../Geometry\";\nimport { GeometryHandler, IStrokeHandler } from \"../geometry3d/GeometryHandler\";\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\nimport { Plane3dByOriginAndUnitNormal } from \"../geometry3d/Plane3dByOriginAndUnitNormal\";\nimport { Plane3dByOriginAndVectors } from \"../geometry3d/Plane3dByOriginAndVectors\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Point3dArray } from \"../geometry3d/PointHelpers\";\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { Point4d } from \"../geometry4d/Point4d\";\nimport { UnivariateBezier } from \"../numerics/BezierPolynomials\";\nimport { AkimaCurve3dOptions } from \"./AkimaCurve3d\";\nimport { Bezier1dNd } from \"./Bezier1dNd\";\nimport { BezierCurve3d } from \"./BezierCurve3d\";\nimport { BezierCurve3dH } from \"./BezierCurve3dH\";\nimport { BezierCurveBase } from \"./BezierCurveBase\";\nimport { BSpline1dNd } from \"./BSpline1dNd\";\nimport { BSplineCurveOps } from \"./BSplineCurveOps\";\nimport { InterpolationCurve3dOptions } from \"./InterpolationCurve3d\";\nimport { BSplineWrapMode, KnotVector } from \"./KnotVector\";\n\n/**\n * Base class for BSplineCurve3d and BSplineCurve3dH.\n * * A B-spline curve consists of an array of `knots`, an array of `poles`, and a `degree`.\n * * The knot array is a non-decreasing sequence of numbers. It is also called a \"knot vector\".\n * * The curve is a parametric function whose domain is a sub-range of its knots.\n * * The API sometimes refers to a domain parameter `u` as a \"knot\", even if `u` is not actually an entry in the\n * knot array.\n * * The curve loosely \"follows\" the line string formed by the poles, aka the \"control polygon\".\n * * The curve is a chain of polynomial segments, aka \"spans\" or \"fragments\". B-spline theory identifies these as\n * Bezier curves.\n * * The polynomial spans all have same `degree`.\n * * Each span is controlled by `order = degree + 1` contiguous points in the pole array.\n * * There is a strict relationship between knot and poles counts: `numPoles + order = numKnots + 2'.\n * * The number of spans is `numSpan = numPoles - degree`.\n * * For a span with index `spanIndex`:\n * * The `order` relevant poles begin at pole index `spanIndex`.\n * * The `2*degree` relevant knots begin at knot index `spanIndex`.\n * * The span domain is the knot range `[knot[spanIndex+degree-1], knot[spanIndex+degree]]`.\n * * The curve domain is the knot range `[knot[degree-1], knot[numSpan+degree-1]]`, or equivalently\n * `[knot[degree-1], knot[numPoles-1]]`. The API refers to this domain as the \"active knot interval\" of the curve.\n *\n * Nearly all B-spline curves are \"clamped\".\n * * This means that in the `knots` array, the first `degree` knots are equal, and the last `degree` knots are equal.\n * We say the smallest knot and the largest knot have multiplicity `degree`.\n * * Clamping make the curve pass through its first and last poles, with tangents directed along the first and\n * last edges of the control polygon.\n * * For instance, a cubic B-spline curve with knot vector `[0,0,0,1,2,3,3,3]`\n * * can be evaluated at parameter values in the range `[0, 3]`\n * * has 3 spans, with domains `[0, 1]`, `[1, 2]`, and `[2, 3]`\n * * has 6 poles\n * * passes through its first and last poles.\n * * The `create` methods may allow the classic convention that has an extra knot at the beginning and end of the\n * knot vector.\n * * These two extra knots are not actually needed to define the B-spline curve.\n * * When the `create` methods recognize the classic setup (`numPoles + order = numKnots`), the extra knots are\n * not saved with the BSplineCurve3dBase knots.\n *\n * * The weighted variant [[BSplineCurve3dH]] has the problem that `CurvePrimitive` 3D typing does not allow the\n * undefined result where a homogeneous pole has zero weight; the convention in this case is to return 000.\n *\n * * Note the class relationships:\n * * [[BSpline1dNd]] knows the definitional B-spline recurrence relation with no physical interpretation for the poles.\n * * BsplineCurve3dBase owns a protected BSpline1dNd.\n * * `BsplineCurve3dBase` is derived from [[CurvePrimitive]], which creates obligation to act as a 3D curve, e.g.,\n * * evaluate fraction to point and derivatives wrt fraction.\n * * compute intersection with plane.\n * * [[BSplineCurve3d]] and [[BSplineCurve3dH]] have variant logic driven by whether or not there are \"weights\" on the poles.\n * * For `BSplineCurve3d`, the xyz value of pole calculations are \"final\" values for 3d evaluation.\n * * For `BSplineCurve3dH`, various `BSpline1dNd` results with xyzw have to be normalized back to xyz.\n *\n * * These classes do not support \"periodic\" variants.\n * * Periodic curves historically have carried a flag (e.g., \"closed\") indicating that certain un-stored\n * leading/trailing knots and poles are understood to wrap around periodically.\n * * Instead, these classes carry no such flag. They represent such curves with explicitly wrapped knots/poles.\n *\n * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/BSpline/\n * @public\n */\nexport abstract class BSplineCurve3dBase extends CurvePrimitive {\n /** String name for schema properties. */\n public readonly curvePrimitiveType = \"bsplineCurve\";\n /** The underlying blocked-pole spline, with simple x,y,z poles. */\n protected _bcurve: BSpline1dNd;\n private _definitionData?: any;\n public set definitionData(data: any) {\n this._definitionData = data;\n }\n public get definitionData(): any {\n return this._definitionData;\n }\n protected constructor(poleDimension: number, numPoles: number, order: number, knots: KnotVector) {\n super();\n this._bcurve = BSpline1dNd.create(numPoles, poleDimension, order, knots);\n }\n /** Return the degree (one less than the order) of the curve. */\n public get degree(): number {\n return this._bcurve.degree;\n }\n /** Return the order (one more than degree) of the curve. */\n public get order(): number {\n return this._bcurve.order;\n }\n /**\n * Return the number of Bezier spans in the curve. Note that this number includes the number of null\n * spans at repeated knows.\n */\n public get numSpan(): number {\n return this._bcurve.numSpan;\n }\n /** Return the number of poles. */\n public get numPoles(): number {\n return this._bcurve.numPoles;\n }\n /** Return live reference to the poles of the curve. */\n public get polesRef(): Float64Array {\n return this._bcurve.packedData;\n }\n /** Return live reference to the knots of the curve. */\n public get knotsRef(): Float64Array {\n return this._bcurve.knots.knots;\n }\n /**\n * Number of components per pole, e.g.,\n * * 3 for conventional (x,y,z) curve.\n * * 4 for weighted (wx,wy,wz,w) curve.\n */\n public get poleDimension(): number {\n return this._bcurve.poleLength;\n }\n /** Return a simple array form of the knots. Optionally replicate the first and last in classic over-clamped manner. */\n public copyKnots(includeExtraEndKnot: boolean): number[] {\n return this._bcurve.knots.copyKnots(includeExtraEndKnot);\n }\n /** Get the flag indicating the curve might be suitable for having wrapped \"closed\" interpretation. */\n public getWrappable(): BSplineWrapMode {\n return this._bcurve.knots.wrappable;\n }\n /** Set the flag indicating the curve might be suitable for having wrapped \"closed\" interpretation. */\n public setWrappable(value: BSplineWrapMode) {\n this._bcurve.knots.wrappable = value;\n }\n /**\n * Test knots and poles to determine if it is possible to close (aka \"wrap\") the curve.\n * @returns the manner in which it is possible to close the curve. See `BSplineWrapMode` for particulars of each mode.\n */\n public get isClosableCurve(): BSplineWrapMode {\n const mode = this._bcurve.knots.wrappable;\n if (mode === BSplineWrapMode.None)\n return BSplineWrapMode.None;\n if (!this._bcurve.knots.testClosable(mode))\n return BSplineWrapMode.None;\n if (!this._bcurve.testClosablePolygon(mode))\n return BSplineWrapMode.None;\n return mode;\n }\n /** Evaluate the curve at a fractional position within a given span. */\n public abstract evaluatePointInSpan(spanIndex: number, spanFraction: number, result?: Point3d): Point3d;\n /**\n * Evaluate the curve and derivative at a fractional position within a given span.\n * * The derivative is with respect to the span fractional parameter, _not_ to the curve's parameter or fractional parameter.\n */\n public abstract evaluatePointAndDerivativeInSpan(spanIndex: number, spanFraction: number, result?: Ray3d): Ray3d;\n /** Evaluate the curve at the given parameter. */\n public abstract knotToPoint(knot: number, result?: Point3d): Point3d;\n /** Evaluate the curve and derivative at the given parameter. */\n public abstract knotToPointAndDerivative(knot: number, result?: Ray3d): Ray3d;\n /** Evaluate the curve and two derivatives at the given parameter. */\n public abstract knotToPointAnd2Derivatives(knot: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors;\n /** Evaluate the curve point at the given fractional parameter. */\n public fractionToPoint(fraction: number, result?: Point3d): Point3d {\n return this.knotToPoint(this._bcurve.knots.fractionToKnot(fraction), result);\n }\n /** Evaluate the curve and derivative at the given fractional parameter. */\n public fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d {\n const knot = this._bcurve.knots.fractionToKnot(fraction);\n result = this.knotToPointAndDerivative(knot, result);\n result.direction.scaleInPlace(this._bcurve.knots.knotLength01);\n return result;\n }\n /** Evaluate the curve and two derivatives at the given fractional parameter. */\n public fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\n const knot = this._bcurve.knots.fractionToKnot(fraction);\n result = this.knotToPointAnd2Derivatives(knot, result);\n const a = this._bcurve.knots.knotLength01;\n result.vectorU.scaleInPlace(a);\n result.vectorV.scaleInPlace(a * a);\n return result;\n }\n /** Return the start point of the curve. */\n public override startPoint(result?: Point3d): Point3d {\n return this.evaluatePointInSpan(0, 0.0, result);\n }\n /** Return the end point of the curve. */\n public override endPoint(result?: Point3d): Point3d {\n return this.evaluatePointInSpan(this.numSpan - 1, 1.0, result);\n }\n /**\n * Reverse the curve in place.\n * * Poles are reversed.\n * * Knot values are mirrored around the middle of the knot array.\n */\n public reverseInPlace(): void {\n this._bcurve.reverseInPlace();\n }\n /** Return an array with this curve's Bezier fragments. */\n public collectBezierSpans(prefer3dH: boolean): BezierCurveBase[] {\n const result: BezierCurveBase[] = [];\n const numSpans = this.numSpan;\n for (let i = 0; i < numSpans; i++) {\n if (this._bcurve.knots.isIndexOfRealSpan(i)) {\n const span = this.getSaturatedBezierSpan3dOr3dH(i, prefer3dH);\n if (span)\n result.push(span);\n }\n }\n return result;\n }\n /**\n * Return the Bezier fragment corresponding to the given span of this curve.\n * * The concrete return type may be [[BezierCurve3d]] or [[BezierCurve3dH]] according to the instance type and `prefer3dH`.\n * @param spanIndex index of span.\n * @param prefer3dH true to force promotion to homogeneous.\n * @param result optional reusable curve. This will only be reused if its type and order matches.\n */\n public abstract getSaturatedBezierSpan3dOr3dH(\n spanIndex: number, prefer3dH: boolean, result?: BezierCurveBase,\n ): BezierCurveBase | undefined;\n /**\n * Return a specified pole as a Point4d.\n * * BSplineCurve3d appends weight 1 to its xyz.\n * * BSplineCurve3dH with pole whose \"normalized\" point is (x,y,z) but has weight w returns the weighted form (wx,wy,wz,w).\n */\n public abstract getPolePoint4d(poleIndex: number, result?: Point4d): Point4d | undefined;\n /**\n * Return a specified pole as a Point3d.\n * * BSplineCurve3d returns its simple xyz.\n * * BSplineCurve3dH attempts to normalize its (wx,wy,wz,w) back to (x,y,z), and returns undefined if weight is zero.\n * @param poleIndex index of the pole.\n * @param result optional result.\n */\n public abstract getPolePoint3d(poleIndex: number, result?: Point3d): Point3d | undefined;\n /** Given a pole index, return the starting index for the contiguous array. */\n public poleIndexToDataIndex(poleIndex: number): number | undefined {\n if (poleIndex >= 0 && poleIndex < this.numPoles)\n return poleIndex * this._bcurve.poleLength;\n return undefined;\n }\n /**\n * Search for the curve point that is closest to the spacePoint.\n * * If the space point is exactly on the curve, this is the reverse of fractionToPoint.\n * * Since CurvePrimitive should always have start and end available as candidate points, this method should always\n * succeed.\n * @param spacePoint point in space.\n * @param _extend ignored (pass false). A BSplineCurve3dBase cannot be extended.\n * @param result optional pre-allocated detail to populate and return.\n * @returns details of the closest point.\n */\n public override closestPoint(\n spacePoint: Point3d, _extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n // seed at start point; final point comes with final bezier perpendicular step\n const point = this.fractionToPoint(0);\n result = CurveLocationDetail.createCurveFractionPointDistance(this, 0.0, point, point.distance(spacePoint), result);\n let span: BezierCurve3dH | undefined;\n const numSpans = this.numSpan;\n for (let i = 0; i < numSpans; i++) {\n if (this._bcurve.knots.isIndexOfRealSpan(i)) {\n span = this.getSaturatedBezierSpan3dOr3dH(i, true, span) as BezierCurve3dH;\n if (span) {\n // if the B-spline is discontinuous, both ends should be tested; ignore that possibility\n if (span.updateClosestPointByTruePerpendicular(spacePoint, result, false, true)) {\n // the detail records the span bezier; promote it to the parent curve\n result.curve = this;\n result.fraction = span.fractionToParentFraction(result.fraction);\n }\n }\n }\n }\n return result;\n }\n /** Return a deep clone. */\n public abstract override clone(): BSplineCurve3dBase;\n /** Return a transformed deep clone. */\n public override cloneTransformed(transform: Transform): BSplineCurve3dBase {\n const curve = this.clone();\n curve.tryTransformInPlace(transform);\n return curve;\n }\n /**\n * Return a curve primitive which is a portion of this curve.\n * @param fractionA start fraction.\n * @param fractionB end fraction.\n */\n public override clonePartialCurve(fractionA: number, fractionB: number): BSplineCurve3dBase {\n let clone: BSplineCurve3dBase;\n if (fractionA > fractionB) {\n clone = this.clonePartialCurve(fractionB, fractionA);\n clone.reverseInPlace();\n return clone;\n }\n clone = this.clone();\n const origNumKnots = clone._bcurve.knots.knots.length;\n let knotA = clone._bcurve.knots.fractionToKnot(fractionA);\n let knotB = clone._bcurve.knots.fractionToKnot(fractionB);\n clone._bcurve.addKnot(knotA, clone.degree);\n clone._bcurve.addKnot(knotB, clone.degree);\n if (origNumKnots === clone._bcurve.knots.knots.length)\n return clone; // full curve\n if (knotA > knotB)\n [knotA, knotB] = [knotB, knotA];\n // choose first/last knot and pole such that knotA/knotB has degree multiplicity in the new knot sequence\n const iStartKnot = clone._bcurve.knots.knotToLeftKnotIndex(knotA) - clone.degree + 1;\n const iStartPole = iStartKnot * clone._bcurve.poleLength;\n const iLastKnot = clone._bcurve.knots.knotToLeftKnotIndex(knotB);\n let iLastKnotLeftMultiple = iLastKnot - clone._bcurve.knots.getKnotMultiplicityAtIndex(iLastKnot) + 1;\n if (clone._bcurve.knots.knots[iLastKnot] < knotB)\n iLastKnotLeftMultiple = iLastKnot + 1;\n const iEndPole = (iLastKnotLeftMultiple + 1) * clone._bcurve.poleLength; // one past last pole\n const iEndKnot = iLastKnotLeftMultiple + clone.degree; // one past last knot\n // trim the arrays (leave knots unnormalized)\n clone._bcurve.knots.setKnotsCapture(clone._bcurve.knots.knots.slice(iStartKnot, iEndKnot));\n clone._bcurve.packedData = clone._bcurve.packedData.slice(iStartPole, iEndPole);\n clone.setWrappable(BSplineWrapMode.None); // always open\n return clone;\n }\n /**\n * Implement `CurvePrimitive.appendPlaneIntersections` to compute intersections of the curve with a plane.\n * @param plane the plane with which to intersect the curve. Concrete types include [[Plane3dByOriginAndUnitNormal]],\n * [[Point4d]], etc.\n * @param result growing array of plane intersections.\n * @return number of intersections appended to the array.\n */\n public override appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number {\n const numPole = this.numPoles;\n const order = this.order;\n const allCoffs = new Float64Array(numPole);\n const numSpan = this.numSpan;\n const point4d = Point4d.create();\n // compute all pole altitudes from the plane\n const minMax = Range1d.createNull();\n // put the altitudes of all the B-spline poles in one array\n for (let i = 0; i < numPole; i++) {\n this.getPolePoint4d(i, point4d);\n allCoffs[i] = plane.weightedAltitude(point4d);\n minMax.extendX(allCoffs[i]);\n }\n // A univariate B-spline through the altitude poles gives altitude as function of the B-spline knot.\n // The (bspline) altitude function for each span is `order` consecutive altitudes.\n // If those altitudes bracket zero, the span may potentially have a crossing.\n let univariateBezier: UnivariateBezier | undefined;\n let numFound = 0;\n let previousFraction = -1000.0;\n if (minMax.containsX(0.0)) {\n for (let spanIndex = 0; spanIndex < numSpan; spanIndex++) {\n if (this._bcurve.knots.isIndexOfRealSpan(spanIndex)) { // ignore trivial knot intervals\n // outer range test ...\n minMax.setNull();\n minMax.extendArraySubset(allCoffs, spanIndex, order);\n if (minMax.containsX(0.0)) {\n // pack the B-spline support into a univariate bezier\n univariateBezier = UnivariateBezier.createArraySubset(allCoffs, spanIndex, order, univariateBezier);\n // saturate and solve the bezier\n Bezier1dNd.saturate1dInPlace(univariateBezier.coffs, this._bcurve.knots, spanIndex);\n const roots = univariateBezier.roots(0.0, true);\n if (roots) {\n for (const spanFraction of roots) {\n // promote each local bezier fraction to global fraction and save the curve evaluation at that fraction\n numFound++;\n const fraction = this._bcurve.knots.spanFractionToFraction(spanIndex, spanFraction);\n if (!Geometry.isAlmostEqualNumber(fraction, previousFraction)) {\n const detail = CurveLocationDetail.createCurveEvaluatedFraction(this, fraction);\n detail.intervalRole = CurveIntervalRole.isolated;\n result.push(detail);\n previousFraction = fraction;\n }\n }\n }\n }\n }\n }\n }\n return numFound;\n }\n /**\n * Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).\n * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object.\n */\n public override constructOffsetXY(offsetDistanceOrOptions: number | OffsetOptions): BSplineCurve3d | undefined {\n const options = OffsetOptions.create(offsetDistanceOrOptions);\n const handler = new CurveOffsetXYHandler(this, options.leftOffsetDistance);\n this.emitStrokableParts(handler, options.strokeOptions);\n return handler.claimResult();\n }\n /**\n * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters\n * of projection.\n * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.\n * @param lowHigh optional receiver for output.\n * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the\n * end of the ray.\n */\n public override projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\n return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);\n }\n}\n/**\n * A BSplineCurve3d is a B-spline curve whose poles are Point3d.\n * See BSplineCurve3dBase for description of knots, order, degree, and poles.\n * @public\n */\nexport class BSplineCurve3d extends BSplineCurve3dBase {\n private _workBezier?: BezierCurve3d;\n private initializeWorkBezier(): BezierCurve3d {\n if (this._workBezier === undefined)\n this._workBezier = BezierCurve3d.createOrder(this.order);\n return this._workBezier;\n }\n private constructor(numPoles: number, order: number, knots: KnotVector) {\n super(3, numPoles, order, knots);\n }\n /** Test if `other` is an instance of BSplineCurve3d. */\n public isSameGeometryClass(other: any): boolean {\n return other instanceof BSplineCurve3d;\n }\n /** Apply `transform` to the poles. */\n public tryTransformInPlace(transform: Transform): boolean {\n Point3dArray.multiplyInPlace(transform, this._bcurve.packedData);\n return true;\n }\n /** Get a pole as a simple Point3d. */\n public getPolePoint3d(poleIndex: number, result?: Point3d): Point3d | undefined {\n const k = this.poleIndexToDataIndex(poleIndex);\n if (k !== undefined) {\n const data = this._bcurve.packedData;\n return Point3d.create(data[k], data[k + 1], data[k + 2], result);\n }\n return undefined;\n }\n /** Get a pole as Point4d with weight 1. */\n public getPolePoint4d(poleIndex: number, result?: Point4d): Point4d | undefined {\n const k = this.poleIndexToDataIndex(poleIndex);\n if (k !== undefined) {\n const data = this._bcurve.packedData;\n return Point4d.create(data[k], data[k + 1], data[k + 2], 1.0, result);\n }\n return undefined;\n }\n /**\n * Convert the fractional position in the given span to a knot.\n * * The returned value is not necessarily a knot, but it is a valid parameter in the domain of the B-spline curve.\n */\n public spanFractionToKnot(spanIndex: number, spanFraction: number): number {\n return this._bcurve.spanFractionToKnot(spanIndex, spanFraction);\n }\n /** Return a simple array of arrays with the poles as `[[x,y,z],[x,y,z],..]`. */\n public copyPoints(): any[] {\n return Point3dArray.unpackNumbersToNestedArrays(this._bcurve.packedData, 3);\n }\n /** Return a simple array of poles' coordinates. */\n public copyPointsFloat64Array(): Float64Array {\n return this._bcurve.packedData.slice();\n }\n /** Return a simple array form of the knots. Optionally replicate the first and last in classic over-clamped manner. */\n public override copyKnots(includeExtraEndKnot: boolean): number[] {\n return this._bcurve.knots.copyKnots(includeExtraEndKnot);\n }\n /** Create a B-spline with uniform knots. */\n public static createUniformKnots(\n poles: Point3d[] | Float64Array | GrowableXYZArray, order: number,\n ): BSplineCurve3d | undefined {\n const numPoles = poles instanceof Float64Array ? poles.length / 3 : poles.length;\n if (order < 2 || numPoles < order)\n return undefined;\n const knots = KnotVector.createUniformClamped(numPoles, order - 1, 0.0, 1.0);\n const curve = new BSplineCurve3d(numPoles, order, knots);\n if (poles instanceof Float64Array) {\n for (let i = 0; i < 3 * numPoles; i++)\n curve._bcurve.packedData[i] = poles[i];\n } else if (poles instanceof GrowableXYZArray) {\n curve._bcurve.packedData = poles.float64Data().slice(0, 3 * numPoles);\n } else {\n let i = 0;\n for (const p of poles) {\n curve._bcurve.packedData[i++] = p.x;\n curve._bcurve.packedData[i++] = p.y;\n curve._bcurve.packedData[i++] = p.z;\n }\n }\n return curve;\n }\n /**\n * Create a smoothly closed B-spline curve with uniform knots.\n * * Note that the curve does not start at the first pole.\n */\n public static createPeriodicUniformKnots(\n poles: Point3d[] | Float64Array | GrowableXYZArray, order: number,\n ): BSplineCurve3d | undefined {\n if (order < 2)\n return undefined;\n let numPoles = poles instanceof Float64Array ? poles.length / 3 : poles.length;\n if (numPoles < 2)\n return undefined;\n const startPoint = Point3d.createZero();\n const endPoint = Point3d.createZero();\n let hasClosurePoint = false;\n do {\n if (poles instanceof Float64Array) {\n startPoint.set(poles[0], poles[1], poles[2]);\n endPoint.set(poles[3 * numPoles - 3], poles[3 * numPoles - 2], poles[3 * numPoles - 1]);\n } else if (poles instanceof GrowableXYZArray) {\n poles.getPoint3dAtUncheckedPointIndex(0, startPoint);\n poles.getPoint3dAtUncheckedPointIndex(numPoles - 1, endPoint);\n } else {\n startPoint.setFromPoint3d(poles[0]);\n endPoint.setFromPoint3d(poles[numPoles - 1]);\n }\n if (hasClosurePoint = startPoint.isAlmostEqual(endPoint))\n --numPoles; // remove wraparound pole if found\n } while (hasClosurePoint && numPoles > 1);\n if (numPoles < order)\n return undefined;\n const degree = order - 1;\n const numIntervals = numPoles;\n const knots = KnotVector.createUniformWrapped(numIntervals, degree, 0.0, 1.0);\n knots.wrappable = BSplineWrapMode.OpenByAddingControlPoints;\n // append degree wraparound poles\n const curve = new BSplineCurve3d(numPoles + degree, order, knots);\n if (poles instanceof Float64Array) {\n let i = 0;\n for (let j = 0; j < 3 * numPoles; j++)\n curve._bcurve.packedData[i++] = poles[j];\n for (let j = 0; j < 3 * degree; j++)\n curve._bcurve.packedData[i++] = poles[j];\n } else if (poles instanceof GrowableXYZArray) {\n let i = 0;\n for (let j = 0; j < 3 * numPoles; j++)\n curve._bcurve.packedData[i++] = poles.float64Data()[j];\n for (let j = 0; j < 3 * degree; j++)\n curve._bcurve.packedData[i++] = poles.float64Data()[j];\n } else {\n let i = 0;\n for (let j = 0; j < numPoles; j++) {\n curve._bcurve.packedData[i++] = poles[j].x;\n curve._bcurve.packedData[i++] = poles[j].y;\n curve._bcurve.packedData[i++] = poles[j].z;\n }\n for (let j = 0; j < degree; j++) {\n curve._bcurve.packedData[i++] = poles[j].x;\n curve._bcurve.packedData[i++] = poles[j].y;\n curve._bcurve.packedData[i++] = poles[j].z;\n }\n }\n return curve;\n }\n /**\n * Create a C2 cubic B-spline curve that interpolates the given points and optional end tangents.\n * @param options collection of points and end conditions.\n */\n public static createFromInterpolationCurve3dOptions(options: InterpolationCurve3dOptions): BSplineCurve3d | undefined {\n return BSplineCurveOps.createThroughPointsC2Cubic(options);\n }\n /**\n * Create a B-spline curve from an Akima curve.\n * @param options collection of points and end conditions.\n */\n public static createFromAkimaCurve3dOptions(options: AkimaCurve3dOptions): BSplineCurve3d | undefined {\n return BSplineCurveOps.createThroughPoints(options.fitPoints, 4); // temporary\n }\n /**\n * Create a B-spline curve with given knots.\n * * The poles have several variants:\n * * Float64Array(3 * numPoles) in blocks of [x,y,z].\n * * Point3d[].\n * * number[][], with inner dimension 3.\n * * Two count conditions are recognized:\n * * If poleArray.length + order === knotArray.length, the first and last are assumed to be the extraneous knots\n * of classic clamping.\n * * If poleArray.length + order === knotArray.length + 2, the knots are in modern form.\n * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/BSpline/\n */\n public static create(\n poleArray: Float64Array | Point3d[] | number[][], knotArray: Float64Array | number[], order: number,\n ): BSplineCurve3d | undefined {\n if (order < 2)\n return undefined;\n let numPoles = poleArray.length;\n if (poleArray instanceof Float64Array)\n numPoles = Math.floor(numPoles / 3); // blocked as xyz\n if (numPoles < order)\n return undefined;\n const numKnots = knotArray.length;\n const skipFirstAndLast = (numPoles + order === numKnots); // classic over-clamped input knots\n if (!skipFirstAndLast && numPoles + order !== numKnots + 2) // modern knots\n return undefined;\n const knots = KnotVector.create(knotArray, order - 1, skipFirstAndLast);\n const curve = new BSplineCurve3d(numPoles, order, knots);\n let i = 0;\n if (poleArray instanceof Float64Array) {\n for (const coordinate of poleArray)\n curve._bcurve.packedData[i++] = coordinate;\n } else if (poleArray[0] instanceof Point3d) {\n for (const p of poleArray as Point3d[]) {\n curve._bcurve.packedData[i++] = p.x;\n curve._bcurve.packedData[i++] = p.y;\n curve._bcurve.packedData[i++] = p.z;\n }\n } else if (Array.isArray(poleArray[0]) && poleArray[0].length === 3) {\n for (const point of poleArray as number[][])\n for (const coord of point)\n curve._bcurve.packedData[i++] = coord;\n } else {\n return undefined; // unexpected poleArray type\n }\n return curve;\n }\n /** Return a deep clone. */\n public override clone(): BSplineCurve3d {\n const knotVector = this._bcurve.knots.clone();\n const curve = new BSplineCurve3d(this.numPoles, this.order, knotVector);\n curve._bcurve.packedData = this._bcurve.packedData.slice();\n return curve;\n }\n /** Evaluate the curve at a fractional position within a given span. */\n public evaluatePointInSpan(spanIndex: number, spanFraction: number, result?: Point3d): Point3d {\n this._bcurve.evaluateBuffersInSpan(spanIndex, spanFraction);\n return Point3d.createFrom(this._bcurve.poleBuffer, result);\n }\n /**\n * Evaluate the curve and derivative at a fractional position within a given span.\n * * The derivative is with respect to the span fractional parameter, _not_ to the curve's parameter or fractional parameter.\n */\n public evaluatePointAndDerivativeInSpan(spanIndex: number, spanFraction: number): Ray3d {\n this._bcurve.evaluateBuffersInSpan1(spanIndex, spanFraction);\n return Ray3d.createCapture(\n Point3d.createFrom(this._bcurve.poleBuffer),\n Vector3d.createFrom(this._bcurve.poleBuffer1),\n );\n }\n /**\n * Evaluate the curve at the given parameter.\n * @param u parameter in curve domain.\n * @param result optional result.\n * @returns the point on the curve.\n */\n public knotToPoint(u: number, result?: Point3d): Point3d {\n this._bcurve.evaluateBuffersAtKnot(u);\n return Point3d.createFrom(this._bcurve.poleBuffer, result);\n }\n /**\n * Evaluate the curve and derivative at the given parameter.\n * @param u parameter in curve domain.\n * @param result optional result.\n * @returns the ray with origin at the curve point and direction as the derivative.\n */\n public knotToPointAndDerivative(u: number, result?: Ray3d): Ray3d {\n this._bcurve.evaluateBuffersAtKnot(u, 1);\n if (!result)\n return Ray3d.createCapture(\n Point3d.createFrom(this._bcurve.poleBuffer),\n Vector3d.createFrom(this._bcurve.poleBuffer1),\n );\n result.origin.setFrom(this._bcurve.poleBuffer);\n result.direction.setFrom(this._bcurve.poleBuffer1);\n return result;\n }\n /**\n * Evaluate the curve and two derivatives at the given parameter.\n * @param u parameter in the curve domain.\n * @param result optional result.\n * @returns the plane with origin at the curve point, vectorU as the 1st derivative, and vectorV as the 2nd derivative.\n */\n public knotToPointAnd2Derivatives(u: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\n this._bcurve.evaluateBuffersAtKnot(u, 2);\n return Plane3dByOriginAndVectors.createOriginAndVectorsXYZ(\n this._bcurve.poleBuffer[0], this._bcurve.poleBuffer[1], this._bcurve.poleBuffer[2],\n this._bcurve.poleBuffer1[0], this._bcurve.poleBuffer1[1], this._bcurve.poleBuffer1[2],\n this._bcurve.poleBuffer2[0], this._bcurve.poleBuffer2[1], this._bcurve.poleBuffer2[2],\n result,\n );\n }\n /** Test if `this` is almost the same curve as `other`. */\n public override isAlmostEqual(other: any): boolean {\n if (other instanceof BSplineCurve3d) {\n return this._bcurve.knots.isAlmostEqual(other._bcurve.knots)\n && Point3dArray.isAlmostEqual(this._bcurve.packedData, other._bcurve.packedData);\n }\n return false;\n }\n /** Test if this curve lies entirely in the given plane. */\n public isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean {\n return Point3dArray.isCloseToPlane(this._bcurve.packedData, plane);\n }\n /**\n * Return the control polygon length as an approximation to the curve length.\n * * The returned length is always an overestimate.\n */\n public quickLength(): number {\n return Point3dArray.sumEdgeLengths(this._bcurve.packedData);\n }\n /** Emit Beziers or strokes (selected by the stroke options) to the handler. */\n public emitStrokableParts(handler: IStrokeHandler, options?: StrokeOptions): void {\n const workBezier = this.initializeWorkBezier();\n const numSpan = this.numSpan;\n let numStrokes;\n for (let spanIndex = 0; spanIndex < numSpan; spanIndex++) {\n const bezier = this.getSaturatedBezierSpan3dOr3dH(spanIndex, false, workBezier);\n if (bezier) {\n numStrokes = bezier.computeStrokeCountForOptions(options);\n if (handler.announceBezierCurve) {\n handler.announceBezierCurve(\n bezier,\n numStrokes,\n this,\n spanIndex,\n this._bcurve.knots.spanFractionToFraction(spanIndex, 0.0),\n this._bcurve.knots.spanFractionToFraction(spanIndex, 1.0),\n );\n\n } else {\n handler.announceIntervalForUniformStepStrokes(\n this,\n numStrokes,\n this._bcurve.knots.spanFractionToFraction(spanIndex, 0.0),\n this._bcurve.knots.spanFractionToFraction(spanIndex, 1.0),\n );\n }\n }\n }\n }\n /**\n * Assess length and turn to determine a stroke count.\n * @param options stroke options structure.\n */\n public computeStrokeCountForOptions(options?: StrokeOptions): number {\n const workBezier = this.initializeWorkBezier();\n const numSpan = this.numSpan;\n let numStroke = 0;\n for (let spanIndex = 0; spanIndex < numSpan; spanIndex++) {\n const bezier = this.getSaturatedBezierSpan3d(spanIndex, workBezier);\n if (bezier)\n numStroke += bezier.computeStrokeCountForOptions(options);\n }\n return numStroke;\n }\n /**\n * Compute individual segment stroke counts. Attach in a StrokeCountMap.\n * @param options StrokeOptions that determine count\n * @param parentStrokeMap evolving parent map.\n * @alpha\n */\n public override computeAndAttachRecursiveStrokeCounts(options?: StrokeOptions, parentStrokeMap?: StrokeCountMap) {\n const workBezier = this.initializeWorkBezier();\n const numSpan = this.numSpan;\n const myData = StrokeCountMap.createWithCurvePrimitiveAndOptionalParent(this, parentStrokeMap, []);\n for (let spanIndex = 0; spanIndex < numSpan; spanIndex++) {\n const bezier = this.getSaturatedBezierSpan3d(spanIndex, workBezier);\n if (bezier) {\n const segmentLength = workBezier.curveLength();\n const numStrokeOnSegment = workBezier.computeStrokeCountForOptions(options);\n myData.addToCountAndLength(numStrokeOnSegment, segmentLength);\n }\n }\n CurvePrimitive.installStrokeCountMap(this, myData, parentStrokeMap);\n }\n /** Append strokes to the given linestring. */\n public emitStrokes(dest: LineString3d, options?: StrokeOptions): void {\n const workBezier = this.initializeWorkBezier();\n const numSpan = this.numSpan;\n for (let spanIndex = 0; spanIndex < numSpan; spanIndex++) {\n const bezier = this.getSaturatedBezierSpan3d(spanIndex, workBezier);\n if (bezier)\n bezier.emitStrokes(dest, options);\n }\n }\n /**\n * Test knots and poles to determine if it is possible to close (aka \"wrap\") the curve.\n * @returns the manner in which it is possible to close the curve. See `BSplineWrapMode` for particulars of each mode.\n */\n public get isClosable(): BSplineWrapMode {\n return this.isClosableCurve;\n }\n /**\n * Return the Bezier fragment corresponding to the given span of this curve.\n * * The concrete return type may be [[BezierCurve3d]] or [[BezierCurve3dH]] according to the instance type and `prefer3dH`.\n * @param spanIndex index of span.\n * @param result optional reusable curve. This will only be reused if its type and order matches.\n */\n public getSaturatedBezierSpan3dOr3dH(\n spanIndex: number, prefer3dH: boolean, result?: BezierCurveBase,\n ): BezierCurveBase | undefined {\n if (prefer3dH)\n return this.getSaturatedBezierSpan3dH(spanIndex, result);\n return this.getSaturatedBezierSpan3d(spanIndex, result);\n }\n /**\n * Return the Bezier fragment corresponding to the given span of this curve.\n * @param spanIndex index of span.\n * @param result optional reusable curve. This will only be reused if its type and order matches.\n */\n public getSaturatedBezierSpan3d(spanIndex: number, result?: BezierCurveBase): BezierCurve3d | undefined {\n if (spanIndex < 0 || spanIndex >= this.numSpan)\n return undefined;\n const order = this.order;\n if (result === undefined || !(result instanceof BezierCurve3d) || result.order !== order)\n result = BezierCurve3d.createOrder(order);\n const bezier = result as BezierCurve3d;\n bezier.loadSpanPoles(this._bcurve.packedData, spanIndex);\n if (bezier.saturateInPlace(this._bcurve.knots, spanIndex))\n return bezier;\n return undefined;\n }\n /**\n * Return the Bezier fragment corresponding to the given span of this curve.\n * @param spanIndex index of span.\n * @param result optional reusable curve. This will only be reused if its type and order matches.\n */\n public getSaturatedBezierSpan3dH(spanIndex: number, result?: BezierCurveBase): BezierCurve3dH | undefined {\n if (spanIndex < 0 || spanIndex >= this.numSpan)\n return undefined;\n const order = this.order;\n if (result === undefined || !(result instanceof BezierCurve3dH) || result.order !== order)\n result = BezierCurve3dH.createOrder(order);\n const bezier = result as BezierCurve3dH;\n bezier.loadSpan3dPolesWithWeight(this._bcurve.packedData, spanIndex, 1.0);\n if (bezier.saturateInPlace(this._bcurve.knots, spanIndex))\n return bezier;\n return undefined;\n }\n /** Second step of double dispatch: call `handler.handleBSplineCurve3d(this)`. */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleBSplineCurve3d(this);\n }\n /**\n * Extend a range so it contains the range of this curve.\n * * This computation is based on the poles, not the curve itself, so the returned range is generally larger than the\n * tightest possible range.\n * @param rangeToExtend range to extend.\n * @param transform transform to apply to the poles as they are entered into the range.\n */\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\n const buffer = this._bcurve.packedData;\n const n = buffer.length - 2;\n if (transform) {\n for (let i0 = 0; i0 < n; i0 += 3)\n rangeToExtend.extendTransformedXYZ(transform, buffer[i0], buffer[i0 + 1], buffer[i0 + 2]);\n } else {\n for (let i0 = 0;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AM,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QAC5B,IAAI,SAAS,EAAE,CAAC;YACd,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC;gBAC9B,aAAa,CAAC,oBAAoB,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;QAC9F,CAAC;aAAM,CAAC;YACN,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC;gBAC9B,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Bspline\n */\n\nimport { VariantCurveExtendParameter } from \"../curve/CurveExtendMode\";\nimport { CurveIntervalRole, CurveLocationDetail } from \"../curve/CurveLocationDetail\";\nimport { CurvePrimitive } from \"../curve/CurvePrimitive\";\nimport { CurveOffsetXYHandler } from \"../curve/internalContexts/CurveOffsetXYHandler\";\nimport { PlaneAltitudeRangeContext } from \"../curve/internalContexts/PlaneAltitudeRangeContext\";\nimport { LineString3d } from \"../curve/LineString3d\";\nimport { OffsetOptions } from \"../curve/OffsetOptions\";\nimport { StrokeCountMap } from \"../curve/Query/StrokeCountMap\";\nimport { StrokeOptions } from \"../curve/StrokeOptions\";\nimport { Geometry, PlaneAltitudeEvaluator } from \"../Geometry\";\nimport { GeometryHandler, IStrokeHandler } from \"../geometry3d/GeometryHandler\";\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\nimport { Plane3dByOriginAndUnitNormal } from \"../geometry3d/Plane3dByOriginAndUnitNormal\";\nimport { Plane3dByOriginAndVectors } from \"../geometry3d/Plane3dByOriginAndVectors\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Point3dArray } from \"../geometry3d/PointHelpers\";\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { Point4d } from \"../geometry4d/Point4d\";\nimport { UnivariateBezier } from \"../numerics/BezierPolynomials\";\nimport { AkimaCurve3dOptions } from \"./AkimaCurve3d\";\nimport { Bezier1dNd } from \"./Bezier1dNd\";\nimport { BezierCurve3d } from \"./BezierCurve3d\";\nimport { BezierCurve3dH } from \"./BezierCurve3dH\";\nimport { BezierCurveBase } from \"./BezierCurveBase\";\nimport { BSpline1dNd } from \"./BSpline1dNd\";\nimport { BSplineCurveOps } from \"./BSplineCurveOps\";\nimport { InterpolationCurve3dOptions } from \"./InterpolationCurve3d\";\nimport { BSplineWrapMode, KnotVector } from \"./KnotVector\";\n\n/**\n * Base class for BSplineCurve3d and BSplineCurve3dH.\n * * A B-spline curve consists of an array of `knots`, an array of `poles`, and a `degree`.\n * * The knot array is a non-decreasing sequence of numbers. It is also called a \"knot vector\".\n * * The curve is a parametric function whose domain is a sub-range of its knots.\n * * The API sometimes refers to a domain parameter `u` as a \"knot\", even if `u` is not actually an entry in the\n * knot array.\n * * The curve loosely \"follows\" the line string formed by the poles, aka the \"control polygon\".\n * * The curve is a chain of polynomial segments, aka \"spans\" or \"fragments\". B-spline theory identifies these as\n * Bezier curves.\n * * The polynomial spans all have same `degree`.\n * * Each span is controlled by `order = degree + 1` contiguous points in the pole array.\n * * There is a strict relationship between knot and poles counts: `numPoles + order = numKnots + 2'.\n * * The number of spans is `numSpan = numPoles - degree`.\n * * For a span with index `spanIndex`:\n * * The `order` relevant poles begin at pole index `spanIndex`.\n * * The `2*degree` relevant knots begin at knot index `spanIndex`.\n * * The span domain is the knot range `[knot[spanIndex+degree-1], knot[spanIndex+degree]]`.\n * * The curve domain is the knot range `[knot[degree-1], knot[numSpan+degree-1]]`, or equivalently\n * `[knot[degree-1], knot[numPoles-1]]`. The API refers to this domain as the \"active knot interval\" of the curve.\n *\n * Nearly all B-spline curves are \"clamped\".\n * * This means that in the `knots` array, the first `degree` knots are equal, and the last `degree` knots are equal.\n * We say the smallest knot and the largest knot have multiplicity `degree`.\n * * Clamping make the curve pass through its first and last poles, with tangents directed along the first and\n * last edges of the control polygon.\n * * For instance, a cubic B-spline curve with knot vector `[0,0,0,1,2,3,3,3]`\n * * can be evaluated at parameter values in the range `[0, 3]`\n * * has 3 spans, with domains `[0, 1]`, `[1, 2]`, and `[2, 3]`\n * * has 6 poles\n * * passes through its first and last poles.\n * * The `create` methods may allow the classic convention that has an extra knot at the beginning and end of the\n * knot vector.\n * * These two extra knots are not actually needed to define the B-spline curve.\n * * When the `create` methods recognize the classic setup (`numPoles + order = numKnots`), the extra knots are\n * not saved with the BSplineCurve3dBase knots.\n *\n * * The weighted variant [[BSplineCurve3dH]] has the problem that `CurvePrimitive` 3D typing does not allow the\n * undefined result where a homogeneous pole has zero weight; the convention in this case is to return 000.\n *\n * * Note the class relationships:\n * * [[BSpline1dNd]] knows the definitional B-spline recurrence relation with no physical interpretation for the poles.\n * * BsplineCurve3dBase owns a protected BSpline1dNd.\n * * `BsplineCurve3dBase` is derived from [[CurvePrimitive]], which creates obligation to act as a 3D curve, e.g.,\n * * evaluate fraction to point and derivatives wrt fraction.\n * * compute intersection with plane.\n * * [[BSplineCurve3d]] and [[BSplineCurve3dH]] have variant logic driven by whether or not there are \"weights\" on the poles.\n * * For `BSplineCurve3d`, the xyz value of pole calculations are \"final\" values for 3d evaluation.\n * * For `BSplineCurve3dH`, various `BSpline1dNd` results with xyzw have to be normalized back to xyz.\n *\n * * These classes do not support \"periodic\" variants.\n * * Periodic curves historically have carried a flag (e.g., \"closed\") indicating that certain un-stored\n * leading/trailing knots and poles are understood to wrap around periodically.\n * * Instead, these classes carry no such flag. They represent such curves with explicitly wrapped knots/poles.\n *\n * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/BSpline/\n * @public\n */\nexport abstract class BSplineCurve3dBase extends CurvePrimitive {\n /** String name for schema properties. */\n public readonly curvePrimitiveType = \"bsplineCurve\";\n /** The underlying blocked-pole spline, with simple x,y,z poles. */\n protected _bcurve: BSpline1dNd;\n private _definitionData?: any;\n public set definitionData(data: any) {\n this._definitionData = data;\n }\n public get definitionData(): any {\n return this._definitionData;\n }\n protected constructor(poleDimension: number, numPoles: number, order: number, knots: KnotVector) {\n super();\n this._bcurve = BSpline1dNd.create(numPoles, poleDimension, order, knots);\n }\n /** Return the degree (one less than the order) of the curve. */\n public get degree(): number {\n return this._bcurve.degree;\n }\n /** Return the order (one more than degree) of the curve. */\n public get order(): number {\n return this._bcurve.order;\n }\n /**\n * Return the number of Bezier spans in the curve. Note that this number includes the number of null\n * spans at repeated knots.\n */\n public get numSpan(): number {\n return this._bcurve.numSpan;\n }\n /** Return the number of poles. */\n public get numPoles(): number {\n return this._bcurve.numPoles;\n }\n /** Return live reference to the poles of the curve. */\n public get polesRef(): Float64Array {\n return this._bcurve.packedData;\n }\n /** Return live reference to the knots of the curve. */\n public get knotsRef(): Float64Array {\n return this._bcurve.knots.knots;\n }\n /**\n * Number of components per pole, e.g.,\n * * 3 for conventional (x,y,z) curve.\n * * 4 for weighted (wx,wy,wz,w) curve.\n */\n public get poleDimension(): number {\n return this._bcurve.poleLength;\n }\n /** Return a simple array form of the knots. Optionally replicate the first and last in classic over-clamped manner. */\n public copyKnots(includeExtraEndKnot: boolean): number[] {\n return this._bcurve.knots.copyKnots(includeExtraEndKnot);\n }\n /** Get the flag indicating the curve might be suitable for having wrapped \"closed\" interpretation. */\n public getWrappable(): BSplineWrapMode {\n return this._bcurve.knots.wrappable;\n }\n /** Set the flag indicating the curve might be suitable for having wrapped \"closed\" interpretation. */\n public setWrappable(value: BSplineWrapMode) {\n this._bcurve.knots.wrappable = value;\n }\n /**\n * Test knots and poles to determine if it is possible to close (aka \"wrap\") the curve.\n * @returns the manner in which it is possible to close the curve. See `BSplineWrapMode` for particulars of each mode.\n */\n public get isClosableCurve(): BSplineWrapMode {\n const mode = this._bcurve.knots.wrappable;\n if (mode === BSplineWrapMode.None)\n return BSplineWrapMode.None;\n if (!this._bcurve.knots.testClosable(mode))\n return BSplineWrapMode.None;\n if (!this._bcurve.testClosablePolygon(mode))\n return BSplineWrapMode.None;\n return mode;\n }\n /** Evaluate the curve at a fractional position within a given span. */\n public abstract evaluatePointInSpan(spanIndex: number, spanFraction: number, result?: Point3d): Point3d;\n /**\n * Evaluate the curve and derivative at a fractional position within a given span.\n * * The derivative is with respect to the span fractional parameter, _not_ to the curve's parameter or fractional parameter.\n */\n public abstract evaluatePointAndDerivativeInSpan(spanIndex: number, spanFraction: number, result?: Ray3d): Ray3d;\n /** Evaluate the curve at the given parameter. */\n public abstract knotToPoint(knot: number, result?: Point3d): Point3d;\n /** Evaluate the curve and derivative at the given parameter. */\n public abstract knotToPointAndDerivative(knot: number, result?: Ray3d): Ray3d;\n /** Evaluate the curve and two derivatives at the given parameter. */\n public abstract knotToPointAnd2Derivatives(knot: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors;\n /** Evaluate the curve point at the given fractional parameter. */\n public fractionToPoint(fraction: number, result?: Point3d): Point3d {\n return this.knotToPoint(this._bcurve.knots.fractionToKnot(fraction), result);\n }\n /** Evaluate the curve and derivative at the given fractional parameter. */\n public fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d {\n const knot = this._bcurve.knots.fractionToKnot(fraction);\n result = this.knotToPointAndDerivative(knot, result);\n result.direction.scaleInPlace(this._bcurve.knots.knotLength01);\n return result;\n }\n /** Evaluate the curve and two derivatives at the given fractional parameter. */\n public fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\n const knot = this._bcurve.knots.fractionToKnot(fraction);\n result = this.knotToPointAnd2Derivatives(knot, result);\n const a = this._bcurve.knots.knotLength01;\n result.vectorU.scaleInPlace(a);\n result.vectorV.scaleInPlace(a * a);\n return result;\n }\n /** Return the start point of the curve. */\n public override startPoint(result?: Point3d): Point3d {\n return this.evaluatePointInSpan(0, 0.0, result);\n }\n /** Return the end point of the curve. */\n public override endPoint(result?: Point3d): Point3d {\n return this.evaluatePointInSpan(this.numSpan - 1, 1.0, result);\n }\n /**\n * Reverse the curve in place.\n * * Poles are reversed.\n * * Knot values are mirrored around the middle of the knot array.\n */\n public reverseInPlace(): void {\n this._bcurve.reverseInPlace();\n }\n /** Return an array with this curve's Bezier fragments. */\n public collectBezierSpans(prefer3dH: boolean): BezierCurveBase[] {\n const result: BezierCurveBase[] = [];\n const numSpans = this.numSpan;\n for (let i = 0; i < numSpans; i++) {\n if (this._bcurve.knots.isIndexOfRealSpan(i)) {\n const span = this.getSaturatedBezierSpan3dOr3dH(i, prefer3dH);\n if (span)\n result.push(span);\n }\n }\n return result;\n }\n /**\n * Return the Bezier fragment corresponding to the given span of this curve.\n * * The concrete return type may be [[BezierCurve3d]] or [[BezierCurve3dH]] according to the instance type and `prefer3dH`.\n * @param spanIndex index of span.\n * @param prefer3dH true to force promotion to homogeneous.\n * @param result optional reusable curve. This will only be reused if its type and order matches.\n */\n public abstract getSaturatedBezierSpan3dOr3dH(\n spanIndex: number, prefer3dH: boolean, result?: BezierCurveBase,\n ): BezierCurveBase | undefined;\n /**\n * Return a specified pole as a Point4d.\n * * BSplineCurve3d appends weight 1 to its xyz.\n * * BSplineCurve3dH with pole whose \"normalized\" point is (x,y,z) but has weight w returns the weighted form (wx,wy,wz,w).\n */\n public abstract getPolePoint4d(poleIndex: number, result?: Point4d): Point4d | undefined;\n /**\n * Return a specified pole as a Point3d.\n * * BSplineCurve3d returns its simple xyz.\n * * BSplineCurve3dH attempts to normalize its (wx,wy,wz,w) back to (x,y,z), and returns undefined if weight is zero.\n * @param poleIndex index of the pole.\n * @param result optional result.\n */\n public abstract getPolePoint3d(poleIndex: number, result?: Point3d): Point3d | undefined;\n /** Given a pole index, return the starting index for the contiguous array. */\n public poleIndexToDataIndex(poleIndex: number): number | undefined {\n if (poleIndex >= 0 && poleIndex < this.numPoles)\n return poleIndex * this._bcurve.poleLength;\n return undefined;\n }\n /**\n * Search for the curve point that is closest to the spacePoint.\n * * If the space point is exactly on the curve, this is the reverse of fractionToPoint.\n * * Since CurvePrimitive should always have start and end available as candidate points, this method should always\n * succeed.\n * @param spacePoint point in space.\n * @param _extend ignored (pass false). A BSplineCurve3dBase cannot be extended.\n * @param result optional pre-allocated detail to populate and return.\n * @returns details of the closest point.\n */\n public override closestPoint(\n spacePoint: Point3d, _extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n // seed at start point; final point comes with final bezier perpendicular step\n const point = this.fractionToPoint(0);\n result = CurveLocationDetail.createCurveFractionPointDistance(this, 0.0, point, point.distance(spacePoint), result);\n let span: BezierCurve3dH | undefined;\n const numSpans = this.numSpan;\n for (let i = 0; i < numSpans; i++) {\n if (this._bcurve.knots.isIndexOfRealSpan(i)) {\n span = this.getSaturatedBezierSpan3dOr3dH(i, true, span) as BezierCurve3dH;\n if (span) {\n // if the B-spline is discontinuous, both ends should be tested; ignore that possibility\n if (span.updateClosestPointByTruePerpendicular(spacePoint, result, false, true)) {\n // the detail records the span bezier; promote it to the parent curve\n result.curve = this;\n result.fraction = span.fractionToParentFraction(result.fraction);\n }\n }\n }\n }\n return result;\n }\n /** Return a deep clone. */\n public abstract override clone(): BSplineCurve3dBase;\n /** Return a transformed deep clone. */\n public override cloneTransformed(transform: Transform): BSplineCurve3dBase {\n const curve = this.clone();\n curve.tryTransformInPlace(transform);\n return curve;\n }\n /**\n * Return a curve primitive which is a portion of this curve.\n * @param fractionA start fraction.\n * @param fractionB end fraction.\n */\n public override clonePartialCurve(fractionA: number, fractionB: number): BSplineCurve3dBase {\n let clone: BSplineCurve3dBase;\n if (fractionA > fractionB) {\n clone = this.clonePartialCurve(fractionB, fractionA);\n clone.reverseInPlace();\n return clone;\n }\n clone = this.clone();\n const origNumKnots = clone._bcurve.knots.knots.length;\n let knotA = clone._bcurve.knots.fractionToKnot(fractionA);\n let knotB = clone._bcurve.knots.fractionToKnot(fractionB);\n clone._bcurve.addKnot(knotA, clone.degree);\n clone._bcurve.addKnot(knotB, clone.degree);\n if (origNumKnots === clone._bcurve.knots.knots.length)\n return clone; // full curve\n if (knotA > knotB)\n [knotA, knotB] = [knotB, knotA];\n // choose first/last knot and pole such that knotA/knotB has degree multiplicity in the new knot sequence\n const iStartKnot = clone._bcurve.knots.knotToLeftKnotIndex(knotA) - clone.degree + 1;\n const iStartPole = iStartKnot * clone._bcurve.poleLength;\n const iLastKnot = clone._bcurve.knots.knotToLeftKnotIndex(knotB);\n let iLastKnotLeftMultiple = iLastKnot - clone._bcurve.knots.getKnotMultiplicityAtIndex(iLastKnot) + 1;\n if (clone._bcurve.knots.knots[iLastKnot] < knotB)\n iLastKnotLeftMultiple = iLastKnot + 1;\n const iEndPole = (iLastKnotLeftMultiple + 1) * clone._bcurve.poleLength; // one past last pole\n const iEndKnot = iLastKnotLeftMultiple + clone.degree; // one past last knot\n // trim the arrays (leave knots unnormalized)\n clone._bcurve.knots.setKnotsCapture(clone._bcurve.knots.knots.slice(iStartKnot, iEndKnot));\n clone._bcurve.packedData = clone._bcurve.packedData.slice(iStartPole, iEndPole);\n clone.setWrappable(BSplineWrapMode.None); // always open\n return clone;\n }\n /**\n * Implement `CurvePrimitive.appendPlaneIntersections` to compute intersections of the curve with a plane.\n * @param plane the plane with which to intersect the curve. Concrete types include [[Plane3dByOriginAndUnitNormal]],\n * [[Point4d]], etc.\n * @param result growing array of plane intersections.\n * @return number of intersections appended to the array.\n */\n public override appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number {\n const numPole = this.numPoles;\n const order = this.order;\n const allCoffs = new Float64Array(numPole);\n const numSpan = this.numSpan;\n const point4d = Point4d.create();\n // compute all pole altitudes from the plane\n const minMax = Range1d.createNull();\n // put the altitudes of all the B-spline poles in one array\n for (let i = 0; i < numPole; i++) {\n this.getPolePoint4d(i, point4d);\n allCoffs[i] = plane.weightedAltitude(point4d);\n minMax.extendX(allCoffs[i]);\n }\n // A univariate B-spline through the altitude poles gives altitude as function of the B-spline knot.\n // The (bspline) altitude function for each span is `order` consecutive altitudes.\n // If those altitudes bracket zero, the span may potentially have a crossing.\n let univariateBezier: UnivariateBezier | undefined;\n let numFound = 0;\n let previousFraction = -1000.0;\n if (minMax.containsX(0.0)) {\n for (let spanIndex = 0; spanIndex < numSpan; spanIndex++) {\n if (this._bcurve.knots.isIndexOfRealSpan(spanIndex)) { // ignore trivial knot intervals\n // outer range test ...\n minMax.setNull();\n minMax.extendArraySubset(allCoffs, spanIndex, order);\n if (minMax.containsX(0.0)) {\n // pack the B-spline support into a univariate bezier\n univariateBezier = UnivariateBezier.createArraySubset(allCoffs, spanIndex, order, univariateBezier);\n // saturate and solve the bezier\n Bezier1dNd.saturate1dInPlace(univariateBezier.coffs, this._bcurve.knots, spanIndex);\n const roots = univariateBezier.roots(0.0, true);\n if (roots) {\n for (const spanFraction of roots) {\n // promote each local bezier fraction to global fraction and save the curve evaluation at that fraction\n numFound++;\n const fraction = this._bcurve.knots.spanFractionToFraction(spanIndex, spanFraction);\n if (!Geometry.isAlmostEqualNumber(fraction, previousFraction)) {\n const detail = CurveLocationDetail.createCurveEvaluatedFraction(this, fraction);\n detail.intervalRole = CurveIntervalRole.isolated;\n result.push(detail);\n previousFraction = fraction;\n }\n }\n }\n }\n }\n }\n }\n return numFound;\n }\n /**\n * Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).\n * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object.\n */\n public override constructOffsetXY(offsetDistanceOrOptions: number | OffsetOptions): BSplineCurve3d | undefined {\n const options = OffsetOptions.create(offsetDistanceOrOptions);\n const handler = new CurveOffsetXYHandler(this, options.leftOffsetDistance);\n this.emitStrokableParts(handler, options.strokeOptions);\n return handler.claimResult();\n }\n /**\n * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters\n * of projection.\n * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.\n * @param lowHigh optional receiver for output.\n * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the\n * end of the ray.\n */\n public override projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\n return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);\n }\n}\n/**\n * A BSplineCurve3d is a B-spline curve whose poles are Point3d.\n * See BSplineCurve3dBase for description of knots, order, degree, and poles.\n * @public\n */\nexport class BSplineCurve3d extends BSplineCurve3dBase {\n private _workBezier?: BezierCurve3d;\n private initializeWorkBezier(): BezierCurve3d {\n if (this._workBezier === undefined)\n this._workBezier = BezierCurve3d.createOrder(this.order);\n return this._workBezier;\n }\n private constructor(numPoles: number, order: number, knots: KnotVector) {\n super(3, numPoles, order, knots);\n }\n /** Test if `other` is an instance of BSplineCurve3d. */\n public isSameGeometryClass(other: any): boolean {\n return other instanceof BSplineCurve3d;\n }\n /** Apply `transform` to the poles. */\n public tryTransformInPlace(transform: Transform): boolean {\n Point3dArray.multiplyInPlace(transform, this._bcurve.packedData);\n return true;\n }\n /** Get a pole as a simple Point3d. */\n public getPolePoint3d(poleIndex: number, result?: Point3d): Point3d | undefined {\n const k = this.poleIndexToDataIndex(poleIndex);\n if (k !== undefined) {\n const data = this._bcurve.packedData;\n return Point3d.create(data[k], data[k + 1], data[k + 2], result);\n }\n return undefined;\n }\n /** Get a pole as Point4d with weight 1. */\n public getPolePoint4d(poleIndex: number, result?: Point4d): Point4d | undefined {\n const k = this.poleIndexToDataIndex(poleIndex);\n if (k !== undefined) {\n const data = this._bcurve.packedData;\n return Point4d.create(data[k], data[k + 1], data[k + 2], 1.0, result);\n }\n return undefined;\n }\n /**\n * Convert the fractional position in the given span to a knot.\n * * The returned value is not necessarily a knot, but it is a valid parameter in the domain of the B-spline curve.\n */\n public spanFractionToKnot(spanIndex: number, spanFraction: number): number {\n return this._bcurve.spanFractionToKnot(spanIndex, spanFraction);\n }\n /** Return a simple array of arrays with the poles as `[[x,y,z],[x,y,z],..]`. */\n public copyPoints(): any[] {\n return Point3dArray.unpackNumbersToNestedArrays(this._bcurve.packedData, 3);\n }\n /** Return a simple array of poles' coordinates. */\n public copyPointsFloat64Array(): Float64Array {\n return this._bcurve.packedData.slice();\n }\n /** Return a simple array form of the knots. Optionally replicate the first and last in classic over-clamped manner. */\n public override copyKnots(includeExtraEndKnot: boolean): number[] {\n return this._bcurve.knots.copyKnots(includeExtraEndKnot);\n }\n /** Create a B-spline with uniform knots. */\n public static createUniformKnots(\n poles: Point3d[] | Float64Array | GrowableXYZArray, order: number,\n ): BSplineCurve3d | undefined {\n const numPoles = poles instanceof Float64Array ? poles.length / 3 : poles.length;\n if (order < 2 || numPoles < order)\n return undefined;\n const knots = KnotVector.createUniformClamped(numPoles, order - 1, 0.0, 1.0);\n const curve = new BSplineCurve3d(numPoles, order, knots);\n if (poles instanceof Float64Array) {\n for (let i = 0; i < 3 * numPoles; i++)\n curve._bcurve.packedData[i] = poles[i];\n } else if (poles instanceof GrowableXYZArray) {\n curve._bcurve.packedData = poles.float64Data().slice(0, 3 * numPoles);\n } else {\n let i = 0;\n for (const p of poles) {\n curve._bcurve.packedData[i++] = p.x;\n curve._bcurve.packedData[i++] = p.y;\n curve._bcurve.packedData[i++] = p.z;\n }\n }\n return curve;\n }\n /**\n * Create a smoothly closed B-spline curve with uniform knots.\n * * Note that the curve does not start at the first pole.\n */\n public static createPeriodicUniformKnots(\n poles: Point3d[] | Float64Array | GrowableXYZArray, order: number,\n ): BSplineCurve3d | undefined {\n if (order < 2)\n return undefined;\n let numPoles = poles instanceof Float64Array ? poles.length / 3 : poles.length;\n if (numPoles < 2)\n return undefined;\n const startPoint = Point3d.createZero();\n const endPoint = Point3d.createZero();\n let hasClosurePoint = false;\n do {\n if (poles instanceof Float64Array) {\n startPoint.set(poles[0], poles[1], poles[2]);\n endPoint.set(poles[3 * numPoles - 3], poles[3 * numPoles - 2], poles[3 * numPoles - 1]);\n } else if (poles instanceof GrowableXYZArray) {\n poles.getPoint3dAtUncheckedPointIndex(0, startPoint);\n poles.getPoint3dAtUncheckedPointIndex(numPoles - 1, endPoint);\n } else {\n startPoint.setFromPoint3d(poles[0]);\n endPoint.setFromPoint3d(poles[numPoles - 1]);\n }\n if (hasClosurePoint = startPoint.isAlmostEqual(endPoint))\n --numPoles; // remove wraparound pole if found\n } while (hasClosurePoint && numPoles > 1);\n if (numPoles < order)\n return undefined;\n const degree = order - 1;\n const numIntervals = numPoles;\n const knots = KnotVector.createUniformWrapped(numIntervals, degree, 0.0, 1.0);\n knots.wrappable = BSplineWrapMode.OpenByAddingControlPoints;\n // append degree wraparound poles\n const curve = new BSplineCurve3d(numPoles + degree, order, knots);\n if (poles instanceof Float64Array) {\n let i = 0;\n for (let j = 0; j < 3 * numPoles; j++)\n curve._bcurve.packedData[i++] = poles[j];\n for (let j = 0; j < 3 * degree; j++)\n curve._bcurve.packedData[i++] = poles[j];\n } else if (poles instanceof GrowableXYZArray) {\n let i = 0;\n for (let j = 0; j < 3 * numPoles; j++)\n curve._bcurve.packedData[i++] = poles.float64Data()[j];\n for (let j = 0; j < 3 * degree; j++)\n curve._bcurve.packedData[i++] = poles.float64Data()[j];\n } else {\n let i = 0;\n for (let j = 0; j < numPoles; j++) {\n curve._bcurve.packedData[i++] = poles[j].x;\n curve._bcurve.packedData[i++] = poles[j].y;\n curve._bcurve.packedData[i++] = poles[j].z;\n }\n for (let j = 0; j < degree; j++) {\n curve._bcurve.packedData[i++] = poles[j].x;\n curve._bcurve.packedData[i++] = poles[j].y;\n curve._bcurve.packedData[i++] = poles[j].z;\n }\n }\n return curve;\n }\n /**\n * Create a C2 cubic B-spline curve that interpolates the given points and optional end tangents.\n * @param options collection of points and end conditions.\n */\n public static createFromInterpolationCurve3dOptions(options: InterpolationCurve3dOptions): BSplineCurve3d | undefined {\n return BSplineCurveOps.createThroughPointsC2Cubic(options);\n }\n /**\n * Create a B-spline curve from an Akima curve.\n * @param options collection of points and end conditions.\n */\n public static createFromAkimaCurve3dOptions(options: AkimaCurve3dOptions): BSplineCurve3d | undefined {\n return BSplineCurveOps.createThroughPoints(options.fitPoints, 4); // temporary\n }\n /**\n * Create a B-spline curve with given knots.\n * * The poles have several variants:\n * * Float64Array(3 * numPoles) in blocks of [x,y,z].\n * * Point3d[].\n * * number[][], with inner dimension 3.\n * * Two count conditions are recognized:\n * * If poleArray.length + order === knotArray.length, the first and last are assumed to be the extraneous knots\n * of classic clamping.\n * * If poleArray.length + order === knotArray.length + 2, the knots are in modern form.\n * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/BSpline/\n */\n public static create(\n poleArray: Float64Array | Point3d[] | number[][], knotArray: Float64Array | number[], order: number,\n ): BSplineCurve3d | undefined {\n if (order < 2)\n return undefined;\n let numPoles = poleArray.length;\n if (poleArray instanceof Float64Array)\n numPoles = Math.floor(numPoles / 3); // blocked as xyz\n if (numPoles < order)\n return undefined;\n const numKnots = knotArray.length;\n const skipFirstAndLast = (numPoles + order === numKnots); // classic over-clamped input knots\n if (!skipFirstAndLast && numPoles + order !== numKnots + 2) // modern knots\n return undefined;\n const knots = KnotVector.create(knotArray, order - 1, skipFirstAndLast);\n const curve = new BSplineCurve3d(numPoles, order, knots);\n let i = 0;\n if (poleArray instanceof Float64Array) {\n for (const coordinate of poleArray)\n curve._bcurve.packedData[i++] = coordinate;\n } else if (poleArray[0] instanceof Point3d) {\n for (const p of poleArray as Point3d[]) {\n curve._bcurve.packedData[i++] = p.x;\n curve._bcurve.packedData[i++] = p.y;\n curve._bcurve.packedData[i++] = p.z;\n }\n } else if (Array.isArray(poleArray[0]) && poleArray[0].length === 3) {\n for (const point of poleArray as number[][])\n for (const coord of point)\n curve._bcurve.packedData[i++] = coord;\n } else {\n return undefined; // unexpected poleArray type\n }\n return curve;\n }\n /** Return a deep clone. */\n public override clone(): BSplineCurve3d {\n const knotVector = this._bcurve.knots.clone();\n const curve = new BSplineCurve3d(this.numPoles, this.order, knotVector);\n curve._bcurve.packedData = this._bcurve.packedData.slice();\n return curve;\n }\n /** Evaluate the curve at a fractional position within a given span. */\n public evaluatePointInSpan(spanIndex: number, spanFraction: number, result?: Point3d): Point3d {\n this._bcurve.evaluateBuffersInSpan(spanIndex, spanFraction);\n return Point3d.createFrom(this._bcurve.poleBuffer, result);\n }\n /**\n * Evaluate the curve and derivative at a fractional position within a given span.\n * * The derivative is with respect to the span fractional parameter, _not_ to the curve's parameter or fractional parameter.\n */\n public evaluatePointAndDerivativeInSpan(spanIndex: number, spanFraction: number): Ray3d {\n this._bcurve.evaluateBuffersInSpan1(spanIndex, spanFraction);\n return Ray3d.createCapture(\n Point3d.createFrom(this._bcurve.poleBuffer),\n Vector3d.createFrom(this._bcurve.poleBuffer1),\n );\n }\n /**\n * Evaluate the curve at the given parameter.\n * @param u parameter in curve domain.\n * @param result optional result.\n * @returns the point on the curve.\n */\n public knotToPoint(u: number, result?: Point3d): Point3d {\n this._bcurve.evaluateBuffersAtKnot(u);\n return Point3d.createFrom(this._bcurve.poleBuffer, result);\n }\n /**\n * Evaluate the curve and derivative at the given parameter.\n * @param u parameter in curve domain.\n * @param result optional result.\n * @returns the ray with origin at the curve point and direction as the derivative.\n */\n public knotToPointAndDerivative(u: number, result?: Ray3d): Ray3d {\n this._bcurve.evaluateBuffersAtKnot(u, 1);\n if (!result)\n return Ray3d.createCapture(\n Point3d.createFrom(this._bcurve.poleBuffer),\n Vector3d.createFrom(this._bcurve.poleBuffer1),\n );\n result.origin.setFrom(this._bcurve.poleBuffer);\n result.direction.setFrom(this._bcurve.poleBuffer1);\n return result;\n }\n /**\n * Evaluate the curve and two derivatives at the given parameter.\n * @param u parameter in the curve domain.\n * @param result optional result.\n * @returns the plane with origin at the curve point, vectorU as the 1st derivative, and vectorV as the 2nd derivative.\n */\n public knotToPointAnd2Derivatives(u: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\n this._bcurve.evaluateBuffersAtKnot(u, 2);\n return Plane3dByOriginAndVectors.createOriginAndVectorsXYZ(\n this._bcurve.poleBuffer[0], this._bcurve.poleBuffer[1], this._bcurve.poleBuffer[2],\n this._bcurve.poleBuffer1[0], this._bcurve.poleBuffer1[1], this._bcurve.poleBuffer1[2],\n this._bcurve.poleBuffer2[0], this._bcurve.poleBuffer2[1], this._bcurve.poleBuffer2[2],\n result,\n );\n }\n /** Test if `this` is almost the same curve as `other`. */\n public override isAlmostEqual(other: any): boolean {\n if (other instanceof BSplineCurve3d) {\n return this._bcurve.knots.isAlmostEqual(other._bcurve.knots)\n && Point3dArray.isAlmostEqual(this._bcurve.packedData, other._bcurve.packedData);\n }\n return false;\n }\n /** Test if this curve lies entirely in the given plane. */\n public isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean {\n return Point3dArray.isCloseToPlane(this._bcurve.packedData, plane);\n }\n /**\n * Return the control polygon length as an approximation to the curve length.\n * * The returned length is always an overestimate.\n */\n public quickLength(): number {\n return Point3dArray.sumEdgeLengths(this._bcurve.packedData);\n }\n /** Emit Beziers or strokes (selected by the stroke options) to the handler. */\n public emitStrokableParts(handler: IStrokeHandler, options?: StrokeOptions): void {\n const workBezier = this.initializeWorkBezier();\n const numSpan = this.numSpan;\n let numStrokes;\n for (let spanIndex = 0; spanIndex < numSpan; spanIndex++) {\n const bezier = this.getSaturatedBezierSpan3dOr3dH(spanIndex, false, workBezier);\n if (bezier) {\n numStrokes = bezier.computeStrokeCountForOptions(options);\n if (handler.announceBezierCurve) {\n handler.announceBezierCurve(\n bezier,\n numStrokes,\n this,\n spanIndex,\n this._bcurve.knots.spanFractionToFraction(spanIndex, 0.0),\n this._bcurve.knots.spanFractionToFraction(spanIndex, 1.0),\n );\n\n } else {\n handler.announceIntervalForUniformStepStrokes(\n this,\n numStrokes,\n this._bcurve.knots.spanFractionToFraction(spanIndex, 0.0),\n this._bcurve.knots.spanFractionToFraction(spanIndex, 1.0),\n );\n }\n }\n }\n }\n /**\n * Assess length and turn to determine a stroke count.\n * @param options stroke options structure.\n */\n public computeStrokeCountForOptions(options?: StrokeOptions): number {\n const workBezier = this.initializeWorkBezier();\n const numSpan = this.numSpan;\n let numStroke = 0;\n for (let spanIndex = 0; spanIndex < numSpan; spanIndex++) {\n const bezier = this.getSaturatedBezierSpan3d(spanIndex, workBezier);\n if (bezier)\n numStroke += bezier.computeStrokeCountForOptions(options);\n }\n return numStroke;\n }\n /**\n * Compute individual segment stroke counts. Attach in a StrokeCountMap.\n * @param options StrokeOptions that determine count\n * @param parentStrokeMap evolving parent map.\n * @alpha\n */\n public override computeAndAttachRecursiveStrokeCounts(options?: StrokeOptions, parentStrokeMap?: StrokeCountMap) {\n const workBezier = this.initializeWorkBezier();\n const numSpan = this.numSpan;\n const myData = StrokeCountMap.createWithCurvePrimitiveAndOptionalParent(this, parentStrokeMap, []);\n for (let spanIndex = 0; spanIndex < numSpan; spanIndex++) {\n const bezier = this.getSaturatedBezierSpan3d(spanIndex, workBezier);\n if (bezier) {\n const segmentLength = workBezier.curveLength();\n const numStrokeOnSegment = workBezier.computeStrokeCountForOptions(options);\n myData.addToCountAndLength(numStrokeOnSegment, segmentLength);\n }\n }\n CurvePrimitive.installStrokeCountMap(this, myData, parentStrokeMap);\n }\n /** Append strokes to the given linestring. */\n public emitStrokes(dest: LineString3d, options?: StrokeOptions): void {\n const workBezier = this.initializeWorkBezier();\n const numSpan = this.numSpan;\n for (let spanIndex = 0; spanIndex < numSpan; spanIndex++) {\n const bezier = this.getSaturatedBezierSpan3d(spanIndex, workBezier);\n if (bezier)\n bezier.emitStrokes(dest, options);\n }\n }\n /**\n * Test knots and poles to determine if it is possible to close (aka \"wrap\") the curve.\n * @returns the manner in which it is possible to close the curve. See `BSplineWrapMode` for particulars of each mode.\n */\n public get isClosable(): BSplineWrapMode {\n return this.isClosableCurve;\n }\n /**\n * Return the Bezier fragment corresponding to the given span of this curve.\n * * The concrete return type may be [[BezierCurve3d]] or [[BezierCurve3dH]] according to the instance type and `prefer3dH`.\n * @param spanIndex index of span.\n * @param result optional reusable curve. This will only be reused if its type and order matches.\n */\n public getSaturatedBezierSpan3dOr3dH(\n spanIndex: number, prefer3dH: boolean, result?: BezierCurveBase,\n ): BezierCurveBase | undefined {\n if (prefer3dH)\n return this.getSaturatedBezierSpan3dH(spanIndex, result);\n return this.getSaturatedBezierSpan3d(spanIndex, result);\n }\n /**\n * Return the Bezier fragment corresponding to the given span of this curve.\n * @param spanIndex index of span.\n * @param result optional reusable curve. This will only be reused if its type and order matches.\n */\n public getSaturatedBezierSpan3d(spanIndex: number, result?: BezierCurveBase): BezierCurve3d | undefined {\n if (spanIndex < 0 || spanIndex >= this.numSpan)\n return undefined;\n const order = this.order;\n if (result === undefined || !(result instanceof BezierCurve3d) || result.order !== order)\n result = BezierCurve3d.createOrder(order);\n const bezier = result as BezierCurve3d;\n bezier.loadSpanPoles(this._bcurve.packedData, spanIndex);\n if (bezier.saturateInPlace(this._bcurve.knots, spanIndex))\n return bezier;\n return undefined;\n }\n /**\n * Return the Bezier fragment corresponding to the given span of this curve.\n * @param spanIndex index of span.\n * @param result optional reusable curve. This will only be reused if its type and order matches.\n */\n public getSaturatedBezierSpan3dH(spanIndex: number, result?: BezierCurveBase): BezierCurve3dH | undefined {\n if (spanIndex < 0 || spanIndex >= this.numSpan)\n return undefined;\n const order = this.order;\n if (result === undefined || !(result instanceof BezierCurve3dH) || result.order !== order)\n result = BezierCurve3dH.createOrder(order);\n const bezier = result as BezierCurve3dH;\n bezier.loadSpan3dPolesWithWeight(this._bcurve.packedData, spanIndex, 1.0);\n if (bezier.saturateInPlace(this._bcurve.knots, spanIndex))\n return bezier;\n return undefined;\n }\n /** Second step of double dispatch: call `handler.handleBSplineCurve3d(this)`. */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleBSplineCurve3d(this);\n }\n /**\n * Extend a range so it contains the range of this curve.\n * * This computation is based on the poles, not the curve itself, so the returned range is generally larger than the\n * tightest possible range.\n * @param rangeToExtend range to extend.\n * @param transform transform to apply to the poles as they are entered into the range.\n */\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\n const buffer = this._bcurve.packedData;\n const n = buffer.length - 2;\n if (transform) {\n for (let i0 = 0; i0 < n; i0 += 3)\n rangeToExtend.extendTransformedXYZ(transform, buffer[i0], buffer[i0 + 1], buffer[i0 + 2]);\n } else {\n for (let i0 = 0; i0 < n; i0 += 3)\n rangeToExtend.extendXYZ(buffer[i0], buffer[i0 + 1], buffer[i0 + 2]);\n }\n }\n}\n"]}
|
|
@@ -70,7 +70,7 @@ export declare abstract class BooleanClipNode implements Clipper {
|
|
|
70
70
|
announceClippedCurveIntervals(curve: CurvePrimitive, announce?: AnnounceNumberNumberCurvePrimitive): boolean;
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
|
-
* Implement [BooleanClipNode] virtual methods for
|
|
73
|
+
* Implement [BooleanClipNode] virtual methods for union (boolean OR) among children.
|
|
74
74
|
* @internal
|
|
75
75
|
*/
|
|
76
76
|
export declare class BooleanClipNodeUnion extends BooleanClipNode {
|
|
@@ -82,7 +82,7 @@ export declare class BooleanClipNodeUnion extends BooleanClipNode {
|
|
|
82
82
|
appendPolygonClip(xyz: IndexedXYZCollection, insideFragments: GrowableXYZArray[], outsideFragments: GrowableXYZArray[], arrayCache: GrowableXYZArrayCache): void;
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
|
-
* Implement [BooleanClipNode] virtual methods for
|
|
85
|
+
* Implement [BooleanClipNode] virtual methods for parity (boolean XOR) among children.
|
|
86
86
|
* @internal
|
|
87
87
|
*/
|
|
88
88
|
export declare class BooleanClipNodeParity extends BooleanClipNode {
|
|
@@ -220,7 +220,7 @@ export class BooleanClipNode {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
/**
|
|
223
|
-
* Implement [BooleanClipNode] virtual methods for
|
|
223
|
+
* Implement [BooleanClipNode] virtual methods for union (boolean OR) among children.
|
|
224
224
|
* @internal
|
|
225
225
|
*/
|
|
226
226
|
export class BooleanClipNodeUnion extends BooleanClipNode {
|
|
@@ -246,7 +246,7 @@ export class BooleanClipNodeUnion extends BooleanClipNode {
|
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
249
|
-
* Implement [BooleanClipNode] virtual methods for
|
|
249
|
+
* Implement [BooleanClipNode] virtual methods for parity (boolean XOR) among children.
|
|
250
250
|
* @internal
|
|
251
251
|
*/
|
|
252
252
|
export class BooleanClipNodeParity extends BooleanClipNode {
|