@itwin/core-geometry 4.0.0-dev.6 → 4.0.0-dev.8

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 (119) hide show
  1. package/lib/cjs/Geometry.d.ts +3 -3
  2. package/lib/cjs/Geometry.d.ts.map +1 -1
  3. package/lib/cjs/Geometry.js +27 -11
  4. package/lib/cjs/Geometry.js.map +1 -1
  5. package/lib/cjs/curve/CurveCurve.d.ts +11 -8
  6. package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
  7. package/lib/cjs/curve/CurveCurve.js +16 -12
  8. package/lib/cjs/curve/CurveCurve.js.map +1 -1
  9. package/lib/cjs/curve/CurveCurveIntersectXY.d.ts +5 -1
  10. package/lib/cjs/curve/CurveCurveIntersectXY.d.ts.map +1 -1
  11. package/lib/cjs/curve/CurveCurveIntersectXY.js +11 -10
  12. package/lib/cjs/curve/CurveCurveIntersectXY.js.map +1 -1
  13. package/lib/cjs/geometry3d/Angle.d.ts +18 -0
  14. package/lib/cjs/geometry3d/Angle.d.ts.map +1 -1
  15. package/lib/cjs/geometry3d/Angle.js +38 -0
  16. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  17. package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts +1 -0
  18. package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
  19. package/lib/cjs/geometry3d/CoincidentGeometryOps.js +3 -0
  20. package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
  21. package/lib/cjs/geometry3d/Matrix3d.d.ts +171 -118
  22. package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
  23. package/lib/cjs/geometry3d/Matrix3d.js +448 -417
  24. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  25. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +12 -13
  26. package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
  27. package/lib/cjs/geometry3d/Point3dVector3d.js +15 -13
  28. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  29. package/lib/cjs/geometry3d/Segment1d.d.ts +1 -1
  30. package/lib/cjs/geometry3d/Segment1d.js +1 -1
  31. package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
  32. package/lib/cjs/numerics/Polynomials.d.ts +12 -0
  33. package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
  34. package/lib/cjs/numerics/Polynomials.js +14 -0
  35. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  36. package/lib/cjs/polyface/PolyfaceBuilder.d.ts +1 -0
  37. package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
  38. package/lib/cjs/polyface/PolyfaceBuilder.js +46 -6
  39. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  40. package/lib/cjs/polyface/PolyfaceQuery.d.ts +54 -0
  41. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  42. package/lib/cjs/polyface/PolyfaceQuery.js +71 -1
  43. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  44. package/lib/cjs/polyface/multiclip/OffsetMeshContext.d.ts +202 -0
  45. package/lib/cjs/polyface/multiclip/OffsetMeshContext.d.ts.map +1 -0
  46. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js +1038 -0
  47. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -0
  48. package/lib/cjs/serialization/GeometrySamples.d.ts +4 -1
  49. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  50. package/lib/cjs/serialization/GeometrySamples.js +14 -6
  51. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  52. package/lib/cjs/topology/Graph.d.ts +113 -7
  53. package/lib/cjs/topology/Graph.d.ts.map +1 -1
  54. package/lib/cjs/topology/Graph.js +185 -7
  55. package/lib/cjs/topology/Graph.js.map +1 -1
  56. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +38 -0
  57. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts.map +1 -0
  58. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js +82 -0
  59. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -0
  60. package/lib/esm/Geometry.d.ts +3 -3
  61. package/lib/esm/Geometry.d.ts.map +1 -1
  62. package/lib/esm/Geometry.js +27 -11
  63. package/lib/esm/Geometry.js.map +1 -1
  64. package/lib/esm/curve/CurveCurve.d.ts +11 -8
  65. package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
  66. package/lib/esm/curve/CurveCurve.js +16 -12
  67. package/lib/esm/curve/CurveCurve.js.map +1 -1
  68. package/lib/esm/curve/CurveCurveIntersectXY.d.ts +5 -1
  69. package/lib/esm/curve/CurveCurveIntersectXY.d.ts.map +1 -1
  70. package/lib/esm/curve/CurveCurveIntersectXY.js +11 -10
  71. package/lib/esm/curve/CurveCurveIntersectXY.js.map +1 -1
  72. package/lib/esm/geometry3d/Angle.d.ts +18 -0
  73. package/lib/esm/geometry3d/Angle.d.ts.map +1 -1
  74. package/lib/esm/geometry3d/Angle.js +38 -0
  75. package/lib/esm/geometry3d/Angle.js.map +1 -1
  76. package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts +1 -0
  77. package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
  78. package/lib/esm/geometry3d/CoincidentGeometryOps.js +3 -0
  79. package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
  80. package/lib/esm/geometry3d/Matrix3d.d.ts +171 -118
  81. package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
  82. package/lib/esm/geometry3d/Matrix3d.js +448 -417
  83. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  84. package/lib/esm/geometry3d/Point3dVector3d.d.ts +12 -13
  85. package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
  86. package/lib/esm/geometry3d/Point3dVector3d.js +15 -13
  87. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  88. package/lib/esm/geometry3d/Segment1d.d.ts +1 -1
  89. package/lib/esm/geometry3d/Segment1d.js +1 -1
  90. package/lib/esm/geometry3d/Segment1d.js.map +1 -1
  91. package/lib/esm/numerics/Polynomials.d.ts +12 -0
  92. package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
  93. package/lib/esm/numerics/Polynomials.js +14 -0
  94. package/lib/esm/numerics/Polynomials.js.map +1 -1
  95. package/lib/esm/polyface/PolyfaceBuilder.d.ts +1 -0
  96. package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
  97. package/lib/esm/polyface/PolyfaceBuilder.js +46 -6
  98. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  99. package/lib/esm/polyface/PolyfaceQuery.d.ts +54 -0
  100. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  101. package/lib/esm/polyface/PolyfaceQuery.js +69 -0
  102. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  103. package/lib/esm/polyface/multiclip/OffsetMeshContext.d.ts +202 -0
  104. package/lib/esm/polyface/multiclip/OffsetMeshContext.d.ts.map +1 -0
  105. package/lib/esm/polyface/multiclip/OffsetMeshContext.js +1032 -0
  106. package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -0
  107. package/lib/esm/serialization/GeometrySamples.d.ts +4 -1
  108. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  109. package/lib/esm/serialization/GeometrySamples.js +14 -6
  110. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  111. package/lib/esm/topology/Graph.d.ts +113 -7
  112. package/lib/esm/topology/Graph.d.ts.map +1 -1
  113. package/lib/esm/topology/Graph.js +185 -7
  114. package/lib/esm/topology/Graph.js.map +1 -1
  115. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +38 -0
  116. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts.map +1 -0
  117. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js +78 -0
  118. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -0
  119. package/package.json +4 -4
