@itwin/core-geometry 5.10.0-dev.1 → 5.10.0-dev.11

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.
Files changed (174) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/lib/cjs/clipping/BooleanClipNode.d.ts +28 -29
  3. package/lib/cjs/clipping/BooleanClipNode.d.ts.map +1 -1
  4. package/lib/cjs/clipping/BooleanClipNode.js +61 -29
  5. package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
  6. package/lib/cjs/clipping/ClipPlane.d.ts +12 -13
  7. package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
  8. package/lib/cjs/clipping/ClipPlane.js +19 -12
  9. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  10. package/lib/cjs/clipping/ClipPrimitive.d.ts +13 -8
  11. package/lib/cjs/clipping/ClipPrimitive.d.ts.map +1 -1
  12. package/lib/cjs/clipping/ClipPrimitive.js +18 -7
  13. package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
  14. package/lib/cjs/clipping/ClipUtils.d.ts +13 -5
  15. package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
  16. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  17. package/lib/cjs/clipping/ClipVector.d.ts +11 -5
  18. package/lib/cjs/clipping/ClipVector.d.ts.map +1 -1
  19. package/lib/cjs/clipping/ClipVector.js +22 -7
  20. package/lib/cjs/clipping/ClipVector.js.map +1 -1
  21. package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts +7 -20
  22. package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  23. package/lib/cjs/clipping/ConvexClipPlaneSet.js +16 -20
  24. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  25. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts +8 -19
  26. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
  27. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +19 -22
  28. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  29. package/lib/cjs/curve/CurvePrimitive.d.ts +4 -4
  30. package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
  31. package/lib/cjs/curve/CurvePrimitive.js +5 -6
  32. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  33. package/lib/cjs/curve/LineString3d.d.ts +4 -4
  34. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  35. package/lib/cjs/curve/LineString3d.js +4 -6
  36. package/lib/cjs/curve/LineString3d.js.map +1 -1
  37. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.d.ts +2 -3
  38. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.d.ts.map +1 -1
  39. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js +5 -6
  40. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  41. package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
  42. package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
  43. package/lib/cjs/geometry3d/Ellipsoid.d.ts +4 -3
  44. package/lib/cjs/geometry3d/Ellipsoid.d.ts.map +1 -1
  45. package/lib/cjs/geometry3d/Ellipsoid.js +7 -4
  46. package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
  47. package/lib/cjs/geometry3d/Matrix3d.d.ts +2 -0
  48. package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
  49. package/lib/cjs/geometry3d/Matrix3d.js +4 -0
  50. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  51. package/lib/cjs/geometry3d/Plane3d.d.ts +16 -11
  52. package/lib/cjs/geometry3d/Plane3d.d.ts.map +1 -1
  53. package/lib/cjs/geometry3d/Plane3d.js +16 -11
  54. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  55. package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
  56. package/lib/cjs/serialization/IModelJsonSchema.js +8 -13
  57. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  58. package/lib/cjs/solid/Box.d.ts +2 -0
  59. package/lib/cjs/solid/Box.d.ts.map +1 -1
  60. package/lib/cjs/solid/Box.js +4 -0
  61. package/lib/cjs/solid/Box.js.map +1 -1
  62. package/lib/cjs/solid/Cone.d.ts +12 -0
  63. package/lib/cjs/solid/Cone.d.ts.map +1 -1
  64. package/lib/cjs/solid/Cone.js +23 -0
  65. package/lib/cjs/solid/Cone.js.map +1 -1
  66. package/lib/cjs/solid/LinearSweep.d.ts +2 -0
  67. package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
  68. package/lib/cjs/solid/LinearSweep.js +4 -0
  69. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  70. package/lib/cjs/solid/RotationalSweep.d.ts +2 -0
  71. package/lib/cjs/solid/RotationalSweep.d.ts.map +1 -1
  72. package/lib/cjs/solid/RotationalSweep.js +4 -0
  73. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  74. package/lib/cjs/solid/RuledSweep.d.ts +1 -1
  75. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  76. package/lib/cjs/solid/SolidPrimitive.d.ts +8 -1
  77. package/lib/cjs/solid/SolidPrimitive.d.ts.map +1 -1
  78. package/lib/cjs/solid/SolidPrimitive.js +8 -0
  79. package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
  80. package/lib/cjs/solid/Sphere.d.ts +2 -0
  81. package/lib/cjs/solid/Sphere.d.ts.map +1 -1
  82. package/lib/cjs/solid/Sphere.js +4 -0
  83. package/lib/cjs/solid/Sphere.js.map +1 -1
  84. package/lib/cjs/solid/TorusPipe.d.ts +2 -0
  85. package/lib/cjs/solid/TorusPipe.d.ts.map +1 -1
  86. package/lib/cjs/solid/TorusPipe.js +4 -0
  87. package/lib/cjs/solid/TorusPipe.js.map +1 -1
  88. package/lib/esm/clipping/BooleanClipNode.d.ts +28 -29
  89. package/lib/esm/clipping/BooleanClipNode.d.ts.map +1 -1
  90. package/lib/esm/clipping/BooleanClipNode.js +61 -29
  91. package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
  92. package/lib/esm/clipping/ClipPlane.d.ts +12 -13
  93. package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
  94. package/lib/esm/clipping/ClipPlane.js +19 -12
  95. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  96. package/lib/esm/clipping/ClipPrimitive.d.ts +13 -8
  97. package/lib/esm/clipping/ClipPrimitive.d.ts.map +1 -1
  98. package/lib/esm/clipping/ClipPrimitive.js +18 -7
  99. package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
  100. package/lib/esm/clipping/ClipUtils.d.ts +13 -5
  101. package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
  102. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  103. package/lib/esm/clipping/ClipVector.d.ts +11 -5
  104. package/lib/esm/clipping/ClipVector.d.ts.map +1 -1
  105. package/lib/esm/clipping/ClipVector.js +22 -7
  106. package/lib/esm/clipping/ClipVector.js.map +1 -1
  107. package/lib/esm/clipping/ConvexClipPlaneSet.d.ts +7 -20
  108. package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  109. package/lib/esm/clipping/ConvexClipPlaneSet.js +16 -20
  110. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  111. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts +8 -19
  112. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
  113. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +19 -22
  114. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  115. package/lib/esm/curve/CurvePrimitive.d.ts +4 -4
  116. package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
  117. package/lib/esm/curve/CurvePrimitive.js +5 -6
  118. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  119. package/lib/esm/curve/LineString3d.d.ts +4 -4
  120. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  121. package/lib/esm/curve/LineString3d.js +4 -6
  122. package/lib/esm/curve/LineString3d.js.map +1 -1
  123. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.d.ts +2 -3
  124. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.d.ts.map +1 -1
  125. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js +5 -6
  126. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  127. package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
  128. package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
  129. package/lib/esm/geometry3d/Ellipsoid.d.ts +4 -3
  130. package/lib/esm/geometry3d/Ellipsoid.d.ts.map +1 -1
  131. package/lib/esm/geometry3d/Ellipsoid.js +7 -4
  132. package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
  133. package/lib/esm/geometry3d/Matrix3d.d.ts +2 -0
  134. package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
  135. package/lib/esm/geometry3d/Matrix3d.js +4 -0
  136. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  137. package/lib/esm/geometry3d/Plane3d.d.ts +16 -11
  138. package/lib/esm/geometry3d/Plane3d.d.ts.map +1 -1
  139. package/lib/esm/geometry3d/Plane3d.js +16 -11
  140. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  141. package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
  142. package/lib/esm/serialization/IModelJsonSchema.js +8 -13
  143. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  144. package/lib/esm/solid/Box.d.ts +2 -0
  145. package/lib/esm/solid/Box.d.ts.map +1 -1
  146. package/lib/esm/solid/Box.js +4 -0
  147. package/lib/esm/solid/Box.js.map +1 -1
  148. package/lib/esm/solid/Cone.d.ts +12 -0
  149. package/lib/esm/solid/Cone.d.ts.map +1 -1
  150. package/lib/esm/solid/Cone.js +23 -0
  151. package/lib/esm/solid/Cone.js.map +1 -1
  152. package/lib/esm/solid/LinearSweep.d.ts +2 -0
  153. package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
  154. package/lib/esm/solid/LinearSweep.js +4 -0
  155. package/lib/esm/solid/LinearSweep.js.map +1 -1
  156. package/lib/esm/solid/RotationalSweep.d.ts +2 -0
  157. package/lib/esm/solid/RotationalSweep.d.ts.map +1 -1
  158. package/lib/esm/solid/RotationalSweep.js +4 -0
  159. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  160. package/lib/esm/solid/RuledSweep.d.ts +1 -1
  161. package/lib/esm/solid/RuledSweep.js.map +1 -1
  162. package/lib/esm/solid/SolidPrimitive.d.ts +8 -1
  163. package/lib/esm/solid/SolidPrimitive.d.ts.map +1 -1
  164. package/lib/esm/solid/SolidPrimitive.js +8 -0
  165. package/lib/esm/solid/SolidPrimitive.js.map +1 -1
  166. package/lib/esm/solid/Sphere.d.ts +2 -0
  167. package/lib/esm/solid/Sphere.d.ts.map +1 -1
  168. package/lib/esm/solid/Sphere.js +4 -0
  169. package/lib/esm/solid/Sphere.js.map +1 -1
  170. package/lib/esm/solid/TorusPipe.d.ts +2 -0
  171. package/lib/esm/solid/TorusPipe.d.ts.map +1 -1
  172. package/lib/esm/solid/TorusPipe.js +4 -0
  173. package/lib/esm/solid/TorusPipe.js.map +1 -1
  174. package/package.json +3 -3
