@itwin/core-geometry 4.7.0-dev.7 → 4.7.0-dev.9

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 (113) hide show
  1. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +7 -1
  2. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
  3. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +20 -4
  4. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  5. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +1 -1
  6. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  7. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js +1 -1
  8. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  9. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +3 -3
  10. package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
  11. package/lib/cjs/geometry3d/Point3dVector3d.js +4 -3
  12. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  13. package/lib/cjs/geometry3d/PointHelpers.d.ts +7 -0
  14. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  15. package/lib/cjs/geometry3d/PointHelpers.js +19 -0
  16. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  17. package/lib/cjs/polyface/AuxData.d.ts +18 -10
  18. package/lib/cjs/polyface/AuxData.d.ts.map +1 -1
  19. package/lib/cjs/polyface/AuxData.js +24 -12
  20. package/lib/cjs/polyface/AuxData.js.map +1 -1
  21. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +2 -1
  22. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  23. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +2 -1
  24. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  25. package/lib/cjs/polyface/Polyface.d.ts +10 -2
  26. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  27. package/lib/cjs/polyface/Polyface.js +29 -17
  28. package/lib/cjs/polyface/Polyface.js.map +1 -1
  29. package/lib/cjs/polyface/PolyfaceData.d.ts +10 -9
  30. package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
  31. package/lib/cjs/polyface/PolyfaceData.js +17 -2
  32. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  33. package/lib/cjs/polyface/PolyfaceQuery.d.ts +321 -270
  34. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  35. package/lib/cjs/polyface/PolyfaceQuery.js +405 -351
  36. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  37. package/lib/cjs/serialization/BGFBReader.d.ts +18 -20
  38. package/lib/cjs/serialization/BGFBReader.d.ts.map +1 -1
  39. package/lib/cjs/serialization/BGFBReader.js +119 -84
  40. package/lib/cjs/serialization/BGFBReader.js.map +1 -1
  41. package/lib/cjs/serialization/BGFBWriter.d.ts +1 -1
  42. package/lib/cjs/serialization/BGFBWriter.d.ts.map +1 -1
  43. package/lib/cjs/serialization/BGFBWriter.js +10 -15
  44. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  45. package/lib/cjs/serialization/IModelJsonSchema.d.ts +52 -7
  46. package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
  47. package/lib/cjs/serialization/IModelJsonSchema.js +26 -78
  48. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  49. package/lib/cjs/serialization/SerializationHelpers.d.ts +17 -0
  50. package/lib/cjs/serialization/SerializationHelpers.d.ts.map +1 -1
  51. package/lib/cjs/serialization/SerializationHelpers.js +85 -0
  52. package/lib/cjs/serialization/SerializationHelpers.js.map +1 -1
  53. package/lib/cjs/solid/Sphere.d.ts +1 -0
  54. package/lib/cjs/solid/Sphere.d.ts.map +1 -1
  55. package/lib/cjs/solid/Sphere.js +4 -2
  56. package/lib/cjs/solid/Sphere.js.map +1 -1
  57. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +7 -1
  58. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
  59. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +20 -4
  60. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  61. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +1 -1
  62. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  63. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js +1 -1
  64. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  65. package/lib/esm/geometry3d/Point3dVector3d.d.ts +3 -3
  66. package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
  67. package/lib/esm/geometry3d/Point3dVector3d.js +4 -3
  68. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  69. package/lib/esm/geometry3d/PointHelpers.d.ts +7 -0
  70. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  71. package/lib/esm/geometry3d/PointHelpers.js +19 -0
  72. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  73. package/lib/esm/polyface/AuxData.d.ts +18 -10
  74. package/lib/esm/polyface/AuxData.d.ts.map +1 -1
  75. package/lib/esm/polyface/AuxData.js +24 -12
  76. package/lib/esm/polyface/AuxData.js.map +1 -1
  77. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +2 -1
  78. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  79. package/lib/esm/polyface/IndexedPolyfaceVisitor.js +2 -1
  80. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  81. package/lib/esm/polyface/Polyface.d.ts +10 -2
  82. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  83. package/lib/esm/polyface/Polyface.js +29 -17
  84. package/lib/esm/polyface/Polyface.js.map +1 -1
  85. package/lib/esm/polyface/PolyfaceData.d.ts +10 -9
  86. package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
  87. package/lib/esm/polyface/PolyfaceData.js +17 -2
  88. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  89. package/lib/esm/polyface/PolyfaceQuery.d.ts +321 -270
  90. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  91. package/lib/esm/polyface/PolyfaceQuery.js +405 -351
  92. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  93. package/lib/esm/serialization/BGFBReader.d.ts +18 -20
  94. package/lib/esm/serialization/BGFBReader.d.ts.map +1 -1
  95. package/lib/esm/serialization/BGFBReader.js +119 -84
  96. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  97. package/lib/esm/serialization/BGFBWriter.d.ts +1 -1
  98. package/lib/esm/serialization/BGFBWriter.d.ts.map +1 -1
  99. package/lib/esm/serialization/BGFBWriter.js +10 -15
  100. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  101. package/lib/esm/serialization/IModelJsonSchema.d.ts +52 -7
  102. package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
  103. package/lib/esm/serialization/IModelJsonSchema.js +26 -78
  104. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  105. package/lib/esm/serialization/SerializationHelpers.d.ts +17 -0
  106. package/lib/esm/serialization/SerializationHelpers.d.ts.map +1 -1
  107. package/lib/esm/serialization/SerializationHelpers.js +85 -0
  108. package/lib/esm/serialization/SerializationHelpers.js.map +1 -1
  109. package/lib/esm/solid/Sphere.d.ts +1 -0
  110. package/lib/esm/solid/Sphere.d.ts.map +1 -1
  111. package/lib/esm/solid/Sphere.js +4 -2
  112. package/lib/esm/solid/Sphere.js.map +1 -1
  113. package/package.json +3 -3
@@ -26,61 +26,69 @@ import { RangeLengthData } from "./RangeLengthData";
26
26
  * @public
27
27
  */
28
28
  export declare class SweepLineStringToFacetsOptions {
29
- /** vector "towards the eye"
30
- * * In the common case of sweeping to an XY (e.g. ground or DTM) mesh,
31
- * use the positive Z vector as an up vector.
29
+ /**
30
+ * Vector towards the eye.
31
+ * * In the common case of sweeping to an XY (e.g., ground or DTM) mesh, use the positive Z vector as an up vector.
32
32
  * * In general case, this is a vector from the mesh towards an eye at infinity.
33
33
  */
34
34
  vectorToEye: Vector3d;
35
- /** true to collect edges from facets that face towards the eye */
35
+ /** True to collect edges from facets that face towards the eye. */
36
36
  collectOnForwardFacets: boolean;
37
- /** true to collect facets that are "on the side", i.e. their outward vector is perpendicular to vectorToEye. */
37
+ /** True to collect facets that are "on the side", i.e., their outward vector is perpendicular to vectorToEye. */
38
38
  collectOnSideFacets: boolean;
39
- /** true to collect facets that face away from the eye */
39
+ /** True to collect facets that face away from the eye. */
40
40
  collectOnRearFacets: boolean;
41
- /** (small) angle to use as tolerance for deciding if a facet is "on the side". Default (if given in degrees) is Geometry.smallAngleDegrees */
41
+ /**
42
+ * (Small) angle to use as tolerance for deciding if a facet is "on the side".
43
+ * * Default (if given in degrees) is `Geometry.smallAngleDegrees`.
44
+ */
42
45
  sideAngle: Angle;
43
- /** option to assemble lines into chains */
46
+ /** Option to assemble lines into chains. */
44
47
  assembleChains: boolean;
45
- /** constructor -- captures fully-checked parameters from static create method.
46
- */
48
+ /** Constructor. Captures fully-checked parameters from static create method. */
47
49
  private constructor();
48
- /** Create an options structure.
49
- * * Default vectorToEye is positive Z
50
- * * Default sideAngle has radians value Geometry.smallAngleRadians
51
- * * Default assembleChains is true
52
- * * Default collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets are all true.
50
+ /**
51
+ * Create an options structure.
52
+ * * Default `vectorToEye` is (0,0,1).
53
+ * * Default `sideAngle` is `Geometry.smallAngleRadians`.
54
+ * * Default `assembleChains` is `true`.
55
+ * * Default `collectOnForwardFacets`, `collectOnSideFacets`, `collectOnRearFacets` are all `true`.
53
56
  */
54
57
  static create(vectorToEye?: Vector3d, sideAngle?: Angle, assembleChains?: boolean, collectOnForwardFacets?: boolean, collectOnSideFacets?: boolean, collectOnRearFacets?: boolean): SweepLineStringToFacetsOptions;
55
- /** Return true if all outputs are requested */
58
+ /** Return `true` if all outputs are requested. */
56
59
  get collectAll(): boolean;
57
- /** Decide if the instance flags accept this facet.
58
- * * Facets whose facet normal have positive, zero, or negative dot product with the vectorToEye are forward, side, and rear.
59
- * * Undefined facet normal returns false
60
+ /**
61
+ * Decide if the instance collector flags accept a facet with the given normal.
62
+ * * A facet whose facet normal has a positive, zero, or negative dot product with `vectorToEye` is classified
63
+ * as forward, side, or rear, respectively.
64
+ * * `undefined` facet normal returns `false`.
60
65
  */
61
66
  collectFromThisFacetNormal(facetNormal: Vector3d | undefined): boolean;
62
67
  }