@@ -66,6 +66,32 @@ export declare type HalfEdgeAndMaskToBooleanFunction = (node: HalfEdge, mask: Ha
66
66
  * @internal
67
67
  */
68
68
  export declare type GraphNodeFunction = (graph: HalfEdgeGraph, node: HalfEdge) => boolean;
69
+ /** Non-topological data members in a half edge.
70
+ * These are not part of adjacency and masking logic.
71
+ */
72
+ /** member fields for a half edge (which is also commonly called a node)
73
+ * @internal
74
+ */
75
+ export interface HalfEdgeUserData {
76
+ /** Vertex x coordinate */
77
+ x: number;
78
+ /** Vertex y coordinate */
79
+ y: number;
80
+ /** Vertex z coordinate */
81
+ z: number;
82
+ /** angle used for sort-around-vertex */
83
+ sortAngle?: number;
84
+ /** numeric value for application-specific tagging (e.g. sorting) */
85
+ sortData?: number;
86
+ /** application-specific data for the edge identifier.
87
+ * * edge split operations are expected to copy this to new sub-edges.
88
+ */
89
+ edgeTag?: any;
90
+ /** application-specific data for the face loop
91
+ * * edge split operations are expected to copy this to new sub-edges.
92
+ */
93
+ faceTag?: any;
94
+ }
69
95
  /**
70
96
  *
71
97
  * * A HalfEdge is "one side of an edge" in a structure of faces, edges and vertices. From a node there are navigational links to:
@@ -82,7 +108,7 @@ export declare type GraphNodeFunction = (graph: HalfEdgeGraph, node: HalfEdge) =
82
108
  * of graph manipulation.
83
109
  * @internal
84
110
  */
85
- export declare class HalfEdge {
111
+ export declare class HalfEdge implements HalfEdgeUserData {
86
112
  /** Vertex index in some parent object's numbering. */
87
113
  i: number;
88
114
  /** bitmask bits, used to mark nodes as part of a triangle(idx 0) or visited when flipping(idx 1) */
@@ -101,6 +127,10 @@ export declare class HalfEdge {
101
127
  * * edge split operations are expected to copy this to new sub-edges.
102
128
  */
103
129
  edgeTag?: any;
130
+ /** application-specific data for the face loop
131
+ * * edge split operations are expected to copy this to new sub-edges.
132
+ */
133
+ faceTag?: any;
104
134
  private _id;
105
135
  /** id assigned sequentially during construction --- useful for debugging. */
106
136
  get id(): any;
@@ -156,6 +186,18 @@ export declare class HalfEdge {
156
186
  * @returns Returns the reference to the half edge created.
157
187
  */
158
188
  static splitEdge(baseA: undefined | HalfEdge, xA: number | undefined, yA: number | undefined, zA: number | undefined, iA: number | undefined, heArray: HalfEdge[] | undefined): HalfEdge;
189
+ /**
190
+ * * Create a new sliver face "inside" an existing edge.
191
+ * * Insert it "within" the base edge.
192
+ * * This requires two new half edges.
193
+ * * if the base is undefined, create a single-edge loop.
194
+ * * This (unlike pinch) breaks the edgeMate pairing of the base edge.
195
+ * * This preserves xyz and i properties at all existing vertices.
196
+ * * The two new half edges are a sliver face (via their predecessor and successor)
197
+ * * Each new edge mates to one existing edge.
198
+ * @returns Returns the reference to the half edge created.
199
+ */
200
+ static splitEdgeCreateSliverFace(baseA: HalfEdge, heArray: HalfEdge[] | undefined): HalfEdge;
159
201
  private static _edgePropertyMasks;
160
202
  /**
161
203
  * Copy "edge based" content of fromNode to toNode
@@ -238,6 +280,12 @@ export declare class HalfEdge {
238
280
  countMaskAroundFace(mask: HalfEdgeMask, value?: boolean): number;
239
281
  /** Returns the number of nodes found with the given mask value around this vertex loop. */
240
282
  countMaskAroundVertex(mask: HalfEdgeMask, value?: boolean): number;
283
+ /** Returns the first node with given mask value around this vertex loop. */
284
+ findMaskAroundVertex(mask: HalfEdgeMask, value?: boolean): HalfEdge | undefined;
285
+ /** Returns the first node with given mask value around this face loop. */
286
+ findMaskAroundFace(mask: HalfEdgeMask, value?: boolean): HalfEdge | undefined;
287
+ /** Returns the first node with given mask value on this edge (i.e. examining this and this.mate) */
288
+ findMaskAroundEdge(mask: HalfEdgeMask, value?: boolean): HalfEdge | undefined;
241
289
  /** Set a mask, and return prior value.
242
290
  * @param mask mask to apply
243
291
  */
@@ -247,6 +295,11 @@ export declare class HalfEdge {
247
295
  * @param node node containing xyz
248
296
  */
249
297
  setXYZFrom(node: HalfEdge): void;
298
+ /**
299
+ * Set (copy) the this.x, this.y, this.z from xyz.x, xyz.y, xyz.z
300
+ * @param node source with x,y,z properties
301
+ */
302
+ setXYZ(xyz: XYAndZ): void;
250
303
  /**
251
304
  * Test if mask bits are set in the node's bitMask.
252
305
  * @return Return true (as a simple boolean, not a mask) if any bits of the mask parameter match bits of the node's bitMask
@@ -304,6 +357,8 @@ export declare class HalfEdge {
304
357
  };
305
358
  /** Return the [id, [x,y]] of a node. Useful for collector methods. */
306
359
  static nodeToIdXYString(node: HalfEdge): string;
360
+ /** Return the [id, [x,y],z] of a node. Useful for collector methods. */
361
+ static nodeToIdXYZString(node: HalfEdge): string;
307
362
  /** Create a string representation of the mask
308
363
  * * Null mask is empty string.
309
364
  * * Appended characters B,P,X for Boundary, Primary, Exterior mask bits.
@@ -315,6 +370,8 @@ export declare class HalfEdge {
315
370
  vectorToFaceSuccessorXY(result?: Vector2d): Vector2d;
316
371
  /** Return Vector3d to face successor */
317
372
  vectorToFaceSuccessor(result?: Vector3d): Vector3d;
373
+ /** Return Vector3d to face successor */
374
+ vectorToFacePredecessor(result?: Vector3d): Vector3d;
318
375
  /** test if spaceNode is in the sector at sectorNode */
319
376
  static isNodeVisibleInSector(spaceNode: HalfEdge, sectorNode: HalfEdge): boolean;
320
377
  /** Returns Return cross product (2d) of vectors from baseA to targetA and baseB to targetB */
@@ -350,6 +407,10 @@ export declare class HalfEdge {
350
407
  static testNodeMaskNotExterior(node: HalfEdge): boolean;
351
408
  /** Returns Returns true if the node does NOT have Mask.EXTERIOR_MASK set. */
352
409
  static testMateMaskExterior(node: HalfEdge): boolean;
410
+ /** Returns radians between this edge and its face predecessor edge, using all three coordinates x,y,z and given normal to resolve sweep direction.
411
+ * * The returned angle is positive, i.e. may be larger than PI radians.
412
+ */
413
+ static sectorSweepRadiansXYZ(node: HalfEdge, normal: Vector3d): number;
353
414
  /** Returns Returns true if the face has positive area in xy parts. */
354
415
  static testFacePositiveAreaXY(node: HalfEdge): boolean;
355
416
  /** Return true if x and y coordinates of this and other are exactly equal */
@@ -365,6 +426,14 @@ export declare class HalfEdge {
365
426
  * @returns Return the array of function values.
366
427
  */
367
428
  collectAroundFace(f?: NodeFunction): any[];
429
+ /**
430
+ * search around a vertex for nodes that have a specified mask setting.
431
+ * @param vertexSeed first node to search
432
+ * @param mask target mask
433
+ * @param value target value for mask on half edges.
434
+ * @param collectedNodes optional array to be cleared and receive masked nodes
435
+ */
436
+ collectMaskedEdgesAroundVertex(mask: HalfEdgeMask, value?: boolean, result?: HalfEdge[]): HalfEdge[];
368
437
  /**
369
438
  *
370
439
  * * Evaluate f(node) at each outbound node around this node's vertex loop.
@@ -460,18 +529,25 @@ export declare class HalfEdge {
460
529
  * * If the edge is horizontal with (approximate) identical y, return the node.
461
530
  * * If the edge is horizontal with different y, return undefined.
462
531
  * * If the edge is not horizontal, return the fractional position (possibly outside 0..1) of the intersection.
463
- * @param nodeA Base node of edge
464
- * @param result optional preallocated result
532
+ * @param node0 Base node of edge
465
533
  */
466
534
  static horizontalScanFraction(node0: HalfEdge, y: number): number | undefined | HalfEdge;
467
535
  /**
468
536
  * * Compute fractional coordinates of the intersection of a horizontal line with an edge.
469
537
  * * If the edge is horizontal return undefined (no test for horizontal at y!!!)
470
538
  * * If the edge is not horizontal and y is between its end y's, return the fraction
471
- * @param nodeA Base node of edge
472
- * @param result optional preallocated result
539
+ * @param node0 Base node of edge
473
540
  */
474
541
  static horizontalScanFraction01(node0: HalfEdge, y: number): number | undefined;
542
+ /**
543
+ * Copy various data from source to this.
544
+ * @param source other half edge.
545
+ * @param XYZ copy simple coordinates
546
+ * @param copyVertexData true to copy data belonging to the vertex. (i.e. the "i" member)
547
+ * @param copyVertexData true to copy data belonging to the edge. (i.e. call transferEdgeData)
548
+ * @param copyFaceData true to copy faceTag
549
+ */
550
+ copyDataFrom(source: HalfEdge, copyXYZ: boolean, copyVertexData: boolean, copyEdgeData: boolean, copyFaceData: boolean): void;
475
551
  }
476
552
  /**
477
553
  * A HalfEdgeGraph has:
@@ -501,6 +577,16 @@ export declare class HalfEdgeGraph {
501
577
  * @returns Return pointer to the first half edge created.
502
578
  */
503
579
  createEdgeXYZXYZ(xA?: number, yA?: number, zA?: number, iA?: number, xB?: number, yB?: number, zB?: number, iB?: number): HalfEdge;
580
+ /**
581
+ * * Create 2 half edges forming 2 vertices, 1 edge, and 1 face
582
+ * * The two edges are joined as edgeMate pair.
583
+ * * The two edges are a 2-half-edge face loop in both the faceSuccessor and facePredecessor directions.
584
+ * * The two edges are added to the graph's HalfEdge set
585
+ * * Coordinates are set to zero.
586
+ * * ids are installed in the two half edges.
587
+ * @returns Return pointer to the first half edge created. (This has idA as its id.)
588
+ */
589
+ createEdgeIdId(iA?: number, iB?: number): HalfEdge;
504
590
  /**
505
591
  * * create an edge from coordinates x,y,z to (the tail of) an existing half edge.
506
592
  * @returns Return pointer to the half edge with tail at x,y,z
@@ -528,6 +614,17 @@ export declare class HalfEdgeGraph {
528
614
  * @returns Returns the reference to the half edge created.
529
615
  */
530
616
  splitEdge(base: undefined | HalfEdge, xA?: number, yA?: number, zA?: number, iA?: number): HalfEdge;
617
+ /**
618
+ * * Create a sliver face "within" an edge.
619
+ * * this creates two half edges.
620
+ * * The existing edges both stay in their same face loops and retain coordinates and i value.
621
+ * * Each existing edge's mate is a new edge (rather than original mate)
622
+ * * Coordinates are copied to the new edges at respective vertices.
623
+ * * New faceTag and edgeTag undefined.
624
+ * * i members are copied around their respective vertices.
625
+ * @returns Returns the reference to the half edge created.
626
+ */
627
+ splitEdgeCreateSliverFace(base: HalfEdge): HalfEdge;
531
628
  /**
532
629
  * * Insert a vertex in the edge beginning at base, with coordinates specified as a fraction along the existing edge.
533
630
  * * this creates two half edges.
@@ -585,6 +682,15 @@ export declare class HalfEdgeGraph {
585
682
  * @param announceFace function to apply at one node of each face.
586
683
  */
587
684
  announceFaceLoops(announceFace: GraphNodeFunction): void;
685
+ /**
686
+ * * Visit each edge of the graph once.
687
+ * * Call the announceEdge function.
688
+ * * the edge mate will NOT appear in an announceEdge call.
689
+ * * continue search if announceEdge(graph, node) returns true
690
+ * * terminate search if announceEdge (graph, node) returns false
691
+ * @param announceEdge function to apply at one node of each edge.
692
+ */
693
+ announceEdges(announceEdge: GraphNodeFunction): void;
588
694
  /**
589
695
  * * Visit each vertex loop of the graph once.
590
696
  * * Call the announceVertex function
@@ -594,8 +700,8 @@ export declare class HalfEdgeGraph {
594
700
  */
595
701
  announceVertexLoops(announceVertex: GraphNodeFunction): void;
596
702
  /**
597
- * * Visit each vertex loop of the graph once.
598
- * * Call the announceVertex function
703
+ * * Visit each half edge (node) of the graph once.
704
+ * * Call the announceNode function
599
705
  * * continue search if announceNode(graph, node) returns true
600
706
  * * terminate search if announce face (graph, node) returns false
601
707
  * @param announceNode function to apply at one node of each face.
@@ -1 +1 @@
1
- {"version":3,"file":"Graph.d.ts","sourceRoot":"","sources":["../../../src/topology/Graph.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AASvD;;;;;;;;;;GAUG;AACH,oBAAY,YAAY;IACtB;;;;OAIG;IACH,QAAQ,IAAa;IACrB;;;OAGG;IACH,aAAa,IAAa;IAS1B;;OAEG;IACH,YAAY,IAAa;IAEzB,4EAA4E;IAC5E,OAAO,KAAY;IAEnB,uDAAuD;IACvD,iBAAiB,MAAa;IAC9B,2CAA2C;IAC3C,SAAS,MAAa;IAEtB,mBAAmB;IACnB,SAAS,IAAa;IACtB,8CAA8C;IAC9C,mBAAmB,aAAa;IAChC,oBAAoB;I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d");
12
12
  const Geometry_1 = require("../Geometry");
13
+ const Angle_1 = require("../geometry3d/Angle");
13
14
  const Point2dVector2d_1 = require("../geometry3d/Point2dVector2d");
14
15
  const Point3dVector3d_1 = require("../geometry3d/Point3dVector3d");
15
16
  const Polynomials_1 = require("../numerics/Polynomials");
@@ -101,6 +102,7 @@ class HalfEdge {
101
102
  this.sortAngle = undefined;
102
103
  this.sortData = undefined;
103
104
  this.edgeTag = undefined;
105
+ this.faceTag = undefined;
104
106
  // Always created in pairs, init here to make TS compiler and JS runtime happy
105
107
  this._facePredecessor = this;
106
108
  this._faceSuccessor = this;
@@ -221,6 +223,36 @@ class HalfEdge {
221
223
  }
222
224
  return newA;
223
225
  }
226
+ /**
227
+ * * Create a new sliver face "inside" an existing edge.
228
+ * * Insert it "within" the base edge.
229
+ * * This requires two new half edges.
230
+ * * if the base is undefined, create a single-edge loop.
231
+ * * This (unlike pinch) breaks the edgeMate pairing of the base edge.
232
+ * * This preserves xyz and i properties at all existing vertices.
233
+ * * The two new half edges are a sliver face (via their predecessor and successor)
234
+ * * Each new edge mates to one existing edge.
235
+ * @returns Returns the reference to the half edge created.
236
+ */
237
+ static splitEdgeCreateSliverFace(baseA, heArray) {
238
+ // raw edges ...
239
+ const newA = new HalfEdge();
240
+ const newB = new HalfEdge();
241
+ const baseB = baseA.edgeMate;
242
+ if (heArray) {
243
+ heArray.push(newA);
244
+ heArray.push(newB);
245
+ }
246
+ newA._faceSuccessor = newA._facePredecessor = newB;
247
+ newB._faceSuccessor = newB._facePredecessor = newA;
248
+ // newA is in vertex loop with baseA etc.
249
+ // newA mates to baseB
250
+ HalfEdge.setEdgeMates(newA, baseB);
251
+ HalfEdge.setEdgeMates(newB, baseA);
252
+ newA.copyDataFrom(baseA, true, true, false, false);
253
+ newB.copyDataFrom(baseB, true, true, false, false);
254
+ return newA;
255
+ }
224
256
  /**
225
257
  * Copy "edge based" content of fromNode to toNode
226
258
  * * edgeTag
@@ -431,6 +463,35 @@ class HalfEdge {
431
463
  }
432
464
  return count;
433
465
  }
466
+ /** Returns the first node with given mask value around this vertex loop. */
467
+ findMaskAroundVertex(mask, value = true) {
468
+ let node = this;
469
+ do {
470
+ if (node.isMaskSet(mask) === value)
471
+ return node;
472
+ node = node.vertexSuccessor;
473
+ } while (node !== this);
474
+ return undefined;
475
+ }
476
+ /** Returns the first node with given mask value around this face loop. */
477
+ findMaskAroundFace(mask, value = true) {
478
+ let node = this;
479
+ do {
480
+ if (node.isMaskSet(mask) === value)
481
+ return node;
482
+ node = node.faceSuccessor;
483
+ } while (node !== this);
484
+ return undefined;
485
+ }
486
+ /** Returns the first node with given mask value on this edge (i.e. examining this and this.mate) */
487
+ findMaskAroundEdge(mask, value = true) {
488
+ if (this.isMaskSet(mask) === value)
489
+ return this;
490
+ const mate = this.edgeMate;
491
+ if (mate.isMaskSet(mask) === value)
492
+ return mate;
493
+ return undefined;
494
+ }
434
495
  /** Set a mask, and return prior value.
435
496
  * @param mask mask to apply
436
497
  */
@@ -448,6 +509,15 @@ class HalfEdge {
448
509
  this.y = node.y;
449
510
  this.z = node.z;
450
511
  }
512
+ /**
513
+ * Set (copy) the this.x, this.y, this.z from xyz.x, xyz.y, xyz.z
514
+ * @param node source with x,y,z properties
515
+ */
516
+ setXYZ(xyz) {
517
+ this.x = xyz.x;
518
+ this.y = xyz.y;
519
+ this.z = xyz.z;
520
+ }
451
521
  /**
452
522
  * Test if mask bits are set in the node's bitMask.
453
523
  * @return Return true (as a simple boolean, not a mask) if any bits of the mask parameter match bits of the node's bitMask
@@ -537,6 +607,10 @@ class HalfEdge {
537
607
  const s = `${node.id.toString()}+${HalfEdge.nodeToMaskString(node)}[${node.x},${node.y}]`;
538
608
  return s;
539
609
  }
610
+ /** Return the [id, [x,y],z] of a node. Useful for collector methods. */
611
+ static nodeToIdXYZString(node) {
612
+ return `[${node.id.toString()}: ${node.x},${node.y},${node.z}]`;
613
+ }
540
614
  /** Create a string representation of the mask
541
615
  * * Null mask is empty string.
542
616
  * * Appended characters B,P,X for Boundary, Primary, Exterior mask bits.
@@ -561,7 +635,13 @@ class HalfEdge {
561
635
  }
562
636
  /** Return Vector3d to face successor */
563
637
  vectorToFaceSuccessor(result) {
564
- return Point3dVector3d_1.Vector3d.create(this.faceSuccessor.x - this.x, this.faceSuccessor.y - this.y, this.faceSuccessor.z - this.z, result);
638
+ const other = this.faceSuccessor;
639
+ return Point3dVector3d_1.Vector3d.create(other.x - this.x, other.y - this.y, other.z - this.z, result);
640
+ }
641
+ /** Return Vector3d to face successor */
642
+ vectorToFacePredecessor(result) {
643
+ const other = this.facePredecessor;
644
+ return Point3dVector3d_1.Vector3d.create(other.x - this.x, other.y - this.y, other.z - this.z, result);
565
645
  }
566
646
  /** test if spaceNode is in the sector at sectorNode */
567
647
  static isNodeVisibleInSector(spaceNode, sectorNode) {
@@ -685,6 +765,14 @@ class HalfEdge {
685
765
  static testNodeMaskNotExterior(node) { return !node.isMaskSet(HalfEdgeMask.EXTERIOR); }
686
766
  /** Returns Returns true if the node does NOT have Mask.EXTERIOR_MASK set. */
687
767
  static testMateMaskExterior(node) { return node.edgeMate.isMaskSet(HalfEdgeMask.EXTERIOR); }
768
+ /** Returns radians between this edge and its face predecessor edge, using all three coordinates x,y,z and given normal to resolve sweep direction.
769
+ * * The returned angle is positive, i.e. may be larger than PI radians.
770
+ */
771
+ static sectorSweepRadiansXYZ(node, normal) {
772
+ const nodeB = node.faceSuccessor;
773
+ const nodeC = node.facePredecessor;
774
+ return Angle_1.Angle.orientedRadiansBetweenVectorsXYZ(nodeB.x - node.x, nodeB.y - node.y, nodeB.z - node.z, nodeC.x - node.x, nodeC.y - node.y, nodeC.z - node.z, normal.x, normal.y, normal.z, true);
775
+ }
688
776
  /** Returns Returns true if the face has positive area in xy parts. */
689
777
  static testFacePositiveAreaXY(node) {
690
778
  return node.countEdgesAroundFace() > 2 && node.signedFaceArea() > 0.0;
@@ -716,6 +804,26 @@ class HalfEdge {
716
804
  } while (node !== this);
717
805
  return nodes;
718
806
  }
807
+ /**
808
+ * search around a vertex for nodes that have a specified mask setting.
809
+ * @param vertexSeed first node to search
810
+ * @param mask target mask
811
+ * @param value target value for mask on half edges.
812
+ * @param collectedNodes optional array to be cleared and receive masked nodes
813
+ */
814
+ collectMaskedEdgesAroundVertex(mask, value = true, result) {
815
+ if (result === undefined)
816
+ result = [];
817
+ else
818
+ result.length = 0;
819
+ let node = this;
820
+ do {
821
+ if (node.isMaskSet(mask) === value)
822
+ result.push(node);
823
+ node = node.vertexSuccessor;
824
+ } while (node !== this);
825
+ return result;
826
+ }
719
827
  /**
720
828
  *
721
829
  * * Evaluate f(node) at each outbound node around this node's vertex loop.
@@ -908,8 +1016,7 @@ class HalfEdge {
908
1016
  * * If the edge is horizontal with (approximate) identical y, return the node.
909
1017
  * * If the edge is horizontal with different y, return undefined.
910
1018
  * * If the edge is not horizontal, return the fractional position (possibly outside 0..1) of the intersection.
911
- * @param nodeA Base node of edge
912
- * @param result optional preallocated result
1019
+ * @param node0 Base node of edge
913
1020
  */
914
1021
  static horizontalScanFraction(node0, y) {
915
1022
  const node1 = node0.faceSuccessor;
@@ -924,8 +1031,7 @@ class HalfEdge {
924
1031
  * * Compute fractional coordinates of the intersection of a horizontal line with an edge.
925
1032
  * * If the edge is horizontal return undefined (no test for horizontal at y!!!)
926
1033
  * * If the edge is not horizontal and y is between its end y's, return the fraction
927
- * @param nodeA Base node of edge
928
- * @param result optional preallocated result
1034
+ * @param node0 Base node of edge
929
1035
  */
930
1036
  static horizontalScanFraction01(node0, y) {
931
1037
  const node1 = node0.faceSuccessor;
@@ -939,6 +1045,31 @@ class HalfEdge {
939
1045
  return fraction;
940
1046
  return undefined;
941
1047
  }
1048
+ /**
1049
+ * Copy various data from source to this.
1050
+ * @param source other half edge.
1051
+ * @param XYZ copy simple coordinates
1052
+ * @param copyVertexData true to copy data belonging to the vertex. (i.e. the "i" member)
1053
+ * @param copyVertexData true to copy data belonging to the edge. (i.e. call transferEdgeData)
1054
+ * @param copyFaceData true to copy faceTag
1055
+ */
1056
+ copyDataFrom(source, copyXYZ, copyVertexData, copyEdgeData, copyFaceData) {
1057
+ if (copyXYZ) {
1058
+ this.x = source.x;
1059
+ this.y = source.y;
1060
+ this.z = source.z;
1061
+ }
1062
+ if (copyVertexData) {
1063
+ this.i = source.i;
1064
+ }
1065
+ if (copyEdgeData) {
1066
+ HalfEdge.transferEdgeProperties(source, this);
1067
+ this.edgeTag = source.edgeTag;
1068
+ }
1069
+ if (copyFaceData) {
1070
+ this.faceTag = source.faceTag;
1071
+ }
1072
+ }
942
1073
  }
943
1074
  exports.HalfEdge = HalfEdge;
944
1075
  HalfEdge._edgePropertyMasks = [HalfEdgeMask.BOUNDARY_EDGE, HalfEdgeMask.EXTERIOR, HalfEdgeMask.PRIMARY_EDGE, HalfEdgeMask.NULL_FACE];
@@ -980,6 +1111,19 @@ class HalfEdgeGraph {
980
1111
  const a = HalfEdge.createHalfEdgePairWithCoordinates(xA, yA, zA, iA, xB, yB, zB, iB, this.allHalfEdges);
981
1112
  return a;
982
1113
  }
1114
+ /**
1115
+ * * Create 2 half edges forming 2 vertices, 1 edge, and 1 face
1116
+ * * The two edges are joined as edgeMate pair.
1117
+ * * The two edges are a 2-half-edge face loop in both the faceSuccessor and facePredecessor directions.
1118
+ * * The two edges are added to the graph's HalfEdge set
1119
+ * * Coordinates are set to zero.
1120
+ * * ids are installed in the two half edges.
1121
+ * @returns Return pointer to the first half edge created. (This has idA as its id.)
1122
+ */
1123
+ createEdgeIdId(iA = 0, iB = 0) {
1124
+ const a = HalfEdge.createHalfEdgePairWithCoordinates(0.0, 0.0, 0.0, iA, 0.0, 0.0, 0.0, iB, this.allHalfEdges);
1125
+ return a;
1126
+ }
983
1127
  /**
984
1128
  * * create an edge from coordinates x,y,z to (the tail of) an existing half edge.
985
1129
  * @returns Return pointer to the half edge with tail at x,y,z
@@ -1024,6 +1168,20 @@ class HalfEdgeGraph {
1024
1168
  const he = HalfEdge.splitEdge(base, xA, yA, zA, iA, this.allHalfEdges);
1025
1169
  return he;
1026
1170
  }
1171
+ /**
1172
+ * * Create a sliver face "within" an edge.
1173
+ * * this creates two half edges.
1174
+ * * The existing edges both stay in their same face loops and retain coordinates and i value.
1175
+ * * Each existing edge's mate is a new edge (rather than original mate)
1176
+ * * Coordinates are copied to the new edges at respective vertices.
1177
+ * * New faceTag and edgeTag undefined.
1178
+ * * i members are copied around their respective vertices.
1179
+ * @returns Returns the reference to the half edge created.
1180
+ */
1181
+ splitEdgeCreateSliverFace(base) {
1182
+ const he = HalfEdge.splitEdgeCreateSliverFace(base, this.allHalfEdges);
1183
+ return he;
1184
+ }
1027
1185
  /**
1028
1186
  * * Insert a vertex in the edge beginning at base, with coordinates specified as a fraction along the existing edge.
1029
1187
  * * this creates two half edges.
@@ -1161,6 +1319,26 @@ class HalfEdgeGraph {
1161
1319
  break;
1162
1320
  }
1163
1321
  }
1322
+ /**
1323
+ * * Visit each edge of the graph once.
1324
+ * * Call the announceEdge function.
1325
+ * * the edge mate will NOT appear in an announceEdge call.
1326
+ * * continue search if announceEdge(graph, node) returns true
1327
+ * * terminate search if announceEdge (graph, node) returns false
1328
+ * @param announceEdge function to apply at one node of each edge.
1329
+ */
1330
+ announceEdges(announceEdge) {
1331
+ this.clearMask(HalfEdgeMask.VISITED);
1332
+ for (const node of this.allHalfEdges) {
1333
+ if (node.getMask(HalfEdgeMask.VISITED))
1334
+ continue;
1335
+ const mate = node.edgeMate;
1336
+ node.setMask(HalfEdgeMask.VISITED);
1337
+ mate.setMask(HalfEdgeMask.VISITED);
1338
+ if (!announceEdge(this, node))
1339
+ break;
1340
+ }
1341
+ }
1164
1342
  /**
1165
1343
  * * Visit each vertex loop of the graph once.
1166
1344
  * * Call the announceVertex function
@@ -1179,8 +1357,8 @@ class HalfEdgeGraph {
1179
1357
  }
1180
1358
  }
1181
1359
  /**
1182
- * * Visit each vertex loop of the graph once.
1183
- * * Call the announceVertex function
1360
+ * * Visit each half edge (node) of the graph once.
1361
+ * * Call the announceNode function
1184
1362
  * * continue search if announceNode(graph, node) returns true
1185
1363
  * * terminate search if announce face (graph, node) returns false
1186
1364
  * @param announceNode function to apply at one node of each face.