@@ -2,7 +2,7 @@
2
2
  * @module CartesianGeometry
3
3
  */
4
4
  import { Arc3d } from "../curve/Arc3d";
5
- import { AnnounceNumberNumberCurvePrimitive } from "../curve/CurvePrimitive";
5
+ import { AnnounceNumberNumber, AnnounceNumberNumberCurvePrimitive, CurvePrimitive } from "../curve/CurvePrimitive";
6
6
  import { LineSegment3d } from "../curve/LineSegment3d";
7
7
  import { GrowableXYZArray } from "../geometry3d/GrowableXYZArray";
8
8
  import { IndexedXYZCollection } from "../geometry3d/IndexedXYZCollection";
@@ -23,7 +23,7 @@ import { ConvexClipPlaneSet, ConvexClipPlaneSetProps } from "./ConvexClipPlaneSe
23
23
  export type UnionOfConvexClipPlaneSetsProps = ConvexClipPlaneSetProps[];
24
24
  /**
25
25
  * A collection of ConvexClipPlaneSets.
26
- * * A point is "in" the clip plane set if it is "in" one or more of the ConvexClipPlaneSet
26
+ * * A point is "in" the clip plane set if it is "in" one or more of the ConvexClipPlaneSets.
27
27
  * * Hence the boolean logic is that the ClipPlaneSet is a UNION of its constituents.
28
28
  * @public
29
29
  */
@@ -102,24 +102,13 @@ export declare class UnionOfConvexClipPlaneSets implements Clipper, PolygonClipp
102
102
  * @see appendPolygonClip
103
103
  */
104
104
  polygonClip(input: GrowableXYZArray | Point3d[], output: GrowableXYZArray[], work?: GrowableXYZArray, planeToSkip?: ClipPlane, tolerance?: number): void;
105
- /**
106
- * Announce clipSegment() for each convexSet in this ClipPlaneSet.
107
- * * all clipPlaneSets are inspected.
108
- * * announced intervals are for each individual clipPlaneSet -- adjacent intervals are not consolidated.
109
- * @param f0 active interval start.
110
- * @param f1 active interval end.
111
- * @param pointA line segment start.
112
- * @param pointB line segment end.
113
- * @param announce function to announce interval.
114
- * @returns Return true if any announcements are made.
115
- */
116
- announceClippedSegmentIntervals(f0: number, f1: number, pointA: Point3d, pointB: Point3d, announce?: (fraction0: number, fraction1: number) => void): boolean;
117
- private static _clipArcFractionArray;
118
- /**
119
- * Find parts of an arc that are inside any member clipper.
120
- * Announce each with `announce(startFraction, endFraction, this)`
121
- */
105
+ /** Method from [[Clipper]] interface. */
106
+ announceClippedSegmentIntervals(f0: number, f1: number, pointA: Point3d, pointB: Point3d, announce?: AnnounceNumberNumber): boolean;
107
+ private static _clipFractionArray;
108
+ /** Method from [[Clipper]] interface. */
122
109
  announceClippedArcIntervals(arc: Arc3d, announce?: AnnounceNumberNumberCurvePrimitive): boolean;
110
+ /** Method from [[Clipper]] interface. */
111
+ announceClippedCurveIntervals(curve: CurvePrimitive, announce?: AnnounceNumberNumberCurvePrimitive): boolean;
123
112
  /**
124
113
  * Collect the output from computePlanePlanePlaneIntersections in all the contained convex sets.
125
114
  * @param points (optional) array to which computed points are to be added.
@@ -1 +1 @@
1
- {"version":3,"file":"UnionOfConvexClipPlaneSets.d.ts","sourceRoot":"","sources":["../../../src/clipping/UnionOfConvexClipPlaneSets.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,kCAAkC,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAuC,cAAc,EAAE,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEnF;;;GAGG;AACH,MAAM,MAAM,+BAA+B,GAAG,uBAAuB,EAAE,CAAC;AAExE;;;;;GAKG;AACH,qBAA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;;;;;;OAYG;IACI,iBAAiB,CACtB,GAAG,EAAE,oBAAoB,EACzB,eAAe,EAAE,gBAAgB,EAAE,EACnC,gBAAgB,EAAE,gBAAgB,EAAE,EACpC,UAAU,EAAE,qBAAqB,GAChC,IAAI;CA2BR"}
@@ -14,7 +14,7 @@ import { ClipPlaneContainment, ClipUtilities } from "./ClipUtils";
14
14
  import { ConvexClipPlaneSet } from "./ConvexClipPlaneSet";
15
15
  /**
16
16
  * A collection of ConvexClipPlaneSets.
17
- * * A point is "in" the clip plane set if it is "in" one or more of the ConvexClipPlaneSet
17
+ * * A point is "in" the clip plane set if it is "in" one or more of the ConvexClipPlaneSets.
18
18
  * * Hence the boolean logic is that the ClipPlaneSet is a UNION of its constituents.
19
19
  * @public
20
20
  */
@@ -207,17 +207,7 @@ export class UnionOfConvexClipPlaneSets {
207
207
  output.push(convexSetOutput);
208
208
  }
209
209
  }