63
68
  /**
64
- * Options carrier for [[fillSimpleHoles]]
69
+ * Options carrier for [[PolyfaceQuery.fillSimpleHoles]].
65
70
  * @public
66
71
  */
67
72
  export interface HoleFillOptions {
68
- /** REJECT hole candidates if its boundary chain is longer than this limit. */
73
+ /** Reject hole candidates if its boundary chain is longer than this limit. */
69
74
  maxPerimeter?: number;
70
- /** REJECT hole candidates if they have more than this number of edges */
75
+ /** Reject hole candidates if they have more than this number of edges. */
71
76
  maxEdgesAroundHole?: number;
72
- /** REJECT hole candidates if their orientation is not COUNTERCLOCKWISE around this vector.
73
- * * For instance, use an upward Z vector for a DTM whose facets face upward. This suppresses incorrectly treating the outer boundary as a hole.
77
+ /**
78
+ * Reject hole candidates if their orientation is not COUNTERCLOCKWISE around this vector.
79
+ * * For instance, use an upward Z vector for a DTM whose facets face upward. This suppresses incorrectly
80
+ * treating the outer boundary as a hole.
74
81
  */
75
82
  upVector?: Vector3d;
76
- /** requests that all content from the original mesh be copied to the mesh with filled holes. */
83
+ /** Requests that all content from the original mesh be copied to the mesh with filled holes. */
77
84
  includeOriginalMesh?: boolean;
78
85
  }
