@itwin/core-geometry 5.0.0-dev.3 → 5.0.0-dev.5
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/lib/cjs/curve/Arc3d.d.ts +25 -5
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +44 -5
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +6 -2
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +11 -2
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/LineString3d.d.ts +12 -8
- package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineString3d.js +29 -8
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Loop.d.ts +12 -6
- package/lib/cjs/curve/Loop.d.ts.map +1 -1
- package/lib/cjs/curve/Loop.js +12 -6
- package/lib/cjs/curve/Loop.js.map +1 -1
- package/lib/cjs/curve/Query/CylindricalRange.d.ts +8 -6
- package/lib/cjs/curve/Query/CylindricalRange.d.ts.map +1 -1
- package/lib/cjs/curve/Query/CylindricalRange.js +13 -9
- package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js +24 -18
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.d.ts +14 -8
- package/lib/cjs/geometry3d/BarycentricTriangle.d.ts.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.js +17 -8
- package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts +2 -0
- package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.js +4 -0
- package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +8 -4
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +25 -22
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +10 -4
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +92 -45
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts +5 -5
- package/lib/cjs/numerics/Polynomials.js +6 -6
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/polyface/AuxData.d.ts +2 -2
- package/lib/cjs/polyface/AuxData.d.ts.map +1 -1
- package/lib/cjs/polyface/AuxData.js +11 -3
- package/lib/cjs/polyface/AuxData.js.map +1 -1
- package/lib/cjs/polyface/Polyface.d.ts +3 -5
- package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
- package/lib/cjs/polyface/Polyface.js +6 -13
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +23 -13
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.d.ts +13 -3
- package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.js +21 -4
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts +2 -2
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +4 -3
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/solid/Box.d.ts +9 -3
- package/lib/cjs/solid/Box.d.ts.map +1 -1
- package/lib/cjs/solid/Box.js +10 -5
- package/lib/cjs/solid/Box.js.map +1 -1
- package/lib/cjs/solid/Cone.d.ts +3 -2
- package/lib/cjs/solid/Cone.d.ts.map +1 -1
- package/lib/cjs/solid/Cone.js +3 -3
- package/lib/cjs/solid/Cone.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.d.ts +9 -3
- package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
- package/lib/cjs/solid/LinearSweep.js +9 -4
- package/lib/cjs/solid/LinearSweep.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.d.ts +15 -4
- package/lib/cjs/solid/RotationalSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RotationalSweep.js +20 -7
- package/lib/cjs/solid/RotationalSweep.js.map +1 -1
- package/lib/cjs/solid/RuledSweep.d.ts +9 -3
- package/lib/cjs/solid/RuledSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RuledSweep.js +11 -5
- package/lib/cjs/solid/RuledSweep.js.map +1 -1
- package/lib/cjs/solid/Sphere.d.ts +17 -7
- package/lib/cjs/solid/Sphere.d.ts.map +1 -1
- package/lib/cjs/solid/Sphere.js +22 -16
- package/lib/cjs/solid/Sphere.js.map +1 -1
- package/lib/cjs/solid/SweepContour.d.ts +1 -1
- package/lib/cjs/solid/SweepContour.js +1 -1
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/solid/TorusPipe.d.ts +8 -2
- package/lib/cjs/solid/TorusPipe.d.ts.map +1 -1
- package/lib/cjs/solid/TorusPipe.js +9 -5
- package/lib/cjs/solid/TorusPipe.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +25 -5
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +44 -5
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +6 -2
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +11 -2
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/LineString3d.d.ts +12 -8
- package/lib/esm/curve/LineString3d.d.ts.map +1 -1
- package/lib/esm/curve/LineString3d.js +29 -8
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Loop.d.ts +12 -6
- package/lib/esm/curve/Loop.d.ts.map +1 -1
- package/lib/esm/curve/Loop.js +12 -6
- package/lib/esm/curve/Loop.js.map +1 -1
- package/lib/esm/curve/Query/CylindricalRange.d.ts +8 -6
- package/lib/esm/curve/Query/CylindricalRange.d.ts.map +1 -1
- package/lib/esm/curve/Query/CylindricalRange.js +13 -9
- package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js +24 -18
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.d.ts +14 -8
- package/lib/esm/geometry3d/BarycentricTriangle.d.ts.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.js +17 -8
- package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.d.ts +2 -0
- package/lib/esm/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.js +4 -0
- package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +8 -4
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +25 -22
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +10 -4
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +92 -45
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts +5 -5
- package/lib/esm/numerics/Polynomials.js +6 -6
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/polyface/AuxData.d.ts +2 -2
- package/lib/esm/polyface/AuxData.d.ts.map +1 -1
- package/lib/esm/polyface/AuxData.js +11 -3
- package/lib/esm/polyface/AuxData.js.map +1 -1
- package/lib/esm/polyface/Polyface.d.ts +3 -5
- package/lib/esm/polyface/Polyface.d.ts.map +1 -1
- package/lib/esm/polyface/Polyface.js +6 -13
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +23 -13
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.d.ts +13 -3
- package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceData.js +21 -4
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts +2 -2
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +4 -3
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/solid/Box.d.ts +9 -3
- package/lib/esm/solid/Box.d.ts.map +1 -1
- package/lib/esm/solid/Box.js +10 -5
- package/lib/esm/solid/Box.js.map +1 -1
- package/lib/esm/solid/Cone.d.ts +3 -2
- package/lib/esm/solid/Cone.d.ts.map +1 -1
- package/lib/esm/solid/Cone.js +3 -3
- package/lib/esm/solid/Cone.js.map +1 -1
- package/lib/esm/solid/LinearSweep.d.ts +9 -3
- package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
- package/lib/esm/solid/LinearSweep.js +9 -4
- package/lib/esm/solid/LinearSweep.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.d.ts +15 -4
- package/lib/esm/solid/RotationalSweep.d.ts.map +1 -1
- package/lib/esm/solid/RotationalSweep.js +20 -7
- package/lib/esm/solid/RotationalSweep.js.map +1 -1
- package/lib/esm/solid/RuledSweep.d.ts +9 -3
- package/lib/esm/solid/RuledSweep.d.ts.map +1 -1
- package/lib/esm/solid/RuledSweep.js +11 -5
- package/lib/esm/solid/RuledSweep.js.map +1 -1
- package/lib/esm/solid/Sphere.d.ts +17 -7
- package/lib/esm/solid/Sphere.d.ts.map +1 -1
- package/lib/esm/solid/Sphere.js +22 -16
- package/lib/esm/solid/Sphere.js.map +1 -1
- package/lib/esm/solid/SweepContour.d.ts +1 -1
- package/lib/esm/solid/SweepContour.js +1 -1
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/solid/TorusPipe.d.ts +8 -2
- package/lib/esm/solid/TorusPipe.d.ts.map +1 -1
- package/lib/esm/solid/TorusPipe.js +9 -5
- package/lib/esm/solid/TorusPipe.js.map +1 -1
- package/package.json +3 -3
package/lib/esm/curve/Loop.d.ts
CHANGED
|
@@ -21,19 +21,25 @@ export declare class Loop extends CurveChain {
|
|
|
21
21
|
isInner: boolean;
|
|
22
22
|
/** Test if `other` is a `Loop` */
|
|
23
23
|
isSameGeometryClass(other: GeometryQuery): boolean;
|
|
24
|
-
/** Test if `other` is an instance of `Loop` */
|
|
25
24
|
constructor();
|
|
26
25
|
/**
|
|
27
|
-
* Create a loop from variable length list of
|
|
28
|
-
*
|
|
26
|
+
* Create a loop from a variable length list of [[CurvePrimitive]]s.
|
|
27
|
+
* * A significant gap between the end of one curve and the start of the next, or between chain start and end,
|
|
28
|
+
* is not bridged and may cause unexpected behavior.
|
|
29
|
+
* @param curves array of individual curve primitives, assumed to form a closed planar loop.
|
|
29
30
|
*/
|
|
30
31
|
static create(...curves: CurvePrimitive[]): Loop;
|
|
31
32
|
/**
|
|
32
|
-
* Create a loop from an array of
|
|
33
|
-
*
|
|
33
|
+
* Create a loop from an array of [[CurvePrimitive]]s.
|
|
34
|
+
* * A significant gap between the end of one curve and the start of the next, or between chain start and end,
|
|
35
|
+
* is not bridged and may cause unexpected behavior.
|
|
36
|
+
* @param curves array of individual curve primitives, assumed to form a closed planar loop.
|
|
34
37
|
*/
|
|
35
38
|
static createArray(curves: CurvePrimitive[]): Loop;
|
|
36
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Create a loop from an array of coplanar points.
|
|
41
|
+
* @param points vertices of polygon, closure point optional.
|
|
42
|
+
*/
|
|
37
43
|
static createPolygon(points: IndexedXYZCollection | Point3d[]): Loop;
|
|
38
44
|
/** Create a loop with the stroked form of this loop. */
|
|
39
45
|
cloneStroked(options?: StrokeOptions): Loop;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loop.d.ts","sourceRoot":"","sources":["../../../src/curve/Loop.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;GAIG;AACH,qBAAa,IAAK,SAAQ,UAAU;IAClC,wCAAwC;IACxC,SAAgB,mBAAmB,UAAU;IAC7C,qFAAqF;IACrE,OAAO,EAAE,OAAO,CAAS;IACzC,kCAAkC;IAC3B,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO
|
|
1
|
+
{"version":3,"file":"Loop.d.ts","sourceRoot":"","sources":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a,kBAAkB;IAC7B,iBAAiB;IACV,KAAK,CAAC,EAAE,IAAI,CAAC;IACpB,2CAA2C;IACpC,MAAM,CAAC,EAAE,cAAc,CAAC;IAC/B,kBAAkB;IACX,KAAK,CAAC,EAAE,IAAI,CAAC;IACpB,2CAA2C;IACpC,MAAM,CAAC,EAAE,cAAc,CAAC;IAC/B,kBAAkB;gBAEhB,KAAK,EAAE,IAAI,GAAG,SAAS,EAAE,MAAM,EAAE,cAAc,GAAG,SAAS,EAAE,KAAK,EAAE,IAAI,GAAG,SAAS,EAAE,MAAM,EAAE,cAAc,GAAG,SAAS;IAO1H,uCAAuC;IAChC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc;IAI7C,uCAAuC;IAChC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc;CAI9C;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,iFAAiF;IACjF,iBAAiB,EAAE,IAAI,EAAE,CAAC;IAC1B,0EAA0E;IAC1E,iBAAiB,EAAE,IAAI,EAAE,CAAC;IAC1B,mEAAmE;IACnE,OAAO,EAAE,IAAI,EAAE,CAAC;IAChB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAC9B"}
|
package/lib/esm/curve/Loop.js
CHANGED
|
@@ -15,7 +15,6 @@ export class Loop extends CurveChain {
|
|
|
15
15
|
isSameGeometryClass(other) {
|
|
16
16
|
return other instanceof Loop;
|
|
17
17
|
}
|
|
18
|
-
/** Test if `other` is an instance of `Loop` */
|
|
19
18
|
constructor() {
|
|
20
19
|
super();
|
|
21
20
|
/** String name for schema properties */
|
|
@@ -24,8 +23,10 @@ export class Loop extends CurveChain {
|
|
|
24
23
|
this.isInner = false;
|
|
25
24
|
}
|
|
26
25
|
/**
|
|
27
|
-
* Create a loop from variable length list of
|
|
28
|
-
*
|
|
26
|
+
* Create a loop from a variable length list of [[CurvePrimitive]]s.
|
|
27
|
+
* * A significant gap between the end of one curve and the start of the next, or between chain start and end,
|
|
28
|
+
* is not bridged and may cause unexpected behavior.
|
|
29
|
+
* @param curves array of individual curve primitives, assumed to form a closed planar loop.
|
|
29
30
|
*/
|
|
30
31
|
static create(...curves) {
|
|
31
32
|
const result = new Loop();
|
|
@@ -38,13 +39,18 @@ export class Loop extends CurveChain {
|
|
|
38
39
|
return result;
|
|
39
40
|
}
|
|
40
41
|
/**
|
|
41
|
-
* Create a loop from an array of
|
|
42
|
-
*
|
|
42
|
+
* Create a loop from an array of [[CurvePrimitive]]s.
|
|
43
|
+
* * A significant gap between the end of one curve and the start of the next, or between chain start and end,
|
|
44
|
+
* is not bridged and may cause unexpected behavior.
|
|
45
|
+
* @param curves array of individual curve primitives, assumed to form a closed planar loop.
|
|
43
46
|
*/
|
|
44
47
|
static createArray(curves) {
|
|
45
48
|
return this.create(...curves);
|
|
46
49
|
}
|
|
47
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Create a loop from an array of coplanar points.
|
|
52
|
+
* @param points vertices of polygon, closure point optional.
|
|
53
|
+
*/
|
|
48
54
|
static createPolygon(points) {
|
|
49
55
|
const linestring = LineString3d.create(points);
|
|
50
56
|
linestring.addClosurePoint();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loop.js","sourceRoot":"","sources":["../../../src/curve/Loop.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAQ/F,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C;;;;GAIG;AACH,MAAM,OAAO,IAAK,SAAQ,UAAU;IAKlC,kCAAkC;IAC3B,mBAAmB,CAAC,KAAoB;QAC7C,OAAO,KAAK,YAAY,IAAI,CAAC;IAC/B,CAAC;IACD
|
|
1
|
+
{"version":3,"file":"Loop.js","sourceRoot":"","s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AAG,IAAI,CAAC;QAClB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IACD,uCAAuC;IAChC,IAAI,CAAC,IAAU,EAAE,KAAqB;QAC3C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Curve\r\n */\r\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { IndexedXYZCollection } from \"../geometry3d/IndexedXYZCollection\";\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { CurveChainWithDistanceIndex } from \"./CurveChainWithDistanceIndex\";\r\nimport { CurveChain } from \"./CurveCollection\";\r\nimport { CurvePrimitive } from \"./CurvePrimitive\";\r\nimport { RecursiveCurveProcessor } from \"./CurveProcessor\";\r\nimport { GeometryQuery } from \"./GeometryQuery\";\r\nimport { LineString3d } from \"./LineString3d\";\r\nimport { StrokeOptions } from \"./StrokeOptions\";\r\n\r\n/**\r\n * A `Loop` is a curve chain that is the boundary of a closed (planar) loop.\r\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\r\n * @public\r\n */\r\nexport class Loop extends CurveChain {\r\n /** String name for schema properties */\r\n public readonly curveCollectionType = \"loop\";\r\n /** Tag value that can be set to true for user code to mark inner and outer loops. */\r\n public override isInner: boolean = false;\r\n /** Test if `other` is a `Loop` */\r\n public isSameGeometryClass(other: GeometryQuery): boolean {\r\n return other instanceof Loop;\r\n }\r\n public constructor() {\r\n super();\r\n }\r\n /**\r\n * Create a loop from a variable length list of [[CurvePrimitive]]s.\r\n * * A significant gap between the end of one curve and the start of the next, or between chain start and end,\r\n * is not bridged and may cause unexpected behavior.\r\n * @param curves array of individual curve primitives, assumed to form a closed planar loop.\r\n */\r\n public static create(...curves: CurvePrimitive[]): Loop {\r\n const result = new Loop();\r\n for (const curve of curves) {\r\n if (curve instanceof CurveChainWithDistanceIndex)\r\n result.children.push(...curve.path.children);\r\n else\r\n result.children.push(curve);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Create a loop from an array of [[CurvePrimitive]]s.\r\n * * A significant gap between the end of one curve and the start of the next, or between chain start and end,\r\n * is not bridged and may cause unexpected behavior.\r\n * @param curves array of individual curve primitives, assumed to form a closed planar loop.\r\n */\r\n public static createArray(curves: CurvePrimitive[]): Loop {\r\n return this.create(...curves);\r\n }\r\n /**\r\n * Create a loop from an array of coplanar points.\r\n * @param points vertices of polygon, closure point optional.\r\n */\r\n public static createPolygon(points: IndexedXYZCollection | Point3d[]): Loop {\r\n const linestring = LineString3d.create(points);\r\n linestring.addClosurePoint();\r\n return Loop.create(linestring);\r\n }\r\n /** Create a loop with the stroked form of this loop. */\r\n public cloneStroked(options?: StrokeOptions): Loop {\r\n const strokes = LineString3d.create();\r\n for (const curve of this.children)\r\n curve.emitStrokes(strokes, options);\r\n // eliminate near-duplicate points between children\r\n strokes.removeDuplicatePoints();\r\n if (strokes.isPhysicallyClosed) {\r\n strokes.popPoint();\r\n strokes.addClosurePoint();\r\n }\r\n return Loop.create(strokes);\r\n }\r\n /** Return the boundary type (2) of a corresponding MicroStation CurveVector */\r\n public dgnBoundaryType(): number {\r\n /**\r\n * All \"Loop\" become \"outer\". TypeScript Loop object is equivalent to a native CurveVector with\r\n * boundaryType = BOUNDARY_TYPE_Outer. In other words, TypeScript has no flavor of Loop that\r\n * carries \"hole\" semantics.\r\n */\r\n return 2;\r\n }\r\n /** Invoke `processor.announceLoop(this, indexInParent)` */\r\n public announceToCurveProcessor(processor: RecursiveCurveProcessor, indexInParent: number = -1): void {\r\n return processor.announceLoop(this, indexInParent);\r\n }\r\n /** Create a new `Loop` with no children */\r\n public cloneEmptyPeer(): Loop {\r\n return new Loop();\r\n }\r\n /** Second step of double dispatch: call `handler.handleLoop(this)` */\r\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\r\n return handler.handleLoop(this);\r\n }\r\n}\r\n\r\n/**\r\n * Structure carrying a pair of loops with curve geometry.\r\n * @public\r\n */\r\nexport class LoopCurveLoopCurve {\r\n /** First loop */\r\n public loopA?: Loop;\r\n /** A curve (typically an edge of loopA) */\r\n public curveA?: CurvePrimitive;\r\n /** second loop */\r\n public loopB?: Loop;\r\n /** A curve (typically an edge of loopB) */\r\n public curveB?: CurvePrimitive;\r\n /** Constructor */\r\n public constructor(\r\n loopA: Loop | undefined, curveA: CurvePrimitive | undefined, loopB: Loop | undefined, curveB: CurvePrimitive | undefined,\r\n ) {\r\n this.loopA = loopA;\r\n this.curveA = curveA;\r\n this.loopB = loopB;\r\n this.curveB = curveB;\r\n }\r\n /** Set the loopA and curveA members */\r\n public setA(loop: Loop, curve: CurvePrimitive) {\r\n this.loopA = loop;\r\n this.curveA = curve;\r\n }\r\n /** Set the loopB and curveB members */\r\n public setB(loop: Loop, curve: CurvePrimitive) {\r\n this.loopB = loop;\r\n this.curveB = curve;\r\n }\r\n}\r\n\r\n/**\r\n * Carrier object for loops characterized by area sign\r\n * @public\r\n */\r\nexport interface SignedLoops {\r\n /** Array of loops that have positive area sign (i.e. counterclockwise loops). */\r\n positiveAreaLoops: Loop[];\r\n /** Array of loops that have negative area sign (i.e. clockwise loops). */\r\n negativeAreaLoops: Loop[];\r\n /** Slivers where there are coincident sections of input curves. */\r\n slivers: Loop[];\r\n /** Array indicating edges between loops */\r\n edges?: LoopCurveLoopCurve[];\r\n}\r\n"]}
|
|
@@ -32,14 +32,16 @@ export declare class CylindricalRangeQuery extends RecurseToCurvesGeometryHandle
|
|
|
32
32
|
*/
|
|
33
33
|
static computeMaxVectorFromRay(ray: Ray3d, geometry: GeometryQuery): Vector3d;
|
|
34
34
|
/**
|
|
35
|
-
* Recurse through geometry.children to find linestrings.
|
|
36
|
-
*
|
|
35
|
+
* Recurse through `geometry.children` to find linestrings.
|
|
36
|
+
* For each linestring, compute and store the normal of the rotational surface resulting from sweeping the
|
|
37
|
+
* geometry around `axis` through a positive angle, using:
|
|
37
38
|
* * the curve tangent stored in the linestring
|
|
38
39
|
* * the axis of rotation
|
|
39
|
-
* * a default V vector to be used when the linestring point is close to the axis
|
|
40
|
-
* @param geometry
|
|
41
|
-
*
|
|
42
|
-
* @param
|
|
40
|
+
* * a default V vector to be used when the linestring point is close to the axis
|
|
41
|
+
* @param geometry profile curve (e.g., linestring, parity region). The orientation of the curve should be such that
|
|
42
|
+
* the computed normal lies in the same half-space as the rotational sweep direction.
|
|
43
|
+
* @param axis rotational axis
|
|
44
|
+
* @param defaultVectorFromAxis default vector perpendicular to `axis` (e.g., sweepVector)
|
|
43
45
|
*/
|
|
44
46
|
static buildRotationalNormalsInLineStrings(geometry: AnyCurve, axis: Ray3d, defaultVectorFromAxis: Vector3d): void;
|
|
45
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CylindricalRange.d.ts","sourceRoot":"","sources":["../../../../src/curve/Query/CylindricalRange.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAW,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,8BAA8B;IAEvE,OAAO,CAAC,WAAW,CAAW;IA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CAAC,GAAG,EAAE,YAAY;IAOpC,WAAW,CAAC,IAAI,EAAE,KAAK,GAAG,GAAG;IAc7C;;;;OAIG;WACW,uBAAuB,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ;IAMpF;;;;;;;;;;;OAWG;WACW,mCAAmC,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,qBAAqB,EAAE,QAAQ,GAAG,IAAI;CAgC1H"}
|
|
@@ -67,14 +67,16 @@ export class CylindricalRangeQuery extends RecurseToCurvesGeometryHandler {
|
|
|
67
67
|
return accumulator._perpVector.clone();
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
|
-
* Recurse through geometry.children to find linestrings.
|
|
71
|
-
*
|
|
70
|
+
* Recurse through `geometry.children` to find linestrings.
|
|
71
|
+
* For each linestring, compute and store the normal of the rotational surface resulting from sweeping the
|
|
72
|
+
* geometry around `axis` through a positive angle, using:
|
|
72
73
|
* * the curve tangent stored in the linestring
|
|
73
74
|
* * the axis of rotation
|
|
74
|
-
* * a default V vector to be used when the linestring point is close to the axis
|
|
75
|
-
* @param geometry
|
|
76
|
-
*
|
|
77
|
-
* @param
|
|
75
|
+
* * a default V vector to be used when the linestring point is close to the axis
|
|
76
|
+
* @param geometry profile curve (e.g., linestring, parity region). The orientation of the curve should be such that
|
|
77
|
+
* the computed normal lies in the same half-space as the rotational sweep direction.
|
|
78
|
+
* @param axis rotational axis
|
|
79
|
+
* @param defaultVectorFromAxis default vector perpendicular to `axis` (e.g., sweepVector)
|
|
78
80
|
*/
|
|
79
81
|
static buildRotationalNormalsInLineStrings(geometry, axis, defaultVectorFromAxis) {
|
|
80
82
|
if (geometry instanceof LineString3d) {
|
|
@@ -83,18 +85,20 @@ export class CylindricalRangeQuery extends RecurseToCurvesGeometryHandler {
|
|
|
83
85
|
const normals = geometry.ensureEmptySurfaceNormals();
|
|
84
86
|
if (derivatives && normals) {
|
|
85
87
|
const vectorU = Vector3d.create();
|
|
86
|
-
const vectorV = Vector3d.create();
|
|
88
|
+
const vectorV = Vector3d.create();
|
|
87
89
|
const xyz = Point3d.create();
|
|
88
90
|
const n = points.length;
|
|
89
91
|
for (let i = 0; i < n; i++) {
|
|
90
92
|
points.getPoint3dAtUncheckedPointIndex(i, xyz);
|
|
91
93
|
axis.perpendicularPartOfVectorToTarget(xyz, vectorU);
|
|
94
|
+
// compute the positive sweep direction. ASSUME: the rotational sweep angle is positive!
|
|
92
95
|
if (vectorU.isAlmostZero)
|
|
93
96
|
axis.direction.crossProduct(defaultVectorFromAxis, vectorV);
|
|
94
97
|
else
|
|
95
98
|
axis.direction.crossProduct(vectorU, vectorV);
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
// ASSUME: orientation-based profile normal is in the same half-space as vectorV
|
|
100
|
+
geometry.packedDerivatives.getVector3dAtCheckedVectorIndex(i, vectorU); // reuse vectorU
|
|
101
|
+
vectorU.crossProduct(vectorV, vectorV); // reuse vectorV
|
|
98
102
|
vectorV.normalizeInPlace();
|
|
99
103
|
normals.push(vectorV);
|
|
100
104
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CylindricalRange.js","sourceRoot":"","sources":["../../../../src/curve/Query/CylindricalRange.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAOrE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,8BAA8B;IAKvE,kDAAkD;IAClD,YAAoB,GAAU;QAC5B,KAAK,EAAE,CAAC;QAKF,gBAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;QAC/B,gBAA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,CAAC;gBAC7B,IAAI,CAAC,mCAAmC,CAAC,KAAiB,EAAE,IAAI,EAAE,qBAAqB,CAAC,CAAC;YAC3F,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Curve\r\n */\r\n\r\nimport { RecurseToCurvesGeometryHandler } from \"../../geometry3d/GeometryHandler\";\r\nimport { Point3d, Vector3d } from \"../../geometry3d/Point3dVector3d\";\r\nimport { Ray3d } from \"../../geometry3d/Ray3d\";\r\nimport { Transform } from \"../../geometry3d/Transform\";\r\nimport { Arc3d } from \"../Arc3d\";\r\nimport { AnyCurve } from \"../CurveTypes\";\r\nimport { GeometryQuery } from \"../GeometryQuery\";\r\nimport { LineSegment3d } from \"../LineSegment3d\";\r\nimport { LineString3d } from \"../LineString3d\";\r\nimport { StrokeOptions } from \"../StrokeOptions\";\r\n\r\n/**\r\n * Context for computing geometry range around an axis.\r\n * * The publicly called method is `computeZRRange (ray, geometry)\r\n */\r\nexport class CylindricalRangeQuery extends RecurseToCurvesGeometryHandler {\r\n // private geometry0: GeometryQuery; <-- Never used\r\n private _perpVector: Vector3d;\r\n private _maxDistance: number;\r\n private _localToWorld: Transform;\r\n /** capture ray and initialize evolving ranges. */\r\n private constructor(ray: Ray3d) {\r\n super();\r\n this._perpVector = Vector3d.createZero();\r\n this._maxDistance = 0.0;\r\n this._localToWorld = ray.toRigidZFrame();\r\n }\r\n private _localPoint = Point3d.create();\r\n private _worldPoint = Point3d.create();\r\n private announcePoint(xyz: Point3d) {\r\n this._localToWorld.multiplyInversePoint3d(xyz, this._localPoint);\r\n const distance = this._localPoint.magnitudeXY();\r\n if (distance >= this._maxDistance) {\r\n this._maxDistance = distance;\r\n this._perpVector.setFromPoint3d(this._localPoint);\r\n this._perpVector.z = 0.0;\r\n this._localToWorld.matrix.multiplyXY(this._localPoint.x, this._localPoint.y, this._perpVector);\r\n }\r\n }\r\n\r\n public override handleLineSegment3d(segment0: LineSegment3d) {\r\n this.announcePoint(segment0.startPoint(this._worldPoint));\r\n this.announcePoint(segment0.endPoint(this._worldPoint));\r\n }\r\n public override handleLineString3d(ls0: LineString3d) {\r\n for (let i = 0; i < ls0.numPoints(); i++) {\r\n ls0.pointAt(i, this._worldPoint);\r\n this.announcePoint(this._worldPoint);\r\n }\r\n }\r\n\r\n public override handleArc3d(arc0: Arc3d): any {\r\n // humbug .. just stroke it ..\r\n // exact solution is:\r\n // project the arc to the z=0 plane of the local system.\r\n // find max distance to origin.\r\n const numStroke = StrokeOptions.applyAngleTol(undefined, 3, arc0.sweep.sweepRadians, 0.1);\r\n const df = 1.0 / numStroke;\r\n for (let i = 0; i <= numStroke; i++) {\r\n arc0.fractionToPoint(i * df, this._worldPoint);\r\n this.announcePoint(this._worldPoint);\r\n }\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Compute the largest vector perpendicular to a ray and ending on the geometry.\r\n * @param geometry0 geometry to search\r\n * @returns vector from ray to geometry.\r\n */\r\n public static computeMaxVectorFromRay(ray: Ray3d, geometry: GeometryQuery): Vector3d {\r\n const accumulator = new CylindricalRangeQuery(ray);\r\n geometry.dispatchToGeometryHandler(accumulator);\r\n return accumulator._perpVector.clone();\r\n }\r\n\r\n /**\r\n * Recurse through `geometry.children` to find linestrings.\r\n * For each linestring, compute and store the normal of the rotational surface resulting from sweeping the\r\n * geometry around `axis` through a positive angle, using:\r\n * * the curve tangent stored in the linestring\r\n * * the axis of rotation\r\n * * a default V vector to be used when the linestring point is close to the axis\r\n * @param geometry profile curve (e.g., linestring, parity region). The orientation of the curve should be such that\r\n * the computed normal lies in the same half-space as the rotational sweep direction.\r\n * @param axis rotational axis\r\n * @param defaultVectorFromAxis default vector perpendicular to `axis` (e.g., sweepVector)\r\n */\r\n public static buildRotationalNormalsInLineStrings(geometry: AnyCurve, axis: Ray3d, defaultVectorFromAxis: Vector3d): void {\r\n if (geometry instanceof LineString3d) {\r\n const points = geometry.packedPoints;\r\n const derivatives = geometry.packedDerivatives;\r\n const normals = geometry.ensureEmptySurfaceNormals();\r\n if (derivatives && normals) {\r\n const vectorU = Vector3d.create();\r\n const vectorV = Vector3d.create();\r\n const xyz = Point3d.create();\r\n const n = points.length;\r\n for (let i = 0; i < n; i++) {\r\n points.getPoint3dAtUncheckedPointIndex(i, xyz);\r\n axis.perpendicularPartOfVectorToTarget(xyz, vectorU);\r\n // compute the positive sweep direction. ASSUME: the rotational sweep angle is positive!\r\n if (vectorU.isAlmostZero)\r\n axis.direction.crossProduct(defaultVectorFromAxis, vectorV);\r\n else\r\n axis.direction.crossProduct(vectorU, vectorV);\r\n // ASSUME: orientation-based profile normal is in the same half-space as vectorV\r\n geometry.packedDerivatives.getVector3dAtCheckedVectorIndex(i, vectorU); // reuse vectorU\r\n vectorU.crossProduct(vectorV, vectorV); // reuse vectorV\r\n vectorV.normalizeInPlace();\r\n normals.push(vectorV);\r\n }\r\n }\r\n } else if (geometry.children) {\r\n const children = geometry.children;\r\n for (const child of children) {\r\n this.buildRotationalNormalsInLineStrings(child as AnyCurve, axis, defaultVectorFromAxis);\r\n }\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EllipticalArcApproximationContext.d.ts","sourceRoot":"","sources":["../../../../src/curve/internalContexts/EllipticalArcApproximationContext.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,iCAAiC,EAA6B,MAAM,UAAU,CAAC;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAA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,EAAE,UAAU,GAAG,OAAO;IAWlE,6CAA6C;IACtC,OAAO,IAAI,IAAI;CAIvB;AAED;;;GAGG;AACH,cAAM,0BAA0B;IAC9B;;;;;OAKG;IACI,qBAAqB,CAAC,EAAE,EAAE,iBAAiB,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO;IAChF;;;;;;OAMG;IACI,mBAAmB,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAC3D;;;;;;;;;;OAUG;IACI,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAC3F;;;;OAIG;IACI,mBAAmB,CAAC,EAAE,EAAE,iBAAiB,EAAE,SAAS,EAAE,OAAO,GAAG,IAAI;CAC5E;
|
|
1
|
+
{"version":3,"file":"EllipticalArcApproximationContext.d.ts","sourceRoot":"","sources":["../../../../src/curve/internalContexts/EllipticalArcApproximationContext.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,iCAAiC,EAA6B,MAAM,UAAU,CAAC;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AA4BjE;;;EAGE;AACF,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,UAAU,CAAW;IAC7B,OAAO,CAAC,wBAAwB,CAAU;IAC1C,OAAO,CAAC,sBAAsB,CAAU;IACxC,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO;IASP,uCAAuC;WACzB,MAAM,CAClB,QAAQ,EAAE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MAAM,EAAE;IA2IjC,0EAA0E;IACnE,sCAAsC,CAAC,OAAO,CAAC,EAAE,iCAAiC,GAAG,UAAU,GAAG,SAAS;CAUnH"}
|
|
@@ -262,16 +262,19 @@ class ArcChainErrorProcessor extends QuadrantFractionsProcessor {
|
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
/**
|
|
265
|
-
* Processor for
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
* `q
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
* * This processor
|
|
273
|
-
*
|
|
274
|
-
*
|
|
265
|
+
* Processor for computing an optimal refinement of a single Q1 ordered interval [f0,f1] by perturbing an interior
|
|
266
|
+
* seed fraction f.
|
|
267
|
+
* * Typically the caller (cf. [[AdaptiveSubdivisionQ1ErrorProcessor.announceArc]] processes a
|
|
268
|
+
* QuadrantFractions `q` with `q.quadrant` = 1 until convergence. The `q.fractions` array is expected to have
|
|
269
|
+
* one of two forms:
|
|
270
|
+
* * [fPrev, f0, f, f1], where fPrev is from the adjacent interval (possibly just refined), or
|
|
271
|
+
* * [f0, f, f1], if `q.interpolateStartTangent === true`.
|
|
272
|
+
* * This processor implements a bisection algorithm that iteratively shrinks a sub-interval that brackets f,
|
|
273
|
+
* starting with [f0,f1]:
|
|
274
|
+
* * During processing, `announceArc` will be called twice to compute the approximation errors of the circular
|
|
275
|
+
* arcs on either side of f in the current bracket.
|
|
276
|
+
* * In `announceQuadrantEnd` if these two errors are almost equal, we are done refining [f0,f1]. Otherwise,
|
|
277
|
+
* we move f halfway to the endpoint of the bracket that decreases the error delta, and shrink our bracket.
|
|
275
278
|
* @internal
|
|
276
279
|
*/
|
|
277
280
|
class AdaptiveSubdivisionQ1IntervalErrorProcessor extends QuadrantFractionsProcessor {
|
|
@@ -343,14 +346,17 @@ class AdaptiveSubdivisionQ1IntervalErrorProcessor extends QuadrantFractionsProce
|
|
|
343
346
|
/**
|
|
344
347
|
* Processor for computing samples in Q1 for a subdivision-based arc chain approximation.
|
|
345
348
|
* * The basic idea is to build a refinement of `q.fractions` for a QuadrantFractions q with q.quadrant = 1.
|
|
346
|
-
* *
|
|
347
|
-
* *
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
353
|
-
*
|
|
349
|
+
* * In `announceQuadrantBegin` we start off the refinement with a copy of `q.fractions`.
|
|
350
|
+
* * In `announceArc` we are called to process the interval [f0,f1] in `q.fractions`. First we test if the
|
|
351
|
+
* announced arc's approximation error over [f0,f1] exceeds maxError.
|
|
352
|
+
* * If so, we employ [[AdaptiveSubdivisionQ1IntervalErrorProcessor]] to compute an interior fraction f
|
|
353
|
+
* that best refines the interval, which becomes [f0,f,f1].
|
|
354
|
+
* * Otherwise, the fraction span [f0,f1] is unchanged---no additional samples are needed to decrease the
|
|
355
|
+
* approximation error.
|
|
356
|
+
* * In `announceQuadrantEnd`, `q.fractions` is updated in place with the computed refinement.
|
|
357
|
+
* * The caller (e.g., [[AdaptiveSubdivisionSampler.computeRadiansStrictlyInsideQuadrant1]]) typically
|
|
358
|
+
* re-processes `q` until `isRefined` returns false, at which point construction of an approximation that is
|
|
359
|
+
* guaranteed not to exceed the desired error can commence.
|
|
354
360
|
* @internal
|
|
355
361
|
*/
|
|
356
362
|
class AdaptiveSubdivisionQ1ErrorProcessor extends QuadrantFractionsProcessor {
|