210
- /**
211
- * Announce clipSegment() for each convexSet in this ClipPlaneSet.
212
- * * all clipPlaneSets are inspected.
213
- * * announced intervals are for each individual clipPlaneSet -- adjacent intervals are not consolidated.
214
- * @param f0 active interval start.
215
- * @param f1 active interval end.
216
- * @param pointA line segment start.
217
- * @param pointB line segment end.
218
- * @param announce function to announce interval.
219
- * @returns Return true if any announcements are made.
220
- */
210
+ /** Method from [[Clipper]] interface. */
221
211
  announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce) {
222
212
  let numAnnounce = 0;
223
213
  for (const convexSet of this._convexSets) {
@@ -226,22 +216,29 @@ export class UnionOfConvexClipPlaneSets {
226
216
  }
227
217
  return numAnnounce > 0;
228
218
  }
229
- static _clipArcFractionArray = new GrowableFloat64Array();
230
- /**
231
- * Find parts of an arc that are inside any member clipper.
232
- * Announce each with `announce(startFraction, endFraction, this)`
233
- */
219
+ static _clipFractionArray = new GrowableFloat64Array();
220
+ /** Method from [[Clipper]] interface. */
234
221
  announceClippedArcIntervals(arc, announce) {
235
- const breaks = UnionOfConvexClipPlaneSets._clipArcFractionArray;
222
+ const breaks = UnionOfConvexClipPlaneSets._clipFractionArray;
236
223
  breaks.clear();
237
- for (const convexSet of this._convexSets) {
238
- for (const clipPlane of convexSet.planes) {
224
+ for (const convexSet of this._convexSets)
225
+ for (const clipPlane of convexSet.planes)
239
226
  clipPlane.appendIntersectionRadians(arc, breaks);
240
- }
241
- }
242
227
  arc.sweep.radiansArrayToPositivePeriodicFractions(breaks);
243
228
  return ClipUtilities.selectIntervals01(arc, breaks, this, announce);
244
229
  }
230
+ /** Method from [[Clipper]] interface. */
231
+ announceClippedCurveIntervals(curve, announce) {
232
+ const breaks = UnionOfConvexClipPlaneSets._clipFractionArray;
233
+ breaks.clear();
234
+ const results = [];
235
+ for (const convexSet of this._convexSets)
236
+ for (const clipPlane of convexSet.planes)
237
+ curve.appendPlaneIntersectionPoints(clipPlane, results);
238
+ for (const r of results)
239
+ breaks.push(r.fraction);
240
+ return ClipUtilities.selectIntervals01(curve, breaks, this, announce);
241
+ }
245
242
  /**
246
243
  * Collect the output from computePlanePlanePlaneIntersections in all the contained convex sets.
247
244
  * @param points (optional) array to which computed points are to be added.
@@ -1 +1 @@
1
- {"version":3,"file":"UnionOfConvexClipPlaneSets.js","sourceRoot":"","sources":["../../../src/clipping/UnionOfConvexClipPlaneSets.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGlE,OAAO,EAAE,OAAO,EAAW,MAAM,qBAAqB,CAAC;AAGvD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAIpD,OAAO,EAAW,oBAAoB,EAAE,aAAa,EAAkB,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAA2B,MAAM,sBAAsB,CAAC;AAQnF;;;;;GAK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C;QACX,IAAI,KAAK,CAAC;QACV,0GAA0G;QAC1G,6HAA6H;QAC7H,kDAAkD;QAClD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACjC,OAAO,SAAS,KAAK,CAAC,KAAK,GAAG,aAAa,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC;gBACnD,CAAC,CAAC,iBAAiB,CAAC,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;gBACvE,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAChC,CAAC;YACD,MAAM,GAAG,aAAa,CAAC;YACvB,aAAa,GAAG,aAAa,CAAC,CAAE,oBAAoB;YACpD,aAAa,GAAG,MAAM,CAAC;QACzB,CAAC;QACD,OAAO,SAAS,KAAK,CAAC,KAAK,GAAG,aAAa,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC;YACnD,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;QACD,IAAI,gBAAgB,CAAC,MAAM,KAAK,eAAe;YAC7C,aAAa,CAAC,uCAAuC,CAAC,eAAe,EAAE,cAAc,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC;aACrG,IAAI,eAAe,CAAC,MAAM,KAAK,cAAc;YAChD,aAAa,CAAC,uCAAuC,CAAC,gBAAgB,EAAE,eAAe,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC;IAC9G,CAAC;;AAGH;;;;;;;;;;;;;;EAcE","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/** @packageDocumentation\r\n * @module CartesianGeometry\r\n */\r\n\r\nimport { Arc3d } from \"../curve/Arc3d\";\r\nimport { AnnounceNumberNumberCurvePrimitive } from \"../curve/CurvePrimitive\";\r\nimport { LineSegment3d } from \"../curve/LineSegment3d\";\r\nimport { Geometry } from \"../Geometry\";\r\nimport { GrowableFloat64Array } from \"../geometry3d/GrowableFloat64Array\";\r\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\r\nimport { IndexedXYZCollection } from \"../geometry3d/IndexedXYZCollection\";\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\r\nimport { Ray3d } from \"../geometry3d/Ray3d\";\r\nimport { GrowableXYZArrayCache } from \"../geometry3d/ReusableObjectCache\";\r\nimport { Segment1d } from \"../geometry3d/Segment1d\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { Matrix4d } from \"../geometry4d/Matrix4d\";\r\nimport { ClipPlane } from \"./ClipPlane\";\r\nimport { Clipper, ClipPlaneContainment, ClipUtilities, PolygonClipper } from \"./ClipUtils\";\r\nimport { ConvexClipPlaneSet, ConvexClipPlaneSetProps } from \"./ConvexClipPlaneSet\";\r\n\r\n/**\r\n * Wire format describing a [[UnionOfConvexClipPlaneSets]].\r\n * @public\r\n */\r\nexport type UnionOfConvexClipPlaneSetsProps = ConvexClipPlaneSetProps[];\r\n\r\n/**\r\n * A collection of ConvexClipPlaneSets.\r\n * * A point is \"in\" the clip plane set if it is \"in\" one or more of the ConvexClipPlaneSet\r\n * * Hence the boolean logic is that the ClipPlaneSet is a UNION of its constituents.\r\n * @public\r\n */\r\nexport class UnionOfConvexClipPlaneSets implements Clipper, PolygonClipper {\r\n private _convexSets: ConvexClipPlaneSet[];\r\n /** (property accessor) Return the (reference to the) array of `ConvexClipPlaneSet` */\r\n public get convexSets(): ConvexClipPlaneSet[] {\r\n return this._convexSets;\r\n }\r\n private constructor() {\r\n this._convexSets = [];\r\n }\r\n /** Return an array with the `toJSON` form of each `ConvexClipPlaneSet` */\r\n public toJSON(): UnionOfConvexClipPlaneSetsProps {\r\n const val: ConvexClipPlaneSetProps[] = [];\r\n for (const convex of this._convexSets)\r\n val.push(convex.toJSON());\r\n return val;\r\n }\r\n /** Convert json `UnionOfConvexClipPlaneSets`, using `setFromJSON`. */\r\n public static fromJSON(\r\n json: UnionOfConvexClipPlaneSetsProps | undefined, result?: UnionOfConvexClipPlaneSets,\r\n ): UnionOfConvexClipPlaneSets {\r\n result = result ? result : new UnionOfConvexClipPlaneSets();\r\n result._convexSets.length = 0;\r\n if (!Array.isArray(json))\r\n return result;\r\n\r\n for (const thisJson of json)\r\n result._convexSets.push(ConvexClipPlaneSet.fromJSON(thisJson));\r\n return result;\r\n }\r\n /** Create a `UnionOfConvexClipPlaneSets` with no members. */\r\n public static createEmpty(result?: UnionOfConvexClipPlaneSets): UnionOfConvexClipPlaneSets {\r\n if (result) {\r\n result._convexSets.length = 0;\r\n return result;\r\n }\r\n return new UnionOfConvexClipPlaneSets();\r\n }\r\n /**\r\n * Return true if all member convex sets are almostEqual to corresponding members of other. This includes\r\n * identical order in array.\r\n * @param other clip plane to compare.\r\n */\r\n public isAlmostEqual(other: UnionOfConvexClipPlaneSets): boolean {\r\n if (this._convexSets.length !== other._convexSets.length)\r\n return false;\r\n for (let i = 0; i < this._convexSets.length; i++)\r\n if (!this._convexSets[i].isAlmostEqual(other._convexSets[i]))\r\n return false;\r\n return true;\r\n }\r\n /** Create a `UnionOfConvexClipPlaneSets` with given `ConvexClipPlaneSet` members. */\r\n public static createConvexSets(\r\n convexSets: ConvexClipPlaneSet[], result?: UnionOfConvexClipPlaneSets,\r\n ): UnionOfConvexClipPlaneSets {\r\n result = result ? result : new UnionOfConvexClipPlaneSets();\r\n for (const set of convexSets)\r\n result._convexSets.push(set);\r\n return result;\r\n }\r\n /** Return a deep copy. */\r\n public clone(result?: UnionOfConvexClipPlaneSets): UnionOfConvexClipPlaneSets {\r\n result = result ? result : new UnionOfConvexClipPlaneSets();\r\n result._convexSets.length = 0;\r\n for (const convexSet of this._convexSets)\r\n result._convexSets.push(convexSet.clone());\r\n return result;\r\n }\r\n /**\r\n * Append `toAdd` to the array of `ConvexClipPlaneSet`.\r\n * * undefined toAdd is ignored.\r\n */\r\n public addConvexSet(toAdd: ConvexClipPlaneSet | undefined) {\r\n if (toAdd)\r\n this._convexSets.push(toAdd);\r\n }\r\n /**\r\n * Test if there is any intersection with a ray defined by origin and direction.\r\n * * Optionally record the range (null or otherwise) in caller-allocated result.\r\n * * If the ray is unbounded inside the clip, result can contain positive or negative\r\n * \"Geometry.largeCoordinateResult\" values.\r\n * * If no result is provide, there are no object allocations.\r\n * @param maximalRange optional Range1d to receive parameters along the ray.\r\n */\r\n public hasIntersectionWithRay(ray: Ray3d, maximalRange?: Range1d): boolean {\r\n if (maximalRange === undefined) {\r\n // if complete result is not requested, return after any hit.\r\n for (const planeSet of this._convexSets) {\r\n if (planeSet.hasIntersectionWithRay(ray))\r\n return true;\r\n }\r\n return false;\r\n }\r\n maximalRange.setNull();\r\n const rangeA = Range1d.createNull();\r\n for (const planeSet of this._convexSets) {\r\n if (planeSet.hasIntersectionWithRay(ray, rangeA))\r\n maximalRange.extendRange(rangeA);\r\n }\r\n return !maximalRange.isNull;\r\n }\r\n /**\r\n * Return true if true is returned for any contained convex set returns true for\r\n * `convexSet.isPointInside (point, tolerance)`.\r\n */\r\n public isPointInside(point: Point3d): boolean {\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.isPointInside(point)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n /**\r\n * Return true if true is returned for any contained convex set returns true for\r\n * `convexSet.isPointOnOrInside (point, tolerance)`.\r\n */\r\n public isPointOnOrInside(point: Point3d, tolerance: number = Geometry.smallMetricDistance): boolean {\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.isPointOnOrInside(point, tolerance))\r\n return true;\r\n }\r\n return false;\r\n }\r\n /**\r\n * Return true if true is returned for any contained convex set returns true for\r\n * `convexSet.isSphereOnOrInside (point, tolerance)`.\r\n */\r\n public isSphereInside(point: Point3d, radius: number) {\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.isSphereInside(point, radius))\r\n return true;\r\n }\r\n return false;\r\n }\r\n /** Test if any part of a line segment is within the volume. */\r\n public isAnyPointInOrOnFromSegment(segment: LineSegment3d): boolean {\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.announceClippedSegmentIntervals(0.0, 1.0, segment.point0Ref, segment.point1Ref))\r\n return true;\r\n }\r\n return false;\r\n }\r\n // Intervals must be Segment1d array, as there may be multiple intervals along segment that pass through set regions,\r\n // and so splitting the intervals into segments aids in better organization\r\n /** Returns the fractions of the segment that pass through the set region, as 1 dimensional pieces. */\r\n public appendIntervalsFromSegment(segment: LineSegment3d, intervals: Segment1d[]) {\r\n for (const convexSet of this._convexSets) {\r\n convexSet.announceClippedSegmentIntervals(0.0, 1.0, segment.point0Ref, segment.point1Ref,\r\n (fraction0: number, fraction1: number) =>\r\n intervals.push(Segment1d.create(fraction0, fraction1)));\r\n }\r\n }\r\n /** Apply `transform` to all the ConvexClipPlaneSet's. */\r\n public transformInPlace(transform: Transform) {\r\n for (const convexSet of this._convexSets) {\r\n convexSet.transformInPlace(transform);\r\n }\r\n }\r\n /** Returns 1, 2, or 3 based on whether point is strongly inside, ambiguous, or strongly outside respectively. */\r\n public classifyPointContainment(points: Point3d[], onIsOutside: boolean): number {\r\n for (const convexSet of this._convexSets) {\r\n const thisStatus = convexSet.classifyPointContainment(points, onIsOutside);\r\n if (thisStatus !== ClipPlaneContainment.StronglyOutside)\r\n return thisStatus;\r\n }\r\n return ClipPlaneContainment.StronglyOutside;\r\n }\r\n /**\r\n * Clip a polygon to the planes of the clip sets, returning new polygon boundaries.\r\n * * The output polygons may lie next to each other, or be disconnected.\r\n * * For a convex input polygon, the output polygon(s) are also convex.\r\n * * For non-convex input, the output polygon(s) may have double-back edges along plane intersections. This is still a\r\n * valid clip in a parity sense (overlapping regions cancel).\r\n * * This method differs from [[appendPolygonClip]] by clipping the same input polygon with each [[ConvexClipPlaneSet]]\r\n * in the instance, and returning only the inside pieces.\r\n * @param input polygon, usually convex. Unchanged.\r\n * @param output output polygon\r\n * @param work optional work array.\r\n * @param planeToSkip if this plane is found in the convex set, it is NOT applied.\r\n * This is useful when caller knows the polygon lies in one of the instance planes.\r\n * @param tolerance distance tolerance for \"on plane\" decision. Default value is [[Geometry.smallMetricDistance]].\r\n * @see appendPolygonClip\r\n */\r\n public polygonClip(\r\n input: GrowableXYZArray | Point3d[],\r\n output: GrowableXYZArray[],\r\n work?: GrowableXYZArray,\r\n planeToSkip?: ClipPlane,\r\n tolerance: number = Geometry.smallMetricDistance,\r\n ): void {\r\n output.length = 0;\r\n if (Array.isArray(input))\r\n input = GrowableXYZArray.create(input);\r\n if (!work)\r\n work = new GrowableXYZArray();\r\n for (const convexSet of this._convexSets) {\r\n const convexSetOutput = new GrowableXYZArray();\r\n convexSet.polygonClip(input, convexSetOutput, work, planeToSkip, tolerance);\r\n if (convexSetOutput.length !== 0)\r\n output.push(convexSetOutput);\r\n }\r\n }\r\n /**\r\n * Announce clipSegment() for each convexSet in this ClipPlaneSet.\r\n * * all clipPlaneSets are inspected.\r\n * * announced intervals are for each individual clipPlaneSet -- adjacent intervals are not consolidated.\r\n * @param f0 active interval start.\r\n * @param f1 active interval end.\r\n * @param pointA line segment start.\r\n * @param pointB line segment end.\r\n * @param announce function to announce interval.\r\n * @returns Return true if any announcements are made.\r\n */\r\n public announceClippedSegmentIntervals(\r\n f0: number, f1: number, pointA: Point3d, pointB: Point3d, announce?: (fraction0: number, fraction1: number) => void,\r\n ): boolean {\r\n let numAnnounce = 0;\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce))\r\n numAnnounce++;\r\n }\r\n return numAnnounce > 0;\r\n }\r\n private static _clipArcFractionArray = new GrowableFloat64Array();\r\n /**\r\n * Find parts of an arc that are inside any member clipper.\r\n * Announce each with `announce(startFraction, endFraction, this)`\r\n */\r\n public announceClippedArcIntervals(arc: Arc3d, announce?: AnnounceNumberNumberCurvePrimitive): boolean {\r\n const breaks = UnionOfConvexClipPlaneSets._clipArcFractionArray;\r\n breaks.clear();\r\n for (const convexSet of this._convexSets) {\r\n for (const clipPlane of convexSet.planes) {\r\n clipPlane.appendIntersectionRadians(arc, breaks);\r\n }\r\n }\r\n arc.sweep.radiansArrayToPositivePeriodicFractions(breaks);\r\n return ClipUtilities.selectIntervals01(arc, breaks, this, announce);\r\n }\r\n /**\r\n * Collect the output from computePlanePlanePlaneIntersections in all the contained convex sets.\r\n * @param points (optional) array to which computed points are to be added.\r\n * @param rangeToExtend (optional) range to be extended by the computed points.\r\n * @param transform (optional) transform to apply to the accepted points.\r\n * @param testContainment if true, test each point to see if it is within the convex set (send false if confident\r\n * that the convex set is rectilinear set such as a slab. Send true if chiseled corners are possible).\r\n * @returns number of points.\r\n */\r\n public computePlanePlanePlaneIntersectionsInAllConvexSets(\r\n points: Point3d[] | undefined, rangeToExtend: Range3d | undefined, transform?: Transform, testContainment: boolean = true,\r\n ): number {\r\n let n = 0;\r\n for (const convexSet of this._convexSets) {\r\n n += convexSet.computePlanePlanePlaneIntersections(points, rangeToExtend, transform, testContainment);\r\n }\r\n return n;\r\n }\r\n /**\r\n * Multiply all ClipPlanes DPoint4d by matrix.\r\n * @param matrix matrix to apply.\r\n * @param invert if true, use in verse of the matrix.\r\n * @param transpose if true, use the transpose of the matrix (or inverse, per invert parameter).\r\n * * Note that if matrixA is applied to all of space, the matrix to send to this method to get a corresponding effect\r\n * on the plane is the inverse transpose of matrixA.\r\n * * Callers that will apply the same matrix to many planes should pre-invert the matrix for efficiency.\r\n * * Both params default to true to get the full effect of transforming space.\r\n * @param matrix matrix to apply\r\n */\r\n public multiplyPlanesByMatrix4d(matrix: Matrix4d, invert: boolean = true, transpose: boolean = true): boolean {\r\n if (invert) { // form inverse once here, reuse for all planes\r\n const inverse = matrix.createInverse();\r\n if (!inverse)\r\n return false;\r\n return this.multiplyPlanesByMatrix4d(inverse, false, transpose);\r\n }\r\n // (no inversion -- no failures possible)\r\n for (const convexSet of this._convexSets) {\r\n convexSet.multiplyPlanesByMatrix4d(matrix, false, transpose);\r\n }\r\n return true;\r\n }\r\n /** Recursively call `setInvisible` on all member convex sets. */\r\n public setInvisible(invisible: boolean) {\r\n for (const convexSet of this._convexSets) {\r\n convexSet.setInvisible(invisible);\r\n }\r\n }\r\n /** add convex sets that accept points below `zLow` and above `zHigh` */\r\n public addOutsideZClipSets(invisible: boolean, zLow?: number, zHigh?: number) {\r\n if (zLow) {\r\n const convexSet = ConvexClipPlaneSet.createEmpty();\r\n convexSet.addZClipPlanes(invisible, zLow);\r\n this._convexSets.push(convexSet);\r\n }\r\n if (zHigh) {\r\n const convexSet = ConvexClipPlaneSet.createEmpty();\r\n convexSet.addZClipPlanes(invisible, undefined, zHigh);\r\n this._convexSets.push(convexSet);\r\n }\r\n }\r\n /** Move convex sets from source.*/\r\n public takeConvexSets(source: UnionOfConvexClipPlaneSets) {\r\n let convexSet;\r\n while ((undefined !== (convexSet = source._convexSets.pop()))) {\r\n this._convexSets.push(convexSet);\r\n }\r\n }\r\n /**\r\n * Implement appendPolygonClip, as defined in interface PolygonClipper.\r\n * * This method differs from [[polygonClip]] by clipping the outside fragments resulting from the previous\r\n * [[ConvexClipPlaneSet]] with the following one, and returning both inside and outside pieces.\r\n * In this way, it always produces disjoint inside fragments, even if the clippers are not disjoint (uncommon).\r\n * @param xyz convex polygon. This is not changed.\r\n * @param insideFragments Array to receive \"inside\" fragments. Each fragment is a GrowableXYZArray grabbed from\r\n * the cache. This is NOT cleared.\r\n * @param outsideFragments Array to receive \"outside\" fragments. Each fragment is a GrowableXYZArray grabbed from\r\n * the cache. This is NOT cleared.\r\n * @param arrayCache cache for reusable GrowableXYZArray.\r\n * @see polygonClip\r\n */\r\n public appendPolygonClip(\r\n xyz: IndexedXYZCollection,\r\n insideFragments: GrowableXYZArray[],\r\n outsideFragments: GrowableXYZArray[],\r\n arrayCache: GrowableXYZArrayCache,\r\n ): void {\r\n const oldOutsideCount = outsideFragments.length;\r\n const oldInsideCount = insideFragments.length;\r\n let carryForwardA = [arrayCache.grabAndFill(xyz)];\r\n let carryForwardB: GrowableXYZArray[] = [];\r\n let tempAB;\r\n let shard;\r\n // At each convex set, carryForwardA is all the fragments that have been outside all previous convex sets.\r\n // Clip each such fragment to the current set, sending the outside parts to carryForwardB, which will got to the next clipper\r\n // The final surviving carryForward really is out.\r\n for (const c of this._convexSets) {\r\n while (undefined !== (shard = carryForwardA.pop())) {\r\n c.appendPolygonClip(shard, insideFragments, carryForwardB, arrayCache);\r\n arrayCache.dropToCache(shard);\r\n }\r\n tempAB = carryForwardB;\r\n carryForwardB = carryForwardA; // and that is empty\r\n carryForwardA = tempAB;\r\n }\r\n while (undefined !== (shard = carryForwardA.pop())) {\r\n outsideFragments.push(shard);\r\n }\r\n if (outsideFragments.length === oldOutsideCount)\r\n ClipUtilities.restoreSingletonInPlaceOfMultipleShards(insideFragments, oldInsideCount, xyz, arrayCache);\r\n else if (insideFragments.length === oldInsideCount)\r\n ClipUtilities.restoreSingletonInPlaceOfMultipleShards(outsideFragments, oldOutsideCount, xyz, arrayCache);\r\n }\r\n}\r\n\r\n/* FUNCTIONS SKIPPED DUE TO BSPLINES, VU, OR NON-USAGE IN NATIVE CODE----------------------------------------------------------------\r\n\r\nInvolves vu: skipping for now...\r\n public fromSweptPolygon(points: Point3d[], directions: Vector3d[]): ClipPlaneSet;\r\n public parseConcavePolygonPlanes(...)\r\n\r\nUses bsplines... skipping for now:\r\n public appendIntervalsClipPlaneSetFromCurve();\r\n\r\nUses bsplines... skipping for now:\r\n public isAnyPointInOrOnFrom();\r\n\r\nSkipped fromSweptPolygon(...), which is overloaded function from first, due to presence of vu\r\n public fromSweptPolygon(points: Point3d[], directions: Vector3d[], shapes: Point3d[])\r\n*/\r\n"]}
1
+ {"version":3,"file":"UnionOfConvexClipPlaneSets.js","sourceRoot":"","sources":["../../../src/clipping/UnionOfConvexClipPlaneSets.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAMH,OAAO,EAAE,QAAQ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;YACD,MAAM,GAAG,aAAa,CAAC;YACvB,aAAa,GAAG,aAAa,CAAC,CAAE,oBAAoB;YACpD,aAAa,GAAG,MAAM,CAAC;QACzB,CAAC;QACD,OAAO,SAAS,KAAK,CAAC,KAAK,GAAG,aAAa,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC;YACnD,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;QACD,IAAI,gBAAgB,CAAC,MAAM,KAAK,eAAe;YAC7C,aAAa,CAAC,uCAAuC,CAAC,eAAe,EAAE,cAAc,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC;aACrG,IAAI,eAAe,CAAC,MAAM,KAAK,cAAc;YAChD,aAAa,CAAC,uCAAuC,CAAC,gBAAgB,EAAE,eAAe,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC;IAC9G,CAAC;;AAGH;;;;;;;;;;;;;;EAcE","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/** @packageDocumentation\r\n * @module CartesianGeometry\r\n */\r\n\r\nimport { Arc3d } from \"../curve/Arc3d\";\r\nimport { CurveLocationDetail } from \"../curve/CurveLocationDetail\";\r\nimport { AnnounceNumberNumber, AnnounceNumberNumberCurvePrimitive, CurvePrimitive } from \"../curve/CurvePrimitive\";\r\nimport { LineSegment3d } from \"../curve/LineSegment3d\";\r\nimport { Geometry } from \"../Geometry\";\r\nimport { GrowableFloat64Array } from \"../geometry3d/GrowableFloat64Array\";\r\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\r\nimport { IndexedXYZCollection } from \"../geometry3d/IndexedXYZCollection\";\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\r\nimport { Ray3d } from \"../geometry3d/Ray3d\";\r\nimport { GrowableXYZArrayCache } from \"../geometry3d/ReusableObjectCache\";\r\nimport { Segment1d } from \"../geometry3d/Segment1d\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { Matrix4d } from \"../geometry4d/Matrix4d\";\r\nimport { ClipPlane } from \"./ClipPlane\";\r\nimport { Clipper, ClipPlaneContainment, ClipUtilities, PolygonClipper } from \"./ClipUtils\";\r\nimport { ConvexClipPlaneSet, ConvexClipPlaneSetProps } from \"./ConvexClipPlaneSet\";\r\n\r\n/**\r\n * Wire format describing a [[UnionOfConvexClipPlaneSets]].\r\n * @public\r\n */\r\nexport type UnionOfConvexClipPlaneSetsProps = ConvexClipPlaneSetProps[];\r\n\r\n/**\r\n * A collection of ConvexClipPlaneSets.\r\n * * A point is \"in\" the clip plane set if it is \"in\" one or more of the ConvexClipPlaneSets.\r\n * * Hence the boolean logic is that the ClipPlaneSet is a UNION of its constituents.\r\n * @public\r\n */\r\nexport class UnionOfConvexClipPlaneSets implements Clipper, PolygonClipper {\r\n private _convexSets: ConvexClipPlaneSet[];\r\n /** (property accessor) Return the (reference to the) array of `ConvexClipPlaneSet` */\r\n public get convexSets(): ConvexClipPlaneSet[] {\r\n return this._convexSets;\r\n }\r\n private constructor() {\r\n this._convexSets = [];\r\n }\r\n /** Return an array with the `toJSON` form of each `ConvexClipPlaneSet` */\r\n public toJSON(): UnionOfConvexClipPlaneSetsProps {\r\n const val: ConvexClipPlaneSetProps[] = [];\r\n for (const convex of this._convexSets)\r\n val.push(convex.toJSON());\r\n return val;\r\n }\r\n /** Convert json `UnionOfConvexClipPlaneSets`, using `setFromJSON`. */\r\n public static fromJSON(\r\n json: UnionOfConvexClipPlaneSetsProps | undefined, result?: UnionOfConvexClipPlaneSets,\r\n ): UnionOfConvexClipPlaneSets {\r\n result = result ? result : new UnionOfConvexClipPlaneSets();\r\n result._convexSets.length = 0;\r\n if (!Array.isArray(json))\r\n return result;\r\n\r\n for (const thisJson of json)\r\n result._convexSets.push(ConvexClipPlaneSet.fromJSON(thisJson));\r\n return result;\r\n }\r\n /** Create a `UnionOfConvexClipPlaneSets` with no members. */\r\n public static createEmpty(result?: UnionOfConvexClipPlaneSets): UnionOfConvexClipPlaneSets {\r\n if (result) {\r\n result._convexSets.length = 0;\r\n return result;\r\n }\r\n return new UnionOfConvexClipPlaneSets();\r\n }\r\n /**\r\n * Return true if all member convex sets are almostEqual to corresponding members of other. This includes\r\n * identical order in array.\r\n * @param other clip plane to compare.\r\n */\r\n public isAlmostEqual(other: UnionOfConvexClipPlaneSets): boolean {\r\n if (this._convexSets.length !== other._convexSets.length)\r\n return false;\r\n for (let i = 0; i < this._convexSets.length; i++)\r\n if (!this._convexSets[i].isAlmostEqual(other._convexSets[i]))\r\n return false;\r\n return true;\r\n }\r\n /** Create a `UnionOfConvexClipPlaneSets` with given `ConvexClipPlaneSet` members. */\r\n public static createConvexSets(\r\n convexSets: ConvexClipPlaneSet[], result?: UnionOfConvexClipPlaneSets,\r\n ): UnionOfConvexClipPlaneSets {\r\n result = result ? result : new UnionOfConvexClipPlaneSets();\r\n for (const set of convexSets)\r\n result._convexSets.push(set);\r\n return result;\r\n }\r\n /** Return a deep copy. */\r\n public clone(result?: UnionOfConvexClipPlaneSets): UnionOfConvexClipPlaneSets {\r\n result = result ? result : new UnionOfConvexClipPlaneSets();\r\n result._convexSets.length = 0;\r\n for (const convexSet of this._convexSets)\r\n result._convexSets.push(convexSet.clone());\r\n return result;\r\n }\r\n /**\r\n * Append `toAdd` to the array of `ConvexClipPlaneSet`.\r\n * * undefined toAdd is ignored.\r\n */\r\n public addConvexSet(toAdd: ConvexClipPlaneSet | undefined) {\r\n if (toAdd)\r\n this._convexSets.push(toAdd);\r\n }\r\n /**\r\n * Test if there is any intersection with a ray defined by origin and direction.\r\n * * Optionally record the range (null or otherwise) in caller-allocated result.\r\n * * If the ray is unbounded inside the clip, result can contain positive or negative\r\n * \"Geometry.largeCoordinateResult\" values.\r\n * * If no result is provide, there are no object allocations.\r\n * @param maximalRange optional Range1d to receive parameters along the ray.\r\n */\r\n public hasIntersectionWithRay(ray: Ray3d, maximalRange?: Range1d): boolean {\r\n if (maximalRange === undefined) {\r\n // if complete result is not requested, return after any hit.\r\n for (const planeSet of this._convexSets) {\r\n if (planeSet.hasIntersectionWithRay(ray))\r\n return true;\r\n }\r\n return false;\r\n }\r\n maximalRange.setNull();\r\n const rangeA = Range1d.createNull();\r\n for (const planeSet of this._convexSets) {\r\n if (planeSet.hasIntersectionWithRay(ray, rangeA))\r\n maximalRange.extendRange(rangeA);\r\n }\r\n return !maximalRange.isNull;\r\n }\r\n /**\r\n * Return true if true is returned for any contained convex set returns true for\r\n * `convexSet.isPointInside (point, tolerance)`.\r\n */\r\n public isPointInside(point: Point3d): boolean {\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.isPointInside(point)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n /**\r\n * Return true if true is returned for any contained convex set returns true for\r\n * `convexSet.isPointOnOrInside (point, tolerance)`.\r\n */\r\n public isPointOnOrInside(point: Point3d, tolerance: number = Geometry.smallMetricDistance): boolean {\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.isPointOnOrInside(point, tolerance))\r\n return true;\r\n }\r\n return false;\r\n }\r\n /**\r\n * Return true if true is returned for any contained convex set returns true for\r\n * `convexSet.isSphereOnOrInside (point, tolerance)`.\r\n */\r\n public isSphereInside(point: Point3d, radius: number) {\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.isSphereInside(point, radius))\r\n return true;\r\n }\r\n return false;\r\n }\r\n /** Test if any part of a line segment is within the volume. */\r\n public isAnyPointInOrOnFromSegment(segment: LineSegment3d): boolean {\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.announceClippedSegmentIntervals(0.0, 1.0, segment.point0Ref, segment.point1Ref))\r\n return true;\r\n }\r\n return false;\r\n }\r\n // Intervals must be Segment1d array, as there may be multiple intervals along segment that pass through set regions,\r\n // and so splitting the intervals into segments aids in better organization\r\n /** Returns the fractions of the segment that pass through the set region, as 1 dimensional pieces. */\r\n public appendIntervalsFromSegment(segment: LineSegment3d, intervals: Segment1d[]) {\r\n for (const convexSet of this._convexSets) {\r\n convexSet.announceClippedSegmentIntervals(0.0, 1.0, segment.point0Ref, segment.point1Ref,\r\n (fraction0: number, fraction1: number) =>\r\n intervals.push(Segment1d.create(fraction0, fraction1)));\r\n }\r\n }\r\n /** Apply `transform` to all the ConvexClipPlaneSet's. */\r\n public transformInPlace(transform: Transform) {\r\n for (const convexSet of this._convexSets) {\r\n convexSet.transformInPlace(transform);\r\n }\r\n }\r\n /** Returns 1, 2, or 3 based on whether point is strongly inside, ambiguous, or strongly outside respectively. */\r\n public classifyPointContainment(points: Point3d[], onIsOutside: boolean): number {\r\n for (const convexSet of this._convexSets) {\r\n const thisStatus = convexSet.classifyPointContainment(points, onIsOutside);\r\n if (thisStatus !== ClipPlaneContainment.StronglyOutside)\r\n return thisStatus;\r\n }\r\n return ClipPlaneContainment.StronglyOutside;\r\n }\r\n /**\r\n * Clip a polygon to the planes of the clip sets, returning new polygon boundaries.\r\n * * The output polygons may lie next to each other, or be disconnected.\r\n * * For a convex input polygon, the output polygon(s) are also convex.\r\n * * For non-convex input, the output polygon(s) may have double-back edges along plane intersections. This is still a\r\n * valid clip in a parity sense (overlapping regions cancel).\r\n * * This method differs from [[appendPolygonClip]] by clipping the same input polygon with each [[ConvexClipPlaneSet]]\r\n * in the instance, and returning only the inside pieces.\r\n * @param input polygon, usually convex. Unchanged.\r\n * @param output output polygon\r\n * @param work optional work array.\r\n * @param planeToSkip if this plane is found in the convex set, it is NOT applied.\r\n * This is useful when caller knows the polygon lies in one of the instance planes.\r\n * @param tolerance distance tolerance for \"on plane\" decision. Default value is [[Geometry.smallMetricDistance]].\r\n * @see appendPolygonClip\r\n */\r\n public polygonClip(\r\n input: GrowableXYZArray | Point3d[],\r\n output: GrowableXYZArray[],\r\n work?: GrowableXYZArray,\r\n planeToSkip?: ClipPlane,\r\n tolerance: number = Geometry.smallMetricDistance,\r\n ): void {\r\n output.length = 0;\r\n if (Array.isArray(input))\r\n input = GrowableXYZArray.create(input);\r\n if (!work)\r\n work = new GrowableXYZArray();\r\n for (const convexSet of this._convexSets) {\r\n const convexSetOutput = new GrowableXYZArray();\r\n convexSet.polygonClip(input, convexSetOutput, work, planeToSkip, tolerance);\r\n if (convexSetOutput.length !== 0)\r\n output.push(convexSetOutput);\r\n }\r\n }\r\n /** Method from [[Clipper]] interface. */\r\n public announceClippedSegmentIntervals(\r\n f0: number, f1: number, pointA: Point3d, pointB: Point3d, announce?: AnnounceNumberNumber,\r\n ): boolean {\r\n let numAnnounce = 0;\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce))\r\n numAnnounce++;\r\n }\r\n return numAnnounce > 0;\r\n }\r\n private static _clipFractionArray = new GrowableFloat64Array();\r\n /** Method from [[Clipper]] interface. */\r\n public announceClippedArcIntervals(arc: Arc3d, announce?: AnnounceNumberNumberCurvePrimitive): boolean {\r\n const breaks = UnionOfConvexClipPlaneSets._clipFractionArray;\r\n breaks.clear();\r\n for (const convexSet of this._convexSets)\r\n for (const clipPlane of convexSet.planes)\r\n clipPlane.appendIntersectionRadians(arc, breaks);\r\n arc.sweep.radiansArrayToPositivePeriodicFractions(breaks);\r\n return ClipUtilities.selectIntervals01(arc, breaks, this, announce);\r\n }\r\n /** Method from [[Clipper]] interface. */\r\n public announceClippedCurveIntervals(curve: CurvePrimitive, announce?: AnnounceNumberNumberCurvePrimitive): boolean {\r\n const breaks = UnionOfConvexClipPlaneSets._clipFractionArray;\r\n breaks.clear();\r\n const results: CurveLocationDetail[] = [];\r\n for (const convexSet of this._convexSets)\r\n for (const clipPlane of convexSet.planes)\r\n curve.appendPlaneIntersectionPoints(clipPlane, results);\r\n for (const r of results)\r\n breaks.push(r.fraction);\r\n return ClipUtilities.selectIntervals01(curve, breaks, this, announce);\r\n }\r\n /**\r\n * Collect the output from computePlanePlanePlaneIntersections in all the contained convex sets.\r\n * @param points (optional) array to which computed points are to be added.\r\n * @param rangeToExtend (optional) range to be extended by the computed points.\r\n * @param transform (optional) transform to apply to the accepted points.\r\n * @param testContainment if true, test each point to see if it is within the convex set (send false if confident\r\n * that the convex set is rectilinear set such as a slab. Send true if chiseled corners are possible).\r\n * @returns number of points.\r\n */\r\n public computePlanePlanePlaneIntersectionsInAllConvexSets(\r\n points: Point3d[] | undefined, rangeToExtend: Range3d | undefined, transform?: Transform, testContainment: boolean = true,\r\n ): number {\r\n let n = 0;\r\n for (const convexSet of this._convexSets) {\r\n n += convexSet.computePlanePlanePlaneIntersections(points, rangeToExtend, transform, testContainment);\r\n }\r\n return n;\r\n }\r\n /**\r\n * Multiply all ClipPlanes DPoint4d by matrix.\r\n * @param matrix matrix to apply.\r\n * @param invert if true, use in verse of the matrix.\r\n * @param transpose if true, use the transpose of the matrix (or inverse, per invert parameter).\r\n * * Note that if matrixA is applied to all of space, the matrix to send to this method to get a corresponding effect\r\n * on the plane is the inverse transpose of matrixA.\r\n * * Callers that will apply the same matrix to many planes should pre-invert the matrix for efficiency.\r\n * * Both params default to true to get the full effect of transforming space.\r\n * @param matrix matrix to apply\r\n */\r\n public multiplyPlanesByMatrix4d(matrix: Matrix4d, invert: boolean = true, transpose: boolean = true): boolean {\r\n if (invert) { // form inverse once here, reuse for all planes\r\n const inverse = matrix.createInverse();\r\n if (!inverse)\r\n return false;\r\n return this.multiplyPlanesByMatrix4d(inverse, false, transpose);\r\n }\r\n // (no inversion -- no failures possible)\r\n for (const convexSet of this._convexSets) {\r\n convexSet.multiplyPlanesByMatrix4d(matrix, false, transpose);\r\n }\r\n return true;\r\n }\r\n /** Recursively call `setInvisible` on all member convex sets. */\r\n public setInvisible(invisible: boolean) {\r\n for (const convexSet of this._convexSets) {\r\n convexSet.setInvisible(invisible);\r\n }\r\n }\r\n /** add convex sets that accept points below `zLow` and above `zHigh` */\r\n public addOutsideZClipSets(invisible: boolean, zLow?: number, zHigh?: number) {\r\n if (zLow) {\r\n const convexSet = ConvexClipPlaneSet.createEmpty();\r\n convexSet.addZClipPlanes(invisible, zLow);\r\n this._convexSets.push(convexSet);\r\n }\r\n if (zHigh) {\r\n const convexSet = ConvexClipPlaneSet.createEmpty();\r\n convexSet.addZClipPlanes(invisible, undefined, zHigh);\r\n this._convexSets.push(convexSet);\r\n }\r\n }\r\n /** Move convex sets from source.*/\r\n public takeConvexSets(source: UnionOfConvexClipPlaneSets) {\r\n let convexSet;\r\n while ((undefined !== (convexSet = source._convexSets.pop()))) {\r\n this._convexSets.push(convexSet);\r\n }\r\n }\r\n /**\r\n * Implement appendPolygonClip, as defined in interface PolygonClipper.\r\n * * This method differs from [[polygonClip]] by clipping the outside fragments resulting from the previous\r\n * [[ConvexClipPlaneSet]] with the following one, and returning both inside and outside pieces.\r\n * In this way, it always produces disjoint inside fragments, even if the clippers are not disjoint (uncommon).\r\n * @param xyz convex polygon. This is not changed.\r\n * @param insideFragments Array to receive \"inside\" fragments. Each fragment is a GrowableXYZArray grabbed from\r\n * the cache. This is NOT cleared.\r\n * @param outsideFragments Array to receive \"outside\" fragments. Each fragment is a GrowableXYZArray grabbed from\r\n * the cache. This is NOT cleared.\r\n * @param arrayCache cache for reusable GrowableXYZArray.\r\n * @see polygonClip\r\n */\r\n public appendPolygonClip(\r\n xyz: IndexedXYZCollection,\r\n insideFragments: GrowableXYZArray[],\r\n outsideFragments: GrowableXYZArray[],\r\n arrayCache: GrowableXYZArrayCache,\r\n ): void {\r\n const oldOutsideCount = outsideFragments.length;\r\n const oldInsideCount = insideFragments.length;\r\n let carryForwardA = [arrayCache.grabAndFill(xyz)];\r\n let carryForwardB: GrowableXYZArray[] = [];\r\n let tempAB;\r\n let shard;\r\n // At each convex set, carryForwardA is all the fragments that have been outside all previous convex sets.\r\n // Clip each such fragment to the current set, sending the outside parts to carryForwardB, which will got to the next clipper\r\n // The final surviving carryForward really is out.\r\n for (const c of this._convexSets) {\r\n while (undefined !== (shard = carryForwardA.pop())) {\r\n c.appendPolygonClip(shard, insideFragments, carryForwardB, arrayCache);\r\n arrayCache.dropToCache(shard);\r\n }\r\n tempAB = carryForwardB;\r\n carryForwardB = carryForwardA; // and that is empty\r\n carryForwardA = tempAB;\r\n }\r\n while (undefined !== (shard = carryForwardA.pop())) {\r\n outsideFragments.push(shard);\r\n }\r\n if (outsideFragments.length === oldOutsideCount)\r\n ClipUtilities.restoreSingletonInPlaceOfMultipleShards(insideFragments, oldInsideCount, xyz, arrayCache);\r\n else if (insideFragments.length === oldInsideCount)\r\n ClipUtilities.restoreSingletonInPlaceOfMultipleShards(outsideFragments, oldOutsideCount, xyz, arrayCache);\r\n }\r\n}\r\n\r\n/* FUNCTIONS SKIPPED DUE TO BSPLINES, VU, OR NON-USAGE IN NATIVE CODE----------------------------------------------------------------\r\n\r\nInvolves vu: skipping for now...\r\n public fromSweptPolygon(points: Point3d[], directions: Vector3d[]): ClipPlaneSet;\r\n public parseConcavePolygonPlanes(...)\r\n\r\nUses bsplines... skipping for now:\r\n public appendIntervalsClipPlaneSetFromCurve();\r\n\r\nUses bsplines... skipping for now:\r\n public isAnyPointInOrOnFrom();\r\n\r\nSkipped fromSweptPolygon(...), which is overloaded function from first, due to presence of vu\r\n public fromSweptPolygon(points: Point3d[], directions: Vector3d[], shapes: Point3d[])\r\n*/\r\n"]}
@@ -378,13 +378,13 @@ export declare abstract class CurvePrimitive extends GeometryQuery {
378
378
  */
379
379
  closestTangent(spacePoint: Point3d, options?: TangentOptions): CurveLocationDetail | undefined;
380
380
  /**
381
- * Find intervals of this curvePrimitive that are interior to a clipper
381
+ * Find intervals of this curve that are interior to the clipper.
382
+ * * Default implementation calls `clipper.announceClippedCurveIntervals`; subclasses can implement more efficiently as necessary.
382
383
  * @param clipper clip structure (e.g. clip planes)
383
- * @param announce (optional) function to be called announcing fractional intervals
384
- * `announce(fraction0, fraction1, curvePrimitive)`
384
+ * @param announce (optional) called to announce each fractional interval: `announce(fraction0, fraction1, this)`
385
385
  * @returns true if any "in" segments are announced.
386
386
  */
387
- announceClipIntervals(_clipper: Clipper, _announce?: AnnounceNumberNumberCurvePrimitive): boolean;
387
+ announceClipIntervals(clipper: Clipper, announce?: AnnounceNumberNumberCurvePrimitive): boolean;
388
388
  /** Return a deep clone. */
389
389
  abstract clone(): CurvePrimitive;
390
390
  /** Return a transformed deep clone. */
@@ -1 +1 @@
1
- {"version":3,"file":"CurvePrimitive.d.ts","sourceRoot":"","sources":["../../../src/curve/CurvePrimitive.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAuB,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE/E,OAAO,EAAE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,KAAK,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAqB,mBAAmB,EAAqB,MAAM,uBAAuB,CAAC;AAClG,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKhD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC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;;;;OAYG;IACI,qCAAqC,CAAC,OAAO,CAAC,EAAE,aAAa,EAAE,SAAS,CAAC,EAAE,cAAc;IAQhG;;;;;;;;;;;OAWG;IACI,8BAA8B,CAAC,GAAG,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,GAAG,MAAM;IAU5F;;;;;OAKG;WACW,qBAAqB,CAAC,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,cAAc;IAK/G;;;;;;;;OAQG;IACI,wBAAwB,CAC7B,cAAc,EAAE,cAAc,EAAE,EAAE,2BAA2B,EAAE,OAAO,EAAE,mBAAmB,GAAE,OAAe,GAC3G,IAAI;IAGP;;;;;;;;OAQG;IACI,sBAAsB,CAC3B,cAAc,CAAC,EAAE,cAAc,EAAE,EAAE,0BAA0B,GAAE,OAAe,EAAE,kBAAkB,GAAE,OAAe,GAClH,cAAc,EAAE;IAKnB;;;;;;OAMG;aACa,iBAAiB,CAC/B,uBAAuB,EAAE,MAAM,GAAG,aAAa,GAC9C,cAAc,GAAG,cAAc,EAAE,GAAG,SAAS;IAEhD;;;;;;;OAOG;IACI,uBAAuB,CAAC,IAAI,EAAE,QAAQ,GAAG,KAAK,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS;CAGhG"}
@@ -492,15 +492,14 @@ export class CurvePrimitive extends GeometryQuery {
492
492
  return closestTangent;
493
493
  }
494
494
  /**
495
- * Find intervals of this curvePrimitive that are interior to a clipper
495
+ * Find intervals of this curve that are interior to the clipper.
496
+ * * Default implementation calls `clipper.announceClippedCurveIntervals`; subclasses can implement more efficiently as necessary.
496
497
  * @param clipper clip structure (e.g. clip planes)
497
- * @param announce (optional) function to be called announcing fractional intervals
498
- * `announce(fraction0, fraction1, curvePrimitive)`
498
+ * @param announce (optional) called to announce each fractional interval: `announce(fraction0, fraction1, this)`
499
499
  * @returns true if any "in" segments are announced.
500
500
  */
501
- announceClipIntervals(_clipper, _announce) {
502
- // DEFAULT IMPLEMENTATION -- no interior parts
503
- return false;
501
+ announceClipIntervals(clipper, announce) {
502
+ return clipper.announceClippedCurveIntervals?.(this, announce) ?? false;
504
503
  }
505
504
  /**
506
505
  * Return (if possible) a curve primitive which is a portion of this curve.