79
- /** Selective output options for PolyfaceQuery.cloneOffset:
80
- * * undefined means the usual facets in the expected offset mesh.
81
- * * if present as a json object, the various booleans select respective outputs.
82
- * * @public
83
- */
86
+ /**
87
+ * Selective output options for [[PolyfaceQuery.cloneOffset]]:
88
+ * * `undefined` means the usual facets in the expected offset mesh.
89
+ * * If present as a json object, the various booleans select respective outputs.
90
+ * * @public
91
+ */
84
92
  export interface OffsetMeshSelectiveOutputOptions {
85
93
  outputOffsetsFromFacesBeforeChamfers?: boolean;
86
94
  outputOffsetsFromFaces?: boolean;
@@ -90,212 +98,264 @@ export interface OffsetMeshSelectiveOutputOptions {
90
98
  /**
91
99
  * Options carrier for [[PolyfaceQuery.cloneOffset]].
92
100
  * * Default options are strongly recommended.
93
- * * The option most likely to be changed is chamferTurnAngle
101
+ * * The option most likely to be changed is `chamferAngleBetweenNormals`.
94
102
  * @public
95
103
  */
96
104
  export declare class OffsetMeshOptions {
97
- /** max angle between normals to be considered smooth */
105
+ /** Max angle between normals to be considered smooth. */
98
106
  smoothSingleAngleBetweenNormals: Angle;
99
- /** max accumulation of angle between normals to be considered smooth */
107
+ /** Max accumulation of angle between normals to be considered smooth. */
100
108
  smoothAccumulatedAngleBetweenNormals: Angle;
101
- /** When crossing an edge, this turn angle (typically 120 degrees) triggers a chamfer */
109
+ /**
110
+ * When facets meet and the turn angle (i.e., angle between facet normals) is larger than
111
+ * `chamferTurnAngleBetweenNormals`, a chamfer edge may be added to prevent offset mesh from having
112
+ * facets that extend out too far away from the source mesh.
113
+ */
102
114
  chamferAngleBetweenNormals: Angle;
103
- /** optional control structure for selective output.
104
- * * If undefined, output all expected offset facets.
115
+ /**
116
+ * Optional control structure for selective output.
117
+ * * If `undefined`, output all expected offset facets.
105
118
  */
106
119
  outputSelector?: OffsetMeshSelectiveOutputOptions;
107
- /** Constructor -- CAPTURE parameters ... */
120
+ /** Constructor -- CAPTURE parameters. */
108
121
  private constructor();
109
- /** construct and return an OffsetMeshOptions with given parameters.
122
+ /**
123
+ * Construct and return an `OffsetMeshOptions` with given parameters.
110
124
  * * Angles are forced to minimum values.
111
125
  * * Clones of the angles are given to the constructor.
112
- * @param smoothSingleRadiansBetweenNormals an angle larger than this (between facets) is considered a sharp edge
113
- * @param smoothAccumulatedAngleBetweenNormals angles that sum to this much may be consolidated for average normal
114
- * @param chamferTurnAngleBetweenNormals when facets meet with larger angle, a chamfer edge may be added if the angle between facet normals is larger than this.
126
+ * @param smoothSingleRadiansBetweenNormals an angle larger than this (between facets) is considered a sharp edge.
127
+ * Default value is `25` degrees.
128
+ * @param smoothAccumulatedAngleBetweenNormals angles that sum to this much may be consolidated for average normal.
129
+ * Default value is `60` degrees.
130
+ * @param chamferTurnAngleBetweenNormals when facets meet and the turn angle (i.e., angle between facet normals)
131
+ * is larger than `chamferTurnAngleBetweenNormals`, a chamfer edge may be added to prevent offset mesh from having
132
+ * facets that extend out too far away from the source mesh. Default value is `120` degrees.
115
133
  */
116
134
  static create(smoothSingleAngleBetweenNormals?: Angle, smoothAccumulatedAngleBetweenNormals?: Angle, chamferTurnAngleBetweenNormals?: Angle): OffsetMeshOptions;
117
135
  }
118
136
  /**
119
- * Structure to return multiple results from volume between facets and plane
137
+ * Structure to return multiple results from volume between facets and plane.
120
138
  * @public
121
139
  */
122
140
  export interface FacetProjectedVolumeSums {
123
- /** Summed (signed) volume */
141
+ /** Summed (signed) volume. */
124
142
  volume: number;
125
- /** summed area moments for positive contributions */
143
+ /** Summed area moments for positive contributions. */
126
144
  positiveProjectedFacetAreaMoments?: MomentData;
127
- /** summed area moments for negative contributions */
145
+ /** Summed area moments for negative contributions. */
128
146
  negativeProjectedFacetAreaMoments?: MomentData;
129
147
  }
130
148
  /**
131
- * Enumeration of cases for retaining facets among duplicates
149
+ * Enumeration of cases for retaining facets among duplicates.
132
150
  * @public
133
151
  */
134
152
  export declare enum DuplicateFacetClusterSelector {
135
- /** retain none of the duplicates */
153
+ /** Retain none of the duplicates. */
136
154
  SelectNone = 0,
137
- /** retain any one member among duplicates */
155
+ /** Retain any one member among duplicates. */
138
156
  SelectAny = 1,
139
- /** retain all members among duplicates */
157
+ /** Retain all members among duplicates. */
140
158
  SelectAll = 2,
141
- /** retain one from any cluster with an odd number of faces */
159
+ /** Retain one from any cluster with an odd number of faces. */
142
160
  SelectOneByParity = 3
143
161
  }
144
- /** PolyfaceQuery is a static class whose methods implement queries on a polyface or polyface visitor provided as a parameter to each method.
162
+ /**
163
+ * Announce the points on a drape panel.
164
+ * * The first two points in the array are always along the draped line segment.
165
+ * * The last two are always on the facet.
166
+ * * If there are 4 points, those two pairs are distinct, i.e. both segment points are to the same side of the facet.
167
+ * * If there are 3 points, those two pairs share an on-facet point.
168
+ * * The panel is ordered so the outward normal is to the right of the draped segment.
169
+ * @param indexAOnFacet index (in points) of the point that is the first facet point for moving forward along the linestring.
170
+ * @param indexBOnFacet index (in points) of the point that is the second facet point for moving forward along the linestring.
171
+ * @public
172
+ */
173
+ export type AnnounceDrapePanel = (linestring: GrowableXYZArray, segmentIndex: number, polyface: Polyface, facetIndex: number, points: Point3d[], indexAOnFacet: number, indexBOnFacet: number) => any;
174
+ /**
175
+ * PolyfaceQuery is a static class whose methods implement queries on a `Polyface` or `PolyfaceVisitor` provided as a
176
+ * parameter to each method.
145
177
  * @public
146
178
  */
147
179
  export declare class PolyfaceQuery {
148
- /** copy the points from a visitor into a Linestring3d in a Loop object */
180
+ /** Copy the points from a visitor into a linestring loop. */
149
181
  static visitorToLoop(visitor: PolyfaceVisitor): Loop;
150
182
  /** Create a linestring loop for each facet of the polyface. */
151
183
  static indexedPolyfaceToLoops(polyface: Polyface): BagOfCurves;
152
- /** Return the sum of all facet areas.
153
- * @param vectorToEye compute sum of *signed* facet areas projected to a view plane perpendicular to this vector
154
- */
184
+ /**
185
+ * Sum all facet areas.
186
+ * @param source polyface or visitor.
187
+ * @param vectorToEye compute sum of (signed) facet areas projected to a view plane perpendicular to `vectorToEye`.
188
+ * If `vectorToEye` is not provided, actual facet areas are calculated (without any projection).
189
+ * @returns the sum of all facet areas. Return 0 if `source` is `undefined`.
190
+ */
155
191
  static sumFacetAreas(source: Polyface | PolyfaceVisitor | undefined, vectorToEye?: Vector3d): number;
156
- /** sum volumes of tetrahedra from origin to all facets.
157
- * * if origin is omitted, the first point encountered (by the visitor) is used as origin.
192
+ /**
193
+ * Sum volumes of tetrahedra from origin to all facets.
194
+ * * If origin is `undefined`, the first point encountered (by the visitor) is used as origin.
158
195
  * * If the mesh is closed, this sum is the volume.
159
- * * If the mesh is not closed, this sum is the volume of a mesh with various additional facets
160
- * from the origin to facets.
161
- */
196
+ * * If the mesh is not closed, this sum is the volume of a mesh with various additional facets from the origin
197
+ * to facets.
198
+ */
162
199
  static sumTetrahedralVolumes(source: Polyface | PolyfaceVisitor, origin?: Point3d): number;
163
- /** sum (signed) volumes between facets and a plane.
200
+ /**
201
+ * Sum (signed) volumes between facets and a plane.
164
202
  * Return a structure with multiple sums:
165
203
  * * volume = the sum of (signed) volumes between facets and the plane.
166
- * * positiveAreaMomentData, negativeProjectedFacetAreaMoments = moment data with centroid, area, and second moments with respect to the centroid.
167
- *
168
- */
204
+ * * positiveProjectedFacetAreaMoments, negativeProjectedFacetAreaMoments = moment data with centroid, area, and second
205
+ * moments with respect to the centroid.
206
+ */
169
207
  static sumVolumeBetweenFacetsAndPlane(source: Polyface | PolyfaceVisitor, plane: Plane3dByOriginAndUnitNormal): FacetProjectedVolumeSums;
170
- /** Return the inertia products [xx,xy,xz,xw, yw, etc] integrated over all all facets, as viewed from origin. */
208
+ /** Return the inertia products [xx,xy,xz,xw,yw, etc] integrated over all all facets as viewed from origin. */
171
209
  static sumFacetSecondAreaMomentProducts(source: Polyface | PolyfaceVisitor, origin: Point3d): Matrix4d;
172
- /** Return the inertia products [xx,xy,xz,xw, yw, etc] integrated over all tetrahedral volumes from origin */
210
+ /** Return the inertia products [xx,xy,xz,xw,yw, etc] integrated over all tetrahedral volumes from origin. */
173
211
  static sumFacetSecondVolumeMomentProducts(source: Polyface | PolyfaceVisitor, origin: Point3d): Matrix4d;
174
- /** Compute area moments for the mesh. In the returned MomentData:
175
- * * origin is the centroid.
176
- * * localToWorldMap has the origin and principal directions
177
- * * radiiOfGyration radii for rotation around the x,y,z axes.
212
+ /**
213
+ * Compute area moments for the mesh. In the returned `MomentData`:
214
+ * * `origin` is the centroid.
215
+ * * `localToWorldMap` has the origin and principal directions.
216
+ * * `radiiOfGyration` radii for rotation around the x,y,z axes.
178
217
  */
179
218
  static computePrincipalAreaMoments(source: Polyface): MomentData | undefined;
180
- /** Compute area moments for the mesh. In the returned MomentData:
181
- * * origin is the centroid.
182
- * * localToWorldMap has the origin and principal directions
183
- * * radiiOfGyration radii for rotation around the x,y,z axes.
219
+ /**
220
+ * Compute area moments for the mesh. In the returned MomentData:
221
+ * * `origin` is the centroid.
222
+ * * `localToWorldMap` has the origin and principal directions.
223
+ * * `radiiOfGyration` radii for rotation around the x,y,z axes.
184
224
  * * The result is only valid if the mesh is closed.
185
- * * There is no test for closure. Use `PolyfaceQuery.isPolyfaceClosedByEdgePairing(polyface)` to test for closure.
225
+ * * There is no test for closure. Use `PolyfaceQuery.isPolyfaceClosedByEdgePairing(polyface)` to test for closure.
186
226
  */
187
227
  static computePrincipalVolumeMoments(source: Polyface): MomentData | undefined;
188
- /** Determine whether all facets are convex.
189
- * @param source mesh to examine
228
+ /**
229
+ * Determine whether all facets are convex.
230
+ * @param source polyface or visitor.
231
+ * @returns `true` if all facets are convex; `false` otherwise.
190
232
  */
191
233
  static areFacetsConvex(source: Polyface | PolyfaceVisitor): boolean;
192
234
  /**
193
- * Test for convex volume by dihedral angle tests on all edges.
194
- * * This tests if all dihedral angles are positive.
195
- * * In a closed solid, this is a strong test for overall convexity.
196
- * * With `ignoreBoundaries` true, this may be a useful test when all the facets are in a single edge-connected component, such as a pyramid with no underside.
197
- * * It is not a correct test if there are multiple, disjoint components.
198
- * * Take the above-mentioned pyramid with no underside.
199
- * * Within the same mesh, have a second pyramid placed to the side, still facing upward.
200
- * * The angles will pass the dihedral convexity test, but the composite thing surely is not convex.
201
- * @param source mesh to examine
202
- * @param ignoreBoundaries if true, ignore simple boundary edges, i.e. allow unclosed meshes.
203
- * @returns true if the mesh is closed and has all dihedral angles (angle across edge) positive
235
+ * Compute a number summarizing the dihedral angles in the mesh.
236
+ * * A dihedral angle is the signed angle between adjacent facets' normals. This angle is positive when the cross
237
+ * product `normalA x normalB` has the same direction as facetA's traversal of the facets' shared edge.
238
+ * @param source mesh.
239
+ * @param ignoreBoundaries if `true` ignore simple boundary edges, i.e., allow unclosed meshes. Default is `false`.
240
+ * See [[isConvexByDihedralAngleCount]] for comments about passing true when there are multiple
241
+ * connected components.
242
+ * * Return `0` if all dihedral angles are zero (and `ignoreBoundaries === true`). The mesh is planar.
243
+ * * Otherwise, return `1` if all dihedral angles are non-negative. The mesh probably encloses a convex volume and
244
+ * has outward normals.
245
+ * * Otherwise, return `-1` if all dihedral angles are non-positive. The mesh probably encloses a convex volume and
246
+ * has inward normals.
247
+ * * Otherwise, return `-2`. Also return `-2` if a non-manifold condition was detected, or a facet normal could not
248
+ * be computed. A non-manifold condition is a positive-length edge adjacent to more than 2 facets or (if
249
+ * `ignoreBoundaries` is false) adjacent to exactly one facet.
204
250
  */
251
+ static dihedralAngleSummary(source: Polyface, ignoreBoundaries?: boolean): number;
252
+ /**
253
+ * Test for convex volume by dihedral angle tests on all edges.
254
+ * * This tests if all dihedral angles of the mesh are positive.
255
+ * * In a closed solid, this is a strong test for overall mesh convexity with outward facing normals.
256
+ * * See [[dihedralAngleSummary]] for the definition of "dihedral angle".
257
+ * * With `ignoreBoundaries` true, this may be a useful test when all the facets are in a single edge-connected
258
+ * component, such as a pyramid with no underside.
259
+ * * It is not a correct test if there are multiple, disjoint components.
260
+ * * Take the above-mentioned pyramid with no underside.
261
+ * * Within the same mesh, have a second pyramid placed to the side, still facing upward.
262
+ * * The angles will pass the dihedral convexity test, but the composite thing surely is not convex.
263
+ * @param source mesh.
264
+ * @param ignoreBoundaries if `true` ignore simple boundary edges, i.e., allow unclosed meshes. Default is `false`.
265
+ * @returns true if all dihedral angles of the mesh are positive.
266
+ */
205
267
  static isConvexByDihedralAngleCount(source: Polyface, ignoreBoundaries?: boolean): boolean;
206
268
  /**
207
- * Compute a number summarizing the dihedral angles in the mesh.
208
- * @see [[isConvexByDihedralAngleCount]] for comments about ignoreBoundaries===true when there are multiple connected components.
209
- * @param source mesh to examine
210
- * @param ignoreBoundaries if true, ignore simple boundary edges, i.e. allow unclosed meshes.
211
- * @returns a number summarizing the dihedral angles in the mesh.
212
- * * Return 1 if all angles are positive or planar. The mesh is probably convex with outward normals.
213
- * * Return -1 if all angles are negative or planar. The mesh is probably convex with inward normals.
214
- * * Return 0 if
215
- * * angles area mixed
216
- * * any edge has other than 1 incident facet or more than 2 incident facets.
217
- * * (but null edges are permitted -- These occur naturally at edges of quads at north or south pole)
269
+ * Test edges pairing in `source` mesh.
270
+ * * For `allowSimpleBoundaries === false` true return means this is a closed 2-manifold surface.
271
+ * * For `allowSimpleBoundaries === true` true means this is a 2-manifold surface which may have boundary, but is
272
+ * still properly matched internally.
273
+ * * Any edge with 3 or more adjacent facets triggers `false` return.
274
+ * * Any edge with 2 adjacent facets in the same direction triggers a `false` return.
218
275
  */
219
- static dihedralAngleSummary(source: Polyface, ignoreBoundaries?: boolean): number;
276
+ static isPolyfaceManifold(source: Polyface, allowSimpleBoundaries?: boolean): boolean;
277
+ /** Test if the facets in `source` occur in perfectly mated pairs, as is required for a closed manifold volume. */
278
+ static isPolyfaceClosedByEdgePairing(source: Polyface): boolean;
220
279
  /**
221
280
  * Test if the facets in `source` occur in perfectly mated pairs, as is required for a closed manifold volume.
281
+ * If not, extract the boundary edges as lines.
282
+ * @param source polyface or visitor.
283
+ * @param announceEdge function to be called with each boundary edge. The announcement is start and end points,
284
+ * start and end indices, and facet index.
285
+ * @param includeTypical true to announce typical boundary edges with a single adjacent facet.
286
+ * @param includeMismatch true to announce edges with more than 2 adjacent facets.
287
+ * @param includeNull true to announce edges with identical start and end vertex indices.
222
288
  */
223
- static isPolyfaceClosedByEdgePairing(source: Polyface): boolean;
224
- /** Test edges pairing in `source` mesh.
225
- * * for `allowSimpleBoundaries === false` true return means this is a closed 2-manifold surface
226
- * * for `allowSimpleBoundaries === true` true means this is a 2-manifold surface which may have boundary, but is still properly matched internally.
227
- * * Any edge with 3 or more incident facets triggers `false` return.
228
- * * Any edge with 2 incident facets in the same direction triggers a `false` return.
229
- */
230
- static isPolyfaceManifold(source: Polyface, allowSimpleBoundaries?: boolean): boolean;
289
+ static announceBoundaryEdges(source: Polyface | PolyfaceVisitor | undefined, announceEdge: (pointA: Point3d, pointB: Point3d, indexA: number, indexB: number, facetIndex: number) => void, includeTypical?: boolean, includeMismatch?: boolean, includeNull?: boolean): void;
231
290
  /**
232
- * construct a CurveCollection containing boundary edges.
233
- * * each edge is a LineSegment3d
234
- * @param source polyface or visitor
235
- * @param includeTypical true to in include typical boundary edges with a single incident facet
236
- * @param includeMismatch true to include edges with more than 2 incident facets
291
+ * Construct a CurveCollection containing boundary edges.
292
+ * * Each edge is a LineSegment3d.
293
+ * @param source polyface or visitor.
294
+ * @param includeTypical true to in include typical boundary edges with a single adjacent facet.
295
+ * @param includeMismatch true to include edges with more than 2 adjacent facets.
237
296
  * @param includeNull true to include edges with identical start and end vertex indices.
238
297
  */
239
298
  static boundaryEdges(source: Polyface | PolyfaceVisitor | undefined, includeTypical?: boolean, includeMismatch?: boolean, includeNull?: boolean): CurveCollection | undefined;
240
299
  /**
241
300
  * Collect boundary edges.
242
301
  * * Return the edges as the simplest collection of chains of line segments.
243
- * @param source facets
244
- * @param includeTypical true to in include typical boundary edges with a single incident facet
245
- * @param includeMismatch true to include edges with more than 2 incident facets
302
+ * @param source polyface or visitor.
303
+ * @param includeTypical true to in include typical boundary edges with a single adjacent facet.
304
+ * @param includeMismatch true to include edges with more than 2 adjacent facets.
246
305
  * @param includeNull true to include edges with identical start and end vertex indices.
247
306
  */
248
307
  static collectBoundaryEdges(source: Polyface | PolyfaceVisitor, includeTypical?: boolean, includeMismatch?: boolean, includeNull?: boolean): AnyChain | undefined;
249
308
  /**
250
- * Test if the facets in `source` occur in perfectly mated pairs, as is required for a closed manifold volume.
251
- * If not, extract the boundary edges as lines.
252
- * @param source polyface or visitor
253
- * @param announceEdge function to be called with each boundary edge. The announcement is start and end points, start and end indices, and facet index.
254
- * @param includeTypical true to announce typical boundary edges with a single incident facet
255
- * @param includeMismatch true to announce edges with more than 2 incident facets
256
- * @param includeNull true to announce edges with identical start and end vertex indices.
257
- */
258
- static announceBoundaryEdges(source: Polyface | PolyfaceVisitor | undefined, announceEdge: (pointA: Point3d, pointB: Point3d, indexA: number, indexB: number, facetIndex: number) => void, includeTypical?: boolean, includeMismatch?: boolean, includeNull?: boolean): void;
309
+ * Load all half edges from a mesh to an IndexedEdgeMatcher.
310
+ * @param polyface a mesh or a visitor assumed to have numWrap === 1.
311
+ */
312
+ static createIndexedEdges(polyface: Polyface | PolyfaceVisitor): IndexedEdgeMatcher;
259
313
  /**
260
- * Invoke the callback on each manifold edge whose adjacent facet normals form vectorToEye dot products with opposite sign.
314
+ * Invoke the callback on each manifold edge whose adjacent facet normals form vectorToEye dot products
315
+ * with opposite sign.
261
316
  * * The callback is not called on boundary edges.
262
- * @param source facets
263
- * @param announce callback function invoked on manifold silhouette edges
264
- * @param vectorToEye normal of plane in which to compute silhouette edges
265
- * @param sideAngle angular tolerance for perpendicularity test
317
+ * @param source polyface or visitor.
318
+ * @param announce callback function invoked on manifold silhouette edges.
319
+ * @param vectorToEye normal of plane in which to compute silhouette edges.
320
+ * @param sideAngle angular tolerance for perpendicularity test.
266
321
  */
267
322
  static announceSilhouetteEdges(source: Polyface | PolyfaceVisitor, announce: (pointA: Point3d, pointB: Point3d, vertexIndexA: number, vertexIndexB: number, facetIndex: number) => void, vectorToEye: Vector3d, sideAngle?: Angle): void;
268
323
  /**
269
324
  * Collect manifold edges whose adjacent facet normals form vectorToEye dot products with opposite sign.
270
325
  * * Does not return boundary edges.
271
326
  * * Return the edges as chains of line segments.
272
- * @param source facets
273
- * @param vectorToEye normal of plane in which to compute silhouette edges
274
- * @param sideAngle angular tolerance for perpendicularity test
327
+ * @param source polyface or visitor.
328
+ * @param vectorToEye normal of plane in which to compute silhouette edges.
329
+ * @param sideAngle angular tolerance for perpendicularity test.
275
330
  */
276
331
  static collectSilhouetteEdges(source: Polyface | PolyfaceVisitor, vectorToEye: Vector3d, sideAngle?: Angle): AnyChain | undefined;
277
- /** Find segments (within the linestring) which project to facets.
332
+ /**
333
+ * Find segments (within the linestring) which project to facets.
278
334
  * * Announce each pair of linestring segment and on-facet segment through a callback.
279
335
  * * Facets are ASSUMED to be convex and planar, and not overlap in the z direction.
280
336
  */
281
337
  static announceSweepLinestringToConvexPolyfaceXY(linestringPoints: GrowableXYZArray, polyface: Polyface, announce: AnnounceDrapePanel): any;
282
- /** Execute context.projectToPolygon until its work estimates accumulate to workLimit */
283
- private static continueAnnounceSweepLinestringToConvexPolyfaceXY;
284
338
  private static _asyncWorkLimit;
285
- /** Set the limit on work during an async time blocks, and return the old value.
339
+ /**
340
+ * Set the limit on work during an async time blocks, and return the old value.
286
341
  * * This should be a large number -- default is 1.0e6
287
342
  * @internal
288
343
  */
289
344
  static setAsyncWorkLimit(value: number): number;
290
- /** Query the current limit on work during an async time block.
345
+ /**
346
+ * Query the current limit on work during an async time block.
291
347
  * @internal
292
348
  */
293
349
  static get asyncWorkLimit(): number;
294
- /** Number of "await" steps executed in recent async calls.
350
+ /**
351
+ * Number of "await" steps executed in recent async calls.
295
352
  * @internal
296
353
  */
297
354
  static awaitBlockCount: number;
298
- /** Find segments (within the linestring) which project to facets.
355
+ /** Execute `context.projectToPolygon` until its work estimates accumulate to workLimit. */
356
+ private static continueAnnounceSweepLinestringToConvexPolyfaceXY;
357
+ /**
358
+ * Find segments (within the linestring) which project to facets.
299
359
  * * Announce each pair of linestring segment and on-facet segment through a callback.
300
360
  * * Facets are ASSUMED to be convex and planar, and not overlap in the z direction.
301
361
  * * REMARK: Although this is public, the usual use is via slightly higher level public methods, viz:
@@ -303,44 +363,44 @@ export declare class PolyfaceQuery {
303
363
  * @internal
304
364
  */
305
365
  static asyncAnnounceSweepLinestringToConvexPolyfaceXY(linestringPoints: GrowableXYZArray, polyface: Polyface, announce: AnnounceDrapePanel): Promise<number>;
306
- /** Search the facets for facet subsets that are connected with at least vertex contact.
366
+ /**
367
+ * Search the facets for facet subsets that are connected with at least vertex contact.
307
368
  * * Return array of arrays of facet indices.
308
369
  */
309
370
  static partitionFacetIndicesByVertexConnectedComponent(polyface: Polyface | PolyfaceVisitor): number[][];
310
371
  /**
311
372
  * * Examine the normal orientation for each faces.
312
373
  * * Separate to 3 partitions:
313
- * * facets with normal in the positive direction of the vectorToEye (partition 0)
314
- * * facets with normal in the negative direction of the vectorToEye (partition 1)
315
- * * facets nearly perpendicular to the view vector (partition 2)
374
+ * * Facets with normal in the positive direction of the vectorToEye (partition 0).
375
+ * * Facets with normal in the negative direction of the vectorToEye (partition 1).
376
+ * * Facets nearly perpendicular to the view vector (partition 2).
316
377
  * * Return array of arrays of facet indices.
317
378
  */
318
379
  static partitionFacetIndicesByVisibilityVector(polyface: Polyface | PolyfaceVisitor, vectorToEye: Vector3d, sideAngleTolerance: Angle): number[][];
319
380
  /**
320
381
  * Return the boundary of facets that are facing the eye.
321
- * @param polyface
382
+ * @param polyface the indexed polyface
322
383
  * @param visibilitySubset selector among the visible facet sets extracted by partitionFacetIndicesByVisibilityVector
323
384
  * * 0 ==> forward facing
324
385
  * * 1 ==> rear facing
325
386
  * * 2 ==> side facing
326
- * @param vectorToEye
327
- * @param sideAngleTolerance
387
+ * @param vectorToEye the vector to eye
388
+ * @param sideAngleTolerance the tolerance of side angle
328
389
  */
329
390
  static boundaryOfVisibleSubset(polyface: IndexedPolyface, visibilitySelect: 0 | 1 | 2, vectorToEye: Vector3d, sideAngleTolerance?: Angle): CurveCollection | undefined;
330
391
  /**
331
- * Search for edges with only 1 incident facet.
332
- * * chain them into loops
333
- * * emit the loops to the announceLoop function
334
- * @param mesh
392
+ * Search for edges with only 1 adjacent facet.
393
+ * * Chain them into loops.
394
+ * * Emit the loops to the announceLoop function.
335
395
  */
336
396
  static announceBoundaryChainsAsLineString3d(mesh: Polyface | PolyfaceVisitor, announceLoop: (points: LineString3d) => void): void;
337
397
  /**
338
398
  * Return a mesh with
339
399
  * * clusters of adjacent, coplanar facets merged into larger facets.
340
400
  * * other facets included unchanged.
341
- * @param mesh existing mesh or visitor
342
- * @param maxSmoothEdgeAngle maximum dihedral angle across an edge between facets deemed coplanar. If undefined, uses `Geometry.smallAngleRadians`.
343
- * @returns
401
+ * @param mesh existing mesh or visitor.
402
+ * @param maxSmoothEdgeAngle maximum dihedral angle across an edge between facets deemed coplanar. If undefined,
403
+ * uses `Geometry.smallAngleRadians`.
344
404
  */
345
405
  static cloneWithMaximalPlanarFacets(mesh: Polyface | PolyfaceVisitor, maxSmoothEdgeAngle?: Angle): IndexedPolyface | undefined;
346
406
  /**
@@ -349,50 +409,49 @@ export declare class PolyfaceQuery {
349
409
  * * Unclosed chains are rejected.
350
410
  * * Closed chains are triangulated and returned as a mesh.
351
411
  * * The options structure enforces restrictions on how complicated the hole filling can be:
352
- * * maxEdgesAroundHole -- holes with more edges are skipped
412
+ * * maxEdgesAroundHole -- holes with more edges are skipped.
353
413
  * * maxPerimeter -- holes with larger summed edge lengths are skipped.
354
414
  * * upVector -- holes that do not have positive area along this view are skipped.
355
- * * includeOriginalMesh -- includes the original mesh in the output mesh, so the composite mesh is a clone with holes filled
356
- * @param mesh existing mesh
415
+ * * includeOriginalMesh -- includes the original mesh in the output mesh, so the composite mesh is a
416
+ * clone with holes filled.
417
+ * @param mesh existing mesh.
357
418
  * @param options options controlling the hole fill.
358
419
  * @param unfilledChains optional array to receive the points around holes that were not filled.
359
- * @returns
360
420
  */
361
421
  static fillSimpleHoles(mesh: Polyface | PolyfaceVisitor, options: HoleFillOptions, unfilledChains?: LineString3d[]): IndexedPolyface | undefined;
362
- /** Clone the facets in each partition to a separate polyface.
363
- *
364
- */
422
+ /** Clone the facets in each partition to a separate polyface. */
365
423
  static clonePartitions(polyface: Polyface | PolyfaceVisitor, partitions: number[][]): Polyface[];
366
- /** Clone facets that pass a filter function */
424
+ /** Clone facets that pass a filter function. */
367
425
  static cloneFiltered(source: Polyface | PolyfaceVisitor, filter: (visitor: PolyfaceVisitor) => boolean): IndexedPolyface;
368
426
  /** Clone the facets with in-facet dangling edges removed. */
369
427
  static cloneWithDanglingEdgesRemoved(source: Polyface | PolyfaceVisitor): IndexedPolyface;
370
- /** If the visitor's client is a polyface, simply return its point array length.
371
- * If not a polyface, visit all facets to find the largest index.
372
- */
373
- static visitorClientPointCount(visitor: Polyface | PolyfaceVisitor): number;
374
- /** If the visitor's client is a polyface, simply return its facet count.
375
- * If not a polyface, visit all facets to accumulate a count.
376
- */
377
- static visitorClientFacetCount(visitor: Polyface | PolyfaceVisitor): number;
378
- /** Partition the facet set into connected components such that two adjacent facets are in the same component if and only if they are adjacent across a clustered edge.
428
+ /** Return the point count of the `source`. */
429
+ static visitorClientPointCount(source: Polyface | PolyfaceVisitor): number;
430
+ /** Return the facet count of the `source`. */
431
+ static visitorClientFacetCount(source: Polyface | PolyfaceVisitor): number;
432
+ /**
433
+ * Partition the facet set into connected components such that two adjacent facets are in the same component if and
434
+ * only if they are adjacent across a clustered edge.
379
435
  * @param edgeClusters sorted and clustered edges (cf. `IndexedEdgeMatcher.sortAndCollectClusters`).
380
436
  * @param numFacets facet count in the parent mesh. In particular, `edge.facetIndex < numFacets` for every input edge.
381
- * @return collection of facet index arrays, one array per connected component
437
+ * @return collection of facet index arrays, one array per connected component.
382
438
  */
383
439
  private static partitionFacetIndicesBySortableEdgeClusters;
384
- /** Partition the facet set into connected components. Each facet in a given component shares an edge only with other facets in the component (or is a boundary edge).
385
- * @param polyface facets to partition
386
- * @param stopAtVisibleEdges whether to further split connected components by visible edges of the polyface
387
- * @return collection of facet index arrays, one per connected component
440
+ /**
441
+ * Partition the facet set into connected components. Each facet in a given component shares an edge only with
442
+ * other facets in the component (or is a boundary edge).
443
+ * @param polyface facets to partition.
444
+ * @param stopAtVisibleEdges whether to further split connected components by visible edges of the polyface.
445
+ * @return collection of facet index arrays, one per connected component.
388
446
  */
389
447
  static partitionFacetIndicesByEdgeConnectedComponent(polyface: Polyface | PolyfaceVisitor, stopAtVisibleEdges?: boolean): number[][];
390
- /** Find segments (within the line string) which project to facets.
448
+ /**
449
+ * Find segments (within the line string) which project to facets.
391
450
  * * Assemble each input segment paired with its projected segment/point as a quad/triangle facet in a new polyface.
392
451
  * * Input facets are ASSUMED to be convex and planar, and not overlap in the z direction.
393
452
  */
394
453
  static sweepLineStringToFacetsXYReturnSweptFacets(lineStringPoints: GrowableXYZArray, polyface: Polyface): Polyface;
395
- /** @deprecated in 4.x. Use sweepLineStringToFacetsXYReturnSweptFacets instead. */
454
+ /** @deprecated in 4.x. Use [[sweepLineStringToFacetsXYReturnSweptFacets]] instead. */
396
455
  static sweepLinestringToFacetsXYreturnSweptFacets(linestringPoints: GrowableXYZArray, polyface: Polyface): Polyface;
397
456
  /**
398
457
  * Sweep the line string to intersections with a mesh.
@@ -404,9 +463,9 @@ export declare class PolyfaceQuery {
404
463
  static sweepLineStringToFacets(linestringPoints: GrowableXYZArray, polyfaceOrVisitor: Polyface | PolyfaceVisitor, options?: SweepLineStringToFacetsOptions): LinearCurvePrimitive[];
405
464
  /**
406
465
  * Sweep the line string in the z-direction to intersections with a mesh, using a search object for speedup.
407
- * @param lineStringPoints input line string to drape on the mesh
408
- * @param polyfaceOrVisitor mesh, or mesh visitor to traverse only part of a mesh
409
- * @param searchByReadIndex object for searching facet 2D ranges tagged by mesh read index
466
+ * @param lineStringPoints input line string to drape on the mesh.
467
+ * @param polyfaceOrVisitor mesh, or mesh visitor to traverse only part of a mesh.
468
+ * @param searchByReadIndex object for searching facet 2D ranges tagged by mesh read index.
410
469
  * @example Using a 5x5 indexed search grid:
411
470
  * ```
412
471
  * const xyRange = Range2d.createFrom(myPolyface.range());
@@ -416,160 +475,157 @@ export declare class PolyfaceQuery {
416
475
  * }
417
476
  * const drapedLineStrings = PolyfaceQuery.sweepLineStringToFacetsXY(lineString, myPolyface, searcher);
418
477
  * ```
419
- * @returns collected line strings
478
+ * @returns the collected line strings.
420
479
  */
421
480
  static sweepLineStringToFacetsXY(lineStringPoints: GrowableXYZArray | Point3d[], polyfaceOrVisitor: Polyface | PolyfaceVisitor, searchByReadIndex: Range2dSearchInterface<number>): LineString3d[];
422
- /** Find segments (within the linestring) which project to facets.
481
+ /**
482
+ * Find segments (within the linestring) which project to facets.
423
483
  * * Return collected line segments.
424
484
  * * This calls [[sweepLineStringToFacets]] with options created by
425
- * `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(),false, true, true, true);`
426
- * @deprecated in 4.x. Use [[sweepLineStringToFacets]] to get further options.
485
+ * `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(), false, true, true, true);`
486
+ * @deprecated in 4.x. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
427
487
  */
428
488
  static sweepLinestringToFacetsXYReturnLines(linestringPoints: GrowableXYZArray, polyface: Polyface): LineSegment3d[];
429
- /** Find segments (within the linestring) which project to facets.
489
+ /**
490
+ * Find segments (within the linestring) which project to facets.
430
491
  * * Return chains.
431
492
  * * This calls [[sweepLineStringToFacets]] with options created by
432
493
  * `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(),true, true, true, true);`
433
- * @deprecated in 4.x. Use [[sweepLineStringToFacets]] to get further options.
494
+ * @deprecated in 4.x. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
434
495
  */
435
496
  static sweepLinestringToFacetsXYReturnChains(linestringPoints: GrowableXYZArray, polyface: Polyface): LineString3d[];
436
- /** Find segments (within the linestring) which project to facets.
497
+ /**
498
+ * Find segments (within the linestring) which project to facets.
437
499
  * * This is done as a sequence of "await" steps.
438
- * * Each "await" step deals with approximately PolyfaceQuery.asyncWorkLimit pairings of (linestring edge) with (facet edge)
439
- * * PolyfaceQuery.setAsyncWorkLimit() to change work blocks from default
500
+ * * Each "await" step deals with approximately PolyfaceQuery.asyncWorkLimit pairings of "linestring edge"
501
+ * with "facet edge".
502
+ * * PolyfaceQuery.setAsyncWorkLimit() to change work blocks from default.
440
503
  * * Return chains.
441
504
  * * Facets are ASSUMED to be convex and planar, and not overlap in the z direction.
442
505
  */
443
506
  static asyncSweepLinestringToFacetsXYReturnChains(linestringPoints: GrowableXYZArray, polyface: Polyface): Promise<LineString3d[]>;
444
507
  /**
445
- * * Examine ranges of facets.
508
+ * Examine ranges of facets.
446
509
  * * Return statistical summary of x,y,z ranges.
447
510
  */
448
511
  static collectRangeLengthData(polyface: Polyface | PolyfaceVisitor): RangeLengthData;
449
- /** Clone the facets, inserting vertices (within edges) where points not part of each facet's vertex indices impinge within edges.
450
- *
512
+ /**
513
+ * Clone the facets, inserting vertices (within edges) where points not part of each facet's vertex indices
514
+ * impinge within edges.
451
515
  */
452
516
  static cloneWithTVertexFixup(polyface: Polyface): IndexedPolyface;
453
517
  /**
518
+ * Compare index arrays formatted as follows. Return 0 if arrays are the same.
454
519
  * * Each array input structure is: [facetIndex, vertexIndex0, vertexIndex1, ....]
455
- * * Vertex indices assumed reversed so it
456
- * * vertexIndex0 is the lowest index on the facet
457
- * * vertexIndex1 is the lowest neighbor of vertex0
520
+ * * Vertex indices assumed reversed so:
521
+ * * vertexIndex0 is the lowest index on the facet.
522
+ * * vertexIndex1 is the lowest neighbor of vertex0.
458
523
  * * first different entry among vertex indices determines lexical result.
459
- * * Hence facets with duplicate indices (whether forward or reversed) are considered equal.
460
- * @param arrayA
461
- * @param arrayB
524
+ * * hence facets with duplicate indices (whether forward or reversed) are considered equal.
462
525
  */
463
526
  private static compareFacetIndexAndVertexIndices;
464
527
  /**
465
- * * Return an array of arrays describing facet duplication.
466
- * @param includeSingletons if true, non-duplicated facets are included in the output.
467
- * * Each array `entry` in the output contains read indices of a cluster of facets with the same vertex indices.
528
+ * Announce facet duplicates.
529
+ * @returns an array of arrays describing facet duplication. Each array `entry` in the output contains read
530
+ * indices of a cluster of facets with the same vertex indices.
468
531
  */
469
- static collectDuplicateFacetIndices(polyface: Polyface, includeSingletons?: boolean): number[][];
532
+ static announceDuplicateFacetIndices(polyface: Polyface, announceCluster: (clusterFacetIndices: number[]) => void): void;
470
533
  /**
471
- * * Return an array of arrays describing facet duplication.
534
+ * Collect facet duplicates.
535
+ * @param polyface the polyface.
472
536
  * @param includeSingletons if true, non-duplicated facets are included in the output.
473
- * * Each array `entry` in the output contains read indices of a cluster of facets with the same vertex indices.
537
+ * @returns an array of arrays describing facet duplication. Each array `entry` in the output contains read
538
+ * indices of a cluster of facets with the same vertex indices.
474
539
  */
475
- static announceDuplicateFacetIndices(polyface: Polyface, announceCluster: (clusterFacetIndices: number[]) => void): void;
476
- /** Return a new facet set with a subset of facets in source
540
+ static collectDuplicateFacetIndices(polyface: Polyface, includeSingletons?: boolean): number[][];
541
+ /**
542
+ * Return a new facet set with a subset of facets in polyface.
543
+ * @param source the polyface.
477
544
  * @param includeSingletons true to copy facets that only appear once
478
- * @param clusterSelector indicates whether duplicate clusters are to have 0, 1, or all facets included
545
+ * @param clusterSelector indicates whether duplicate clusters are to have 0, 1, or all facets included.
479
546
  */
480
547
  static cloneByFacetDuplication(source: Polyface, includeSingletons: boolean, clusterSelector: DuplicateFacetClusterSelector): Polyface;
481
- /** Clone the facets, inserting removing points that are simply within colinear edges.
482
- *
483
- */
548
+ /** Clone the facets, removing points that are simply within colinear edges. */
484
549
  static cloneWithColinearEdgeFixup(polyface: Polyface): Polyface;
485
550
  /**
486
551
  * Set the edge visibility for specified edges in the polyface.
487
- * @param polyface mesh to be edited
488
- * @param clusters array of edge references
489
- * @param value visibility value (true or false)
552
+ * @param polyface mesh to be edited.
553
+ * @param clusters array of edge references.
554
+ * @param value visibility value (true or false).
490
555
  */
491
556
  private static setEdgeVisibility;
492
557
  /**
493
558
  * Set the visibility of a particular edge of a particular facet.
494
- * @param polyface containing polyface
495
- * @param facetIndex facet index
496
- * @param vertexIndex vertex index (in vertex array) at which the edge starts
559
+ * @param polyface containing polyface.
560
+ * @param facetIndex facet index.
561
+ * @param vertexIndex vertex index (in vertex array) at which the edge starts.
497
562
  * @param value visibility value.
498
563
  */
499
564
  static setSingleEdgeVisibility(polyface: IndexedPolyface, facetIndex: number, vertexIndex: number, value: boolean): void;
500
565
  /**
501
566
  * Get the visibility of a particular edge of a particular facet.
502
- * @param polyface containing polyface
503
- * @param facetIndex facet index
504
- * @param vertexIndex vertex index (in vertex array) at which the edge starts
567
+ * @param polyface containing polyface.
568
+ * @param facetIndex facet index.
569
+ * @param vertexIndex vertex index (in vertex array) at which the edge starts.
505
570
  */
506
571
  static getSingleEdgeVisibility(polyface: IndexedPolyface, facetIndex: number, vertexIndex: number): boolean | undefined;
507
- /** Load all half edges from a mesh to an IndexedEdgeMatcher.
508
- * @param polyface a mesh, or a visitor assumed to have numWrap === 1
509
- */
510
- static createIndexedEdges(polyface: Polyface | PolyfaceVisitor): IndexedEdgeMatcher;
511
572
  /**
512
573
  * Return manifold edge pairs whose dihedral angle is bounded by the given angle.
513
574
  * * The dihedral angle of a manifold edge is measured between the normals of its two adjacent faces.
514
575
  * * Boundary edges are not returned as they are not manifold.
515
- * @param mesh existing polyface or visitor
516
- * @param maxSmoothEdgeAngle maximum dihedral angle of a smooth edge. If undefined, uses `Geometry.smallAngleRadians`.
517
- * @param sharpEdges true to reverse the angle threshold test and return sharp edges; otherwise return smooth edges (default)
576
+ * @param mesh existing polyface or visitor.
577
+ * @param maxSmoothEdgeAngle maximum dihedral angle of a smooth edge. If `undefined`, uses `Geometry.smallAngleRadians`.
578
+ * @param sharpEdges true to reverse the angle threshold test and return sharp edges; otherwise return smooth edges (default).
518
579
  */
519
580
  static collectEdgesByDihedralAngle(mesh: Polyface | PolyfaceVisitor, maxSmoothEdgeAngle?: Angle, sharpEdges?: boolean): SortableEdgeCluster[];
520
581
  /**
582
+ * Make paired edges invisible.
521
583
  * * Find mated pairs among facet edges.
522
584
  * * Mated pairs have the same vertex indices appearing in opposite order.
523
585
  * * Mark all non-mated pairs visible.
524
586
  * * At mated pairs
525
587
  * * if angle across the edge is larger than `sharpEdgeAngle`, mark visible
526
588
  * * otherwise mark invisible.
527
- * @param mesh mesh to be marked
528
589
  */
529
590
  static markPairedEdgesInvisible(mesh: IndexedPolyface, sharpEdgeAngle?: Angle): void;
530
- /** Try to compute a unit normal for a facet accessible through a visitor.
591
+ /**
592
+ * Try to compute a unit normal for a facet accessible through a visitor.
531
593
  * * Unit normal is computed by `PolygonOps.unitNormal` with the points around the facet.
532
594
  */
533
595
  static computeFacetUnitNormal(visitor: PolyfaceVisitor, facetIndex: number, result?: Vector3d): Vector3d | undefined;
534
596
  /**
535
- * * Mark all edge visibilities in the IndexedPolyface
536
- * @param mesh mesh to be marked
537
- * @param value true for visible, false for hidden
538
- */
597
+ * * Mark all edge visibilities in the IndexedPolyface.
598
+ * @param mesh mesh to be marked.
599
+ * @param value true for visible, false for hidden.
600
+ */
539
601
  static markAllEdgeVisibility(mesh: IndexedPolyface, value: boolean): void;
540
602
  /**
541
- * Create a HalfEdgeGraph with a face for each facet of the IndexedPolyface
542
- * @param mesh mesh to convert
603
+ * Create a HalfEdgeGraph with a face for each facet of the IndexedPolyface.
604
+ * @param mesh mesh to convert.
543
605
  * @internal
544
606
  */
545
607
  static convertToHalfEdgeGraph(mesh: IndexedPolyface): HalfEdgeGraph;
546
- /**
547
- * * Examine adjacent facet orientations throughout the mesh
548
- * * If possible, reverse a subset to achieve proper pairing.
549
- * @param mesh
550
- */
608
+ /** Examine adjacent facet orientations throughout the mesh. If possible, reverse a subset to achieve proper pairing. */
551
609
  static reorientVertexOrderAroundFacetsForConsistentOrientation(mesh: IndexedPolyface): boolean;
552
- /**
553
- * Set up indexed normals with one normal in the plane of each facet of the mesh.
554
- * @param polyface
555
- */
610
+ /** Set up indexed normals with one normal in the plane of each facet of the mesh. */
556
611
  static buildPerFaceNormals(polyface: IndexedPolyface): void;
557
612
  /**
558
- * * At each vertex of the mesh
559
- * * Find clusters of almost parallel normals
560
- * * Compute simple average of those normals
561
- * * Index to the averages
613
+ * * At each vertex of the mesh:
614
+ * * Find clusters of almost parallel normals.
615
+ * * Compute simple average of those normals.
616
+ * * Index to the averages.
562
617
  * * For typical meshes, this correctly clusters adjacent normals.
563
- * * One can imagine a vertex with multiple "smooth cone-like" sets of incident facets such that averaging occurs among two nonadjacent cones. But this does not seem to be a problem in practice.
618
+ * * One can imagine a vertex with multiple "smooth cone-like" sets of adjacent facets such that averaging occurs
619
+ * among two nonadjacent cones. But this does not seem to be a problem in practice.
564
620
  * @param polyface polyface to update.
565
621
  * @param toleranceAngle averaging is done between normals up to this angle.
566
622
  */
567
623
  static buildAverageNormals(polyface: IndexedPolyface, toleranceAngle?: Angle): void;
568
624
  /**
569
625
  * Offset the faces of the mesh.
570
- * @param source original mesh
626
+ * @param source original mesh.
571
627
  * @param signedOffsetDistance distance to offset
572
- * @param offsetOptions angle options. The default options are recommended.
628
+ * @param offsetOptions angle options. The default options are recommended.
573
629
  * @returns shifted mesh.
574
630
  */
575
631
  static cloneOffset(source: IndexedPolyface, signedOffsetDistance: number, offsetOptions?: OffsetMeshOptions): IndexedPolyface;
@@ -579,29 +635,24 @@ export declare class PolyfaceQuery {
579
635
  private static _workFacetDetail3?;
580
636
  private static _workFacetDetailC?;
581
637
  private static _workFacetDetailNC?;
582
- /** Search facets for the first one that intersects the infinite line.
583
- * * To process _all_ intersections, callers can supply an `options.acceptIntersection` callback that always returns false.
584
- * In this case, `intersectRay3d` will return undefined, but the callback will be invoked for each intersection.
638
+ /**
639
+ * Search facets for the first one that intersects the infinite line.
640
+ * * To process _all_ intersections, callers can supply an `options.acceptIntersection` callback that always
641
+ * returns `false`.
642
+ * In this case, `intersectRay3d` will return `undefined`, but the callback will be invoked for each intersection.
585
643
  * * Example callback logic:
586
644
  * * Accept the first found facet that intersects the half-line specified by the ray: `return detail.a >= 0.0;`
587
- * * Collect all intersections: `myIntersections.push(detail.clone()); return false;` Then after `intersectRay3d` returns, sort along `ray` with `myIntersections.sort((d0, d1) => d0.a - d1.a);`
588
- * @param visitor facet iterator
589
- * @param ray infinite line parameterized as a ray. The returned `detail.a` is the intersection parameter on the ray, e.g., zero at `ray.origin` and increasing in `ray.direction`.
590
- * @param options options for computing and populating an intersection detail, and an optional callback for accepting one
591
- * @return detail for the (accepted) intersection with `detail.IsInsideOrOn === true`, or `undefined` if no (accepted) intersection
645
+ * * Collect all intersections: `myIntersections.push(detail.clone()); return false;` Then after `intersectRay3d`
646
+ * returns, sort along `ray` with `myIntersections.sort((d0, d1) => d0.a - d1.a);`
647
+ * @param visitor facet iterator.
648
+ * @param ray infinite line parameterized as a ray. The returned `detail.a` is the intersection parameter on the
649
+ * ray, e.g., zero at `ray.origin` and increasing in `ray.direction`.
650
+ * @param options options for computing and populating an intersection detail, and an optional callback for
651
+ * accepting one.
652
+ * @return detail for the (accepted) intersection with `detail.IsInsideOrOn === true`, or `undefined` if no
653
+ * (accepted) intersection.
592
654
  * @see PolygonOps.intersectRay3d
593
655
  */
594
656
  static intersectRay3d(visitor: Polyface | PolyfaceVisitor, ray: Ray3d, options?: FacetIntersectOptions): FacetLocationDetail | undefined;
595
657
  }
596
- /** Announce the points on a drape panel.
597
- * * The first two points in the array are always along the draped line segment.
598
- * * The last two are always on the facet.
599
- * * If there are 4 points, those two pairs are distinct, i.e. both segment points are to the same side of the facet.
600
- * * If there are 3 points, those two pairs share an on-facet point.
601
- * * The panel is ordered so the outward normal is to the right of the draped segment.
602
- * @param indexAOnFacet index (in points) of the point that is the first facet point for moving forward along the linestring
603
- * @param indexBOnFacet index (in points) of the point that is the second facet point for moving forward along the linestring
604
- * @public
605
- */
606
- export type AnnounceDrapePanel = (linestring: GrowableXYZArray, segmentIndex: number, polyface: Polyface, facetIndex: number, points: Point3d[], indexAOnFacet: number, indexBOnFacet: number) => any;
607
658
  //# sourceMappingURL=PolyfaceQuery.d.ts.map