@itwin/rpcinterface-full-stack-tests 5.0.0-dev.113 → 5.0.0-dev.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/_bea9.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +1152 -851
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_cross-fetch_4_0_0_node_modules_cross-fetch_dist_browser-24291b.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js.map +1 -1
- package/package.json +14 -14
|
@@ -204537,25 +204537,48 @@ class InteractiveTool extends Tool {
|
|
|
204537
204537
|
return foundProperty;
|
|
204538
204538
|
throw new Error(`property not found: ${propertyName}`);
|
|
204539
204539
|
}
|
|
204540
|
-
/** Override to return the property that is
|
|
204540
|
+
/** Override to return the property that is locked by the supplied property if it is a lock property.
|
|
204541
|
+
* Used to enable/disable the returned property according to the current lock state.
|
|
204542
|
+
* @note Only applicable when [[getToolSettingLockProperty]] is not being used automatically enable the lock on a change of value.
|
|
204541
204543
|
* @see [[changeToolSettingPropertyValue]]
|
|
204542
204544
|
* @public
|
|
204543
204545
|
*/
|
|
204544
204546
|
getToolSettingPropertyLocked(_property) {
|
|
204545
204547
|
return undefined;
|
|
204546
204548
|
}
|
|
204549
|
+
/** Override to return the lock property associated with the supplied non-lock property.
|
|
204550
|
+
* Used to enable the lock property after the value of the supplied property is changed.
|
|
204551
|
+
* @see [[changeToolSettingPropertyValue]]
|
|
204552
|
+
* @beta
|
|
204553
|
+
*/
|
|
204554
|
+
getToolSettingLockProperty(_property) {
|
|
204555
|
+
return undefined;
|
|
204556
|
+
}
|
|
204547
204557
|
/** Helper method for responding to a tool setting property value change by updating saved settings.
|
|
204548
204558
|
* @see [[applyToolSettingPropertyChange]]
|
|
204549
204559
|
* @see [[getToolSettingPropertyLocked]] to return the corresponding locked property, if any.
|
|
204560
|
+
* @see [[getToolSettingLockProperty]] to return the corresponding property's lock property, if any.
|
|
204550
204561
|
* @public
|
|
204551
204562
|
*/
|
|
204552
204563
|
changeToolSettingPropertyValue(syncItem) {
|
|
204553
204564
|
const property = this.getToolSettingPropertyByName(syncItem.propertyName);
|
|
204554
204565
|
if (!this.saveToolSettingPropertyValue(property, syncItem.value))
|
|
204555
204566
|
return false;
|
|
204556
|
-
|
|
204557
|
-
|
|
204558
|
-
|
|
204567
|
+
// Either enable lock when corresponding property value changes, or enable/disable property according to value of lock...
|
|
204568
|
+
const lockProperty = this.getToolSettingLockProperty(property);
|
|
204569
|
+
if (undefined !== lockProperty) {
|
|
204570
|
+
if (!lockProperty.value) {
|
|
204571
|
+
this.saveToolSettingPropertyValue(lockProperty, { value: true });
|
|
204572
|
+
this.syncToolSettingPropertyValue(lockProperty);
|
|
204573
|
+
}
|
|
204574
|
+
}
|
|
204575
|
+
else {
|
|
204576
|
+
const propertyToLock = this.getToolSettingPropertyLocked(property);
|
|
204577
|
+
if (undefined !== propertyToLock) {
|
|
204578
|
+
if (undefined === this.getToolSettingLockProperty(propertyToLock))
|
|
204579
|
+
this.syncToolSettingPropertyValue(propertyToLock, !property.value);
|
|
204580
|
+
}
|
|
204581
|
+
}
|
|
204559
204582
|
return true;
|
|
204560
204583
|
}
|
|
204561
204584
|
/** Helper method to establish initial values for tool setting properties from saved settings.
|
|
@@ -210629,7 +210652,7 @@ class SetupCameraTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_17__.Primi
|
|
|
210629
210652
|
_cameraHeightProperty;
|
|
210630
210653
|
get cameraHeightProperty() {
|
|
210631
210654
|
if (!this._cameraHeightProperty)
|
|
210632
|
-
this._cameraHeightProperty = new _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_3__.DialogProperty(new _properties_LengthDescription__WEBPACK_IMPORTED_MODULE_8__.LengthDescription("cameraHeight", ViewTool.translate("SetupCamera.Labels.CameraHeight")), 0.0
|
|
210655
|
+
this._cameraHeightProperty = new _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_3__.DialogProperty(new _properties_LengthDescription__WEBPACK_IMPORTED_MODULE_8__.LengthDescription("cameraHeight", ViewTool.translate("SetupCamera.Labels.CameraHeight")), 0.0);
|
|
210633
210656
|
return this._cameraHeightProperty;
|
|
210634
210657
|
}
|
|
210635
210658
|
get cameraHeight() { return this.cameraHeightProperty.value; }
|
|
@@ -210645,62 +210668,23 @@ class SetupCameraTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_17__.Primi
|
|
|
210645
210668
|
_targetHeightProperty;
|
|
210646
210669
|
get targetHeightProperty() {
|
|
210647
210670
|
if (!this._targetHeightProperty)
|
|
210648
|
-
this._targetHeightProperty = new _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_3__.DialogProperty(new _properties_LengthDescription__WEBPACK_IMPORTED_MODULE_8__.LengthDescription("targetHeight", ViewTool.translate("SetupCamera.Labels.TargetHeight")), 0.0
|
|
210671
|
+
this._targetHeightProperty = new _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_3__.DialogProperty(new _properties_LengthDescription__WEBPACK_IMPORTED_MODULE_8__.LengthDescription("targetHeight", ViewTool.translate("SetupCamera.Labels.TargetHeight")), 0.0);
|
|
210649
210672
|
return this._targetHeightProperty;
|
|
210650
210673
|
}
|
|
210651
210674
|
get targetHeight() { return this.targetHeightProperty.value; }
|
|
210652
210675
|
set targetHeight(value) { this.targetHeightProperty.value = value; }
|
|
210653
|
-
|
|
210654
|
-
|
|
210655
|
-
|
|
210656
|
-
|
|
210657
|
-
|
|
210658
|
-
|
|
210659
|
-
syncTargetHeightState() {
|
|
210660
|
-
const specs = _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.quantityFormatter.getSpecsByName(this.targetHeightProperty.description.kindOfQuantityName ?? "AecUnits.LENGTH");
|
|
210661
|
-
this.targetHeightProperty.displayValue = specs ? specs.formatterSpec.applyFormatting(this.targetHeight) : this.targetHeight.toFixed(2);
|
|
210662
|
-
this.targetHeightProperty.isDisabled = !this.useTargetHeight;
|
|
210663
|
-
this.syncToolSettingsProperties([this.targetHeightProperty.syncItem]);
|
|
210676
|
+
getToolSettingLockProperty(property) {
|
|
210677
|
+
if (property === this.cameraHeightProperty)
|
|
210678
|
+
return this.useCameraHeightProperty;
|
|
210679
|
+
else if (property === this.targetHeightProperty)
|
|
210680
|
+
return this.useTargetHeightProperty;
|
|
210681
|
+
return undefined;
|
|
210664
210682
|
}
|
|
210665
210683
|
async applyToolSettingPropertyChange(updatedValue) {
|
|
210666
|
-
|
|
210667
|
-
this.useCameraHeight = updatedValue.value.value;
|
|
210668
|
-
_IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, this.useCameraHeightProperty.item);
|
|
210669
|
-
this.syncCameraHeightState();
|
|
210670
|
-
}
|
|
210671
|
-
else if (updatedValue.propertyName === this.useTargetHeightProperty.name) {
|
|
210672
|
-
this.useTargetHeight = updatedValue.value.value;
|
|
210673
|
-
_IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, this.useTargetHeightProperty.item);
|
|
210674
|
-
this.syncTargetHeightState();
|
|
210675
|
-
}
|
|
210676
|
-
else if (updatedValue.propertyName === this.cameraHeightProperty.name) {
|
|
210677
|
-
this.cameraHeight = updatedValue.value.value;
|
|
210678
|
-
_IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, this.cameraHeightProperty.item);
|
|
210679
|
-
}
|
|
210680
|
-
else if (updatedValue.propertyName === this.targetHeightProperty.name) {
|
|
210681
|
-
this.targetHeight = updatedValue.value.value;
|
|
210682
|
-
_IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, this.targetHeightProperty.item);
|
|
210683
|
-
}
|
|
210684
|
-
return true;
|
|
210684
|
+
return this.changeToolSettingPropertyValue(updatedValue);
|
|
210685
210685
|
}
|
|
210686
210686
|
supplyToolSettingsProperties() {
|
|
210687
|
-
|
|
210688
|
-
_IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.toolAdmin.toolSettingsState.getInitialToolSettingValues(this.toolId, [
|
|
210689
|
-
this.useCameraHeightProperty.name, this.useTargetHeightProperty.name, this.cameraHeightProperty.name, this.targetHeightProperty.name,
|
|
210690
|
-
])
|
|
210691
|
-
?.forEach((value) => {
|
|
210692
|
-
if (value.propertyName === this.useCameraHeightProperty.name)
|
|
210693
|
-
this.useCameraHeightProperty.dialogItemValue = value.value;
|
|
210694
|
-
else if (value.propertyName === this.cameraHeightProperty.name)
|
|
210695
|
-
this.cameraHeightProperty.dialogItemValue = value.value;
|
|
210696
|
-
else if (value.propertyName === this.useTargetHeightProperty.name)
|
|
210697
|
-
this.useTargetHeightProperty.dialogItemValue = value.value;
|
|
210698
|
-
else if (value.propertyName === this.targetHeightProperty.name)
|
|
210699
|
-
this.targetHeightProperty.dialogItemValue = value.value;
|
|
210700
|
-
});
|
|
210701
|
-
// ensure controls are enabled/disabled base on current lock property state
|
|
210702
|
-
this.targetHeightProperty.isDisabled = !this.useTargetHeight;
|
|
210703
|
-
this.cameraHeightProperty.isDisabled = !this.useCameraHeight;
|
|
210687
|
+
this.initializeToolSettingPropertyValues([this.useCameraHeightProperty, this.useTargetHeightProperty, this.cameraHeightProperty, this.targetHeightProperty]);
|
|
210704
210688
|
const cameraHeightLock = this.useCameraHeightProperty.toDialogItem({ rowPriority: 1, columnIndex: 0 });
|
|
210705
210689
|
const targetHeightLock = this.useTargetHeightProperty.toDialogItem({ rowPriority: 2, columnIndex: 0 });
|
|
210706
210690
|
const toolSettings = new Array();
|
|
@@ -219291,11 +219275,11 @@ class ClipPlane extends _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_0__.Plane3d
|
|
|
219291
219275
|
get inwardNormalRef() {
|
|
219292
219276
|
return this._inwardNormal;
|
|
219293
219277
|
}
|
|
219294
|
-
/** Return the "interior" property
|
|
219278
|
+
/** Return the "interior" property flag. Interpretation of this flag is algorithm-specific. */
|
|
219295
219279
|
get interior() {
|
|
219296
219280
|
return this._interior;
|
|
219297
219281
|
}
|
|
219298
|
-
/** Return the "invisible" property
|
|
219282
|
+
/** Return the "invisible" property flag. Interpretation of this flag is algorithm-specific. */
|
|
219299
219283
|
get invisible() {
|
|
219300
219284
|
return this._invisible;
|
|
219301
219285
|
}
|
|
@@ -219514,7 +219498,7 @@ class ClipPlane extends _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_0__.Plane3d
|
|
|
219514
219498
|
this._distanceFromOrigin = this._inwardNormal.dotProduct(plane.getOriginRef());
|
|
219515
219499
|
return true;
|
|
219516
219500
|
}
|
|
219517
|
-
/** Set the invisible flag. Interpretation of this is
|
|
219501
|
+
/** Set the invisible flag. Interpretation of this flag is algorithm-specific. */
|
|
219518
219502
|
setInvisible(invisible) {
|
|
219519
219503
|
this._invisible = invisible;
|
|
219520
219504
|
}
|
|
@@ -219658,8 +219642,12 @@ class ClipPlane extends _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_0__.Plane3d
|
|
|
219658
219642
|
}
|
|
219659
219643
|
/** Project a point in space to the plane. */
|
|
219660
219644
|
projectPointToPlane(spacePoint, result) {
|
|
219661
|
-
|
|
219662
|
-
|
|
219645
|
+
return this.projectXYZToPlane(spacePoint.x, spacePoint.y, spacePoint.z, result);
|
|
219646
|
+
}
|
|
219647
|
+
/** Return the projection of (x,y,z) onto the plane. */
|
|
219648
|
+
projectXYZToPlane(x, y, z, result) {
|
|
219649
|
+
const scale = -this.altitudeXYZ(x, y, z);
|
|
219650
|
+
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(x + scale * this._inwardNormal.x, y + scale * this._inwardNormal.y, z + scale * this._inwardNormal.z, result);
|
|
219663
219651
|
}
|
|
219664
219652
|
}
|
|
219665
219653
|
|
|
@@ -221958,8 +221946,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
221958
221946
|
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
221959
221947
|
/* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
|
|
221960
221948
|
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
221961
|
-
/* harmony import */ var
|
|
221962
|
-
/* harmony import */ var
|
|
221949
|
+
/* harmony import */ var _polyface_Polyface__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../polyface/Polyface */ "../../core/geometry/lib/esm/polyface/Polyface.js");
|
|
221950
|
+
/* harmony import */ var _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../polyface/PolyfaceQuery */ "../../core/geometry/lib/esm/polyface/PolyfaceQuery.js");
|
|
221963
221951
|
/* harmony import */ var _ClipPlane__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ClipPlane */ "../../core/geometry/lib/esm/clipping/ClipPlane.js");
|
|
221964
221952
|
/* harmony import */ var _ClipUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ClipUtils */ "../../core/geometry/lib/esm/clipping/ClipUtils.js");
|
|
221965
221953
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -222699,29 +222687,18 @@ class ConvexClipPlaneSet {
|
|
|
222699
222687
|
static createConvexPolyface(convexMesh, result) {
|
|
222700
222688
|
result = this.createEmpty(result);
|
|
222701
222689
|
let vol = 0;
|
|
222702
|
-
|
|
222703
|
-
|
|
222704
|
-
|
|
222705
|
-
|
|
222706
|
-
|
|
222707
|
-
|
|
222708
|
-
|
|
222709
|
-
|
|
222710
|
-
|
|
222711
|
-
|
|
222712
|
-
|
|
222713
|
-
|
|
222714
|
-
vol = _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_11__.PolyfaceQuery.sumTetrahedralVolumes(myVisitor);
|
|
222715
|
-
const scale = vol > 0.0 ? -1.0 : 1.0; // point clipper normals inward if mesh normals point outward
|
|
222716
|
-
const normal = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create();
|
|
222717
|
-
const plane = _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_1__.Plane3dByOriginAndUnitNormal.createXYPlane();
|
|
222718
|
-
myVisitor.reset();
|
|
222719
|
-
while (myVisitor.moveToNextFacet()) {
|
|
222720
|
-
if (undefined !== _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_7__.PolygonOps.areaNormalGo(myVisitor.point, normal)) {
|
|
222721
|
-
normal.scaleInPlace(scale);
|
|
222722
|
-
if (undefined !== _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_1__.Plane3dByOriginAndUnitNormal.create(myVisitor.point.front(), normal, plane))
|
|
222723
|
-
result.addPlaneToConvexSet(plane);
|
|
222724
|
-
}
|
|
222690
|
+
if (_polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_10__.PolyfaceQuery.isPolyfaceClosedByEdgePairing(convexMesh))
|
|
222691
|
+
vol = _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_10__.PolyfaceQuery.sumTetrahedralVolumes(convexMesh);
|
|
222692
|
+
const scale = vol > 0.0 ? -1.0 : 1.0; // point clipper normals inward if mesh normals point outward
|
|
222693
|
+
const normal = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create();
|
|
222694
|
+
const plane = _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_1__.Plane3dByOriginAndUnitNormal.createXYPlane();
|
|
222695
|
+
const visitor = convexMesh instanceof _polyface_Polyface__WEBPACK_IMPORTED_MODULE_11__.Polyface ? convexMesh.createVisitor(0) : convexMesh;
|
|
222696
|
+
visitor.setNumWrap(0);
|
|
222697
|
+
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
222698
|
+
if (undefined !== _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_7__.PolygonOps.areaNormalGo(visitor.point, normal)) {
|
|
222699
|
+
normal.scaleInPlace(scale);
|
|
222700
|
+
if (undefined !== _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_1__.Plane3dByOriginAndUnitNormal.create(visitor.point.front(), normal, plane))
|
|
222701
|
+
result.addPlaneToConvexSet(plane);
|
|
222725
222702
|
}
|
|
222726
222703
|
}
|
|
222727
222704
|
return { clipper: result, volume: vol };
|
|
@@ -223316,7 +223293,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
223316
223293
|
/* harmony export */ BSplineWrapMode: () => (/* reexport safe */ _bspline_KnotVector__WEBPACK_IMPORTED_MODULE_108__.BSplineWrapMode),
|
|
223317
223294
|
/* harmony export */ BagOfCurves: () => (/* reexport safe */ _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_64__.BagOfCurves),
|
|
223318
223295
|
/* harmony export */ BarycentricTriangle: () => (/* reexport safe */ _geometry3d_BarycentricTriangle__WEBPACK_IMPORTED_MODULE_3__.BarycentricTriangle),
|
|
223319
|
-
/* harmony export */ BentleyGeometryFlatBuffer: () => (/* reexport safe */
|
|
223296
|
+
/* harmony export */ BentleyGeometryFlatBuffer: () => (/* reexport safe */ _serialization_BentleyGeometryFlatBuffer__WEBPACK_IMPORTED_MODULE_132__.BentleyGeometryFlatBuffer),
|
|
223320
223297
|
/* harmony export */ Bezier1dNd: () => (/* reexport safe */ _bspline_Bezier1dNd__WEBPACK_IMPORTED_MODULE_98__.Bezier1dNd),
|
|
223321
223298
|
/* harmony export */ BezierCoffs: () => (/* reexport safe */ _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_51__.BezierCoffs),
|
|
223322
223299
|
/* harmony export */ BezierCurve3d: () => (/* reexport safe */ _bspline_BezierCurve3d__WEBPACK_IMPORTED_MODULE_100__.BezierCurve3d),
|
|
@@ -223336,7 +223313,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
223336
223313
|
/* harmony export */ ClipStepAction: () => (/* reexport safe */ _clipping_ClipUtils__WEBPACK_IMPORTED_MODULE_44__.ClipStepAction),
|
|
223337
223314
|
/* harmony export */ ClipUtilities: () => (/* reexport safe */ _clipping_ClipUtils__WEBPACK_IMPORTED_MODULE_44__.ClipUtilities),
|
|
223338
223315
|
/* harmony export */ ClipVector: () => (/* reexport safe */ _clipping_ClipVector__WEBPACK_IMPORTED_MODULE_43__.ClipVector),
|
|
223339
|
-
/* harmony export */ ClippedPolyfaceBuilders: () => (/* reexport safe */
|
|
223316
|
+
/* harmony export */ ClippedPolyfaceBuilders: () => (/* reexport safe */ _polyface_PolyfaceClip__WEBPACK_IMPORTED_MODULE_122__.ClippedPolyfaceBuilders),
|
|
223340
223317
|
/* harmony export */ ClusterableArray: () => (/* reexport safe */ _numerics_ClusterableArray__WEBPACK_IMPORTED_MODULE_52__.ClusterableArray),
|
|
223341
223318
|
/* harmony export */ Complex: () => (/* reexport safe */ _numerics_Complex__WEBPACK_IMPORTED_MODULE_53__.Complex),
|
|
223342
223319
|
/* harmony export */ Cone: () => (/* reexport safe */ _solid_Cone__WEBPACK_IMPORTED_MODULE_89__.Cone),
|
|
@@ -223364,9 +223341,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
223364
223341
|
/* harmony export */ CurveSearchStatus: () => (/* reexport safe */ _curve_CurveLocationDetail__WEBPACK_IMPORTED_MODULE_66__.CurveSearchStatus),
|
|
223365
223342
|
/* harmony export */ CutLoop: () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.CutLoop),
|
|
223366
223343
|
/* harmony export */ CutLoopMergeContext: () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.CutLoopMergeContext),
|
|
223367
|
-
/* harmony export */ DeepCompare: () => (/* reexport safe */
|
|
223344
|
+
/* harmony export */ DeepCompare: () => (/* reexport safe */ _serialization_DeepCompare__WEBPACK_IMPORTED_MODULE_129__.DeepCompare),
|
|
223368
223345
|
/* harmony export */ DirectSpiral3d: () => (/* reexport safe */ _curve_spiral_DirectSpiral3d__WEBPACK_IMPORTED_MODULE_85__.DirectSpiral3d),
|
|
223369
|
-
/* harmony export */ DuplicateFacetClusterSelector: () => (/* reexport safe */
|
|
223346
|
+
/* harmony export */ DuplicateFacetClusterSelector: () => (/* reexport safe */ _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_121__.DuplicateFacetClusterSelector),
|
|
223370
223347
|
/* harmony export */ Ellipsoid: () => (/* reexport safe */ _geometry3d_Ellipsoid__WEBPACK_IMPORTED_MODULE_5__.Ellipsoid),
|
|
223371
223348
|
/* harmony export */ EllipsoidPatch: () => (/* reexport safe */ _geometry3d_Ellipsoid__WEBPACK_IMPORTED_MODULE_5__.EllipsoidPatch),
|
|
223372
223349
|
/* harmony export */ EllipticalArcApproximationOptions: () => (/* reexport safe */ _curve_Arc3d__WEBPACK_IMPORTED_MODULE_59__.EllipticalArcApproximationOptions),
|
|
@@ -223381,18 +223358,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
223381
223358
|
/* harmony export */ Geometry: () => (/* reexport safe */ _Geometry__WEBPACK_IMPORTED_MODULE_36__.Geometry),
|
|
223382
223359
|
/* harmony export */ GeometryHandler: () => (/* reexport safe */ _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_8__.GeometryHandler),
|
|
223383
223360
|
/* harmony export */ GeometryQuery: () => (/* reexport safe */ _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_71__.GeometryQuery),
|
|
223384
|
-
/* harmony export */ GriddedRaggedRange2dSet: () => (/* reexport safe */
|
|
223385
|
-
/* harmony export */ GriddedRaggedRange2dSetWithOverflow: () => (/* reexport safe */
|
|
223361
|
+
/* harmony export */ GriddedRaggedRange2dSet: () => (/* reexport safe */ _polyface_multiclip_GriddedRaggedRange2dSet__WEBPACK_IMPORTED_MODULE_117__.GriddedRaggedRange2dSet),
|
|
223362
|
+
/* harmony export */ GriddedRaggedRange2dSetWithOverflow: () => (/* reexport safe */ _polyface_multiclip_GriddedRaggedRange2dSetWithOverflow__WEBPACK_IMPORTED_MODULE_118__.GriddedRaggedRange2dSetWithOverflow),
|
|
223386
223363
|
/* harmony export */ GrowableBlockedArray: () => (/* reexport safe */ _geometry3d_GrowableBlockedArray__WEBPACK_IMPORTED_MODULE_9__.GrowableBlockedArray),
|
|
223387
223364
|
/* harmony export */ GrowableFloat64Array: () => (/* reexport safe */ _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_10__.GrowableFloat64Array),
|
|
223388
223365
|
/* harmony export */ GrowableXYArray: () => (/* reexport safe */ _geometry3d_GrowableXYArray__WEBPACK_IMPORTED_MODULE_11__.GrowableXYArray),
|
|
223389
223366
|
/* harmony export */ GrowableXYZArray: () => (/* reexport safe */ _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_12__.GrowableXYZArray),
|
|
223390
|
-
/* harmony export */ IModelJson: () => (/* reexport safe */
|
|
223367
|
+
/* harmony export */ IModelJson: () => (/* reexport safe */ _serialization_IModelJsonSchema__WEBPACK_IMPORTED_MODULE_128__.IModelJson),
|
|
223391
223368
|
/* harmony export */ IndexedCollectionInterval: () => (/* reexport safe */ _geometry3d_IndexedCollectionInterval__WEBPACK_IMPORTED_MODULE_13__.IndexedCollectionInterval),
|
|
223369
|
+
/* harmony export */ IndexedEdgeMatcher: () => (/* reexport safe */ _polyface_IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_114__.IndexedEdgeMatcher),
|
|
223392
223370
|
/* harmony export */ IndexedPolyface: () => (/* reexport safe */ _polyface_Polyface__WEBPACK_IMPORTED_MODULE_112__.IndexedPolyface),
|
|
223393
|
-
/* harmony export */ IndexedPolyfaceSubsetVisitor: () => (/* reexport safe */
|
|
223394
|
-
/* harmony export */ IndexedPolyfaceVisitor: () => (/* reexport safe */
|
|
223395
|
-
/* harmony export */ IndexedPolyfaceWalker: () => (/* reexport safe */
|
|
223371
|
+
/* harmony export */ IndexedPolyfaceSubsetVisitor: () => (/* reexport safe */ _polyface_IndexedPolyfaceVisitor__WEBPACK_IMPORTED_MODULE_115__.IndexedPolyfaceSubsetVisitor),
|
|
223372
|
+
/* harmony export */ IndexedPolyfaceVisitor: () => (/* reexport safe */ _polyface_IndexedPolyfaceVisitor__WEBPACK_IMPORTED_MODULE_115__.IndexedPolyfaceVisitor),
|
|
223373
|
+
/* harmony export */ IndexedPolyfaceWalker: () => (/* reexport safe */ _polyface_IndexedPolyfaceWalker__WEBPACK_IMPORTED_MODULE_116__.IndexedPolyfaceWalker),
|
|
223396
223374
|
/* harmony export */ IndexedReadWriteXYZCollection: () => (/* reexport safe */ _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_15__.IndexedReadWriteXYZCollection),
|
|
223397
223375
|
/* harmony export */ IndexedXYCollection: () => (/* reexport safe */ _geometry3d_IndexedXYCollection__WEBPACK_IMPORTED_MODULE_14__.IndexedXYCollection),
|
|
223398
223376
|
/* harmony export */ IndexedXYZCollection: () => (/* reexport safe */ _geometry3d_IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_15__.IndexedXYZCollection),
|
|
@@ -223406,7 +223384,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
223406
223384
|
/* harmony export */ KnotVector: () => (/* reexport safe */ _bspline_KnotVector__WEBPACK_IMPORTED_MODULE_108__.KnotVector),
|
|
223407
223385
|
/* harmony export */ LineSegment3d: () => (/* reexport safe */ _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_72__.LineSegment3d),
|
|
223408
223386
|
/* harmony export */ LineString3d: () => (/* reexport safe */ _curve_LineString3d__WEBPACK_IMPORTED_MODULE_73__.LineString3d),
|
|
223409
|
-
/* harmony export */ LineString3dRangeTreeContext: () => (/* reexport safe */
|
|
223387
|
+
/* harmony export */ LineString3dRangeTreeContext: () => (/* reexport safe */ _polyface_RangeTree_LineString3dRangeTreeContext__WEBPACK_IMPORTED_MODULE_124__.LineString3dRangeTreeContext),
|
|
223410
223388
|
/* harmony export */ LinearSweep: () => (/* reexport safe */ _solid_LinearSweep__WEBPACK_IMPORTED_MODULE_90__.LinearSweep),
|
|
223411
223389
|
/* harmony export */ LongitudeLatitudeNumber: () => (/* reexport safe */ _geometry3d_LongitudeLatitudeAltitude__WEBPACK_IMPORTED_MODULE_2__.LongitudeLatitudeNumber),
|
|
223412
223390
|
/* harmony export */ Loop: () => (/* reexport safe */ _curve_Loop__WEBPACK_IMPORTED_MODULE_74__.Loop),
|
|
@@ -223419,7 +223397,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
223419
223397
|
/* harmony export */ NonConvexFacetLocationDetail: () => (/* reexport safe */ _polyface_FacetLocationDetail__WEBPACK_IMPORTED_MODULE_113__.NonConvexFacetLocationDetail),
|
|
223420
223398
|
/* harmony export */ NullGeometryHandler: () => (/* reexport safe */ _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_8__.NullGeometryHandler),
|
|
223421
223399
|
/* harmony export */ NumberArray: () => (/* reexport safe */ _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_24__.NumberArray),
|
|
223422
|
-
/* harmony export */ OffsetMeshOptions: () => (/* reexport safe */
|
|
223400
|
+
/* harmony export */ OffsetMeshOptions: () => (/* reexport safe */ _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_121__.OffsetMeshOptions),
|
|
223423
223401
|
/* harmony export */ OffsetOptions: () => (/* reexport safe */ _curve_OffsetOptions__WEBPACK_IMPORTED_MODULE_75__.OffsetOptions),
|
|
223424
223402
|
/* harmony export */ Order2Bezier: () => (/* reexport safe */ _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_51__.Order2Bezier),
|
|
223425
223403
|
/* harmony export */ Order3Bezier: () => (/* reexport safe */ _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_51__.Order3Bezier),
|
|
@@ -223442,17 +223420,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
223442
223420
|
/* harmony export */ Point3dArray: () => (/* reexport safe */ _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_24__.Point3dArray),
|
|
223443
223421
|
/* harmony export */ Point3dArrayCarrier: () => (/* reexport safe */ _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_25__.Point3dArrayCarrier),
|
|
223444
223422
|
/* harmony export */ Point3dArrayPolygonOps: () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.Point3dArrayPolygonOps),
|
|
223445
|
-
/* harmony export */ Point3dArrayRangeTreeContext: () => (/* reexport safe */
|
|
223423
|
+
/* harmony export */ Point3dArrayRangeTreeContext: () => (/* reexport safe */ _polyface_RangeTree_Point3dArrayRangeTreeContext__WEBPACK_IMPORTED_MODULE_123__.Point3dArrayRangeTreeContext),
|
|
223446
223424
|
/* harmony export */ Point4d: () => (/* reexport safe */ _geometry4d_Point4d__WEBPACK_IMPORTED_MODULE_47__.Point4d),
|
|
223447
223425
|
/* harmony export */ Point4dArray: () => (/* reexport safe */ _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_24__.Point4dArray),
|
|
223448
223426
|
/* harmony export */ PointString3d: () => (/* reexport safe */ _curve_PointString3d__WEBPACK_IMPORTED_MODULE_80__.PointString3d),
|
|
223449
223427
|
/* harmony export */ Polyface: () => (/* reexport safe */ _polyface_Polyface__WEBPACK_IMPORTED_MODULE_112__.Polyface),
|
|
223450
223428
|
/* harmony export */ PolyfaceAuxData: () => (/* reexport safe */ _polyface_AuxData__WEBPACK_IMPORTED_MODULE_109__.PolyfaceAuxData),
|
|
223451
|
-
/* harmony export */ PolyfaceBuilder: () => (/* reexport safe */
|
|
223452
|
-
/* harmony export */ PolyfaceClip: () => (/* reexport safe */
|
|
223453
|
-
/* harmony export */ PolyfaceData: () => (/* reexport safe */
|
|
223454
|
-
/* harmony export */ PolyfaceQuery: () => (/* reexport safe */
|
|
223455
|
-
/* harmony export */ PolyfaceRangeTreeContext: () => (/* reexport safe */
|
|
223429
|
+
/* harmony export */ PolyfaceBuilder: () => (/* reexport safe */ _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_119__.PolyfaceBuilder),
|
|
223430
|
+
/* harmony export */ PolyfaceClip: () => (/* reexport safe */ _polyface_PolyfaceClip__WEBPACK_IMPORTED_MODULE_122__.PolyfaceClip),
|
|
223431
|
+
/* harmony export */ PolyfaceData: () => (/* reexport safe */ _polyface_PolyfaceData__WEBPACK_IMPORTED_MODULE_120__.PolyfaceData),
|
|
223432
|
+
/* harmony export */ PolyfaceQuery: () => (/* reexport safe */ _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_121__.PolyfaceQuery),
|
|
223433
|
+
/* harmony export */ PolyfaceRangeTreeContext: () => (/* reexport safe */ _polyface_RangeTree_PolyfaceRangeTreeContext__WEBPACK_IMPORTED_MODULE_125__.PolyfaceRangeTreeContext),
|
|
223456
223434
|
/* harmony export */ PolygonLocation: () => (/* reexport safe */ _Geometry__WEBPACK_IMPORTED_MODULE_36__.PolygonLocation),
|
|
223457
223435
|
/* harmony export */ PolygonLocationDetail: () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.PolygonLocationDetail),
|
|
223458
223436
|
/* harmony export */ PolygonLocationDetailPair: () => (/* reexport safe */ _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_27__.PolygonLocationDetailPair),
|
|
@@ -223475,23 +223453,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
223475
223453
|
/* harmony export */ RegionOps: () => (/* reexport safe */ _curve_RegionOps__WEBPACK_IMPORTED_MODULE_79__.RegionOps),
|
|
223476
223454
|
/* harmony export */ RotationalSweep: () => (/* reexport safe */ _solid_RotationalSweep__WEBPACK_IMPORTED_MODULE_91__.RotationalSweep),
|
|
223477
223455
|
/* harmony export */ RuledSweep: () => (/* reexport safe */ _solid_RuledSweep__WEBPACK_IMPORTED_MODULE_92__.RuledSweep),
|
|
223478
|
-
/* harmony export */ Sample: () => (/* reexport safe */
|
|
223456
|
+
/* harmony export */ Sample: () => (/* reexport safe */ _serialization_GeometrySamples__WEBPACK_IMPORTED_MODULE_130__.Sample),
|
|
223479
223457
|
/* harmony export */ Segment1d: () => (/* reexport safe */ _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_31__.Segment1d),
|
|
223480
|
-
/* harmony export */ SerializationHelpers: () => (/* reexport safe */
|
|
223458
|
+
/* harmony export */ SerializationHelpers: () => (/* reexport safe */ _serialization_SerializationHelpers__WEBPACK_IMPORTED_MODULE_131__.SerializationHelpers),
|
|
223481
223459
|
/* harmony export */ SmallSystem: () => (/* reexport safe */ _numerics_SmallSystem__WEBPACK_IMPORTED_MODULE_57__.SmallSystem),
|
|
223482
223460
|
/* harmony export */ SmoothTransformBetweenFrusta: () => (/* reexport safe */ _geometry3d_FrustumAnimation__WEBPACK_IMPORTED_MODULE_7__.SmoothTransformBetweenFrusta),
|
|
223483
223461
|
/* harmony export */ SolidPrimitive: () => (/* reexport safe */ _solid_SolidPrimitive__WEBPACK_IMPORTED_MODULE_93__.SolidPrimitive),
|
|
223484
|
-
/* harmony export */
|
|
223462
|
+
/* harmony export */ SortableEdge: () => (/* reexport safe */ _polyface_IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_114__.SortableEdge),
|
|
223463
|
+
/* harmony export */ SpacePolygonTriangulation: () => (/* reexport safe */ _topology_SpaceTriangulation__WEBPACK_IMPORTED_MODULE_127__.SpacePolygonTriangulation),
|
|
223485
223464
|
/* harmony export */ Sphere: () => (/* reexport safe */ _solid_Sphere__WEBPACK_IMPORTED_MODULE_94__.Sphere),
|
|
223486
223465
|
/* harmony export */ StandardViewIndex: () => (/* reexport safe */ _Geometry__WEBPACK_IMPORTED_MODULE_36__.StandardViewIndex),
|
|
223487
|
-
/* harmony export */ SteppedIndexFunctionFactory: () => (/* reexport safe */
|
|
223466
|
+
/* harmony export */ SteppedIndexFunctionFactory: () => (/* reexport safe */ _serialization_GeometrySamples__WEBPACK_IMPORTED_MODULE_130__.SteppedIndexFunctionFactory),
|
|
223488
223467
|
/* harmony export */ StringifiedClipVector: () => (/* reexport safe */ _clipping_ClipVector__WEBPACK_IMPORTED_MODULE_43__.StringifiedClipVector),
|
|
223489
223468
|
/* harmony export */ StrokeCountMap: () => (/* reexport safe */ _curve_Query_StrokeCountMap__WEBPACK_IMPORTED_MODULE_87__.StrokeCountMap),
|
|
223490
223469
|
/* harmony export */ StrokeOptions: () => (/* reexport safe */ _curve_StrokeOptions__WEBPACK_IMPORTED_MODULE_82__.StrokeOptions),
|
|
223491
223470
|
/* harmony export */ SweepContour: () => (/* reexport safe */ _solid_SweepContour__WEBPACK_IMPORTED_MODULE_95__.SweepContour),
|
|
223492
|
-
/* harmony export */ SweepLineStringToFacetsOptions: () => (/* reexport safe */
|
|
223493
|
-
/* harmony export */ TaggedNumericConstants: () => (/* reexport safe */
|
|
223494
|
-
/* harmony export */ TaggedNumericData: () => (/* reexport safe */
|
|
223471
|
+
/* harmony export */ SweepLineStringToFacetsOptions: () => (/* reexport safe */ _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_121__.SweepLineStringToFacetsOptions),
|
|
223472
|
+
/* harmony export */ TaggedNumericConstants: () => (/* reexport safe */ _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_126__.TaggedNumericConstants),
|
|
223473
|
+
/* harmony export */ TaggedNumericData: () => (/* reexport safe */ _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_126__.TaggedNumericData),
|
|
223495
223474
|
/* harmony export */ TorusPipe: () => (/* reexport safe */ _solid_TorusPipe__WEBPACK_IMPORTED_MODULE_96__.TorusPipe),
|
|
223496
223475
|
/* harmony export */ Transform: () => (/* reexport safe */ _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_32__.Transform),
|
|
223497
223476
|
/* harmony export */ TransitionSpiral3d: () => (/* reexport safe */ _curve_spiral_TransitionSpiral3d__WEBPACK_IMPORTED_MODULE_83__.TransitionSpiral3d),
|
|
@@ -223627,24 +223606,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
223627
223606
|
/* harmony import */ var _polyface_FacetFaceData__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(/*! ./polyface/FacetFaceData */ "../../core/geometry/lib/esm/polyface/FacetFaceData.js");
|
|
223628
223607
|
/* harmony import */ var _polyface_Polyface__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(/*! ./polyface/Polyface */ "../../core/geometry/lib/esm/polyface/Polyface.js");
|
|
223629
223608
|
/* harmony import */ var _polyface_FacetLocationDetail__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(/*! ./polyface/FacetLocationDetail */ "../../core/geometry/lib/esm/polyface/FacetLocationDetail.js");
|
|
223630
|
-
/* harmony import */ var
|
|
223631
|
-
/* harmony import */ var
|
|
223632
|
-
/* harmony import */ var
|
|
223633
|
-
/* harmony import */ var
|
|
223634
|
-
/* harmony import */ var
|
|
223635
|
-
/* harmony import */ var
|
|
223636
|
-
/* harmony import */ var
|
|
223637
|
-
/* harmony import */ var
|
|
223638
|
-
/* harmony import */ var
|
|
223639
|
-
/* harmony import */ var
|
|
223640
|
-
/* harmony import */ var
|
|
223641
|
-
/* harmony import */ var
|
|
223642
|
-
/* harmony import */ var
|
|
223643
|
-
/* harmony import */ var
|
|
223644
|
-
/* harmony import */ var
|
|
223645
|
-
/* harmony import */ var
|
|
223646
|
-
/* harmony import */ var
|
|
223647
|
-
/* harmony import */ var
|
|
223609
|
+
/* harmony import */ var _polyface_IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(/*! ./polyface/IndexedEdgeMatcher */ "../../core/geometry/lib/esm/polyface/IndexedEdgeMatcher.js");
|
|
223610
|
+
/* harmony import */ var _polyface_IndexedPolyfaceVisitor__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(/*! ./polyface/IndexedPolyfaceVisitor */ "../../core/geometry/lib/esm/polyface/IndexedPolyfaceVisitor.js");
|
|
223611
|
+
/* harmony import */ var _polyface_IndexedPolyfaceWalker__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! ./polyface/IndexedPolyfaceWalker */ "../../core/geometry/lib/esm/polyface/IndexedPolyfaceWalker.js");
|
|
223612
|
+
/* harmony import */ var _polyface_multiclip_GriddedRaggedRange2dSet__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(/*! ./polyface/multiclip/GriddedRaggedRange2dSet */ "../../core/geometry/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js");
|
|
223613
|
+
/* harmony import */ var _polyface_multiclip_GriddedRaggedRange2dSetWithOverflow__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(/*! ./polyface/multiclip/GriddedRaggedRange2dSetWithOverflow */ "../../core/geometry/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js");
|
|
223614
|
+
/* harmony import */ var _polyface_PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(/*! ./polyface/PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
|
|
223615
|
+
/* harmony import */ var _polyface_PolyfaceData__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(/*! ./polyface/PolyfaceData */ "../../core/geometry/lib/esm/polyface/PolyfaceData.js");
|
|
223616
|
+
/* harmony import */ var _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(/*! ./polyface/PolyfaceQuery */ "../../core/geometry/lib/esm/polyface/PolyfaceQuery.js");
|
|
223617
|
+
/* harmony import */ var _polyface_PolyfaceClip__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(/*! ./polyface/PolyfaceClip */ "../../core/geometry/lib/esm/polyface/PolyfaceClip.js");
|
|
223618
|
+
/* harmony import */ var _polyface_RangeTree_Point3dArrayRangeTreeContext__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(/*! ./polyface/RangeTree/Point3dArrayRangeTreeContext */ "../../core/geometry/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js");
|
|
223619
|
+
/* harmony import */ var _polyface_RangeTree_LineString3dRangeTreeContext__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(/*! ./polyface/RangeTree/LineString3dRangeTreeContext */ "../../core/geometry/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js");
|
|
223620
|
+
/* harmony import */ var _polyface_RangeTree_PolyfaceRangeTreeContext__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(/*! ./polyface/RangeTree/PolyfaceRangeTreeContext */ "../../core/geometry/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js");
|
|
223621
|
+
/* harmony import */ var _polyface_TaggedNumericData__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(/*! ./polyface/TaggedNumericData */ "../../core/geometry/lib/esm/polyface/TaggedNumericData.js");
|
|
223622
|
+
/* harmony import */ var _topology_SpaceTriangulation__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(/*! ./topology/SpaceTriangulation */ "../../core/geometry/lib/esm/topology/SpaceTriangulation.js");
|
|
223623
|
+
/* harmony import */ var _serialization_IModelJsonSchema__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(/*! ./serialization/IModelJsonSchema */ "../../core/geometry/lib/esm/serialization/IModelJsonSchema.js");
|
|
223624
|
+
/* harmony import */ var _serialization_DeepCompare__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(/*! ./serialization/DeepCompare */ "../../core/geometry/lib/esm/serialization/DeepCompare.js");
|
|
223625
|
+
/* harmony import */ var _serialization_GeometrySamples__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(/*! ./serialization/GeometrySamples */ "../../core/geometry/lib/esm/serialization/GeometrySamples.js");
|
|
223626
|
+
/* harmony import */ var _serialization_SerializationHelpers__WEBPACK_IMPORTED_MODULE_131__ = __webpack_require__(/*! ./serialization/SerializationHelpers */ "../../core/geometry/lib/esm/serialization/SerializationHelpers.js");
|
|
223627
|
+
/* harmony import */ var _serialization_BentleyGeometryFlatBuffer__WEBPACK_IMPORTED_MODULE_132__ = __webpack_require__(/*! ./serialization/BentleyGeometryFlatBuffer */ "../../core/geometry/lib/esm/serialization/BentleyGeometryFlatBuffer.js");
|
|
223648
223628
|
/*---------------------------------------------------------------------------------------------
|
|
223649
223629
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
223650
223630
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -223898,6 +223878,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
223898
223878
|
|
|
223899
223879
|
|
|
223900
223880
|
|
|
223881
|
+
|
|
223901
223882
|
|
|
223902
223883
|
|
|
223903
223884
|
/***/ }),
|
|
@@ -224081,15 +224062,26 @@ class EllipticalArcApproximationOptions {
|
|
|
224081
224062
|
* Circular or elliptic arc.
|
|
224082
224063
|
* * The angle to point equation is:
|
|
224083
224064
|
* * `X = center + cos(theta) * vector0 + sin(theta) * vector90`
|
|
224084
|
-
* *
|
|
224085
|
-
* *
|
|
224086
|
-
* *
|
|
224087
|
-
* *
|
|
224088
|
-
* *
|
|
224089
|
-
*
|
|
224065
|
+
* * The arc's `sweep` determines the range of theta values (angles). In particular:
|
|
224066
|
+
* * The point at `theta = n*360` degrees is `center + vector0` for any integer n.
|
|
224067
|
+
* * The point at `theta = 90 + n*360` degrees is `center + vector90` for any integer n.
|
|
224068
|
+
* * The arc's `sweep` _together with_ `vector0` and `vector90` determine the arc's orientation:
|
|
224069
|
+
* * If `sweep.startDegrees < sweep.endDegrees`, the arc's orientation is counterclockwise with respect to its
|
|
224070
|
+
* `perpendicularVector` (i.e., looking at the arc from the head of this vector).
|
|
224071
|
+
* * Similarly, if `sweep.startDegrees > sweep.endDegrees`, the arc's orientation is clockwise with respect to
|
|
224072
|
+
* its `perpendicularVector`.
|
|
224073
|
+
* * The arc's orientation is _always_ counterclockwise with respect to its `binormalVector`.
|
|
224074
|
+
* * When `vector0` and `vector90` are perpendicular and have equal length, the arc is circular.
|
|
224075
|
+
* * When they are non-perpendicular, the arc is always elliptic.
|
|
224076
|
+
* * When they have unequal length, the arc is always elliptic.
|
|
224077
|
+
* * To create an ellipse in standard major-minor axis form:
|
|
224078
|
+
* * `vector0` is the vector from the center to the major axis extreme.
|
|
224079
|
+
* * `vector90` is the vector from the center to the minor axis extreme.
|
|
224090
224080
|
* * Note that constructing these vectors to the extreme points makes them perpendicular.
|
|
224091
|
-
* * The method toScaledMatrix3d
|
|
224092
|
-
*
|
|
224081
|
+
* * The method [[Arc3d.toScaledMatrix3d]] can be called to convert an arc with unrestricted `vector0` and `vector90`
|
|
224082
|
+
* to an arc in standard major-minor axis form.
|
|
224083
|
+
* * The unrestricted form is much easier to work with for common calculations: stroking, projection to 2d,
|
|
224084
|
+
* intersection with plane.
|
|
224093
224085
|
* @public
|
|
224094
224086
|
*/
|
|
224095
224087
|
class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive {
|
|
@@ -224100,7 +224092,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
224100
224092
|
return other instanceof Arc3d;
|
|
224101
224093
|
}
|
|
224102
224094
|
_center;
|
|
224103
|
-
_matrix; // columns are [vector0, vector90,
|
|
224095
|
+
_matrix; // columns are [vector0, vector90, unit normal]
|
|
224104
224096
|
_sweep; // sweep limits
|
|
224105
224097
|
static _workPointA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create();
|
|
224106
224098
|
static _workPointB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create();
|
|
@@ -224115,21 +224107,27 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
224115
224107
|
set center(center) {
|
|
224116
224108
|
this._center.setFrom(center);
|
|
224117
224109
|
}
|
|
224118
|
-
/** Read property for (reference to) center. */
|
|
224110
|
+
/** Read property for (reference to) the arc center. */
|
|
224119
224111
|
get centerRef() {
|
|
224120
224112
|
return this._center;
|
|
224121
224113
|
}
|
|
224122
|
-
/**
|
|
224114
|
+
/**
|
|
224115
|
+
* Read property for (clone of) the x-column of the arc matrix.
|
|
224116
|
+
* * This vector determines the point on the arc corresponding to angles n*360 degrees.
|
|
224117
|
+
*/
|
|
224123
224118
|
get vector0() {
|
|
224124
224119
|
return this._matrix.columnX();
|
|
224125
224120
|
}
|
|
224126
|
-
/**
|
|
224121
|
+
/**
|
|
224122
|
+
* Read property for (clone of) the y-column of the arc matrix.
|
|
224123
|
+
* * This vector determines the point on the arc corresponding to angles 90 + n*360 degrees.
|
|
224124
|
+
*/
|
|
224127
224125
|
get vector90() {
|
|
224128
224126
|
return this._matrix.columnY();
|
|
224129
224127
|
}
|
|
224130
224128
|
/**
|
|
224131
224129
|
* Compute an arc binormal vector with arbitrary length.
|
|
224132
|
-
* * The arc parameterization is
|
|
224130
|
+
* * The arc parameterization is counterclockwise with respect to this vector.
|
|
224133
224131
|
* * This vector is parallel to [[perpendicularVector]] and possibly opposite.
|
|
224134
224132
|
*/
|
|
224135
224133
|
binormalVector(result) {
|
|
@@ -224137,17 +224135,18 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
224137
224135
|
return plane.vectorU.crossProduct(plane.vectorV, result);
|
|
224138
224136
|
}
|
|
224139
224137
|
/**
|
|
224140
|
-
* Read property for (clone of)
|
|
224141
|
-
* *
|
|
224138
|
+
* Read property for (clone of) the z-column of the arc matrix.
|
|
224139
|
+
* * This vector is nominally the normalized cross product: `vector0 x vector90`.
|
|
224140
|
+
* * To compute a vector with respect to which the arc sweep is counterclockwise, use [[binormalVector]].
|
|
224142
224141
|
*/
|
|
224143
224142
|
get perpendicularVector() {
|
|
224144
224143
|
return this._matrix.columnZ();
|
|
224145
224144
|
}
|
|
224146
|
-
/**
|
|
224145
|
+
/** Return a clone of the arc matrix. */
|
|
224147
224146
|
matrixClone() {
|
|
224148
224147
|
return this._matrix.clone();
|
|
224149
224148
|
}
|
|
224150
|
-
/** Read property for (reference to)
|
|
224149
|
+
/** Read property for (reference to) the arc matrix. */
|
|
224151
224150
|
get matrixRef() {
|
|
224152
224151
|
return this._matrix;
|
|
224153
224152
|
}
|
|
@@ -224162,17 +224161,14 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
224162
224161
|
get isExtensibleFractionSpace() {
|
|
224163
224162
|
return true;
|
|
224164
224163
|
}
|
|
224165
|
-
|
|
224164
|
+
/** Constructor. Captures the inputs. */
|
|
224166
224165
|
constructor(center, matrix, sweep) {
|
|
224167
224166
|
super();
|
|
224168
224167
|
this._center = center;
|
|
224169
224168
|
this._matrix = matrix;
|
|
224170
224169
|
this._sweep = sweep.clampToFullCircle(sweep);
|
|
224171
224170
|
}
|
|
224172
|
-
/**
|
|
224173
|
-
* Return a clone of the arc, with transform applied.
|
|
224174
|
-
* @param transform
|
|
224175
|
-
*/
|
|
224171
|
+
/** Return a clone of the arc, with transform applied. */
|
|
224176
224172
|
cloneTransformed(transform) {
|
|
224177
224173
|
const c = this.clone();
|
|
224178
224174
|
c.tryTransformInPlace(transform);
|
|
@@ -224181,7 +224177,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
224181
224177
|
/**
|
|
224182
224178
|
* Redefine the arc with (captured references to) given data.
|
|
224183
224179
|
* @param center arc center.
|
|
224184
|
-
* @param matrix matrix with columns vector0,
|
|
224180
|
+
* @param matrix matrix with columns vector0, vector90, and their unit cross product.
|
|
224185
224181
|
* @param sweep angle sweep.
|
|
224186
224182
|
*/
|
|
224187
224183
|
setRefs(center, matrix, sweep) {
|
|
@@ -224192,7 +224188,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
224192
224188
|
/**
|
|
224193
224189
|
* Redefine the arc with (clones of) given data.
|
|
224194
224190
|
* @param center arc center.
|
|
224195
|
-
* @param matrix matrix with columns vector0,
|
|
224191
|
+
* @param matrix matrix with columns vector0, vector90, and their unit cross product.
|
|
224196
224192
|
* @param sweep angle sweep.
|
|
224197
224193
|
*/
|
|
224198
224194
|
set(center, matrix, sweep) {
|
|
@@ -224211,7 +224207,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
224211
224207
|
/**
|
|
224212
224208
|
* Create an arc, capturing references to center, matrix and sweep.
|
|
224213
224209
|
* @param center center point.
|
|
224214
|
-
* @param matrix matrix with columns vector0, vector90, and unit cross product.
|
|
224210
|
+
* @param matrix matrix with columns vector0, vector90, and their unit cross product.
|
|
224215
224211
|
* @param sweep sweep limits.
|
|
224216
224212
|
* @param result optional preallocated result.
|
|
224217
224213
|
*/
|
|
@@ -224225,9 +224221,10 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
224225
224221
|
/**
|
|
224226
224222
|
* Create an arc from center, x column to be scaled, and y column to be scaled.
|
|
224227
224223
|
* @param center center of ellipse.
|
|
224228
|
-
* @param matrix
|
|
224229
|
-
*
|
|
224230
|
-
* @param
|
|
224224
|
+
* @param matrix the x-column and y-column of this matrix are scaled by `radius0` and `radius90` to define the
|
|
224225
|
+
* arc's `vector0` and `vector90`.
|
|
224226
|
+
* @param radius0 radius along `vector0`.
|
|
224227
|
+
* @param radius90 radius along `vector90`.
|
|
224231
224228
|
* @param sweep sweep limits.
|
|
224232
224229
|
* @param result optional preallocated result.
|
|
224233
224230
|
*/
|
|
@@ -224237,10 +224234,10 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
224237
224234
|
return Arc3d.create(center, vector0.scale(radius0, vector0), vector90.scale(radius90, vector90), sweep, result);
|
|
224238
224235
|
}
|
|
224239
224236
|
/**
|
|
224240
|
-
* Create a
|
|
224241
|
-
* @param center center of
|
|
224237
|
+
* Create a full circle from center, normal and radius.
|
|
224238
|
+
* @param center center of circle. If undefined, use 000.
|
|
224242
224239
|
* @param normal normal vector.
|
|
224243
|
-
* @param radius radius
|
|
224240
|
+
* @param radius radius of the circle.
|
|
224244
224241
|
* @param result optional preallocated result.
|
|
224245
224242
|
*/
|
|
224246
224243
|
static createCenterNormalRadius(center, normal, radius, result) {
|
|
@@ -224248,7 +224245,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
224248
224245
|
return Arc3d.createScaledXYColumns(center, frame, radius, radius, undefined, result);
|
|
224249
224246
|
}
|
|
224250
224247
|
/**
|
|
224251
|
-
* Create an arc by center with vectors to points at 0 and 90 degrees in parameter space.
|
|
224248
|
+
* Create an elliptical arc by center with vectors to points at 0 and 90 degrees in parameter space.
|
|
224252
224249
|
* @param center arc center.
|
|
224253
224250
|
* @param vector0 vector to 0 degrees (commonly major axis).
|
|
224254
224251
|
* @param vector90 vector to 90 degree point (commonly minor axis).
|
|
@@ -224565,10 +224562,13 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
224565
224562
|
curveLength() {
|
|
224566
224563
|
return this.curveLengthBetweenFractions(0, 1);
|
|
224567
224564
|
}
|
|
224568
|
-
|
|
224569
|
-
|
|
224570
|
-
|
|
224565
|
+
/**
|
|
224566
|
+
* Gauss point quadrature count for evaluating curve length. (The number of intervals is adjusted to the arc sweep).
|
|
224567
|
+
* @deprecated in 5.0. Use correct spelling quadratureGaussCount.
|
|
224568
|
+
*/
|
|
224571
224569
|
static quadratureGuassCount = 5;
|
|
224570
|
+
/** Gauss point quadrature count for evaluating curve length. (The number of intervals is adjusted to the arc sweep). */
|
|
224571
|
+
static quadratureGaussCount = 5;
|
|
224572
224572
|
/** In quadrature for arc length, use this interval (divided by quickEccentricity). */
|
|
224573
224573
|
static quadratureIntervalAngleDegrees = 10.0;
|
|
224574
224574
|
/**
|
|
@@ -224595,7 +224595,7 @@ class Arc3d extends _CurvePrimitive__WEBPACK_IMPORTED_MODULE_1__.CurvePrimitive
|
|
|
224595
224595
|
numInterval = 400;
|
|
224596
224596
|
if (numInterval < 1)
|
|
224597
224597
|
numInterval = 1;
|
|
224598
|
-
return super.curveLengthWithFixedIntervalCountQuadrature(f0, f1, numInterval, Arc3d.
|
|
224598
|
+
return super.curveLengthWithFixedIntervalCountQuadrature(f0, f1, numInterval, Arc3d.quadratureGaussCount);
|
|
224599
224599
|
}
|
|
224600
224600
|
/**
|
|
224601
224601
|
* Return an approximate (but easy to compute) arc length.
|
|
@@ -226573,6 +226573,20 @@ class CurveCollection extends _GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geomet
|
|
|
226573
226573
|
projectedParameterRange(ray, lowHigh) {
|
|
226574
226574
|
return _internalContexts_PlaneAltitudeRangeContext__WEBPACK_IMPORTED_MODULE_9__.PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
|
|
226575
226575
|
}
|
|
226576
|
+
/** Return the immediate parent of the input curve in the instance, or undefined if it is not a descendant. */
|
|
226577
|
+
findParentOfDescendant(descendant) {
|
|
226578
|
+
for (const child of this.children) {
|
|
226579
|
+
if (child === descendant)
|
|
226580
|
+
return this;
|
|
226581
|
+
if (child instanceof CurveCollection) {
|
|
226582
|
+
const parent = child.findParentOfDescendant(descendant);
|
|
226583
|
+
if (parent)
|
|
226584
|
+
return parent;
|
|
226585
|
+
}
|
|
226586
|
+
}
|
|
226587
|
+
return undefined;
|
|
226588
|
+
}
|
|
226589
|
+
;
|
|
226576
226590
|
}
|
|
226577
226591
|
/**
|
|
226578
226592
|
* Shared base class for use by both open and closed paths.
|
|
@@ -229577,6 +229591,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
229577
229591
|
|
|
229578
229592
|
|
|
229579
229593
|
|
|
229594
|
+
// cspell:words CCWXY
|
|
229580
229595
|
/**
|
|
229581
229596
|
* A LineSegment3d is:
|
|
229582
229597
|
* * A 3d line segment represented by its start and end coordinates
|
|
@@ -232550,11 +232565,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
232550
232565
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
232551
232566
|
/* harmony export */ ConsolidateAdjacentCurvePrimitivesContext: () => (/* binding */ ConsolidateAdjacentCurvePrimitivesContext)
|
|
232552
232567
|
/* harmony export */ });
|
|
232568
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
232553
232569
|
/* harmony import */ var _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../geometry3d/GeometryHandler */ "../../core/geometry/lib/esm/geometry3d/GeometryHandler.js");
|
|
232554
|
-
/* harmony import */ var
|
|
232570
|
+
/* harmony import */ var _geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../geometry3d/PolylineCompressionByEdgeOffset */ "../../core/geometry/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js");
|
|
232555
232571
|
/* harmony import */ var _geometry3d_PolylineOps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../geometry3d/PolylineOps */ "../../core/geometry/lib/esm/geometry3d/PolylineOps.js");
|
|
232556
|
-
/* harmony import */ var
|
|
232557
|
-
/* harmony import */ var
|
|
232572
|
+
/* harmony import */ var _Arc3d__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Arc3d */ "../../core/geometry/lib/esm/curve/Arc3d.js");
|
|
232573
|
+
/* harmony import */ var _CurveFactory__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../CurveFactory */ "../../core/geometry/lib/esm/curve/CurveFactory.js");
|
|
232558
232574
|
/* harmony import */ var _LineSegment3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
232559
232575
|
/* harmony import */ var _LineString3d__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
232560
232576
|
/* harmony import */ var _RegionOps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../RegionOps */ "../../core/geometry/lib/esm/curve/RegionOps.js");
|
|
@@ -232573,6 +232589,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
232573
232589
|
|
|
232574
232590
|
|
|
232575
232591
|
|
|
232592
|
+
|
|
232576
232593
|
/**
|
|
232577
232594
|
* * Implementation class for ConsolidateAdjacentCurvePrimitives.
|
|
232578
232595
|
*
|
|
@@ -232614,12 +232631,19 @@ class ConsolidateAdjacentCurvePrimitivesContext extends _geometry3d_GeometryHand
|
|
|
232614
232631
|
break;
|
|
232615
232632
|
}
|
|
232616
232633
|
}
|
|
232617
|
-
if (points.length
|
|
232634
|
+
if (points.length <= 1) {
|
|
232635
|
+
g.children[numAccept++] = basePrimitive;
|
|
232636
|
+
}
|
|
232637
|
+
else if (this._options.disableLinearCompression) {
|
|
232638
|
+
const pointsDeduped = _geometry3d_PolylineOps__WEBPACK_IMPORTED_MODULE_4__.PolylineOps.compressShortEdges(points, _Geometry__WEBPACK_IMPORTED_MODULE_5__.Geometry.smallFloatingPoint); // remove only exact duplicate interior points
|
|
232639
|
+
g.children[numAccept++] = _LineString3d__WEBPACK_IMPORTED_MODULE_3__.LineString3d.createPoints(pointsDeduped);
|
|
232640
|
+
}
|
|
232641
|
+
else { // compress points
|
|
232618
232642
|
const compressedPointsA = _geometry3d_PolylineOps__WEBPACK_IMPORTED_MODULE_4__.PolylineOps.compressShortEdges(points, this._options.duplicatePointTolerance);
|
|
232619
232643
|
const compressedPointsB = _geometry3d_PolylineOps__WEBPACK_IMPORTED_MODULE_4__.PolylineOps.compressByPerpendicularDistance(compressedPointsA, this._options.colinearPointTolerance);
|
|
232620
232644
|
if (i0 === 0 && i1 === numOriginal) {
|
|
232621
232645
|
// points is the entire curve, and the curve is closed. Maybe the first and last segments are colinear.
|
|
232622
|
-
|
|
232646
|
+
_geometry3d_PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_6__.PolylineCompressionContext.compressColinearWrapInPlace(compressedPointsB, this._options.duplicatePointTolerance, this._options.colinearPointTolerance);
|
|
232623
232647
|
}
|
|
232624
232648
|
if (compressedPointsB.length < 2) {
|
|
232625
232649
|
// Collapsed to a point? Make a single point linestring
|
|
@@ -232632,19 +232656,16 @@ class ConsolidateAdjacentCurvePrimitivesContext extends _geometry3d_GeometryHand
|
|
|
232632
232656
|
g.children[numAccept++] = _LineString3d__WEBPACK_IMPORTED_MODULE_3__.LineString3d.createPoints(compressedPointsB);
|
|
232633
232657
|
}
|
|
232634
232658
|
}
|
|
232635
|
-
else {
|
|
232636
|
-
g.children[numAccept++] = basePrimitive;
|
|
232637
|
-
}
|
|
232638
232659
|
i0 = i1;
|
|
232639
232660
|
}
|
|
232640
|
-
else if (this._options.consolidateCompatibleArcs && basePrimitive instanceof
|
|
232661
|
+
else if (this._options.consolidateCompatibleArcs && basePrimitive instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_7__.Arc3d) {
|
|
232641
232662
|
// subsume subsequent arcs into basePrimitive.
|
|
232642
232663
|
// always accept base primitive.
|
|
232643
232664
|
for (; ++i0 < g.children.length;) {
|
|
232644
232665
|
const nextPrimitive = g.children[i0];
|
|
232645
|
-
if (!(nextPrimitive instanceof
|
|
232666
|
+
if (!(nextPrimitive instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_7__.Arc3d))
|
|
232646
232667
|
break;
|
|
232647
|
-
if (!
|
|
232668
|
+
if (!_CurveFactory__WEBPACK_IMPORTED_MODULE_8__.CurveFactory.appendToArcInPlace(basePrimitive, nextPrimitive)) // TODO: use this._options.duplicatePointTolerance
|
|
232648
232669
|
break;
|
|
232649
232670
|
}
|
|
232650
232671
|
// i0 has already advanced
|
|
@@ -233147,13 +233168,18 @@ class MapCurvePrimitiveToCurveLocationDetailPairArray {
|
|
|
233147
233168
|
if (primitiveB)
|
|
233148
233169
|
this.insertPrimitiveToPair(primitiveB, pair);
|
|
233149
233170
|
}
|
|
233150
|
-
/**
|
|
233171
|
+
/**
|
|
233172
|
+
* Split closed missing primitives in half and add new intersection pairs.
|
|
233173
|
+
* * When bridge edges aren't included in the primitives array, a closed primitive with no intersections will not be
|
|
233174
|
+
* added to the graph because it isn't in the `primitiveToPair` map. By splitting such a missing primitive in two, we
|
|
233175
|
+
* introduce two intersections for each half, which allows the primitive to be represented in the map.
|
|
233176
|
+
*/
|
|
233151
233177
|
splitAndAppendMissingClosedPrimitives(primitives, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance) {
|
|
233152
233178
|
for (const p of primitives) {
|
|
233153
233179
|
let closedCurveSplitCandidate = false;
|
|
233154
233180
|
if (p instanceof _Arc3d__WEBPACK_IMPORTED_MODULE_1__.Arc3d)
|
|
233155
233181
|
closedCurveSplitCandidate = p.sweep.isFullCircle;
|
|
233156
|
-
else if (!(p instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_2__.LineSegment3d) && !(p instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_3__.LineString3d))
|
|
233182
|
+
else if (!(p instanceof _LineSegment3d__WEBPACK_IMPORTED_MODULE_2__.LineSegment3d) && !(p instanceof _LineString3d__WEBPACK_IMPORTED_MODULE_3__.LineString3d)) // TODO: probably should do this for all types. Lots of spline-type primitives can be closed.
|
|
233157
233183
|
closedCurveSplitCandidate = p.startPoint().isAlmostEqualXY(p.endPoint(), tolerance);
|
|
233158
233184
|
if (closedCurveSplitCandidate && !this.primitiveToPair.has(p)) {
|
|
233159
233185
|
const p0 = p.clonePartialCurve(0.0, 0.5);
|
|
@@ -234272,13 +234298,14 @@ var RegionBinaryOpType;
|
|
|
234272
234298
|
})(RegionBinaryOpType || (RegionBinaryOpType = {}));
|
|
234273
234299
|
/**
|
|
234274
234300
|
* Class `RegionOps` has static members for calculations on regions (areas).
|
|
234275
|
-
* * Regions are represented by these
|
|
234276
|
-
* *
|
|
234277
|
-
* *
|
|
234278
|
-
* The common "One outer loop and many
|
|
234279
|
-
* *
|
|
234280
|
-
* *
|
|
234281
|
-
* been rotated parallel to the xy-plane.
|
|
234301
|
+
* * Regions are represented by these [[CurveCollection]] subclasses:
|
|
234302
|
+
* * [[Loop]] -- a single loop
|
|
234303
|
+
* * [[ParityRegion]] -- a collection of loops, interpreted by parity rules.
|
|
234304
|
+
* The common "One outer loop and many inner loops" is a parity region.
|
|
234305
|
+
* * [[UnionRegion]] -- a collection of `Loop` and `ParityRegion` objects understood as a (probably disjoint) union.
|
|
234306
|
+
* * Most of the methods in this class:
|
|
234307
|
+
* * Ignore z-coordinates, so callers should ensure that input geometry has been rotated parallel to the xy-plane.
|
|
234308
|
+
* * Assume consistent Loop orientation: "solid" Loops are counterclockwise; "hole" Loops are clockwise.
|
|
234282
234309
|
* @public
|
|
234283
234310
|
*/
|
|
234284
234311
|
class RegionOps {
|
|
@@ -234309,8 +234336,15 @@ class RegionOps {
|
|
|
234309
234336
|
}
|
|
234310
234337
|
/**
|
|
234311
234338
|
* Return a (signed) xy area for a region.
|
|
234339
|
+
<<<<<<< HEAD
|
|
234312
234340
|
* * The area is negative if and only if the region is oriented clockwise with respect to the positive z-axis.
|
|
234313
234341
|
* @param root any Loop, ParityRegion, or UnionRegion.
|
|
234342
|
+
=======
|
|
234343
|
+
* * The input region should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
|
|
234344
|
+
* * For a non-self-intersecting Loop, the returned area is negative if and only if the Loop is oriented clockwise
|
|
234345
|
+
* with respect to the positive z-axis.
|
|
234346
|
+
* @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
|
|
234347
|
+
>>>>>>> 168574b454 (Utilize `PolyfaceData.edgeMateIndex` to speed up some `Polyface` methods (#8095))
|
|
234314
234348
|
*/
|
|
234315
234349
|
static computeXYArea(root) {
|
|
234316
234350
|
const handler = new _RegionMomentsXY__WEBPACK_IMPORTED_MODULE_0__.RegionMomentsXY();
|
|
@@ -234452,10 +234486,11 @@ class RegionOps {
|
|
|
234452
234486
|
}
|
|
234453
234487
|
/**
|
|
234454
234488
|
* Return areas defined by a boolean operation.
|
|
234455
|
-
*
|
|
234456
|
-
*
|
|
234457
|
-
*
|
|
234458
|
-
* @param
|
|
234489
|
+
* @note For best results, input regions should have correctly oriented loops. See [[sortOuterAndHoleLoopsXY]].
|
|
234490
|
+
* @note A common use case of this method is to convert a region with overlapping children into one with
|
|
234491
|
+
* non-overlapping children: `regionOut = RegionOps.regionBooleanXY(regionIn, undefined, RegionBinaryOpType.Union)`.
|
|
234492
|
+
* @param loopsA first set of loops (treated as a union)
|
|
234493
|
+
* @param loopsB second set of loops (treated as a union)
|
|
234459
234494
|
* @param operation indicates Union, Intersection, Parity, AMinusB, or BMinusA
|
|
234460
234495
|
* @param mergeTolerance absolute distance tolerance for merging loops
|
|
234461
234496
|
* @returns a region resulting from merging input loops and the boolean operation. May contain bridge edges added
|
|
@@ -234773,14 +234808,15 @@ class RegionOps {
|
|
|
234773
234808
|
curves.dispatchToGeometryHandler(context);
|
|
234774
234809
|
}
|
|
234775
234810
|
/**
|
|
234776
|
-
* Reverse and reorder loops in the xy-plane for
|
|
234777
|
-
* @param loops multiple loops in any order and orientation, z-coordinates ignored
|
|
234811
|
+
* Reverse and reorder loops in the xy-plane for consistent orientation and containment.
|
|
234812
|
+
* @param loops multiple loops in any order and orientation, z-coordinates ignored.
|
|
234813
|
+
* * For best results, all overlaps should be containments, i.e., loop boundaries can touch, but should not cross.
|
|
234778
234814
|
* @returns a region that captures the input pointers. This region is a:
|
|
234779
|
-
* *
|
|
234780
|
-
* *
|
|
234815
|
+
* * [[Loop]] if there is exactly one input loop. It is oriented counterclockwise.
|
|
234816
|
+
* * [[ParityRegion]] if input consists of exactly one outer loop with at least one hole loop.
|
|
234781
234817
|
* Its first child is an outer loop oriented counterclockwise; all subsequent children are holes oriented
|
|
234782
234818
|
* clockwise.
|
|
234783
|
-
* *
|
|
234819
|
+
* * [[UnionRegion]] if any other input configuration. Its children are individually ordered/oriented as in
|
|
234784
234820
|
* the above cases.
|
|
234785
234821
|
* @see [[PolygonOps.sortOuterAndHoleLoopsXY]]
|
|
234786
234822
|
*/
|
|
@@ -234800,14 +234836,14 @@ class RegionOps {
|
|
|
234800
234836
|
* Find all xy-areas bounded by the unstructured, possibly intersecting curves.
|
|
234801
234837
|
* * For best results, input curves should be parallel to the xy-plane, as z-coordinates are ignored.
|
|
234802
234838
|
* * A common use case of this method is to assemble the bounding "exterior" loop (or loops) containing the
|
|
234803
|
-
* input curves.
|
|
234839
|
+
* input curves. Note that "holes" implied by inputs are _not_ preserved in output.
|
|
234804
234840
|
* * This method does not add bridge edges to connect outer loops to inner loops. Each disconnected loop,
|
|
234805
234841
|
* regardless of its containment, is returned as its own SignedLoops object. Pre-process with [[regionBooleanXY]]
|
|
234806
234842
|
* to add bridge edges so that [[constructAllXYRegionLoops]] will return outer and inner loops in the same
|
|
234807
234843
|
* SignedLoops object.
|
|
234808
234844
|
* @param curvesAndRegions Any collection of curves. Each Loop/ParityRegion/UnionRegion contributes its curve
|
|
234809
|
-
* primitives.
|
|
234810
|
-
* @param tolerance optional distance tolerance for coincidence
|
|
234845
|
+
* primitives, stripped of parity context. This means holes are _not_ preserved in output.
|
|
234846
|
+
* @param tolerance optional distance tolerance for coincidence.
|
|
234811
234847
|
* @returns array of [[SignedLoops]], each entry of which describes the faces in a single connected component:
|
|
234812
234848
|
* * `positiveAreaLoops` contains "interior" loops, _including holes in ParityRegion input_. These loops have
|
|
234813
234849
|
* positive area and counterclockwise orientation.
|
|
@@ -234970,12 +235006,10 @@ class RegionOps {
|
|
|
234970
235006
|
}
|
|
234971
235007
|
/**
|
|
234972
235008
|
* Facet the region according to stroke options.
|
|
235009
|
+
* @note For best results, [[UnionRegion]] input should consist of non-overlapping children. See [[regionBooleanXY]].
|
|
235010
|
+
* @note For best results, [[ParityRegion]] input should be correctly oriented. See [[sortOuterAndHoleLoopsXY]].
|
|
234973
235011
|
* @param region a closed xy-planar region, possibly with holes.
|
|
234974
235012
|
* * The z-coordinates of the region are ignored. Caller is responsible for rotating the region into plane local coordinates beforehand, and reversing the rotation afterwards.
|
|
234975
|
-
* * For best results, `UnionRegion` input should consist of non-overlapping children.
|
|
234976
|
-
* Caller can ensure this by passing in `region = RegionOps.regionBooleanXY(unionRegion, undefined, RegionBinaryOpType.Union)`.
|
|
234977
|
-
* * For best results, `ParityRegion` input should be correctly oriented (holes have opposite orientation to their containing loop).
|
|
234978
|
-
* Caller can ensure this for non-intersecting loops by passing in `region = RegionOps.sortOuterAndHoleLoopsXY(loops)`.
|
|
234979
235013
|
* @param options primarily how to stroke the region boundary, but also how to facet the region interior.
|
|
234980
235014
|
* * By default, a triangulation is returned, but if `options.maximizeConvexFacets === true`, edges between coplanar triangles are removed to return maximally convex facets.
|
|
234981
235015
|
* @returns facets for the region, or undefined if facetting failed
|
|
@@ -235038,17 +235072,19 @@ function pushToInOnOutArrays(curve, select, arrayNegative, array0, arrayPositive
|
|
|
235038
235072
|
array0.push(curve);
|
|
235039
235073
|
}
|
|
235040
235074
|
/**
|
|
235041
|
-
* * Options to control method `RegionOps.consolidateAdjacentPrimitives
|
|
235075
|
+
* * Options to control method `RegionOps.consolidateAdjacentPrimitives`.
|
|
235042
235076
|
* @public
|
|
235043
235077
|
*/
|
|
235044
235078
|
class ConsolidateAdjacentCurvePrimitivesOptions {
|
|
235045
|
-
/** True to consolidate adjacent linear geometry into a single LineString3d */
|
|
235079
|
+
/** True to consolidate adjacent linear geometry into a single LineString3d. */
|
|
235046
235080
|
consolidateLinearGeometry = true;
|
|
235047
|
-
/** True to consolidate contiguous compatible arcs into a single Arc3d */
|
|
235081
|
+
/** True to consolidate contiguous compatible arcs into a single Arc3d. */
|
|
235048
235082
|
consolidateCompatibleArcs = true;
|
|
235049
|
-
/**
|
|
235083
|
+
/** Disable LineSegment3d and LineString3d point compression. */
|
|
235084
|
+
disableLinearCompression = false;
|
|
235085
|
+
/** Tolerance for collapsing identical points (if `!disableLinearCompression`). */
|
|
235050
235086
|
duplicatePointTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance;
|
|
235051
|
-
/** Tolerance for removing interior colinear points. */
|
|
235087
|
+
/** Tolerance for removing interior colinear points (if `!disableLinearCompression`). */
|
|
235052
235088
|
colinearPointTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance;
|
|
235053
235089
|
}
|
|
235054
235090
|
|
|
@@ -245674,17 +245710,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
245674
245710
|
/**
|
|
245675
245711
|
* An `AngleSweep` is a pair of angles at start and end of an interval.
|
|
245676
245712
|
*
|
|
245677
|
-
* *
|
|
245678
|
-
* by theta = start + f*(end-start)
|
|
245679
|
-
* *
|
|
245680
|
-
* *
|
|
245681
|
-
* *
|
|
245682
|
-
* *
|
|
245683
|
-
*
|
|
245684
|
-
*
|
|
245685
|
-
*
|
|
245686
|
-
*
|
|
245687
|
-
*
|
|
245713
|
+
* * For stroking purposes, the "included interval" is all angles numerically reached
|
|
245714
|
+
* by `theta = start + f * (end - start)`, where `0 <= f <= 1`.
|
|
245715
|
+
* * This stroking formula is simple numbers -- 2PI shifts are not involved.
|
|
245716
|
+
* * 2PI shifts do become important in the reverse mapping of an angle to a fraction.
|
|
245717
|
+
* * Angles greater than 360 and less than 0 are fine as endpoints.
|
|
245718
|
+
* * An AngleSweep determines orientation only _in concert with a reference vector_, e.g., a plane normal like (0,0,1).
|
|
245719
|
+
* * Be careful reading orientation from an AngleSweep without a reference vector!
|
|
245720
|
+
* * If "start < end" the angles in the sweep proceed counterclockwise around the reference vector.
|
|
245721
|
+
* * If "start > end" the angles in the sweep proceed clockwise around the reference vector.
|
|
245722
|
+
* * (350,370) covers the same angles as (-10,10), and both sweeps are counterclockwise around the reference vector.
|
|
245723
|
+
* * (370,350) covers the same angles as (10,-10), and both sweeps are clockwise around the reference vector.
|
|
245724
|
+
* * (370,350) covers the same angles as (-10,10), but the sweeps have opposite orientation.
|
|
245725
|
+
* * Math details can be found at docs/learning/geometry/Angle.md .
|
|
245726
|
+
* * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/AngleSweep .
|
|
245688
245727
|
* @public
|
|
245689
245728
|
*/
|
|
245690
245729
|
class AngleSweep {
|
|
@@ -251310,8 +251349,12 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
|
|
|
251310
251349
|
}
|
|
251311
251350
|
}
|
|
251312
251351
|
/** get range of points. */
|
|
251313
|
-
getRange(transform) {
|
|
251314
|
-
|
|
251352
|
+
getRange(transform, result) {
|
|
251353
|
+
let range = result;
|
|
251354
|
+
if (range)
|
|
251355
|
+
range.setNull();
|
|
251356
|
+
else
|
|
251357
|
+
range = _Range__WEBPACK_IMPORTED_MODULE_5__.Range3d.createNull();
|
|
251315
251358
|
this.extendRange(range, transform);
|
|
251316
251359
|
return range;
|
|
251317
251360
|
}
|
|
@@ -251664,6 +251707,20 @@ class GrowableXYZArray extends _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_0_
|
|
|
251664
251707
|
this._data[i + componentIndex] = q;
|
|
251665
251708
|
}
|
|
251666
251709
|
}
|
|
251710
|
+
/**
|
|
251711
|
+
* Pass the (x,y,z) of each point to a function which returns a replacement for the point.
|
|
251712
|
+
* * @param func function to be called as `func(x,y,z)`, returning a replacement point.
|
|
251713
|
+
*/
|
|
251714
|
+
mapPoint(func) {
|
|
251715
|
+
const n = this._data.length;
|
|
251716
|
+
let q;
|
|
251717
|
+
for (let i = 0; i + 2 < n; i += 3) {
|
|
251718
|
+
q = func(this._data[i], this._data[i + 1], this._data[i + 2]);
|
|
251719
|
+
this._data[i] = q.x;
|
|
251720
|
+
this._data[i + 1] = q.y;
|
|
251721
|
+
this._data[i + 2] = q.z;
|
|
251722
|
+
}
|
|
251723
|
+
}
|
|
251667
251724
|
}
|
|
251668
251725
|
|
|
251669
251726
|
|
|
@@ -251999,13 +252056,17 @@ class IndexedXYZCollection {
|
|
|
251999
252056
|
return (i % this.length);
|
|
252000
252057
|
}
|
|
252001
252058
|
/** Return the range of the points. */
|
|
252002
|
-
getRange() {
|
|
252003
|
-
|
|
252059
|
+
getRange(transform, result) {
|
|
252060
|
+
let range = result;
|
|
252061
|
+
if (range)
|
|
252062
|
+
range.setNull();
|
|
252063
|
+
else
|
|
252064
|
+
range = _Range__WEBPACK_IMPORTED_MODULE_2__.Range3d.createNull();
|
|
252004
252065
|
const n = this.length;
|
|
252005
252066
|
const point = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.create();
|
|
252006
252067
|
for (let i = 0; i < n; i++) {
|
|
252007
252068
|
this.getPoint3dAtUncheckedPointIndex(i, point);
|
|
252008
|
-
range.extendPoint(point);
|
|
252069
|
+
range.extendPoint(point, transform);
|
|
252009
252070
|
}
|
|
252010
252071
|
return range;
|
|
252011
252072
|
}
|
|
@@ -255480,7 +255541,12 @@ class Plane3d {
|
|
|
255480
255541
|
* * Classes with a purely implicit equation of their plane can accept the default implementation
|
|
255481
255542
|
*/
|
|
255482
255543
|
getAnyPointOnPlane(result) {
|
|
255483
|
-
return this.
|
|
255544
|
+
return this.projectXYZToPlane(0, 0, 0, result);
|
|
255545
|
+
}
|
|
255546
|
+
/** Return the projection of (x,y,z) onto the plane. */
|
|
255547
|
+
projectXYZToPlane(x, y, z, result) {
|
|
255548
|
+
const point = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(x, y, z, result);
|
|
255549
|
+
return this.projectPointToPlane(point, point);
|
|
255484
255550
|
}
|
|
255485
255551
|
}
|
|
255486
255552
|
|
|
@@ -255825,7 +255891,12 @@ class Plane3dByOriginAndUnitNormal extends _Plane3d__WEBPACK_IMPORTED_MODULE_0__
|
|
|
255825
255891
|
}
|
|
255826
255892
|
/** Return the projection of spacePoint onto the plane. */
|
|
255827
255893
|
projectPointToPlane(spacePoint, result) {
|
|
255828
|
-
return
|
|
255894
|
+
return this.projectXYZToPlane(spacePoint.x, spacePoint.y, spacePoint.z, result);
|
|
255895
|
+
}
|
|
255896
|
+
/** Return the projection of (x,y,z) onto the plane. */
|
|
255897
|
+
projectXYZToPlane(x, y, z, result) {
|
|
255898
|
+
const scale = -this._normal.dotProductStartEndXYZ(this._origin, x, y, z);
|
|
255899
|
+
return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(x + scale * this._normal.x, y + scale * this._normal.y, z + scale * this._normal.z, result);
|
|
255829
255900
|
}
|
|
255830
255901
|
/**
|
|
255831
255902
|
* Returns true if spacePoint is within distance tolerance of the plane.
|
|
@@ -256208,30 +256279,38 @@ class Plane3dByOriginAndVectors extends _Plane3d__WEBPACK_IMPORTED_MODULE_0__.Pl
|
|
|
256208
256279
|
}
|
|
256209
256280
|
/**
|
|
256210
256281
|
* Return the projection of spacePoint onto the plane.
|
|
256211
|
-
* If the plane is degenerate to a ray, project to the ray.
|
|
256212
|
-
* If the plane is degenerate to its origin, return the point
|
|
256282
|
+
* * If the plane is degenerate to a ray, project to the ray.
|
|
256283
|
+
* * If the plane is degenerate to its origin, return the point.
|
|
256213
256284
|
*/
|
|
256214
256285
|
projectPointToPlane(spacePoint, result) {
|
|
256286
|
+
return this.projectXYZToPlane(spacePoint.x, spacePoint.y, spacePoint.z, result);
|
|
256287
|
+
}
|
|
256288
|
+
/**
|
|
256289
|
+
* Return the projection of (x,y,z) onto the plane.
|
|
256290
|
+
* * If the plane is degenerate to a ray, project to the ray.
|
|
256291
|
+
* * If the plane is degenerate to its origin, return the point.
|
|
256292
|
+
*/
|
|
256293
|
+
projectXYZToPlane(x, y, z, result) {
|
|
256215
256294
|
const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);
|
|
256216
256295
|
if (unitNormal !== undefined) {
|
|
256217
|
-
const
|
|
256218
|
-
return
|
|
256296
|
+
const scale = -unitNormal.dotProductStartEndXYZ(this.origin, x, y, z);
|
|
256297
|
+
return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(x + scale * unitNormal.x, y + scale * unitNormal.y, z + scale * unitNormal.z, result);
|
|
256219
256298
|
}
|
|
256220
|
-
//
|
|
256221
|
-
//
|
|
256299
|
+
// vectorU and vectorV are colinear or zero.
|
|
256300
|
+
// Project to ray defined by the longer one, or just to origin.
|
|
256222
256301
|
const dotUU = this.vectorU.magnitudeSquared();
|
|
256223
256302
|
const dotVV = this.vectorV.magnitudeSquared();
|
|
256224
256303
|
if (dotUU >= dotVV) {
|
|
256225
|
-
const dotUW = this.vectorU.
|
|
256304
|
+
const dotUW = this.vectorU.dotProductStartEndXYZ(this.origin, x, y, z);
|
|
256226
256305
|
const f = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.conditionalDivideCoordinate(dotUW, dotUU, 0.0);
|
|
256227
256306
|
if (f !== undefined)
|
|
256228
|
-
return
|
|
256307
|
+
return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(x + f * this.vectorU.x, y + f * this.vectorU.y, z + f * this.vectorU.z, result);
|
|
256229
256308
|
}
|
|
256230
256309
|
else {
|
|
256231
|
-
const dotVW = this.vectorV.
|
|
256310
|
+
const dotVW = this.vectorV.dotProductStartEndXYZ(this.origin, x, y, z);
|
|
256232
256311
|
const f = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.conditionalDivideCoordinate(dotVW, dotVV, 0.0);
|
|
256233
256312
|
if (f !== undefined)
|
|
256234
|
-
return
|
|
256313
|
+
return _Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(x + f * this.vectorV.x, y + f * this.vectorV.y, z + f * this.vectorV.z, result);
|
|
256235
256314
|
}
|
|
256236
256315
|
return this.origin.clone(result);
|
|
256237
256316
|
}
|
|
@@ -258683,7 +258762,7 @@ class Vector3d extends XYZ {
|
|
|
258683
258762
|
/**
|
|
258684
258763
|
* Return the (strongly-typed) angle from this vector to vectorB, using only the xy parts.
|
|
258685
258764
|
* * The returned angle is between -180 and 180 degrees.
|
|
258686
|
-
* * Use
|
|
258765
|
+
* * Use [[planarAngleTo]] and [[signedAngleTo]] to return an angle measured in a specific plane.
|
|
258687
258766
|
* @param vectorB target vector.
|
|
258688
258767
|
*/
|
|
258689
258768
|
angleToXY(vectorB) {
|
|
@@ -258696,7 +258775,7 @@ class Vector3d extends XYZ {
|
|
|
258696
258775
|
* * If the cross product of `this` vector and `vectorB` lies on the same side of the plane as `vectorW`,
|
|
258697
258776
|
* this function returns `radiansTo(vectorB)`; otherwise, it returns `-radiansTo(vectorB)`.
|
|
258698
258777
|
* * `vectorW` does not have to be perpendicular to the plane.
|
|
258699
|
-
* * Use
|
|
258778
|
+
* * Use [[planarRadiansTo]] to measure the angle between vectors that are projected to another plane.
|
|
258700
258779
|
* @param vectorB target vector.
|
|
258701
258780
|
* @param vectorW determines the side of the plane in which the returned angle is measured
|
|
258702
258781
|
*/
|
|
@@ -258716,7 +258795,7 @@ class Vector3d extends XYZ {
|
|
|
258716
258795
|
* * If the cross product of this vector and vectorB lies on the same side of the plane as vectorW,
|
|
258717
258796
|
* this function returns `angleTo(vectorB)`; otherwise, it returns `-angleTo(vectorB)`.
|
|
258718
258797
|
* * `vectorW` does not have to be perpendicular to the plane.
|
|
258719
|
-
* * Use
|
|
258798
|
+
* * Use [[planarAngleTo]] to measure the angle between vectors that are projected to another plane.
|
|
258720
258799
|
* @param vectorB target vector.
|
|
258721
258800
|
* @param vectorW determines the side of the plane in which the returned angle is measured
|
|
258722
258801
|
*/
|
|
@@ -258979,9 +259058,9 @@ class NumberArray {
|
|
|
258979
259058
|
return a;
|
|
258980
259059
|
}
|
|
258981
259060
|
/**
|
|
258982
|
-
* Return an array with indicated start and end points, maximum step size
|
|
258983
|
-
* @param low
|
|
258984
|
-
* @param high
|
|
259061
|
+
* Return an array with indicated start and end points, and maximum step size.
|
|
259062
|
+
* @param low first value in returned array
|
|
259063
|
+
* @param high last value in returned array
|
|
258985
259064
|
* @param step max permitted step
|
|
258986
259065
|
*/
|
|
258987
259066
|
static createArrayWithMaxStepSize(low, high, step) {
|
|
@@ -259172,13 +259251,32 @@ class NumberArray {
|
|
|
259172
259251
|
*/
|
|
259173
259252
|
class Point2dArray {
|
|
259174
259253
|
/** Return true if arrays have same length and matching coordinates. */
|
|
259175
|
-
static isAlmostEqual(dataA, dataB) {
|
|
259254
|
+
static isAlmostEqual(dataA, dataB, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance) {
|
|
259176
259255
|
if (dataA && dataB) {
|
|
259177
|
-
if (dataA
|
|
259178
|
-
|
|
259179
|
-
|
|
259180
|
-
|
|
259256
|
+
if (dataA instanceof Float64Array && dataB instanceof Float64Array) {
|
|
259257
|
+
if (dataA.length !== dataB.length)
|
|
259258
|
+
return false;
|
|
259259
|
+
for (let i = 0; i < dataA.length; i++)
|
|
259260
|
+
if (!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(dataA[i], dataB[i], tolerance))
|
|
259261
|
+
return false;
|
|
259262
|
+
}
|
|
259263
|
+
else if (Array.isArray(dataA) && Array.isArray(dataB)) {
|
|
259264
|
+
if (dataA.length !== dataB.length)
|
|
259181
259265
|
return false;
|
|
259266
|
+
for (let i = 0; i < dataA.length; i++)
|
|
259267
|
+
if (!dataA[i].isAlmostEqual(dataB[i], tolerance))
|
|
259268
|
+
return false;
|
|
259269
|
+
}
|
|
259270
|
+
else { // different types
|
|
259271
|
+
const points = dataA instanceof Float64Array ? dataB : dataA;
|
|
259272
|
+
const numbers = dataA instanceof Float64Array ? dataA : dataB;
|
|
259273
|
+
if (numbers.length !== points.length * 2)
|
|
259274
|
+
return false;
|
|
259275
|
+
for (let iPoint = 0; iPoint < points.length; ++iPoint) {
|
|
259276
|
+
if (!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].x, numbers[2 * iPoint], tolerance) ||
|
|
259277
|
+
!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].y, numbers[2 * iPoint + 1], tolerance))
|
|
259278
|
+
return false;
|
|
259279
|
+
}
|
|
259182
259280
|
}
|
|
259183
259281
|
return true;
|
|
259184
259282
|
}
|
|
@@ -259215,13 +259313,34 @@ class Point2dArray {
|
|
|
259215
259313
|
*/
|
|
259216
259314
|
class Vector3dArray {
|
|
259217
259315
|
/** Return true if arrays have same length and matching coordinates. */
|
|
259218
|
-
static isAlmostEqual(dataA, dataB) {
|
|
259316
|
+
static isAlmostEqual(dataA, dataB, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance) {
|
|
259219
259317
|
if (dataA && dataB) {
|
|
259220
|
-
if (dataA
|
|
259221
|
-
|
|
259222
|
-
|
|
259223
|
-
|
|
259318
|
+
if (dataA instanceof Float64Array && dataB instanceof Float64Array) {
|
|
259319
|
+
if (dataA.length !== dataB.length)
|
|
259320
|
+
return false;
|
|
259321
|
+
for (let i = 0; i < dataA.length; i++)
|
|
259322
|
+
if (!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(dataA[i], dataB[i], tolerance))
|
|
259323
|
+
return false;
|
|
259324
|
+
}
|
|
259325
|
+
else if (Array.isArray(dataA) && Array.isArray(dataB)) {
|
|
259326
|
+
if (dataA.length !== dataB.length)
|
|
259327
|
+
return false;
|
|
259328
|
+
for (let i = 0; i < dataA.length; i++)
|
|
259329
|
+
if (!dataA[i].isAlmostEqual(dataB[i], tolerance))
|
|
259330
|
+
return false;
|
|
259331
|
+
}
|
|
259332
|
+
else { // different types
|
|
259333
|
+
const points = dataA instanceof Float64Array ? dataB : dataA;
|
|
259334
|
+
const numbers = dataA instanceof Float64Array ? dataA : dataB;
|
|
259335
|
+
if (numbers.length !== points.length * 3)
|
|
259224
259336
|
return false;
|
|
259337
|
+
for (let iPoint = 0; iPoint < points.length; ++iPoint) {
|
|
259338
|
+
if (!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].x, numbers[3 * iPoint], tolerance) ||
|
|
259339
|
+
!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].y, numbers[3 * iPoint + 1], tolerance) ||
|
|
259340
|
+
!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].z, numbers[3 * iPoint + 2], tolerance))
|
|
259341
|
+
return false;
|
|
259342
|
+
}
|
|
259343
|
+
}
|
|
259225
259344
|
return true;
|
|
259226
259345
|
}
|
|
259227
259346
|
return (dataA === undefined && dataB === undefined);
|
|
@@ -259340,20 +259459,20 @@ class Point4dArray {
|
|
|
259340
259459
|
}
|
|
259341
259460
|
}
|
|
259342
259461
|
/** Test arrays for near equality of all corresponding numeric values, treated as coordinates. */
|
|
259343
|
-
static isAlmostEqual(dataA, dataB) {
|
|
259462
|
+
static isAlmostEqual(dataA, dataB, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance) {
|
|
259344
259463
|
if (dataA && dataB) {
|
|
259345
259464
|
if (dataA instanceof Float64Array && dataB instanceof Float64Array) {
|
|
259346
259465
|
if (dataA.length !== dataB.length)
|
|
259347
259466
|
return false;
|
|
259348
259467
|
for (let i = 0; i < dataA.length; i++)
|
|
259349
|
-
if (!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(dataA[i], dataB[i]))
|
|
259468
|
+
if (!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(dataA[i], dataB[i], tolerance))
|
|
259350
259469
|
return false;
|
|
259351
259470
|
}
|
|
259352
259471
|
else if (Array.isArray(dataA) && Array.isArray(dataB)) {
|
|
259353
259472
|
if (dataA.length !== dataB.length)
|
|
259354
259473
|
return false;
|
|
259355
259474
|
for (let i = 0; i < dataA.length; i++)
|
|
259356
|
-
if (!dataA[i].isAlmostEqual(dataB[i]))
|
|
259475
|
+
if (!dataA[i].isAlmostEqual(dataB[i], tolerance))
|
|
259357
259476
|
return false;
|
|
259358
259477
|
}
|
|
259359
259478
|
else { // different types
|
|
@@ -259362,10 +259481,10 @@ class Point4dArray {
|
|
|
259362
259481
|
if (numbers.length !== points.length * 4)
|
|
259363
259482
|
return false;
|
|
259364
259483
|
for (let iPoint = 0; iPoint < points.length; ++iPoint) {
|
|
259365
|
-
if (!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].x, numbers[4 * iPoint]) ||
|
|
259366
|
-
!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].y, numbers[4 * iPoint + 1]) ||
|
|
259367
|
-
!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].z, numbers[4 * iPoint + 2]) ||
|
|
259368
|
-
!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].w, numbers[4 * iPoint + 3]))
|
|
259484
|
+
if (!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].x, numbers[4 * iPoint], tolerance) ||
|
|
259485
|
+
!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].y, numbers[4 * iPoint + 1], tolerance) ||
|
|
259486
|
+
!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].z, numbers[4 * iPoint + 2], tolerance) ||
|
|
259487
|
+
!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].w, numbers[4 * iPoint + 3], tolerance))
|
|
259369
259488
|
return false;
|
|
259370
259489
|
}
|
|
259371
259490
|
}
|
|
@@ -259605,20 +259724,20 @@ class Point3dArray {
|
|
|
259605
259724
|
}
|
|
259606
259725
|
}
|
|
259607
259726
|
/** Test arrays for near equality of all corresponding numeric values, treated as coordinates. */
|
|
259608
|
-
static isAlmostEqual(dataA, dataB) {
|
|
259727
|
+
static isAlmostEqual(dataA, dataB, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance) {
|
|
259609
259728
|
if (dataA && dataB) {
|
|
259610
259729
|
if (dataA instanceof Float64Array && dataB instanceof Float64Array) {
|
|
259611
259730
|
if (dataA.length !== dataB.length)
|
|
259612
259731
|
return false;
|
|
259613
259732
|
for (let i = 0; i < dataA.length; i++)
|
|
259614
|
-
if (!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(dataA[i], dataB[i]))
|
|
259733
|
+
if (!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(dataA[i], dataB[i], tolerance))
|
|
259615
259734
|
return false;
|
|
259616
259735
|
}
|
|
259617
259736
|
else if (Array.isArray(dataA) && Array.isArray(dataB)) {
|
|
259618
259737
|
if (dataA.length !== dataB.length)
|
|
259619
259738
|
return false;
|
|
259620
259739
|
for (let i = 0; i < dataA.length; i++)
|
|
259621
|
-
if (!dataA[i].isAlmostEqual(dataB[i]))
|
|
259740
|
+
if (!dataA[i].isAlmostEqual(dataB[i], tolerance))
|
|
259622
259741
|
return false;
|
|
259623
259742
|
}
|
|
259624
259743
|
else { // different types
|
|
@@ -259627,9 +259746,9 @@ class Point3dArray {
|
|
|
259627
259746
|
if (numbers.length !== points.length * 3)
|
|
259628
259747
|
return false;
|
|
259629
259748
|
for (let iPoint = 0; iPoint < points.length; ++iPoint) {
|
|
259630
|
-
if (!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].x, numbers[3 * iPoint]) ||
|
|
259631
|
-
!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].y, numbers[3 * iPoint + 1]) ||
|
|
259632
|
-
!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].z, numbers[3 * iPoint + 2]))
|
|
259749
|
+
if (!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].x, numbers[3 * iPoint], tolerance) ||
|
|
259750
|
+
!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].y, numbers[3 * iPoint + 1], tolerance) ||
|
|
259751
|
+
!_Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSameCoordinate(points[iPoint].z, numbers[3 * iPoint + 2], tolerance))
|
|
259633
259752
|
return false;
|
|
259634
259753
|
}
|
|
259635
259754
|
}
|
|
@@ -260927,6 +261046,41 @@ class PolygonOps {
|
|
|
260927
261046
|
}
|
|
260928
261047
|
}
|
|
260929
261048
|
}
|
|
261049
|
+
/**
|
|
261050
|
+
* Compute the signed volume of the truncated prism between a facet and a plane.
|
|
261051
|
+
* * Useful for parallel algorithms.
|
|
261052
|
+
* @param facetPoints input 3D polygon; on return the points are projected onto the plane. Wraparound point is optional.
|
|
261053
|
+
* @param plane infinite plane bounding volume between the facet and (virtual) side facets perpendicular to the plane (unmodified).
|
|
261054
|
+
* @param options optional flags and pre-allocated temporary storage.
|
|
261055
|
+
* @returns computed data for this facet:
|
|
261056
|
+
* * `volume6`: six times the signed volume of the truncated prism between the facet and the plane.
|
|
261057
|
+
* * `area2`: two times the signed area of the facet's projection onto the plane.
|
|
261058
|
+
* * `origin`: origin of the facet used to accumulate area moments.
|
|
261059
|
+
* * `products`: raw accumulated second moment area products of the facet's projection onto the plane.
|
|
261060
|
+
* @see [[PolyfaceQuery.sumVolumeBetweenFacetsAndPlane]]
|
|
261061
|
+
*/
|
|
261062
|
+
static volumeBetweenPolygonAndPlane(facetPoints, plane, options) {
|
|
261063
|
+
let origin;
|
|
261064
|
+
let products;
|
|
261065
|
+
let singleProjectedFacetAreaTimes2 = 0.0;
|
|
261066
|
+
let signedTruncatedPrismVolumeTimes6 = 0.0;
|
|
261067
|
+
const h0 = facetPoints.evaluateUncheckedIndexPlaneAltitude(0, plane);
|
|
261068
|
+
for (let i = 1; i + 1 < facetPoints.length; i++) {
|
|
261069
|
+
const triangleNormal = facetPoints.crossProductIndexIndexIndex(0, i, i + 1, options?.workVector);
|
|
261070
|
+
const hA = facetPoints.evaluateUncheckedIndexPlaneAltitude(i, plane);
|
|
261071
|
+
const hB = facetPoints.evaluateUncheckedIndexPlaneAltitude(i + 1, plane);
|
|
261072
|
+
const signedProjectedTriangleAreaTimes2 = triangleNormal.dotProductXYZ(plane.normalX(), plane.normalY(), plane.normalZ());
|
|
261073
|
+
singleProjectedFacetAreaTimes2 += signedProjectedTriangleAreaTimes2;
|
|
261074
|
+
signedTruncatedPrismVolumeTimes6 += signedProjectedTriangleAreaTimes2 * (h0 + hA + hB);
|
|
261075
|
+
}
|
|
261076
|
+
if (!options?.skipMoments) {
|
|
261077
|
+
origin = facetPoints.getPoint3dAtUncheckedPointIndex(0, options?.workPoint0);
|
|
261078
|
+
products = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_4__.Matrix4d.createZero(options?.workMatrix);
|
|
261079
|
+
facetPoints.mapPoint((x, y, z) => plane.projectXYZToPlane(x, y, z, options?.workPoint1));
|
|
261080
|
+
PolygonOps.addSecondMomentAreaProducts(facetPoints, origin, products);
|
|
261081
|
+
}
|
|
261082
|
+
return { volume6: signedTruncatedPrismVolumeTimes6, area2: singleProjectedFacetAreaTimes2, origin, products };
|
|
261083
|
+
}
|
|
260930
261084
|
/** Test the direction of turn at the vertices of the polygon, ignoring z-coordinates.
|
|
260931
261085
|
* * For a polygon without self-intersections and successive colinear edges, this is a convexity and orientation test: all positive is convex and counterclockwise, all negative is convex and clockwise.
|
|
260932
261086
|
* * Beware that a polygon which turns through more than a full turn can cross itself and close, but is not convex.
|
|
@@ -261080,8 +261234,9 @@ class PolygonOps {
|
|
|
261080
261234
|
return numReverse;
|
|
261081
261235
|
}
|
|
261082
261236
|
/**
|
|
261083
|
-
* Reverse and reorder loops in the xy-plane for
|
|
261084
|
-
* @param loops multiple polygons in any order and orientation, z-coordinates ignored
|
|
261237
|
+
* Reverse and reorder loops in the xy-plane for consistent orientation and containment.
|
|
261238
|
+
* @param loops multiple polygons in any order and orientation, z-coordinates ignored.
|
|
261239
|
+
* * For best results, all overlaps should be containments, i.e., loop boundaries can touch, but should not cross.
|
|
261085
261240
|
* @returns array of arrays of polygons that capture the input pointers. In each first level array:
|
|
261086
261241
|
* * The first polygon is an outer loop, oriented counterclockwise.
|
|
261087
261242
|
* * Any subsequent polygons are holes of the outer loop, oriented clockwise.
|
|
@@ -262124,17 +262279,21 @@ class PolylineCompressionContext {
|
|
|
262124
262279
|
context.acceptPointByIndex(indexA);
|
|
262125
262280
|
context.recursiveCompressByChordErrorGo(indexA, indexB);
|
|
262126
262281
|
}
|
|
262127
|
-
/**
|
|
262128
|
-
*
|
|
262282
|
+
/**
|
|
262283
|
+
* Return a simplified subset of given points, omitting a point if very close to its predecessor.
|
|
262284
|
+
* * This is a local search, with a single pass over the data.
|
|
262285
|
+
* * First and last points are always retained.
|
|
262286
|
+
* @param data input points
|
|
262287
|
+
* @param maxEdgeLength length of largest edge to be compressed out
|
|
262129
262288
|
*/
|
|
262130
|
-
static compressInPlaceByShortEdgeLength(data,
|
|
262289
|
+
static compressInPlaceByShortEdgeLength(data, maxEdgeLength) {
|
|
262131
262290
|
const n = data.length;
|
|
262132
262291
|
if (n < 2)
|
|
262133
262292
|
return;
|
|
262134
262293
|
let lastAcceptedIndex = 0;
|
|
262135
262294
|
// back up from final point ..
|
|
262136
262295
|
let indexB = n - 1;
|
|
262137
|
-
while (indexB > 0 && data.distanceIndexIndex(indexB - 1, n - 1)
|
|
262296
|
+
while (indexB > 0 && data.distanceIndexIndex(indexB - 1, n - 1) <= maxEdgeLength)
|
|
262138
262297
|
indexB--;
|
|
262139
262298
|
if (indexB === 0) {
|
|
262140
262299
|
// Theres only one point there.
|
|
@@ -262147,7 +262306,7 @@ class PolylineCompressionContext {
|
|
|
262147
262306
|
let candidateIndex = lastAcceptedIndex + 1;
|
|
262148
262307
|
while (candidateIndex <= indexB) {
|
|
262149
262308
|
const d = data.distanceIndexIndex(lastAcceptedIndex, candidateIndex);
|
|
262150
|
-
if (d
|
|
262309
|
+
if (d > maxEdgeLength) {
|
|
262151
262310
|
data.moveIndexToIndex(candidateIndex, lastAcceptedIndex + 1);
|
|
262152
262311
|
lastAcceptedIndex++;
|
|
262153
262312
|
}
|
|
@@ -262155,10 +262314,13 @@ class PolylineCompressionContext {
|
|
|
262155
262314
|
}
|
|
262156
262315
|
data.length = lastAcceptedIndex + 1;
|
|
262157
262316
|
}
|
|
262158
|
-
/**
|
|
262159
|
-
*
|
|
262317
|
+
/**
|
|
262318
|
+
* Return a simplified subset of given points, omitting the middle of three successive points if the triangle they form is small.
|
|
262319
|
+
* * This is a local search, with a single pass over the data.
|
|
262320
|
+
* @param data input points
|
|
262321
|
+
* @param maxTriangleArea area of largest triangle to compress
|
|
262160
262322
|
*/
|
|
262161
|
-
static compressInPlaceBySmallTriangleArea(data,
|
|
262323
|
+
static compressInPlaceBySmallTriangleArea(data, maxTriangleArea) {
|
|
262162
262324
|
const n = data.length;
|
|
262163
262325
|
if (n < 3)
|
|
262164
262326
|
return;
|
|
@@ -262166,7 +262328,7 @@ class PolylineCompressionContext {
|
|
|
262166
262328
|
const cross = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.create();
|
|
262167
262329
|
for (let i1 = 1; i1 + 1 < n; i1++) {
|
|
262168
262330
|
data.crossProductIndexIndexIndex(lastAcceptedIndex, i1, i1 + 1, cross);
|
|
262169
|
-
if (0.5 * cross.magnitude() >
|
|
262331
|
+
if (0.5 * cross.magnitude() > maxTriangleArea) {
|
|
262170
262332
|
data.moveIndexToIndex(i1, ++lastAcceptedIndex);
|
|
262171
262333
|
}
|
|
262172
262334
|
}
|
|
@@ -262307,10 +262469,11 @@ class PolylineOps {
|
|
|
262307
262469
|
return _PolylineCompressionByEdgeOffset__WEBPACK_IMPORTED_MODULE_1__.PolylineCompressionContext.compressPoint3dArrayByChordError(source, chordTolerance);
|
|
262308
262470
|
}
|
|
262309
262471
|
/**
|
|
262310
|
-
* Return a simplified subset of given points, omitting
|
|
262472
|
+
* Return a simplified subset of given points, omitting a point if very close to its predecessor.
|
|
262311
262473
|
* * This is a local search, with a single pass over the data.
|
|
262474
|
+
* * First and last points are always retained.
|
|
262312
262475
|
* @param source input points
|
|
262313
|
-
* @param maxEdgeLength
|
|
262476
|
+
* @param maxEdgeLength length of largest edge to be compressed out
|
|
262314
262477
|
* @see [[GrowableXYZArray.cloneCompressed]]
|
|
262315
262478
|
*/
|
|
262316
262479
|
static compressShortEdges(source, maxEdgeLength) {
|
|
@@ -262319,10 +262482,10 @@ class PolylineOps {
|
|
|
262319
262482
|
return dest.getPoint3dArray();
|
|
262320
262483
|
}
|
|
262321
262484
|
/**
|
|
262322
|
-
* Return a simplified subset of given points, omitting
|
|
262485
|
+
* Return a simplified subset of given points, omitting the middle of three successive points if the triangle they form is small.
|
|
262323
262486
|
* * This is a local search, with a single pass over the data.
|
|
262324
262487
|
* @param source input points
|
|
262325
|
-
* @param
|
|
262488
|
+
* @param maxTriangleArea area of largest triangle to compress
|
|
262326
262489
|
*/
|
|
262327
262490
|
static compressSmallTriangles(source, maxTriangleArea) {
|
|
262328
262491
|
const dest = _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_2__.GrowableXYZArray.create(source);
|
|
@@ -264821,41 +264984,29 @@ class Ray3d {
|
|
|
264821
264984
|
*/
|
|
264822
264985
|
intersectionWithTriangle(vertex0, vertex1, vertex2, distanceTol, parameterTol, result) {
|
|
264823
264986
|
/**
|
|
264824
|
-
*
|
|
264987
|
+
* Let (w,u,v) be the barycentric coordinates of point P wrt the triangle (v0,v1,v2), such that
|
|
264825
264988
|
* P = w*v0 + u*v1 + v*v2 = (1-u-v)*v0 + u*v1 + v*v2 = v0 + u*(v1-v0) + v*(v2-v0)
|
|
264826
264989
|
*
|
|
264827
|
-
* Then if ray intersects triangle at
|
|
264990
|
+
* Then if the ray given by rayOrigin + t*rayVector intersects the triangle at P, we have
|
|
264828
264991
|
* v0 + u*(v1-v0) + v*(v2-v0) = rayOrigin + t*rayVector
|
|
264829
|
-
* or
|
|
264830
|
-
* -t*rayVector + u*(v1-v0) + v*(v2-v0) = rayOrigin - v0
|
|
264831
264992
|
*
|
|
264832
264993
|
* This equation can be reformulated as the following linear system:
|
|
264833
264994
|
*
|
|
264834
264995
|
* [ | | | ] [t] [ | ]
|
|
264835
264996
|
* [-rayVector v1-v0 v2-v0] [u] = [rayOrigin - v0]
|
|
264836
|
-
* [
|
|
264837
|
-
*
|
|
264838
|
-
* Then to find t, u, and v use Cramer's Rule and also the fact that if matrix A = [c1,c2,c3], then
|
|
264839
|
-
* det(A) = c1.(c2 x c3) which leads to
|
|
264840
|
-
*
|
|
264841
|
-
* t = [(rayOrigin - v0).((v1-v0) x (v2-v0))] / [-rayVector.((v1-v0) x (v2-v0))]
|
|
264842
|
-
* u = [-rayVector.((rayOrigin - v0) x (v2-v0))] / [-rayVector.((v1-v0) x (v2-v0))]
|
|
264843
|
-
* v = [-rayVector.((v1-v0) x (rayOrigin - v0))] / [-rayVector.((v1-v0) x (v2-v0))]
|
|
264997
|
+
* [ | | | ] [v] [ | ]
|
|
264844
264998
|
*
|
|
264845
|
-
*
|
|
264846
|
-
*
|
|
264999
|
+
* Then to find t, u, and v, use Cramer's Rule, the formulation of matrix determinant as column triple product,
|
|
265000
|
+
* and the fact that swapping any 2 vectors in the triple product negates it:
|
|
264847
265001
|
*
|
|
264848
|
-
*
|
|
264849
|
-
*
|
|
264850
|
-
*
|
|
264851
|
-
* v = [-rayVector.((rayOrigin - v0) x (v1-v0))] / [(v1-v0).(rayVector x (v2-v0))]
|
|
265002
|
+
* t = (v2-v0).(rayOrigin - v0) x (v1-v0) / (v1-v0).rayVector x (v2-v0)
|
|
265003
|
+
* u = (rayOrigin - v0).rayVector x (v2-v0) / (v1-v0).rayVector x (v2-v0)
|
|
265004
|
+
* v = -rayVector.(rayOrigin - v0) x (v1-v0) / (v1-v0).rayVector x (v2-v0)
|
|
264852
265005
|
*
|
|
264853
|
-
* Note that we
|
|
264854
|
-
*
|
|
264855
|
-
* 0 <= w <= 1.
|
|
265006
|
+
* Note that we verify 0 <= u,v,w <= 1. To do so we only need to check 0 <= u <= 1, 0 <= v, and u+v <= 1:
|
|
265007
|
+
* these 4 checks guarantee that v <= 1 and 0 <= u+v, and so with w = 1-(u+v), we have 0 <= w <= 1.
|
|
264856
265008
|
*
|
|
264857
|
-
* More info be found at
|
|
264858
|
-
* https://en.wikipedia.org/wiki/M%C3%B6ller%E2%80%93Trumbore_intersection_algorithm
|
|
265009
|
+
* More info be found at https://en.wikipedia.org/wiki/Moller-Trumbore_intersection_algorithm.
|
|
264859
265010
|
*/
|
|
264860
265011
|
if (distanceTol === undefined || distanceTol < 0) // we explicitly allow zero tolerance
|
|
264861
265012
|
distanceTol = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance;
|
|
@@ -265898,27 +266049,46 @@ class Transform {
|
|
|
265898
266049
|
return result;
|
|
265899
266050
|
}
|
|
265900
266051
|
/**
|
|
265901
|
-
* Create a Transform
|
|
265902
|
-
* @
|
|
266052
|
+
* Create a Transform with given origin and a rigid matrix constructed from two column vectors.
|
|
266053
|
+
* @param origin origin of the local coordinate system. Default is the global origin (zero).
|
|
266054
|
+
* @param vectorX first axis passed into `Matrix3d.createRigidFromColumns`.
|
|
266055
|
+
* @param vectorY second axis passed into `Matrix3d.createRigidFromColumns`.
|
|
266056
|
+
* @param axisOrder order of axis construction in `Matrix3d.createRigidFromColumns(vectorX, vectorY, axisOrder)`.
|
|
266057
|
+
* @param result optional pre-allocated result to populate and return.
|
|
266058
|
+
* @returns localToWorld transform for a local coordinate system with given origin and ordered axes, or `undefined`
|
|
266059
|
+
* if the rigid matrix could not be created.
|
|
266060
|
+
* @see [[Matrix3d.createRigidFromColumns]]
|
|
265903
266061
|
*/
|
|
265904
266062
|
static createRigidFromOriginAndColumns(origin, vectorX, vectorY, axisOrder, result) {
|
|
265905
|
-
const matrix = _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createRigidFromColumns(vectorX, vectorY, axisOrder, result
|
|
266063
|
+
const matrix = _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createRigidFromColumns(vectorX, vectorY, axisOrder, result?._matrix);
|
|
265906
266064
|
if (!matrix)
|
|
265907
266065
|
return undefined;
|
|
265908
266066
|
if (result) {
|
|
265909
|
-
// result._matrix was already modified to become rigid via createRigidFromColumns
|
|
265910
266067
|
result._origin.setFrom(origin);
|
|
265911
266068
|
return result;
|
|
265912
266069
|
}
|
|
265913
|
-
|
|
265914
|
-
|
|
265915
|
-
|
|
265916
|
-
|
|
265917
|
-
|
|
265918
|
-
|
|
265919
|
-
|
|
265920
|
-
|
|
265921
|
-
|
|
266070
|
+
return Transform.createRefs(origin?.cloneAsPoint3d(), matrix);
|
|
266071
|
+
}
|
|
266072
|
+
/**
|
|
266073
|
+
* Create a Transform with given origin and a rigid matrix constructed from one column vector.
|
|
266074
|
+
* @param origin origin of the local coordinate system. Default is the global origin (zero).
|
|
266075
|
+
* @param vector direction of the axis of the local coordinate system indicated by the first letter of `axisOrder`.
|
|
266076
|
+
* @param axisOrder order of axis construction in `Matrix3d.createRigidHeadsUp(vector, axisOrder)`. Default value
|
|
266077
|
+
* is `AxisOrder.ZXY`, which means the z-column of the returned Transform is in the direction of `vector`.
|
|
266078
|
+
* @param result optional pre-allocated result to populate and return.
|
|
266079
|
+
* @returns localToWorld transform for a local coordinate system with given origin and axis, or `undefined`
|
|
266080
|
+
* if the rigid matrix could not be created.
|
|
266081
|
+
* @see [[Matrix3d.createRigidHeadsUp]]
|
|
266082
|
+
*/
|
|
266083
|
+
static createRigidFromOriginAndVector(origin, vector, axisOrder = _Geometry__WEBPACK_IMPORTED_MODULE_0__.AxisOrder.ZXY, result) {
|
|
266084
|
+
const matrix = _Matrix3d__WEBPACK_IMPORTED_MODULE_2__.Matrix3d.createRigidHeadsUp(vector, axisOrder, result?._matrix);
|
|
266085
|
+
if (!matrix)
|
|
266086
|
+
return undefined;
|
|
266087
|
+
if (result) {
|
|
266088
|
+
result._origin.setFrom(origin);
|
|
266089
|
+
return result;
|
|
266090
|
+
}
|
|
266091
|
+
return Transform.createRefs(origin?.cloneAsPoint3d(), matrix);
|
|
265922
266092
|
}
|
|
265923
266093
|
/**
|
|
265924
266094
|
* Create a Transform with the specified `matrix`. Compute an `origin` (different from the given `fixedPoint`)
|
|
@@ -268475,11 +268645,11 @@ class Point4d extends _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_0__.Plane3d {
|
|
|
268475
268645
|
return result;
|
|
268476
268646
|
}
|
|
268477
268647
|
/** Near-equality test, using `Geometry.isSameCoordinate` on all 4 x,y,z,w */
|
|
268478
|
-
isAlmostEqual(other) {
|
|
268479
|
-
return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.x, other.x)
|
|
268480
|
-
&& _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.y, other.y)
|
|
268481
|
-
&& _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.z, other.z)
|
|
268482
|
-
&& _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.w, other.w);
|
|
268648
|
+
isAlmostEqual(other, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance) {
|
|
268649
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.x, other.x, tolerance)
|
|
268650
|
+
&& _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.y, other.y, tolerance)
|
|
268651
|
+
&& _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.z, other.z, tolerance)
|
|
268652
|
+
&& _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.w, other.w, tolerance);
|
|
268483
268653
|
}
|
|
268484
268654
|
/**
|
|
268485
268655
|
* Test for same coordinate by direct x,y,z,w args
|
|
@@ -268488,11 +268658,11 @@ class Point4d extends _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_0__.Plane3d {
|
|
|
268488
268658
|
* @param z z to test
|
|
268489
268659
|
* @param w w to test
|
|
268490
268660
|
*/
|
|
268491
|
-
isAlmostEqualXYZW(x, y, z, w) {
|
|
268492
|
-
return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.x, x)
|
|
268493
|
-
&& _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.y, y)
|
|
268494
|
-
&& _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.z, z)
|
|
268495
|
-
&& _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.w, w);
|
|
268661
|
+
isAlmostEqualXYZW(x, y, z, w, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.smallMetricDistance) {
|
|
268662
|
+
return _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.x, x, tolerance)
|
|
268663
|
+
&& _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.y, y, tolerance)
|
|
268664
|
+
&& _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.z, z, tolerance)
|
|
268665
|
+
&& _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.isSameCoordinate(this.w, w, tolerance);
|
|
268496
268666
|
}
|
|
268497
268667
|
/**
|
|
268498
268668
|
* Convert an Angle to a JSON object.
|
|
@@ -268727,13 +268897,17 @@ class Point4d extends _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_0__.Plane3d {
|
|
|
268727
268897
|
* * If the xyz part of `this` are all zero, (a clone of) `spacePoint` is returned.
|
|
268728
268898
|
*/
|
|
268729
268899
|
projectPointToPlane(spacePoint, result) {
|
|
268730
|
-
|
|
268900
|
+
return this.projectXYZToPlane(spacePoint.x, spacePoint.y, spacePoint.z, result);
|
|
268901
|
+
}
|
|
268902
|
+
/** Return the projection of (x,y,z) onto the plane. */
|
|
268903
|
+
projectXYZToPlane(x, y, z, result) {
|
|
268904
|
+
const h = this.altitudeXYZ(x, y, z);
|
|
268731
268905
|
const nn = this.magnitudeSquaredXYZ();
|
|
268732
268906
|
// this unusual tol is needed so that toPlane3dByOriginAndUnitNormal agrees with its original implementation
|
|
268733
268907
|
const alpha = _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.conditionalDivideCoordinate(-h, nn, _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.largeFractionResult * _Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.largeFractionResult);
|
|
268734
268908
|
if (alpha === undefined)
|
|
268735
|
-
return
|
|
268736
|
-
return
|
|
268909
|
+
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(x, y, z, result);
|
|
268910
|
+
return _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Point3d.create(x + alpha * this.x, y + alpha * this.y, z + alpha * this.z, result);
|
|
268737
268911
|
}
|
|
268738
268912
|
/** scale all components (including w!!) */
|
|
268739
268913
|
scale(scale, result) {
|
|
@@ -275983,7 +276157,7 @@ class FacetOrientationFixup {
|
|
|
275983
276157
|
return this._facetOrientation[facetIndex];
|
|
275984
276158
|
}
|
|
275985
276159
|
/**
|
|
275986
|
-
* RETURN FALSE IF ANY EDGE HAS 3
|
|
276160
|
+
* RETURN FALSE IF ANY EDGE HAS 3 OR MORE FACETS
|
|
275987
276161
|
*/
|
|
275988
276162
|
setupUnoriented() {
|
|
275989
276163
|
this._edges.sort();
|
|
@@ -276441,97 +276615,107 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
276441
276615
|
* @module Polyface
|
|
276442
276616
|
*/
|
|
276443
276617
|
/**
|
|
276444
|
-
*
|
|
276445
|
-
* *
|
|
276446
|
-
*
|
|
276447
|
-
*
|
|
276448
|
-
* * [2] is facet index (or another number to associate with this edge).
|
|
276618
|
+
* Represent an [[IndexedPolyface]] edge as:
|
|
276619
|
+
* * vertex start index and vertex end index (CCW order around its facet)
|
|
276620
|
+
* * an additional number to associate with the edge (e.g., facet index)
|
|
276621
|
+
* @public
|
|
276449
276622
|
*/
|
|
276450
|
-
class SortableEdge
|
|
276623
|
+
class SortableEdge {
|
|
276624
|
+
_v;
|
|
276625
|
+
_a;
|
|
276626
|
+
/** Constructor. */
|
|
276627
|
+
constructor(startVertex, endVertex, facetIndex) {
|
|
276628
|
+
this._v = [startVertex, endVertex];
|
|
276629
|
+
this._a = facetIndex;
|
|
276630
|
+
}
|
|
276631
|
+
/** Clone the edge. */
|
|
276632
|
+
clone() {
|
|
276633
|
+
return new SortableEdge(this._v[0], this._v[1], this._a);
|
|
276634
|
+
}
|
|
276451
276635
|
/** Return the vertex index that appears first in the order stored. */
|
|
276452
|
-
get
|
|
276453
|
-
return this[0];
|
|
276636
|
+
get startVertex() {
|
|
276637
|
+
return this._v[0];
|
|
276454
276638
|
}
|
|
276455
276639
|
/** Return the vertex index that appears second in the order stored. */
|
|
276456
|
-
get
|
|
276457
|
-
return this[1];
|
|
276640
|
+
get endVertex() {
|
|
276641
|
+
return this._v[1];
|
|
276458
276642
|
}
|
|
276459
276643
|
/**
|
|
276460
276644
|
* Return the facet index.
|
|
276461
276645
|
* * This value is carried along during matching. Typically it is a facet index, but it does not have to be.
|
|
276462
276646
|
*/
|
|
276463
276647
|
get facetIndex() {
|
|
276464
|
-
return this
|
|
276648
|
+
return this._a;
|
|
276465
276649
|
}
|
|
276466
|
-
/** return true if
|
|
276650
|
+
/** return true if `startVertex` is less than `endVertex`. */
|
|
276467
276651
|
get isLowHigh() {
|
|
276468
|
-
return this[0] < this[1];
|
|
276652
|
+
return this._v[0] < this._v[1];
|
|
276469
276653
|
}
|
|
276470
276654
|
/** Return the vertex index with lower numeric value. */
|
|
276471
|
-
get
|
|
276472
|
-
return this
|
|
276655
|
+
get lowVertex() {
|
|
276656
|
+
return this.isLowHigh ? this._v[0] : this._v[1];
|
|
276473
276657
|
}
|
|
276474
276658
|
/** Return the vertex index with higher numeric value. */
|
|
276475
|
-
get
|
|
276476
|
-
return this
|
|
276659
|
+
get highVertex() {
|
|
276660
|
+
return this.isLowHigh ? this._v[1] : this._v[0];
|
|
276477
276661
|
}
|
|
276478
|
-
/** Return true if
|
|
276662
|
+
/** Return true if edgeA and edgeB traverse the same edge in the same direction. */
|
|
276663
|
+
static areSameEdge(edgeA, edgeB) {
|
|
276664
|
+
return edgeA._v[0] === edgeB._v[0] && edgeA._v[1] === edgeB._v[1];
|
|
276665
|
+
}
|
|
276666
|
+
/** Return true if edgeA and edgeB traverse the same edge in opposite directions. */
|
|
276479
276667
|
static areDirectedPartners(edgeA, edgeB) {
|
|
276480
|
-
return edgeA[0] === edgeB[1] && edgeA[1] === edgeB[0];
|
|
276668
|
+
return edgeA._v[0] === edgeB._v[1] && edgeA._v[1] === edgeB._v[0];
|
|
276481
276669
|
}
|
|
276482
|
-
/** Return true if
|
|
276670
|
+
/** Return true if edgeA and edgeB traverse the same edge in the same or opposite directions. */
|
|
276483
276671
|
static areUndirectedPartners(edgeA, edgeB) {
|
|
276484
|
-
return (edgeA
|
|
276672
|
+
return this.areSameEdge(edgeA, edgeB) || this.areDirectedPartners(edgeA, edgeB);
|
|
276485
276673
|
}
|
|
276486
276674
|
/**
|
|
276487
|
-
* Return numeric relationship
|
|
276488
|
-
* * 1 if they share start and end in the same order.
|
|
276489
|
-
* * -1 if they share start and end in reversed order.
|
|
276675
|
+
* Return numeric identifier for the relationship between edgeA and edgeB:
|
|
276676
|
+
* * 1 if they share start and end vertex indices in the same order.
|
|
276677
|
+
* * -1 if they share start and end vertex indices in reversed order.
|
|
276490
276678
|
* * 0 otherwise.
|
|
276491
276679
|
*/
|
|
276492
276680
|
static relativeOrientation(edgeA, edgeB) {
|
|
276493
|
-
if (edgeA
|
|
276681
|
+
if (this.areSameEdge(edgeA, edgeB))
|
|
276494
276682
|
return 1;
|
|
276495
|
-
if (edgeA
|
|
276683
|
+
if (this.areDirectedPartners(edgeA, edgeB))
|
|
276496
276684
|
return -1;
|
|
276497
276685
|
return 0;
|
|
276498
276686
|
}
|
|
276687
|
+
/** Whether the start and end vertex indices are equal. */
|
|
276499
276688
|
get isNullEdge() {
|
|
276500
|
-
return this[0] === this[1];
|
|
276689
|
+
return this._v[0] === this._v[1];
|
|
276501
276690
|
}
|
|
276502
276691
|
/**
|
|
276503
276692
|
* Lexical comparison of two edges.
|
|
276504
|
-
* * If the edges have the same vertex pair (in same or opposite order) they will end up adjacent in a sort.
|
|
276505
|
-
* * If the edges have 0 or 1 shared vertex indices, the one with lowest low comes first.
|
|
276693
|
+
* * If the edges have the same vertex index pair (in same or opposite order) they will end up adjacent in a sort.
|
|
276506
276694
|
* @param edgeA first edge
|
|
276507
276695
|
* @param edgeB second edge
|
|
276508
276696
|
*/
|
|
276509
276697
|
static lessThan(edgeA, edgeB) {
|
|
276510
276698
|
// primary compare is based on indirect indices
|
|
276511
|
-
const lowA = edgeA.
|
|
276512
|
-
const lowB = edgeB.
|
|
276699
|
+
const lowA = edgeA.lowVertex;
|
|
276700
|
+
const lowB = edgeB.lowVertex;
|
|
276513
276701
|
if (lowA < lowB)
|
|
276514
276702
|
return -1;
|
|
276515
276703
|
if (lowB < lowA)
|
|
276516
276704
|
return 1;
|
|
276517
|
-
const highA = edgeA.
|
|
276518
|
-
const highB = edgeB.
|
|
276705
|
+
const highA = edgeA.highVertex;
|
|
276706
|
+
const highB = edgeB.highVertex;
|
|
276519
276707
|
if (highA < highB)
|
|
276520
276708
|
return -1;
|
|
276521
276709
|
if (highB < highA)
|
|
276522
276710
|
return 1;
|
|
276523
276711
|
// undirected indices match ... use directed vertexIndexA
|
|
276524
|
-
return edgeA.
|
|
276525
|
-
}
|
|
276526
|
-
constructor(vertexA, vertexB, facetIndex) {
|
|
276527
|
-
super(3);
|
|
276528
|
-
this[0] = vertexA;
|
|
276529
|
-
this[1] = vertexB;
|
|
276530
|
-
this[2] = facetIndex;
|
|
276712
|
+
return edgeA.startVertex - edgeB.startVertex;
|
|
276531
276713
|
}
|
|
276714
|
+
/** Return the edge data as a JSON array. */
|
|
276532
276715
|
toJSON() {
|
|
276533
|
-
return [this[0], this[1], this
|
|
276716
|
+
return [this._v[0], this._v[1], this._a];
|
|
276534
276717
|
}
|
|
276718
|
+
/** Return the edge cluster in JSON format. */
|
|
276535
276719
|
static clusterToJSON(data) {
|
|
276536
276720
|
if (data instanceof SortableEdge)
|
|
276537
276721
|
return data.toJSON();
|
|
@@ -276539,6 +276723,7 @@ class SortableEdge extends Float64Array {
|
|
|
276539
276723
|
for (const edge of data)
|
|
276540
276724
|
result.push(edge.toJSON());
|
|
276541
276725
|
}
|
|
276726
|
+
/** Return the edge cluster array in JSON format. */
|
|
276542
276727
|
static clusterArrayToJSON(data) {
|
|
276543
276728
|
const result = [];
|
|
276544
276729
|
for (const cluster of data)
|
|
@@ -276547,11 +276732,14 @@ class SortableEdge extends Float64Array {
|
|
|
276547
276732
|
}
|
|
276548
276733
|
}
|
|
276549
276734
|
/**
|
|
276550
|
-
* An IndexedEdgeMatcher carries an array of edge start
|
|
276551
|
-
*
|
|
276735
|
+
* An IndexedEdgeMatcher carries an array of edge start and end indices for sorting and subsequent analyses,
|
|
276736
|
+
* such as testing for closed mesh.
|
|
276737
|
+
* @public
|
|
276552
276738
|
*/
|
|
276553
276739
|
class IndexedEdgeMatcher {
|
|
276740
|
+
/** The array of edges to be sorted. */
|
|
276554
276741
|
edges;
|
|
276742
|
+
/** Constructor. Call [[addEdge]] or [[addPath]] to populate `edges`. */
|
|
276555
276743
|
constructor() {
|
|
276556
276744
|
this.edges = [];
|
|
276557
276745
|
}
|
|
@@ -276568,22 +276756,22 @@ class IndexedEdgeMatcher {
|
|
|
276568
276756
|
return edge;
|
|
276569
276757
|
}
|
|
276570
276758
|
/**
|
|
276571
|
-
* Push edges
|
|
276572
|
-
*
|
|
276573
|
-
* @param
|
|
276759
|
+
* Push edges along a path.
|
|
276760
|
+
* * Typically used to add edges around a facet.
|
|
276761
|
+
* @param vertexIndices array of vertex indices along an open or closed path.
|
|
276762
|
+
* @param facetIndex value to set on each edge pushed.
|
|
276574
276763
|
* @param closeLoop true to add an edge from last to first vertex.
|
|
276575
276764
|
*/
|
|
276576
|
-
addPath(
|
|
276577
|
-
if (
|
|
276765
|
+
addPath(vertexIndices, facetIndex, closeLoop) {
|
|
276766
|
+
if (vertexIndices.length === 0)
|
|
276578
276767
|
return;
|
|
276579
|
-
const m =
|
|
276580
|
-
for (let i = 0; i < m; i++)
|
|
276581
|
-
this.addEdge(
|
|
276582
|
-
}
|
|
276768
|
+
const m = vertexIndices.length - 1;
|
|
276769
|
+
for (let i = 0; i < m; i++)
|
|
276770
|
+
this.addEdge(vertexIndices[i], vertexIndices[i + 1], facetIndex);
|
|
276583
276771
|
if (closeLoop)
|
|
276584
|
-
this.addEdge(
|
|
276772
|
+
this.addEdge(vertexIndices[m], vertexIndices[0], facetIndex);
|
|
276585
276773
|
}
|
|
276586
|
-
/** Sort the
|
|
276774
|
+
/** Sort the edges. */
|
|
276587
276775
|
sort() {
|
|
276588
276776
|
this.edges.sort((edgeA, edgeB) => SortableEdge.lessThan(edgeA, edgeB));
|
|
276589
276777
|
}
|
|
@@ -276602,20 +276790,18 @@ class IndexedEdgeMatcher {
|
|
|
276602
276790
|
}
|
|
276603
276791
|
}
|
|
276604
276792
|
/**
|
|
276605
|
-
* Sort the edges, and
|
|
276606
|
-
*
|
|
276607
|
-
* *
|
|
276608
|
-
* * Any combination of the
|
|
276793
|
+
* Sort the edges, and collect up to four categories of edges: manifold pairs, singletons, null edges,
|
|
276794
|
+
* and everything else.
|
|
276795
|
+
* * Caller should allocate arrays of interest.
|
|
276796
|
+
* * Any combination of the arrays may be `undefined`, indicating that category is to be ignored.
|
|
276797
|
+
* * Any combination of the arrays may be aliased as the same target, in which case the aliased categories are
|
|
276609
276798
|
* merged into the target.
|
|
276610
|
-
* * For instance, to ignore manifold pairs and collect all
|
|
276611
|
-
* `
|
|
276612
|
-
*
|
|
276613
|
-
* @param
|
|
276614
|
-
*
|
|
276615
|
-
* @param
|
|
276616
|
-
* @param nullEdges optional array to receive arrays of null edges (same start and end vertex)
|
|
276617
|
-
* @param allOtherClusters optional array to receive arrays in which all the edges are partners in an undirected sense
|
|
276618
|
-
* but not a simple directed pair.
|
|
276799
|
+
* * For instance, to ignore manifold pairs and collect all other edges in a single array:
|
|
276800
|
+
* `const foo = []; matcher.sortAndCollectClusters(undefined, foo, foo, foo);`
|
|
276801
|
+
* @param manifoldPairs array to receive pairs of properly mated edges, i.e. mesh interior edges.
|
|
276802
|
+
* @param singletons array to receive edges that have no partner, i.e., mesh boundary edges.
|
|
276803
|
+
* @param nullEdges array to receive arrays of matched null edges, for which start === end vertex index.
|
|
276804
|
+
* @param allOtherClusters array to receive arrays of edges that are partners in an undirected, non-manifold sense.
|
|
276619
276805
|
*/
|
|
276620
276806
|
sortAndCollectClusters(manifoldPairs, singletons, nullEdges, allOtherClusters) {
|
|
276621
276807
|
this.sort();
|
|
@@ -276636,18 +276822,14 @@ class IndexedEdgeMatcher {
|
|
|
276636
276822
|
SortableEdge.areUndirectedPartners(baseEdge, this.edges[index1]); index1++) {
|
|
276637
276823
|
clusterLength++;
|
|
276638
276824
|
}
|
|
276639
|
-
if (this.edges[index0].isNullEdge)
|
|
276825
|
+
if (this.edges[index0].isNullEdge)
|
|
276640
276826
|
this.collectSortableEdgeCluster(index0, index0 + clusterLength, nullEdges);
|
|
276641
|
-
|
|
276642
|
-
else if (clusterLength === 2 && SortableEdge.areDirectedPartners(baseEdge, this.edges[index0 + 1])) {
|
|
276827
|
+
else if (clusterLength === 2 && SortableEdge.areDirectedPartners(baseEdge, this.edges[index0 + 1]))
|
|
276643
276828
|
this.collectSortableEdgeCluster(index0, index0 + clusterLength, manifoldPairs);
|
|
276644
|
-
|
|
276645
|
-
else if (clusterLength === 1) {
|
|
276829
|
+
else if (clusterLength === 1)
|
|
276646
276830
|
this.collectSortableEdgeCluster(index0, index0 + 1, singletons);
|
|
276647
|
-
|
|
276648
|
-
else {
|
|
276831
|
+
else
|
|
276649
276832
|
this.collectSortableEdgeCluster(index0, index0 + clusterLength, allOtherClusters);
|
|
276650
|
-
}
|
|
276651
276833
|
}
|
|
276652
276834
|
}
|
|
276653
276835
|
}
|
|
@@ -276706,10 +276888,10 @@ class IndexedPolyfaceVisitor extends _PolyfaceData__WEBPACK_IMPORTED_MODULE_0__.
|
|
|
276706
276888
|
this.auxData = polyface.data.auxData.createForVisitor();
|
|
276707
276889
|
if (polyface.data.edgeMateIndex)
|
|
276708
276890
|
this.edgeMateIndex = [];
|
|
276709
|
-
this.reset();
|
|
276710
276891
|
this._numEdges = 0;
|
|
276711
276892
|
this._nextFacetIndex = 0;
|
|
276712
276893
|
this._currentFacetIndex = -1;
|
|
276894
|
+
this.reset();
|
|
276713
276895
|
}
|
|
276714
276896
|
/** Return the client polyface object. */
|
|
276715
276897
|
clientPolyface() {
|
|
@@ -276746,11 +276928,14 @@ class IndexedPolyfaceVisitor extends _PolyfaceData__WEBPACK_IMPORTED_MODULE_0__.
|
|
|
276746
276928
|
moveToReadIndex(facetIndex) {
|
|
276747
276929
|
if (!this._polyface.isValidFacetIndex(facetIndex))
|
|
276748
276930
|
return false;
|
|
276749
|
-
|
|
276931
|
+
const numEdges = this._polyface.numEdgeInFacet(facetIndex);
|
|
276932
|
+
if (this._currentFacetIndex !== facetIndex || numEdges + this._numWrap !== this.pointCount) {
|
|
276933
|
+
this._currentFacetIndex = facetIndex;
|
|
276934
|
+
this._numEdges = numEdges;
|
|
276935
|
+
this.resizeAllArrays(this._numEdges + this._numWrap);
|
|
276936
|
+
this.gatherIndexedData(this._polyface.data, this._polyface.facetIndex0(this._currentFacetIndex), this._polyface.facetIndex1(this._currentFacetIndex), this._numWrap);
|
|
276937
|
+
}
|
|
276750
276938
|
this._nextFacetIndex = facetIndex + 1;
|
|
276751
|
-
this._numEdges = this._polyface.numEdgeInFacet(facetIndex);
|
|
276752
|
-
this.resizeAllArrays(this._numEdges + this._numWrap);
|
|
276753
|
-
this.gatherIndexedData(this._polyface.data, this._polyface.facetIndex0(this._currentFacetIndex), this._polyface.facetIndex1(this._currentFacetIndex), this._numWrap);
|
|
276754
276939
|
return true;
|
|
276755
276940
|
}
|
|
276756
276941
|
/** Advance the iterator to a the 'next' facet in the client polyface. */
|
|
@@ -276760,7 +276945,7 @@ class IndexedPolyfaceVisitor extends _PolyfaceData__WEBPACK_IMPORTED_MODULE_0__.
|
|
|
276760
276945
|
this._nextFacetIndex++;
|
|
276761
276946
|
return true;
|
|
276762
276947
|
}
|
|
276763
|
-
/**
|
|
276948
|
+
/** Restart the visitor at the first facet. */
|
|
276764
276949
|
reset() {
|
|
276765
276950
|
this.moveToReadIndex(0);
|
|
276766
276951
|
this._nextFacetIndex = 0; // so immediate moveToNextFacet stays here.
|
|
@@ -276859,6 +277044,10 @@ class IndexedPolyfaceVisitor extends _PolyfaceData__WEBPACK_IMPORTED_MODULE_0__.
|
|
|
276859
277044
|
this.color.push(_Geometry__WEBPACK_IMPORTED_MODULE_1__.Geometry.interpolateColor(other.color[index0], fraction, other.color[index1]));
|
|
276860
277045
|
// TODO: auxData? taggedNumericData?
|
|
276861
277046
|
}
|
|
277047
|
+
/** Create a visitor for a subset of the facets visitable by the instance. */
|
|
277048
|
+
createSubsetVisitor(facetIndices, numWrap = 0) {
|
|
277049
|
+
return IndexedPolyfaceSubsetVisitor.createSubsetVisitor(this._polyface, facetIndices, numWrap);
|
|
277050
|
+
}
|
|
276862
277051
|
}
|
|
276863
277052
|
/**
|
|
276864
277053
|
* An `IndexedPolyfaceSubsetVisitor` is an `IndexedPolyfaceVisitor` which only visits a subset of facets in the polyface.
|
|
@@ -276867,38 +277056,38 @@ class IndexedPolyfaceVisitor extends _PolyfaceData__WEBPACK_IMPORTED_MODULE_0__.
|
|
|
276867
277056
|
* @public
|
|
276868
277057
|
*/
|
|
276869
277058
|
class IndexedPolyfaceSubsetVisitor extends IndexedPolyfaceVisitor {
|
|
276870
|
-
|
|
276871
|
-
|
|
276872
|
-
|
|
276873
|
-
constructor(polyface,
|
|
277059
|
+
_facetIndices;
|
|
277060
|
+
_currentSubsetIndex; // index within _facetIndices, or -1 after construction
|
|
277061
|
+
_nextSubsetIndex; // index within _facetIndices
|
|
277062
|
+
constructor(polyface, facetIndices, numWrap) {
|
|
276874
277063
|
super(polyface, numWrap);
|
|
276875
|
-
this.
|
|
276876
|
-
this.
|
|
276877
|
-
this.
|
|
277064
|
+
this._facetIndices = facetIndices.slice();
|
|
277065
|
+
this._currentSubsetIndex = -1;
|
|
277066
|
+
this._nextSubsetIndex = 0;
|
|
277067
|
+
this.reset();
|
|
276878
277068
|
}
|
|
276879
277069
|
isValidSubsetIndex(index) {
|
|
276880
|
-
return
|
|
277070
|
+
return index >= 0 && index < this._facetIndices.length;
|
|
276881
277071
|
}
|
|
276882
277072
|
/**
|
|
276883
277073
|
* Create a visitor for iterating a subset of the facets of `polyface`.
|
|
276884
277074
|
* @param polyface reference to the client polyface, supplying facets
|
|
276885
|
-
* @param
|
|
277075
|
+
* @param facetIndices array of indices of facets in the client polyface to visit. This array is cloned.
|
|
276886
277076
|
* @param numWrap number of vertices replicated in the visitor arrays to facilitate simpler caller code. Default is zero.
|
|
276887
277077
|
*/
|
|
276888
|
-
static createSubsetVisitor(polyface,
|
|
276889
|
-
return new IndexedPolyfaceSubsetVisitor(polyface,
|
|
277078
|
+
static createSubsetVisitor(polyface, facetIndices, numWrap = 0) {
|
|
277079
|
+
return new IndexedPolyfaceSubsetVisitor(polyface, facetIndices, numWrap);
|
|
276890
277080
|
}
|
|
276891
277081
|
/**
|
|
276892
277082
|
* Advance the iterator to a particular facet in the subset of client polyface facets.
|
|
276893
|
-
* @param
|
|
276894
|
-
* the client polyface.
|
|
277083
|
+
* @param subsetIndex index into the subset array, not to be confused with the client facet index.
|
|
276895
277084
|
* @return whether the iterator was successfully moved.
|
|
276896
277085
|
*/
|
|
276897
|
-
moveToReadIndex(
|
|
276898
|
-
if (this.isValidSubsetIndex(
|
|
276899
|
-
this.
|
|
276900
|
-
this.
|
|
276901
|
-
return super.moveToReadIndex(this.
|
|
277086
|
+
moveToReadIndex(subsetIndex) {
|
|
277087
|
+
if (this.isValidSubsetIndex(subsetIndex)) {
|
|
277088
|
+
this._currentSubsetIndex = subsetIndex;
|
|
277089
|
+
this._nextSubsetIndex = subsetIndex + 1;
|
|
277090
|
+
return super.moveToReadIndex(this._facetIndices[subsetIndex]);
|
|
276902
277091
|
}
|
|
276903
277092
|
return false;
|
|
276904
277093
|
}
|
|
@@ -276907,29 +277096,31 @@ class IndexedPolyfaceSubsetVisitor extends IndexedPolyfaceVisitor {
|
|
|
276907
277096
|
* @return whether the iterator was successfully moved.
|
|
276908
277097
|
*/
|
|
276909
277098
|
moveToNextFacet() {
|
|
276910
|
-
if (this.
|
|
276911
|
-
return this.moveToReadIndex(this.
|
|
276912
|
-
this.
|
|
277099
|
+
if (this._nextSubsetIndex !== this._currentSubsetIndex)
|
|
277100
|
+
return this.moveToReadIndex(this._nextSubsetIndex);
|
|
277101
|
+
this._nextSubsetIndex++;
|
|
276913
277102
|
return true;
|
|
276914
277103
|
}
|
|
276915
|
-
/**
|
|
277104
|
+
/** Restart the visitor at the first facet. */
|
|
276916
277105
|
reset() {
|
|
276917
|
-
this.
|
|
276918
|
-
|
|
277106
|
+
if (this._facetIndices) { // avoid crash during super ctor when we aren't yet initialized
|
|
277107
|
+
this.moveToReadIndex(0);
|
|
277108
|
+
this._nextSubsetIndex = 0; // so immediate moveToNextFacet stays here.
|
|
277109
|
+
}
|
|
276919
277110
|
}
|
|
276920
277111
|
/**
|
|
276921
|
-
* Return the
|
|
276922
|
-
* @param
|
|
276923
|
-
* @return valid client polyface facet index, or `undefined` if invalid
|
|
277112
|
+
* Return the client polyface facet index (aka "readIndex") for the given subset index.
|
|
277113
|
+
* @param subsetIndex index into the subset array. Default is the subset index of the currently visited facet.
|
|
277114
|
+
* @return valid client polyface facet index, or `undefined` if invalid subset index.
|
|
276924
277115
|
*/
|
|
276925
|
-
parentFacetIndex(
|
|
276926
|
-
if (undefined ===
|
|
276927
|
-
|
|
276928
|
-
return this.isValidSubsetIndex(
|
|
277116
|
+
parentFacetIndex(subsetIndex) {
|
|
277117
|
+
if (undefined === subsetIndex)
|
|
277118
|
+
subsetIndex = this._currentSubsetIndex;
|
|
277119
|
+
return this.isValidSubsetIndex(subsetIndex) ? this._facetIndices[subsetIndex] : undefined;
|
|
276929
277120
|
}
|
|
276930
277121
|
/** Return the number of facets this visitor is able to visit. */
|
|
276931
277122
|
getVisitableFacetCount() {
|
|
276932
|
-
return this.
|
|
277123
|
+
return this._facetIndices.length;
|
|
276933
277124
|
}
|
|
276934
277125
|
/**
|
|
276935
277126
|
* Create a visitor for those mesh facets with normal in the same half-space as the given vector.
|
|
@@ -277029,7 +277220,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
277029
277220
|
* * The [[previousAroundVertex]] step is clockwise around the vertex.
|
|
277030
277221
|
* * The `nextAroundFacet` steps for a walker and its [[edgeMate]] are in opposite directions along their shared edge,
|
|
277031
277222
|
* when that edge is interior. Thus the `edgeMate` step can be seen to iterate an "edge loop" of two locations for an
|
|
277032
|
-
* interior
|
|
277223
|
+
* interior edge.
|
|
277033
277224
|
* * Invalid Walkers:
|
|
277034
277225
|
* * An invalid walker has undefined [[edgeIndex]]. For these walkers, [[isUndefined]] returns true, and [[isValid]]
|
|
277035
277226
|
* returns false. Traversal operations on an invalid walker return an invalid walker.
|
|
@@ -277043,6 +277234,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
277043
277234
|
* * Invalid walkers can also occur while traversing a non-manifold mesh. Such meshes feature edge(s) with more than
|
|
277044
277235
|
* two adjacent facets, or with two adjacent facets that have opposite orientations. These meshes are uncommon, and
|
|
277045
277236
|
* usually indicate a construction problem.
|
|
277237
|
+
* * Note that a null edge, for which the start and end vertex is the same, does not yield an invalid walker.
|
|
277046
277238
|
* * See [[buildEdgeMateIndices]] for further description of the topological relations.
|
|
277047
277239
|
* @public
|
|
277048
277240
|
*/
|
|
@@ -277085,6 +277277,10 @@ class IndexedPolyfaceWalker {
|
|
|
277085
277277
|
get isUndefined() {
|
|
277086
277278
|
return this._edgeIndex === undefined;
|
|
277087
277279
|
}
|
|
277280
|
+
/** Whether the walker is at a null edge, i.e. an edge with no length. */
|
|
277281
|
+
get isNull() {
|
|
277282
|
+
return this.isValid && this._polyface.data.edgeIndexToEdgeMateIndex(this._edgeIndex) === this._edgeIndex;
|
|
277283
|
+
}
|
|
277088
277284
|
/**
|
|
277089
277285
|
* Create a walker for a given polyface at an optional edge.
|
|
277090
277286
|
* @param polyface reference to the client polyface. This reference is captured (the polyface is not copied).
|
|
@@ -277127,17 +277323,16 @@ class IndexedPolyfaceWalker {
|
|
|
277127
277323
|
}
|
|
277128
277324
|
/**
|
|
277129
277325
|
* Create a new IndexedPolyfaceWalker from the instance.
|
|
277130
|
-
* * The returned walker refers to the same polyface.
|
|
277131
|
-
*
|
|
277132
|
-
|
|
277133
|
-
|
|
277134
|
-
|
|
277135
|
-
|
|
277136
|
-
|
|
277137
|
-
|
|
277138
|
-
|
|
277139
|
-
|
|
277140
|
-
return undefined;
|
|
277326
|
+
* * The returned walker refers to the same polyface and edge as the instance.
|
|
277327
|
+
* @param result optional receiver to modify and return.
|
|
277328
|
+
*/
|
|
277329
|
+
clone(result) {
|
|
277330
|
+
if (result) {
|
|
277331
|
+
result._polyface = this._polyface;
|
|
277332
|
+
result._edgeIndex = this._edgeIndex;
|
|
277333
|
+
return result;
|
|
277334
|
+
}
|
|
277335
|
+
return new IndexedPolyfaceWalker(this._polyface, this._edgeIndex);
|
|
277141
277336
|
}
|
|
277142
277337
|
/**
|
|
277143
277338
|
* Load the walker's facet into the given visitor.
|
|
@@ -277266,29 +277461,35 @@ class IndexedPolyfaceWalker {
|
|
|
277266
277461
|
* Build the edgeMate index array into the polyface's [[PolyfaceData]].
|
|
277267
277462
|
* After this method:
|
|
277268
277463
|
* * The array `polyface.data.edgeMateIndex` is defined with the same length as the other PolyfaceData index arrays.
|
|
277269
|
-
* * For each interior edge, `polyface.data.edgeIndexToEdgeMateIndex` returns the
|
|
277464
|
+
* * For each interior edge, `polyface.data.edgeIndexToEdgeMateIndex` returns the edge index on the other side of the
|
|
277270
277465
|
* edge in the adjacent facet.
|
|
277271
277466
|
* * The conditions for edgeMate matching are:
|
|
277272
277467
|
* * Given facetIndex f, let `k0 = polyface.facetIndex0(f)` and `k1 = polyface.facetIndex1(f)`.
|
|
277273
|
-
* * Every
|
|
277274
|
-
* * The edge with
|
|
277275
|
-
* * Let kA be an
|
|
277468
|
+
* * Every edge index k in the face loop of facet f satisfies `k0 <= k < k1`.
|
|
277469
|
+
* * The edge with edge index k starts at the point with index `polyface.data.pointIndex[k]`.
|
|
277470
|
+
* * Let kA be an edge index in this range [k0,k1), and let kB be its in-range successor with cyclic wrap, i.e.,
|
|
277276
277471
|
* `kB === (kA + 1 === k1) ? k0 : kA + 1`.
|
|
277277
277472
|
* * Then `polyface.data.pointIndex[kA]` and `polyface.data.pointIndex[kB]` are the indices of the points at the
|
|
277278
277473
|
* start and end of an edge of that facet.
|
|
277279
|
-
* * We call kA the
|
|
277280
|
-
* * If kA is
|
|
277281
|
-
* whose face loop contains
|
|
277474
|
+
* * We call kA the _edge index_ for that edge, and kB the _edge index_ for the next edge around the facet.
|
|
277475
|
+
* * If kA is a positive-length interior edge in a 2-manifold mesh with properly oriented facets, then there is
|
|
277476
|
+
* an adjacent facet whose face loop contains edge indices kC and kD referencing the same edge vertices in reverse
|
|
277477
|
+
* order, i.e.,
|
|
277282
277478
|
* * `polyface.data.pointIndex[kA] === polyface.data.pointIndex[kD]`
|
|
277283
277479
|
* * `polyface.data.pointIndex[kB] === polyface.data.pointIndex[kC]`
|
|
277284
|
-
* *
|
|
277285
|
-
*
|
|
277286
|
-
*
|
|
277480
|
+
* * We call the edge indices kA and kC _edge mates_, denoted in the `edgeMateIndex` array by:
|
|
277481
|
+
* * `polyface.data.edgeMateIndex[kA] === kC`
|
|
277482
|
+
* * `polyface.data.edgeMateIndex[kC] === kA`
|
|
277483
|
+
* * If kA is zero-length interior edge, i.e, it has the same start and end point indices, then we call it a _null
|
|
277484
|
+
* edge_, and its edge mate is itself.
|
|
277485
|
+
* * A non-interior edge either lies on the boundary of the mesh, or is non-manifold (having more than 2 adjacent
|
|
277486
|
+
* facets, or 1 with the wrong orientation). These edges have no edge mate, represented as `undefined` in
|
|
277487
|
+
* the `edgeMateIndex` array.
|
|
277287
277488
|
* * These conditions define a conventional manifold mesh where each edge of a facet has at most one partner edge with
|
|
277288
277489
|
* opposite orientation in an adjacent facet.
|
|
277289
277490
|
* * After calling this method, the caller can construct `IndexedPolyfaceWalker` objects to traverse the mesh by
|
|
277290
|
-
* walking across edges, around faces, and around vertices. Let walkerA have
|
|
277291
|
-
* aforementioned
|
|
277491
|
+
* walking across edges, around faces, and around vertices. Let walkerA have edge index value kA. Then with the
|
|
277492
|
+
* aforementioned edge indices:
|
|
277292
277493
|
* * `walkerC = walkerA.edgeMate()` moves across the edge to its other end, at kC.
|
|
277293
277494
|
* * `walkerB = walkerA.nextAroundFacet()` moves around the facet to the next edge, at kB.
|
|
277294
277495
|
* * `walkerB.previousAroundFacet()` moves from kB back to kA.
|
|
@@ -277303,25 +277504,30 @@ class IndexedPolyfaceWalker {
|
|
|
277303
277504
|
const kStart = polyface.facetIndex0(facetIndex);
|
|
277304
277505
|
const kEnd = polyface.facetIndex1(facetIndex);
|
|
277305
277506
|
let k0 = kEnd - 1;
|
|
277306
|
-
// sneaky: addEdge 3rd arg is
|
|
277507
|
+
// sneaky: addEdge 3rd arg is edge index k0 instead of facetIndex; it gets carried around during matching
|
|
277307
277508
|
for (let k1 = kStart; k1 < kEnd; k0 = k1, k1++)
|
|
277308
277509
|
matcher.addEdge(polyface.data.pointIndex[k0], polyface.data.pointIndex[k1], k0);
|
|
277309
277510
|
}
|
|
277310
277511
|
const matchedPairs = [];
|
|
277311
|
-
const singletons = [];
|
|
277312
277512
|
const nullEdges = [];
|
|
277313
|
-
|
|
277314
|
-
matcher.sortAndCollectClusters(matchedPairs, singletons, nullEdges, allOtherClusters);
|
|
277513
|
+
matcher.sortAndCollectClusters(matchedPairs, undefined, nullEdges, undefined);
|
|
277315
277514
|
const numIndex = polyface.data.pointIndex.length;
|
|
277316
277515
|
polyface.data.edgeMateIndex = new Array(numIndex);
|
|
277317
277516
|
for (let i = 0; i < numIndex; i++)
|
|
277318
|
-
polyface.data.edgeMateIndex[i] = undefined;
|
|
277517
|
+
polyface.data.edgeMateIndex[i] = undefined; // boundary and non-manifold edges have no mate
|
|
277319
277518
|
for (const pair of matchedPairs) {
|
|
277320
277519
|
if (Array.isArray(pair) && pair.length === 2) {
|
|
277321
|
-
const
|
|
277322
|
-
const
|
|
277323
|
-
polyface.data.edgeMateIndex[
|
|
277324
|
-
polyface.data.edgeMateIndex[
|
|
277520
|
+
const edgeIndex0 = pair[0].facetIndex;
|
|
277521
|
+
const edgeIndex1 = pair[1].facetIndex;
|
|
277522
|
+
polyface.data.edgeMateIndex[edgeIndex0] = edgeIndex1; // paired edges point to each other
|
|
277523
|
+
polyface.data.edgeMateIndex[edgeIndex1] = edgeIndex0;
|
|
277524
|
+
}
|
|
277525
|
+
}
|
|
277526
|
+
for (const nullEdgeOrCluster of nullEdges) {
|
|
277527
|
+
const nullCluster = Array.isArray(nullEdgeOrCluster) ? nullEdgeOrCluster : [nullEdgeOrCluster];
|
|
277528
|
+
for (const nullEdge of nullCluster) {
|
|
277529
|
+
const edgeIndex = nullEdge.facetIndex;
|
|
277530
|
+
polyface.data.edgeMateIndex[edgeIndex] = edgeIndex; // a null edge points to itself
|
|
277325
277531
|
}
|
|
277326
277532
|
}
|
|
277327
277533
|
}
|
|
@@ -278008,6 +278214,22 @@ class IndexedPolyface extends Polyface {
|
|
|
278008
278214
|
dispatchToGeometryHandler(handler) {
|
|
278009
278215
|
return handler.handleIndexedPolyface(this);
|
|
278010
278216
|
}
|
|
278217
|
+
/** If the input accesses an edgeMateIndex array, return it along with the owning IndexedPolyface. */
|
|
278218
|
+
static hasEdgeMateIndex(polyface) {
|
|
278219
|
+
let parent;
|
|
278220
|
+
if (polyface instanceof Polyface) {
|
|
278221
|
+
if (polyface instanceof IndexedPolyface)
|
|
278222
|
+
parent = polyface;
|
|
278223
|
+
}
|
|
278224
|
+
else if (polyface.clientPolyface() && polyface.clientPolyface() instanceof IndexedPolyface)
|
|
278225
|
+
parent = polyface.clientPolyface();
|
|
278226
|
+
if (parent) {
|
|
278227
|
+
const edgeMateIndex = parent.data.edgeMateIndex;
|
|
278228
|
+
if (edgeMateIndex && edgeMateIndex.length > 0 && edgeMateIndex.length === parent.data.indexCount)
|
|
278229
|
+
return { parent, edgeMateIndex };
|
|
278230
|
+
}
|
|
278231
|
+
return undefined;
|
|
278232
|
+
}
|
|
278011
278233
|
}
|
|
278012
278234
|
|
|
278013
278235
|
|
|
@@ -279918,9 +280140,9 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
|
|
|
279918
280140
|
let indexA = -1;
|
|
279919
280141
|
let indexB = -1;
|
|
279920
280142
|
for (let i = this._polyface.facetIndex0(edge.facetIndex); i < this._polyface.facetIndex1(edge.facetIndex); ++i) {
|
|
279921
|
-
if (edge.
|
|
280143
|
+
if (edge.startVertex === this._polyface.data.pointIndex[i])
|
|
279922
280144
|
indexA = i;
|
|
279923
|
-
else if (edge.
|
|
280145
|
+
else if (edge.endVertex === this._polyface.data.pointIndex[i])
|
|
279924
280146
|
indexB = i;
|
|
279925
280147
|
}
|
|
279926
280148
|
return (indexA < 0 || indexB < 0) ? undefined : { edgeIndexA: indexA, edgeIndexB: indexB };
|
|
@@ -280058,7 +280280,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
280058
280280
|
/* harmony import */ var _curve_UnionRegion__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../curve/UnionRegion */ "../../core/geometry/lib/esm/curve/UnionRegion.js");
|
|
280059
280281
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
280060
280282
|
/* harmony import */ var _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/FrameBuilder */ "../../core/geometry/lib/esm/geometry3d/FrameBuilder.js");
|
|
280061
|
-
/* harmony import */ var
|
|
280283
|
+
/* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
|
|
280062
280284
|
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
280063
280285
|
/* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
|
|
280064
280286
|
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
@@ -280066,7 +280288,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
280066
280288
|
/* harmony import */ var _solid_SweepContour__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../solid/SweepContour */ "../../core/geometry/lib/esm/solid/SweepContour.js");
|
|
280067
280289
|
/* harmony import */ var _topology_ChainMerge__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../topology/ChainMerge */ "../../core/geometry/lib/esm/topology/ChainMerge.js");
|
|
280068
280290
|
/* harmony import */ var _multiclip_RangeSearch__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./multiclip/RangeSearch */ "../../core/geometry/lib/esm/polyface/multiclip/RangeSearch.js");
|
|
280069
|
-
/* harmony import */ var
|
|
280291
|
+
/* harmony import */ var _Polyface__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Polyface */ "../../core/geometry/lib/esm/polyface/Polyface.js");
|
|
280070
280292
|
/* harmony import */ var _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
|
|
280071
280293
|
/* harmony import */ var _PolyfaceQuery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PolyfaceQuery */ "../../core/geometry/lib/esm/polyface/PolyfaceQuery.js");
|
|
280072
280294
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -280162,26 +280384,28 @@ class PolyfaceClip {
|
|
|
280162
280384
|
* * Return all surviving clip as a new mesh.
|
|
280163
280385
|
* * WARNING: The new mesh is "points only" -- parameters, normals, etc are not interpolated
|
|
280164
280386
|
*/
|
|
280165
|
-
static clipPolyfaceClipPlaneWithClosureFace(
|
|
280166
|
-
return this.clipPolyfaceClipPlane(
|
|
280387
|
+
static clipPolyfaceClipPlaneWithClosureFace(source, clipper, insideClip = true, buildClosureFaces = true) {
|
|
280388
|
+
return this.clipPolyfaceClipPlane(source, clipper, insideClip, buildClosureFaces);
|
|
280167
280389
|
}
|
|
280168
280390
|
/** Clip each facet of polyface to the ClipPlane.
|
|
280169
280391
|
* * Return all surviving clip as a new mesh.
|
|
280170
280392
|
* * WARNING: The new mesh is "points only" -- parameters, normals, etc are not interpolated
|
|
280171
280393
|
*/
|
|
280172
|
-
static clipPolyfaceClipPlane(
|
|
280394
|
+
static clipPolyfaceClipPlane(source, clipper, insideClip = true, buildClosureFaces = false) {
|
|
280173
280395
|
const builders = ClippedPolyfaceBuilders.create(insideClip, !insideClip, buildClosureFaces);
|
|
280174
|
-
this.clipPolyfaceInsideOutside(
|
|
280396
|
+
this.clipPolyfaceInsideOutside(source, clipper, builders);
|
|
280175
280397
|
return builders.claimPolyface(insideClip ? 0 : 1, true);
|
|
280176
280398
|
}
|
|
280177
|
-
/**
|
|
280178
|
-
*
|
|
280399
|
+
/**
|
|
280400
|
+
* Clip each facet to the clipper.
|
|
280401
|
+
* * Return surviving facets as a new mesh.
|
|
280179
280402
|
* * WARNING: The new mesh is "points only".
|
|
280180
280403
|
*/
|
|
280181
|
-
static clipPolyfaceConvexClipPlaneSet(
|
|
280182
|
-
const visitor =
|
|
280404
|
+
static clipPolyfaceConvexClipPlaneSet(source, clipper) {
|
|
280405
|
+
const visitor = source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_4__.Polyface ? source.createVisitor(0) : source;
|
|
280406
|
+
visitor.setNumWrap(0);
|
|
280183
280407
|
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_1__.PolyfaceBuilder.create();
|
|
280184
|
-
const work = new
|
|
280408
|
+
const work = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_5__.GrowableXYZArray(10);
|
|
280185
280409
|
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
280186
280410
|
clipper.clipConvexPolygonInPlace(visitor.point, work);
|
|
280187
280411
|
if (visitor.point.length > 2)
|
|
@@ -280189,21 +280413,18 @@ class PolyfaceClip {
|
|
|
280189
280413
|
}
|
|
280190
280414
|
return builder.claimPolyface(true);
|
|
280191
280415
|
}
|
|
280192
|
-
/** Clip each facet
|
|
280416
|
+
/** Clip each facet to the clippers.
|
|
280193
280417
|
* * Add inside, outside fragments to builderA, builderB
|
|
280194
280418
|
* * This does not consider params, normals, colors. Just points.
|
|
280195
280419
|
* * outputSelect determines how the clip output is structured
|
|
280196
280420
|
* * 0 outputs all shards -- this may have many interior edges.
|
|
280197
280421
|
* * 1 stitches shards together to get cleaner facets.
|
|
280198
280422
|
*/
|
|
280199
|
-
static clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders(
|
|
280200
|
-
if (polyface instanceof _Polyface__WEBPACK_IMPORTED_MODULE_5__.Polyface) {
|
|
280201
|
-
this.clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders(polyface.createVisitor(0), allClippers, destination, outputSelector);
|
|
280202
|
-
return;
|
|
280203
|
-
}
|
|
280423
|
+
static clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders(source, allClippers, destination, outputSelector = 1) {
|
|
280204
280424
|
const builderA = destination.builderA;
|
|
280205
280425
|
const builderB = destination.builderB;
|
|
280206
|
-
const visitor =
|
|
280426
|
+
const visitor = source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_4__.Polyface ? source.createVisitor(0) : source;
|
|
280427
|
+
visitor.setNumWrap(0);
|
|
280207
280428
|
const cache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_6__.GrowableXYZArrayCache();
|
|
280208
280429
|
const insideShards = [];
|
|
280209
280430
|
const outsideShards = [];
|
|
@@ -280290,7 +280511,7 @@ class PolyfaceClip {
|
|
|
280290
280511
|
static cleanupAndAddRegion(builder, shards, worldToLocal, localToWorld) {
|
|
280291
280512
|
if (builder !== undefined && shards.length > 0) {
|
|
280292
280513
|
if (worldToLocal)
|
|
280293
|
-
|
|
280514
|
+
_geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_5__.GrowableXYZArray.multiplyTransformInPlace(worldToLocal, shards);
|
|
280294
280515
|
const outsidePieces = _curve_RegionOps__WEBPACK_IMPORTED_MODULE_11__.RegionOps.polygonBooleanXYToLoops(shards, _curve_RegionOps__WEBPACK_IMPORTED_MODULE_11__.RegionBinaryOpType.Union, []);
|
|
280295
280516
|
if (outsidePieces && outsidePieces.children.length > 0) {
|
|
280296
280517
|
_curve_RegionOps__WEBPACK_IMPORTED_MODULE_11__.RegionOps.consolidateAdjacentPrimitives(outsidePieces); // source of the T-vertices removed in claimPolyface
|
|
@@ -280334,24 +280555,23 @@ class PolyfaceClip {
|
|
|
280334
280555
|
}
|
|
280335
280556
|
return chainContexts;
|
|
280336
280557
|
}
|
|
280337
|
-
/** Clip each facet
|
|
280558
|
+
/** Clip each facet to the clippers.
|
|
280338
280559
|
* * Add inside, outside fragments to builderA, builderB
|
|
280339
280560
|
* * This does not consider params, normals, colors. Just points.
|
|
280340
280561
|
* @internal
|
|
280341
280562
|
*/
|
|
280342
|
-
static clipPolyfaceConvexClipPlaneSetToBuilders(
|
|
280563
|
+
static clipPolyfaceConvexClipPlaneSetToBuilders(source, clipper, destination) {
|
|
280343
280564
|
const builderA = destination.builderA;
|
|
280344
280565
|
const builderB = destination.builderB;
|
|
280345
|
-
const visitor =
|
|
280566
|
+
const visitor = source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_4__.Polyface ? source.createVisitor(0) : source;
|
|
280567
|
+
visitor.setNumWrap(0);
|
|
280346
280568
|
const cache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_6__.GrowableXYZArrayCache();
|
|
280347
280569
|
const outsideParts = [];
|
|
280348
280570
|
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
280349
|
-
// !!! currentCandidates and next candidates are empty at this point !!!
|
|
280350
280571
|
const insidePart = clipper.clipInsidePushOutside(visitor.point, outsideParts, cache);
|
|
280351
280572
|
if (insidePart === undefined) {
|
|
280352
280573
|
// everything is out ... outsideParts might be fragmented. Save only the original polygon
|
|
280353
280574
|
builderB?.addPolygonGrowableXYZArray(visitor.point);
|
|
280354
|
-
cache.dropToCache(insidePart);
|
|
280355
280575
|
cache.dropAllToCache(outsideParts);
|
|
280356
280576
|
}
|
|
280357
280577
|
this.addPolygonToBuilderAndDropToCache(insidePart, builderA, cache);
|
|
@@ -280487,15 +280707,16 @@ class PolyfaceClip {
|
|
|
280487
280707
|
}
|
|
280488
280708
|
}
|
|
280489
280709
|
}
|
|
280490
|
-
/** Clip each facet
|
|
280710
|
+
/** Clip each facet to the clippers.
|
|
280491
280711
|
* * Add inside, outside fragments to builderA, builderB
|
|
280492
280712
|
* * This does not consider params, normals, colors. Just points.
|
|
280493
280713
|
* @internal
|
|
280494
280714
|
*/
|
|
280495
|
-
static clipPolyfaceClipPlaneToBuilders(
|
|
280715
|
+
static clipPolyfaceClipPlaneToBuilders(source, clipper, destination) {
|
|
280496
280716
|
const builderA = destination.builderA;
|
|
280497
280717
|
const builderB = destination.builderB;
|
|
280498
|
-
const visitor =
|
|
280718
|
+
const visitor = source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_4__.Polyface ? source.createVisitor(0) : source;
|
|
280719
|
+
visitor.setNumWrap(0);
|
|
280499
280720
|
const cache = new _geometry3d_ReusableObjectCache__WEBPACK_IMPORTED_MODULE_6__.GrowableXYZArrayCache();
|
|
280500
280721
|
const inside = cache.grabFromCache();
|
|
280501
280722
|
const outside = cache.grabFromCache();
|
|
@@ -280512,34 +280733,31 @@ class PolyfaceClip {
|
|
|
280512
280733
|
cache.dropToCache(inside);
|
|
280513
280734
|
cache.dropToCache(outside);
|
|
280514
280735
|
}
|
|
280515
|
-
/** Clip each facet
|
|
280736
|
+
/** Clip each facet to the clipper.
|
|
280516
280737
|
* * accumulate inside and outside facets -- to destination.builderA and destination.builderB
|
|
280517
|
-
* * if `destination.buildClosureFaces` is set,
|
|
280518
|
-
* * This method parses
|
|
280738
|
+
* * if `destination.buildClosureFaces` is set, also build closure facets.
|
|
280739
|
+
* * This method parses the variant input types and calls a more specific method.
|
|
280519
280740
|
* * WARNING: The new mesh is "points only".
|
|
280520
280741
|
* * outputSelect applies only for UnionOfConvexClipPlaneSets -- see [[PolyfaceClip.clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders]]
|
|
280521
280742
|
*/
|
|
280522
|
-
static clipPolyfaceInsideOutside(
|
|
280523
|
-
if (clipper instanceof _clipping_ClipPlane__WEBPACK_IMPORTED_MODULE_18__.ClipPlane)
|
|
280524
|
-
this.clipPolyfaceClipPlaneToBuilders(
|
|
280525
|
-
|
|
280526
|
-
|
|
280527
|
-
|
|
280528
|
-
|
|
280529
|
-
else if (clipper instanceof _clipping_UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_20__.UnionOfConvexClipPlaneSets) {
|
|
280530
|
-
this.clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders(polyface, clipper, destination, outputSelect);
|
|
280531
|
-
}
|
|
280743
|
+
static clipPolyfaceInsideOutside(source, clipper, destination, outputSelect = 0) {
|
|
280744
|
+
if (clipper instanceof _clipping_ClipPlane__WEBPACK_IMPORTED_MODULE_18__.ClipPlane)
|
|
280745
|
+
this.clipPolyfaceClipPlaneToBuilders(source, clipper, destination);
|
|
280746
|
+
else if (clipper instanceof _clipping_ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_19__.ConvexClipPlaneSet)
|
|
280747
|
+
this.clipPolyfaceConvexClipPlaneSetToBuilders(source, clipper, destination);
|
|
280748
|
+
else if (clipper instanceof _clipping_UnionOfConvexClipPlaneSets__WEBPACK_IMPORTED_MODULE_20__.UnionOfConvexClipPlaneSets)
|
|
280749
|
+
this.clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders(source, clipper, destination, outputSelect);
|
|
280532
280750
|
}
|
|
280533
|
-
/** Clip each facet
|
|
280751
|
+
/** Clip each facet to the clipper.
|
|
280534
280752
|
* * This method parses the variant input types and calls a more specific method.
|
|
280535
280753
|
* * To get both inside and outside parts, use clipPolyfaceInsideOutside
|
|
280536
280754
|
* * WARNING: The new mesh is "points only".
|
|
280537
280755
|
*/
|
|
280538
|
-
static clipPolyface(
|
|
280756
|
+
static clipPolyface(source, clipper) {
|
|
280539
280757
|
if (clipper instanceof _clipping_ClipPlane__WEBPACK_IMPORTED_MODULE_18__.ClipPlane)
|
|
280540
|
-
return this.clipPolyfaceClipPlane(
|
|
280758
|
+
return this.clipPolyfaceClipPlane(source, clipper);
|
|
280541
280759
|
if (clipper instanceof _clipping_ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_19__.ConvexClipPlaneSet)
|
|
280542
|
-
return this.clipPolyfaceConvexClipPlaneSet(
|
|
280760
|
+
return this.clipPolyfaceConvexClipPlaneSet(source, clipper);
|
|
280543
280761
|
// (The if tests exhaust the type space -- this line is unreachable.)
|
|
280544
280762
|
return undefined;
|
|
280545
280763
|
}
|
|
@@ -280553,7 +280771,7 @@ class PolyfaceClip {
|
|
|
280553
280771
|
* @returns clipped facets. No other mesh data but vertices appear in output.
|
|
280554
280772
|
*/
|
|
280555
280773
|
static drapeRegion(mesh, region, sweepVector, options) {
|
|
280556
|
-
if (mesh instanceof
|
|
280774
|
+
if (mesh instanceof _Polyface__WEBPACK_IMPORTED_MODULE_4__.Polyface)
|
|
280557
280775
|
return this.drapeRegion(mesh.createVisitor(0), region, sweepVector, options);
|
|
280558
280776
|
const contour = _solid_SweepContour__WEBPACK_IMPORTED_MODULE_16__.SweepContour.createForLinearSweep(region);
|
|
280559
280777
|
if (!contour)
|
|
@@ -280589,10 +280807,11 @@ class PolyfaceClip {
|
|
|
280589
280807
|
/** Intersect each facet with the clip plane. (Producing intersection edges.)
|
|
280590
280808
|
* * Return all edges chained as array of LineString3d.
|
|
280591
280809
|
*/
|
|
280592
|
-
static sectionPolyfaceClipPlane(
|
|
280810
|
+
static sectionPolyfaceClipPlane(source, clipper) {
|
|
280593
280811
|
const chainContext = _topology_ChainMerge__WEBPACK_IMPORTED_MODULE_13__.ChainMergeContext.create();
|
|
280594
|
-
const visitor =
|
|
280595
|
-
|
|
280812
|
+
const visitor = source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_4__.Polyface ? source.createVisitor(0) : source;
|
|
280813
|
+
visitor.setNumWrap(0);
|
|
280814
|
+
const work = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_5__.GrowableXYZArray(10);
|
|
280596
280815
|
const point0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_15__.Point3d.create();
|
|
280597
280816
|
const point1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_15__.Point3d.create();
|
|
280598
280817
|
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
@@ -280627,11 +280846,11 @@ class PolyfaceClip {
|
|
|
280627
280846
|
visitorA.point.setRange(range);
|
|
280628
280847
|
searchA.addRange(range, visitorA.currentReadIndex());
|
|
280629
280848
|
}
|
|
280630
|
-
const xyClip = new
|
|
280631
|
-
const workArray = new
|
|
280849
|
+
const xyClip = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_5__.GrowableXYZArray(10);
|
|
280850
|
+
const workArray = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_5__.GrowableXYZArray(10);
|
|
280632
280851
|
const xyFrustum = _clipping_ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_19__.ConvexClipPlaneSet.createEmpty();
|
|
280633
|
-
const below = new
|
|
280634
|
-
const above = new
|
|
280852
|
+
const below = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_5__.GrowableXYZArray(10);
|
|
280853
|
+
const above = new _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_5__.GrowableXYZArray(10);
|
|
280635
280854
|
const planeOfFacet = _clipping_ClipPlane__WEBPACK_IMPORTED_MODULE_18__.ClipPlane.createNormalAndPointXYZXYZ(0, 0, 1, 0, 0, 0);
|
|
280636
280855
|
const altitudeRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_17__.Range1d.createNull();
|
|
280637
280856
|
for (visitorB.reset(); visitorB.moveToNextFacet();) {
|
|
@@ -281507,42 +281726,41 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
281507
281726
|
/* harmony export */ });
|
|
281508
281727
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
281509
281728
|
/* harmony import */ var _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../curve/CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
281510
|
-
/* harmony import */ var
|
|
281729
|
+
/* harmony import */ var _curve_CurveOps__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../curve/CurveOps */ "../../core/geometry/lib/esm/curve/CurveOps.js");
|
|
281511
281730
|
/* harmony import */ var _curve_internalContexts_MultiChainCollector__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../curve/internalContexts/MultiChainCollector */ "../../core/geometry/lib/esm/curve/internalContexts/MultiChainCollector.js");
|
|
281512
281731
|
/* harmony import */ var _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../curve/LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
281513
281732
|
/* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
281514
281733
|
/* harmony import */ var _curve_Loop__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../curve/Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
281515
|
-
/* harmony import */ var
|
|
281734
|
+
/* harmony import */ var _curve_StrokeOptions__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../curve/StrokeOptions */ "../../core/geometry/lib/esm/curve/StrokeOptions.js");
|
|
281516
281735
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
281517
281736
|
/* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
|
|
281518
|
-
/* harmony import */ var
|
|
281519
|
-
/* harmony import */ var
|
|
281737
|
+
/* harmony import */ var _geometry3d_BarycentricTriangle__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../geometry3d/BarycentricTriangle */ "../../core/geometry/lib/esm/geometry3d/BarycentricTriangle.js");
|
|
281738
|
+
/* harmony import */ var _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../geometry3d/Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
|
|
281520
281739
|
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
281521
|
-
/* harmony import */ var
|
|
281740
|
+
/* harmony import */ var _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../geometry3d/PointHelpers */ "../../core/geometry/lib/esm/geometry3d/PointHelpers.js");
|
|
281522
281741
|
/* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
|
|
281523
|
-
/* harmony import */ var
|
|
281524
|
-
/* harmony import */ var
|
|
281525
|
-
/* harmony import */ var
|
|
281526
|
-
/* harmony import */ var
|
|
281527
|
-
/* harmony import */ var
|
|
281742
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
281743
|
+
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
281744
|
+
/* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
|
|
281745
|
+
/* harmony import */ var _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry4d/Matrix4d */ "../../core/geometry/lib/esm/geometry4d/Matrix4d.js");
|
|
281746
|
+
/* harmony import */ var _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../geometry4d/MomentData */ "../../core/geometry/lib/esm/geometry4d/MomentData.js");
|
|
281528
281747
|
/* harmony import */ var _numerics_UnionFind__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../numerics/UnionFind */ "../../core/geometry/lib/esm/numerics/UnionFind.js");
|
|
281529
|
-
/* harmony import */ var
|
|
281530
|
-
/* harmony import */ var
|
|
281531
|
-
/* harmony import */ var
|
|
281532
|
-
/* harmony import */ var
|
|
281533
|
-
/* harmony import */ var
|
|
281534
|
-
/* harmony import */ var
|
|
281535
|
-
/* harmony import */ var
|
|
281536
|
-
/* harmony import */ var
|
|
281748
|
+
/* harmony import */ var _topology_ChainMerge__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../topology/ChainMerge */ "../../core/geometry/lib/esm/topology/ChainMerge.js");
|
|
281749
|
+
/* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
|
|
281750
|
+
/* harmony import */ var _topology_HalfEdgeGraphFromIndexedLoopsContext__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../topology/HalfEdgeGraphFromIndexedLoopsContext */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js");
|
|
281751
|
+
/* harmony import */ var _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../topology/HalfEdgeGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphSearch.js");
|
|
281752
|
+
/* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
|
|
281753
|
+
/* harmony import */ var _topology_SpaceTriangulation__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../topology/SpaceTriangulation */ "../../core/geometry/lib/esm/topology/SpaceTriangulation.js");
|
|
281754
|
+
/* harmony import */ var _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./FacetLocationDetail */ "../../core/geometry/lib/esm/polyface/FacetLocationDetail.js");
|
|
281755
|
+
/* harmony import */ var _FacetOrientation__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./FacetOrientation */ "../../core/geometry/lib/esm/polyface/FacetOrientation.js");
|
|
281537
281756
|
/* harmony import */ var _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./IndexedEdgeMatcher */ "../../core/geometry/lib/esm/polyface/IndexedEdgeMatcher.js");
|
|
281538
|
-
/* harmony import */ var
|
|
281539
|
-
/* harmony import */ var
|
|
281540
|
-
/* harmony import */ var _multiclip_OffsetMeshContext__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./multiclip/OffsetMeshContext */ "../../core/geometry/lib/esm/polyface/multiclip/OffsetMeshContext.js");
|
|
281757
|
+
/* harmony import */ var _multiclip_BuildAverageNormalsContext__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./multiclip/BuildAverageNormalsContext */ "../../core/geometry/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js");
|
|
281758
|
+
/* harmony import */ var _multiclip_OffsetMeshContext__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./multiclip/OffsetMeshContext */ "../../core/geometry/lib/esm/polyface/multiclip/OffsetMeshContext.js");
|
|
281541
281759
|
/* harmony import */ var _multiclip_SweepLineStringToFacetContext__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./multiclip/SweepLineStringToFacetContext */ "../../core/geometry/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js");
|
|
281542
|
-
/* harmony import */ var
|
|
281760
|
+
/* harmony import */ var _multiclip_XYPointBuckets__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./multiclip/XYPointBuckets */ "../../core/geometry/lib/esm/polyface/multiclip/XYPointBuckets.js");
|
|
281543
281761
|
/* harmony import */ var _Polyface__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Polyface */ "../../core/geometry/lib/esm/polyface/Polyface.js");
|
|
281544
|
-
/* harmony import */ var
|
|
281545
|
-
/* harmony import */ var
|
|
281762
|
+
/* harmony import */ var _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
|
|
281763
|
+
/* harmony import */ var _RangeLengthData__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./RangeLengthData */ "../../core/geometry/lib/esm/polyface/RangeLengthData.js");
|
|
281546
281764
|
/*---------------------------------------------------------------------------------------------
|
|
281547
281765
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
281548
281766
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -281586,7 +281804,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
281586
281804
|
|
|
281587
281805
|
|
|
281588
281806
|
|
|
281589
|
-
|
|
281590
281807
|
|
|
281591
281808
|
|
|
281592
281809
|
/**
|
|
@@ -281614,14 +281831,27 @@ class SweepLineStringToFacetsOptions {
|
|
|
281614
281831
|
sideAngle;
|
|
281615
281832
|
/** Option to assemble lines into chains. */
|
|
281616
281833
|
assembleChains;
|
|
281834
|
+
/**
|
|
281835
|
+
* Optional searcher object for vertical sweep speedup. If provided, `vectorToEye` must be the positive Z vector.
|
|
281836
|
+
* @example To construct a 5x5 indexed search grid:
|
|
281837
|
+
* ````
|
|
281838
|
+
* const xyRange = Range2d.createFrom(myPolyface.range());
|
|
281839
|
+
* const searcher = GriddedRaggedRange2dSetWithOverflow.create<number>(xyRange, 5, 5)!;
|
|
281840
|
+
* for (const visitor = myPolyface.createVisitor(0); visitor.moveToNextFacet();) {
|
|
281841
|
+
* searcher.addRange(visitor.point.getRange(), visitor.currentReadIndex());
|
|
281842
|
+
* }
|
|
281843
|
+
* ````
|
|
281844
|
+
*/
|
|
281845
|
+
searcher;
|
|
281617
281846
|
/** Constructor. Captures fully-checked parameters from static create method. */
|
|
281618
|
-
constructor(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets) {
|
|
281847
|
+
constructor(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets, searcher) {
|
|
281619
281848
|
this.vectorToEye = vectorToEye;
|
|
281620
281849
|
this.sideAngle = sideAngle;
|
|
281621
281850
|
this.assembleChains = assembleChains;
|
|
281622
281851
|
this.collectOnForwardFacets = collectOnForwardFacets;
|
|
281623
281852
|
this.collectOnSideFacets = collectOnSideFacets;
|
|
281624
281853
|
this.collectOnRearFacets = collectOnRearFacets;
|
|
281854
|
+
this.searcher = searcher;
|
|
281625
281855
|
}
|
|
281626
281856
|
/**
|
|
281627
281857
|
* Create an options structure.
|
|
@@ -281630,14 +281860,12 @@ class SweepLineStringToFacetsOptions {
|
|
|
281630
281860
|
* * Default `assembleChains` is `true`.
|
|
281631
281861
|
* * Default `collectOnForwardFacets`, `collectOnSideFacets`, `collectOnRearFacets` are all `true`.
|
|
281632
281862
|
*/
|
|
281633
|
-
static create(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets) {
|
|
281634
|
-
return new SweepLineStringToFacetsOptions(vectorToEye
|
|
281863
|
+
static create(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets, searcher) {
|
|
281864
|
+
return new SweepLineStringToFacetsOptions((!vectorToEye || searcher) ? _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ() : vectorToEye.clone(), sideAngle?.clone() ?? _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createRadians(_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallAngleRadians), assembleChains ?? true, collectOnForwardFacets ?? true, collectOnSideFacets ?? true, collectOnRearFacets ?? true, searcher);
|
|
281635
281865
|
}
|
|
281636
281866
|
/** Return `true` if all outputs are requested. */
|
|
281637
281867
|
get collectAll() {
|
|
281638
|
-
return this.collectOnForwardFacets
|
|
281639
|
-
this.collectOnSideFacets === true &&
|
|
281640
|
-
this.collectOnRearFacets === true;
|
|
281868
|
+
return this.collectOnForwardFacets && this.collectOnSideFacets && this.collectOnRearFacets;
|
|
281641
281869
|
}
|
|
281642
281870
|
/**
|
|
281643
281871
|
* Decide if the instance collector flags accept a facet with the given normal.
|
|
@@ -281748,21 +281976,21 @@ class PolyfaceQuery {
|
|
|
281748
281976
|
* @param source polyface or visitor.
|
|
281749
281977
|
* @param vectorToEye compute sum of (signed) facet areas projected to a view plane perpendicular to `vectorToEye`.
|
|
281750
281978
|
* If `vectorToEye` is not provided, actual facet areas are calculated (without any projection).
|
|
281751
|
-
* @returns the sum of all facet areas.
|
|
281979
|
+
* @returns the sum of all facet areas.
|
|
281752
281980
|
*/
|
|
281753
281981
|
static sumFacetAreas(source, vectorToEye) {
|
|
281754
281982
|
let sum = 0;
|
|
281755
|
-
if (source
|
|
281756
|
-
|
|
281757
|
-
|
|
281758
|
-
|
|
281759
|
-
|
|
281760
|
-
|
|
281761
|
-
|
|
281762
|
-
|
|
281763
|
-
|
|
281764
|
-
|
|
281765
|
-
|
|
281983
|
+
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
281984
|
+
source = source.createVisitor(1);
|
|
281985
|
+
else
|
|
281986
|
+
source.setNumWrap(1);
|
|
281987
|
+
let unitVectorToEye;
|
|
281988
|
+
if (vectorToEye !== undefined)
|
|
281989
|
+
unitVectorToEye = vectorToEye.normalize();
|
|
281990
|
+
source.reset();
|
|
281991
|
+
while (source.moveToNextFacet()) {
|
|
281992
|
+
const areaNormal = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.areaNormal(source.point.getPoint3dArray());
|
|
281993
|
+
sum += unitVectorToEye ? areaNormal.dotProduct(unitVectorToEye) : areaNormal.magnitude();
|
|
281766
281994
|
}
|
|
281767
281995
|
return sum;
|
|
281768
281996
|
}
|
|
@@ -281796,75 +282024,53 @@ class PolyfaceQuery {
|
|
|
281796
282024
|
}
|
|
281797
282025
|
/**
|
|
281798
282026
|
* Sum (signed) volumes between facets and a plane.
|
|
281799
|
-
*
|
|
281800
|
-
*
|
|
281801
|
-
*
|
|
281802
|
-
*
|
|
281803
|
-
|
|
281804
|
-
|
|
281805
|
-
|
|
281806
|
-
|
|
281807
|
-
|
|
281808
|
-
|
|
281809
|
-
const
|
|
281810
|
-
|
|
281811
|
-
const
|
|
281812
|
-
|
|
281813
|
-
|
|
281814
|
-
|
|
281815
|
-
let
|
|
281816
|
-
const
|
|
281817
|
-
const
|
|
281818
|
-
const singleFacetProducts = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_10__.Matrix4d.createZero();
|
|
281819
|
-
const projectToPlane = plane.getProjectionToPlane();
|
|
281820
|
-
source.reset();
|
|
282027
|
+
* @param source facet set
|
|
282028
|
+
* @param plane infinite plane bounding volume between the input facets and (virtual) side facets perpendicular to the plane.
|
|
282029
|
+
* @param skipMoments whether to skip computation of the area moments. Set to `true` if only volume is needed. Default is `false`.
|
|
282030
|
+
* @returns a structure with multiple sums:
|
|
282031
|
+
* * volume: the sum of (signed) volumes between facets and the plane.
|
|
282032
|
+
* * positiveProjectedFacetAreaMoments, negativeProjectedFacetAreaMoments: area moment data (centroid, signed area,
|
|
282033
|
+
* and second moments with respect to the centroid), separately computed for the input facets that project with
|
|
282034
|
+
* positive/negative area onto the plane.
|
|
282035
|
+
*/
|
|
282036
|
+
static sumVolumeBetweenFacetsAndPlane(source, plane, skipMoments) {
|
|
282037
|
+
const visitor = source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface ? source.createVisitor(0) : source;
|
|
282038
|
+
visitor.setNumWrap(0);
|
|
282039
|
+
const workPoint0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
282040
|
+
const workPoint1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
282041
|
+
const workVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
282042
|
+
const workMatrix = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_9__.Matrix4d.createZero();
|
|
282043
|
+
let signedVolumeTimes6 = 0.0;
|
|
282044
|
+
const posSums = skipMoments ? undefined : _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_10__.MomentData.create(undefined, true);
|
|
282045
|
+
const negSums = skipMoments ? undefined : _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_10__.MomentData.create(undefined, true);
|
|
281821
282046
|
// For each facet:
|
|
281822
282047
|
// - form triangles from facet origin to each far edge.
|
|
281823
|
-
// - sum signed area and volume contributions.
|
|
281824
|
-
// each projected area contribution is twice the area of a triangle.
|
|
281825
|
-
// each volume contribution is 3 times the actual volume --
|
|
281826
|
-
|
|
281827
|
-
|
|
281828
|
-
|
|
281829
|
-
|
|
281830
|
-
|
|
281831
|
-
|
|
281832
|
-
|
|
281833
|
-
|
|
281834
|
-
|
|
281835
|
-
|
|
281836
|
-
facetOrigin.crossProductToPoints(targetA, targetB, triangleNormal);
|
|
281837
|
-
hA = plane.altitude(targetA);
|
|
281838
|
-
hB = plane.altitude(targetB);
|
|
281839
|
-
signedTriangleArea = planeNormal.dotProduct(triangleNormal);
|
|
281840
|
-
singleFacetArea += signedTriangleArea;
|
|
281841
|
-
signedVolumeSum += signedTriangleArea * (h0 + hA + hB);
|
|
281842
|
-
}
|
|
281843
|
-
singleFacetProducts.setZero();
|
|
281844
|
-
source.point.multiplyTransformInPlace(projectToPlane);
|
|
281845
|
-
_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.addSecondMomentAreaProducts(source.point, facetOrigin, singleFacetProducts);
|
|
281846
|
-
if (singleFacetArea > 0) {
|
|
281847
|
-
positiveAreaMomentSums.accumulateProductsFromOrigin(facetOrigin, singleFacetProducts, 1.0);
|
|
281848
|
-
}
|
|
281849
|
-
else {
|
|
281850
|
-
negativeAreaMomentSums.accumulateProductsFromOrigin(facetOrigin, singleFacetProducts, 1.0);
|
|
282048
|
+
// - sum signed area and volume contributions (for non-convex facet, signs can be mixed).
|
|
282049
|
+
// - each projected area contribution is twice the area of a triangle.
|
|
282050
|
+
// - each volume contribution is 3 times the actual volume -- a third of the altitude sum is the centroid altitude.
|
|
282051
|
+
const options = { skipMoments, p0: workPoint0, p1: workPoint1, v0: workVector, m0: workMatrix };
|
|
282052
|
+
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
282053
|
+
const facetData = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.volumeBetweenPolygonAndPlane(visitor.point, plane, options);
|
|
282054
|
+
signedVolumeTimes6 += facetData.volume6;
|
|
282055
|
+
if (!skipMoments) {
|
|
282056
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(posSums !== undefined && negSums !== undefined && facetData.origin !== undefined && facetData.products !== undefined);
|
|
282057
|
+
if (facetData.area2 > 0)
|
|
282058
|
+
posSums.accumulateProductsFromOrigin(facetData.origin, facetData.products, 1.0);
|
|
282059
|
+
else
|
|
282060
|
+
negSums.accumulateProductsFromOrigin(facetData.origin, facetData.products, 1.0);
|
|
281851
282061
|
}
|
|
281852
282062
|
}
|
|
281853
|
-
positiveAreaMomentSums.shiftOriginAndSumsToCentroidOfSums();
|
|
281854
|
-
negativeAreaMomentSums.shiftOriginAndSumsToCentroidOfSums();
|
|
281855
|
-
const positiveAreaMoments = _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_9__.MomentData.inertiaProductsToPrincipalAxes(positiveAreaMomentSums.origin, positiveAreaMomentSums.sums);
|
|
281856
|
-
const negativeAreaMoments = _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_9__.MomentData.inertiaProductsToPrincipalAxes(negativeAreaMomentSums.origin, negativeAreaMomentSums.sums);
|
|
281857
282063
|
return {
|
|
281858
|
-
volume:
|
|
281859
|
-
positiveProjectedFacetAreaMoments:
|
|
281860
|
-
negativeProjectedFacetAreaMoments:
|
|
282064
|
+
volume: signedVolumeTimes6 / 6.0,
|
|
282065
|
+
positiveProjectedFacetAreaMoments: posSums ? _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_10__.MomentData.inertiaProductsToPrincipalAxes(posSums.origin, posSums.sums) : undefined,
|
|
282066
|
+
negativeProjectedFacetAreaMoments: negSums ? _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_10__.MomentData.inertiaProductsToPrincipalAxes(negSums.origin, negSums.sums) : undefined,
|
|
281861
282067
|
};
|
|
281862
282068
|
}
|
|
281863
282069
|
/** Return the inertia products [xx,xy,xz,xw,yw, etc] integrated over all all facets as viewed from origin. */
|
|
281864
282070
|
static sumFacetSecondAreaMomentProducts(source, origin) {
|
|
281865
282071
|
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
281866
282072
|
return PolyfaceQuery.sumFacetSecondAreaMomentProducts(source.createVisitor(0), origin);
|
|
281867
|
-
const products =
|
|
282073
|
+
const products = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_9__.Matrix4d.createZero();
|
|
281868
282074
|
source.reset();
|
|
281869
282075
|
while (source.moveToNextFacet()) {
|
|
281870
282076
|
_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.addSecondMomentAreaProducts(source.point, origin, products);
|
|
@@ -281875,7 +282081,7 @@ class PolyfaceQuery {
|
|
|
281875
282081
|
static sumFacetSecondVolumeMomentProducts(source, origin) {
|
|
281876
282082
|
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
281877
282083
|
return PolyfaceQuery.sumFacetSecondVolumeMomentProducts(source.createVisitor(0), origin);
|
|
281878
|
-
const products =
|
|
282084
|
+
const products = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_9__.Matrix4d.createZero();
|
|
281879
282085
|
source.reset();
|
|
281880
282086
|
while (source.moveToNextFacet()) {
|
|
281881
282087
|
_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.addSecondMomentVolumeProducts(source.point, origin, products);
|
|
@@ -281893,7 +282099,7 @@ class PolyfaceQuery {
|
|
|
281893
282099
|
if (!origin)
|
|
281894
282100
|
return undefined;
|
|
281895
282101
|
const inertiaProducts = PolyfaceQuery.sumFacetSecondAreaMomentProducts(source, origin);
|
|
281896
|
-
return
|
|
282102
|
+
return _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_10__.MomentData.inertiaProductsToPrincipalAxes(origin, inertiaProducts);
|
|
281897
282103
|
}
|
|
281898
282104
|
/**
|
|
281899
282105
|
* Compute area moments for the mesh. In the returned MomentData:
|
|
@@ -281908,7 +282114,7 @@ class PolyfaceQuery {
|
|
|
281908
282114
|
if (!origin)
|
|
281909
282115
|
return undefined;
|
|
281910
282116
|
const inertiaProducts = PolyfaceQuery.sumFacetSecondVolumeMomentProducts(source, origin);
|
|
281911
|
-
return
|
|
282117
|
+
return _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_10__.MomentData.inertiaProductsToPrincipalAxes(origin, inertiaProducts);
|
|
281912
282118
|
}
|
|
281913
282119
|
/**
|
|
281914
282120
|
* Determine whether all facets are convex.
|
|
@@ -281932,7 +282138,7 @@ class PolyfaceQuery {
|
|
|
281932
282138
|
* Compute a number summarizing the dihedral angles in the mesh.
|
|
281933
282139
|
* * A dihedral angle is the signed angle between adjacent facets' normals. This angle is positive when the cross
|
|
281934
282140
|
* product `normalA x normalB` has the same direction as facetA's traversal of the facets' shared edge.
|
|
281935
|
-
* @param source
|
|
282141
|
+
* @param source facets.
|
|
281936
282142
|
* @param ignoreBoundaries if `true` ignore simple boundary edges, i.e., allow unclosed meshes. Default is `false`.
|
|
281937
282143
|
* See [[isConvexByDihedralAngleCount]] for comments about passing true when there are multiple
|
|
281938
282144
|
* connected components.
|
|
@@ -281948,19 +282154,21 @@ class PolyfaceQuery {
|
|
|
281948
282154
|
static dihedralAngleSummary(source, ignoreBoundaries = false) {
|
|
281949
282155
|
// more info can be found at geometry/internaldocs/Polyface.md
|
|
281950
282156
|
const edges = new _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__.IndexedEdgeMatcher();
|
|
281951
|
-
const
|
|
281952
|
-
visitor.
|
|
281953
|
-
|
|
282157
|
+
const vertices = source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface ? source.data.point : undefined;
|
|
282158
|
+
const visitor = source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface ? source.createVisitor(1) : source;
|
|
282159
|
+
visitor.setNumWrap(1);
|
|
281954
282160
|
const centroidNormal = [];
|
|
281955
282161
|
let normalCounter = 0;
|
|
281956
|
-
|
|
282162
|
+
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
281957
282163
|
const numEdges = visitor.pointCount - 1;
|
|
281958
282164
|
const normal = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.centroidAreaNormal(visitor.point);
|
|
281959
282165
|
if (normal === undefined)
|
|
281960
282166
|
return -2;
|
|
281961
282167
|
centroidNormal.push(normal);
|
|
281962
282168
|
for (let i = 0; i < numEdges; i++) {
|
|
281963
|
-
edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), normalCounter);
|
|
282169
|
+
const edge = edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), normalCounter);
|
|
282170
|
+
if (!vertices) // decorate if we don't have vertices to query later
|
|
282171
|
+
edge.edgeVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createStartEnd(visitor.point.getPoint3dAtUncheckedPointIndex(i), visitor.point.getPoint3dAtUncheckedPointIndex(i + 1));
|
|
281964
282172
|
}
|
|
281965
282173
|
normalCounter++;
|
|
281966
282174
|
}
|
|
@@ -281978,11 +282186,16 @@ class PolyfaceQuery {
|
|
|
281978
282186
|
let numNegative = 0;
|
|
281979
282187
|
const edgeVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
281980
282188
|
for (const cluster of manifoldClusters) {
|
|
281981
|
-
|
|
281982
|
-
|
|
281983
|
-
|
|
281984
|
-
|
|
281985
|
-
|
|
282189
|
+
if (Array.isArray(cluster) && cluster.length === 2) {
|
|
282190
|
+
const sideA = cluster[0];
|
|
282191
|
+
const sideB = cluster[1];
|
|
282192
|
+
if (vertices)
|
|
282193
|
+
vertices.vectorIndexIndex(sideA.startVertex, sideA.endVertex, edgeVector);
|
|
282194
|
+
else
|
|
282195
|
+
edgeVector.setFrom(sideA.edgeVector);
|
|
282196
|
+
const facetNormalA = centroidNormal[sideA.facetIndex].direction;
|
|
282197
|
+
const facetNormalB = centroidNormal[sideB.facetIndex].direction;
|
|
282198
|
+
const dihedralAngle = facetNormalA.signedAngleTo(facetNormalB, edgeVector);
|
|
281986
282199
|
if (dihedralAngle.isAlmostZero)
|
|
281987
282200
|
numPlanar++;
|
|
281988
282201
|
else if (dihedralAngle.radians > 0.0)
|
|
@@ -282018,26 +282231,50 @@ class PolyfaceQuery {
|
|
|
282018
282231
|
static isConvexByDihedralAngleCount(source, ignoreBoundaries = false) {
|
|
282019
282232
|
return this.dihedralAngleSummary(source, ignoreBoundaries) > 0;
|
|
282020
282233
|
}
|
|
282234
|
+
/** Helper function to detect a subset visitor. */
|
|
282235
|
+
static isSubsetVisitor(visitor) {
|
|
282236
|
+
if (visitor instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
282237
|
+
return false;
|
|
282238
|
+
const parentFacetCount = visitor.clientPolyface()?.facetCount;
|
|
282239
|
+
const visitableFacetCount = visitor.getVisitableFacetCount?.();
|
|
282240
|
+
if (parentFacetCount === undefined || visitableFacetCount === undefined)
|
|
282241
|
+
return false;
|
|
282242
|
+
return parentFacetCount > visitableFacetCount;
|
|
282243
|
+
}
|
|
282021
282244
|
/**
|
|
282022
|
-
*
|
|
282023
|
-
*
|
|
282024
|
-
|
|
282025
|
-
|
|
282245
|
+
* Faster version of isPolyfaceManifold for specific input.
|
|
282246
|
+
* @returns whether the mesh is manifold, or undefined if unsuccessful.
|
|
282247
|
+
*/
|
|
282248
|
+
static isPolyfaceManifoldFast(source, allowSimpleBoundaries) {
|
|
282249
|
+
if (allowSimpleBoundaries)
|
|
282250
|
+
return undefined; // edgeMateIndex does not distinguish boundary edges from non-manifold edges so we can only speed things up if we search for both
|
|
282251
|
+
if (this.isSubsetVisitor(source))
|
|
282252
|
+
return false; // edgeMateIndex doesn't capture the facet subset boundary
|
|
282253
|
+
const parentData = _Polyface__WEBPACK_IMPORTED_MODULE_7__.IndexedPolyface.hasEdgeMateIndex(source);
|
|
282254
|
+
if (!parentData)
|
|
282255
|
+
return undefined;
|
|
282256
|
+
for (const edgeMate of parentData.edgeMateIndex) {
|
|
282257
|
+
if (edgeMate === undefined)
|
|
282258
|
+
return false; // found a boundary or non-manifold edge
|
|
282259
|
+
}
|
|
282260
|
+
return true; // this is a 2-manifold closed surface
|
|
282261
|
+
}
|
|
282262
|
+
/**
|
|
282263
|
+
* Test edge pairing in `source` mesh.
|
|
282026
282264
|
* * Any edge with 3 or more adjacent facets triggers `false` return.
|
|
282027
|
-
* * Any edge with 2 adjacent facets in the same direction triggers
|
|
282265
|
+
* * Any edge with 2 adjacent facets in the same direction triggers `false` return.
|
|
282266
|
+
* * Null edges are ignored.
|
|
282267
|
+
* @param source facet set to examine
|
|
282268
|
+
* @param allowSimpleBoundaries if `false` (default), a return value of `true` means the facets form a closed
|
|
282269
|
+
* 2-manifold surface; if `true`, a return value of `true` means the facets form a 2-manifold surface which may
|
|
282270
|
+
* have a boundary, but is still properly matched internally.
|
|
282028
282271
|
*/
|
|
282029
282272
|
static isPolyfaceManifold(source, allowSimpleBoundaries = false) {
|
|
282030
|
-
const
|
|
282031
|
-
|
|
282032
|
-
|
|
282033
|
-
while (visitor.moveToNextFacet()) {
|
|
282034
|
-
const numEdges = visitor.pointCount - 1;
|
|
282035
|
-
for (let i = 0; i < numEdges; i++) {
|
|
282036
|
-
edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), visitor.currentReadIndex());
|
|
282037
|
-
}
|
|
282038
|
-
}
|
|
282273
|
+
const isManifold = this.isPolyfaceManifoldFast(source, allowSimpleBoundaries);
|
|
282274
|
+
if (isManifold !== undefined)
|
|
282275
|
+
return isManifold;
|
|
282039
282276
|
const badClusters = [];
|
|
282040
|
-
|
|
282277
|
+
this.createIndexedEdges(source).sortAndCollectClusters(undefined, allowSimpleBoundaries ? undefined : badClusters, undefined, badClusters);
|
|
282041
282278
|
return badClusters.length === 0;
|
|
282042
282279
|
}
|
|
282043
282280
|
/** Test if the facets in `source` occur in perfectly mated pairs, as is required for a closed manifold volume. */
|
|
@@ -282045,50 +282282,107 @@ class PolyfaceQuery {
|
|
|
282045
282282
|
return this.isPolyfaceManifold(source, false);
|
|
282046
282283
|
}
|
|
282047
282284
|
/**
|
|
282048
|
-
*
|
|
282049
|
-
*
|
|
282285
|
+
* Faster version of announceBoundaryEdges for specific input.
|
|
282286
|
+
* @returns true if successfully announced boundary edges.
|
|
282287
|
+
*/
|
|
282288
|
+
static announceBoundaryEdgesFast(source, announceEdge, includeTypical, includeMismatch, includeNull) {
|
|
282289
|
+
if (includeTypical !== includeMismatch)
|
|
282290
|
+
return false; // edgeMateIndex does not distinguish boundary edges from non-manifold edges
|
|
282291
|
+
if (!includeTypical && !includeNull)
|
|
282292
|
+
return true;
|
|
282293
|
+
if (this.isSubsetVisitor(source))
|
|
282294
|
+
return false; // edgeMateIndex doesn't capture the facet subset boundary
|
|
282295
|
+
const parentData = _Polyface__WEBPACK_IMPORTED_MODULE_7__.IndexedPolyface.hasEdgeMateIndex(source);
|
|
282296
|
+
if (!parentData)
|
|
282297
|
+
return false;
|
|
282298
|
+
const pointA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
282299
|
+
const pointB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
282300
|
+
for (let edgeIndex = 0; edgeIndex < parentData.edgeMateIndex.length; edgeIndex++) {
|
|
282301
|
+
const edgeMate = parentData.edgeMateIndex[edgeIndex];
|
|
282302
|
+
const announceBoundaryOrNonManifoldEdge = includeTypical && edgeMate === undefined;
|
|
282303
|
+
const announceNullEdge = includeNull && edgeMate === edgeIndex;
|
|
282304
|
+
if (announceBoundaryOrNonManifoldEdge || announceNullEdge) {
|
|
282305
|
+
const facetIndex = parentData.parent.edgeIndexToFacetIndex(edgeIndex);
|
|
282306
|
+
if (facetIndex !== undefined) { // should always be defined
|
|
282307
|
+
const pointIndexA = parentData.parent.data.pointIndex[edgeIndex];
|
|
282308
|
+
let nextEdgeIndex = edgeIndex + 1;
|
|
282309
|
+
if (nextEdgeIndex >= parentData.parent.facetIndex1(facetIndex))
|
|
282310
|
+
nextEdgeIndex = parentData.parent.facetIndex0(facetIndex);
|
|
282311
|
+
const pointIndexB = parentData.parent.data.pointIndex[nextEdgeIndex];
|
|
282312
|
+
parentData.parent.data.getPoint(pointIndexA, pointA);
|
|
282313
|
+
parentData.parent.data.getPoint(pointIndexB, pointB);
|
|
282314
|
+
announceEdge(pointA, pointB, pointIndexA, pointIndexB, facetIndex);
|
|
282315
|
+
}
|
|
282316
|
+
}
|
|
282317
|
+
}
|
|
282318
|
+
return true;
|
|
282319
|
+
}
|
|
282320
|
+
/**
|
|
282321
|
+
* Announce boundary edges of the facet set as line segments.
|
|
282050
282322
|
* @param source polyface or visitor.
|
|
282051
282323
|
* @param announceEdge function to be called with each boundary edge. The announcement is start and end points,
|
|
282052
|
-
* start and end indices, and facet index.
|
|
282053
|
-
* @param includeTypical true to announce typical boundary edges with a single adjacent facet.
|
|
282054
|
-
* @param includeMismatch true to announce edges
|
|
282055
|
-
*
|
|
282324
|
+
* start and end vertex indices, and facet index.
|
|
282325
|
+
* @param includeTypical true to announce typical boundary edges with a single adjacent facet. Default is true.
|
|
282326
|
+
* @param includeMismatch true to announce non-manifold edges (more than 2 adjacent facets, or mismatched
|
|
282327
|
+
* orientations). Default is true.
|
|
282328
|
+
* @param includeNull true to announce edges with identical start and end vertex indices. Default is true.
|
|
282329
|
+
* @see [[announceBoundaryChainsAsLineString3d]] for boundary linestring announcement
|
|
282330
|
+
* @see [[collectBoundaryEdges]] for boundary chain collection
|
|
282331
|
+
* @see [[boundaryEdges]] for boundary edge collection
|
|
282056
282332
|
*/
|
|
282057
282333
|
static announceBoundaryEdges(source, announceEdge, includeTypical = true, includeMismatch = true, includeNull = true) {
|
|
282058
|
-
if (source
|
|
282334
|
+
if (this.announceBoundaryEdgesFast(source, announceEdge, includeTypical, includeMismatch, includeNull))
|
|
282059
282335
|
return;
|
|
282060
|
-
|
|
282336
|
+
if (!includeTypical && !includeMismatch && !includeNull)
|
|
282337
|
+
return;
|
|
282338
|
+
const vertices = source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface ? source.data.point : undefined;
|
|
282061
282339
|
const visitor = source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface ? source.createVisitor(1) : source;
|
|
282062
282340
|
visitor.setNumWrap(1);
|
|
282063
|
-
|
|
282064
|
-
|
|
282341
|
+
const edges = new _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__.IndexedEdgeMatcher();
|
|
282342
|
+
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
282065
282343
|
const numEdges = visitor.pointCount - 1;
|
|
282066
282344
|
for (let i = 0; i < numEdges; i++) {
|
|
282067
|
-
edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), visitor.currentReadIndex());
|
|
282345
|
+
const edge = edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), visitor.currentReadIndex());
|
|
282346
|
+
if (!vertices) { // decorate if we don't have vertices to query later
|
|
282347
|
+
edge.pointA = visitor.point.getPoint3dAtUncheckedPointIndex(i);
|
|
282348
|
+
edge.pointB = visitor.point.getPoint3dAtUncheckedPointIndex(i + 1);
|
|
282349
|
+
}
|
|
282068
282350
|
}
|
|
282069
282351
|
}
|
|
282070
282352
|
const boundaryEdges = [];
|
|
282071
|
-
|
|
282353
|
+
const typicalEdges = includeTypical ? boundaryEdges : undefined;
|
|
282354
|
+
const nullEdges = includeNull ? boundaryEdges : undefined;
|
|
282355
|
+
const mismatchEdges = includeMismatch ? boundaryEdges : undefined;
|
|
282356
|
+
edges.sortAndCollectClusters(undefined, typicalEdges, nullEdges, mismatchEdges);
|
|
282072
282357
|
if (boundaryEdges.length === 0)
|
|
282073
282358
|
return;
|
|
282074
|
-
const sourcePolyface = visitor.clientPolyface();
|
|
282075
282359
|
const pointA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
282076
282360
|
const pointB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
282077
282361
|
for (const e of boundaryEdges) {
|
|
282078
|
-
const e1 = e instanceof _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__.SortableEdge ? e : e[0];
|
|
282079
|
-
const indexA = e1.
|
|
282080
|
-
const indexB = e1.
|
|
282081
|
-
if (
|
|
282082
|
-
|
|
282362
|
+
const e1 = e instanceof _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__.SortableEdge ? e : e[0]; // only report the first edge in a cluster!
|
|
282363
|
+
const indexA = e1.startVertex;
|
|
282364
|
+
const indexB = e1.endVertex;
|
|
282365
|
+
if (vertices) {
|
|
282366
|
+
vertices.getPoint3dAtUncheckedPointIndex(indexA, pointA);
|
|
282367
|
+
vertices.getPoint3dAtUncheckedPointIndex(indexB, pointB);
|
|
282368
|
+
}
|
|
282369
|
+
else {
|
|
282370
|
+
pointA.setFrom(e1.pointA);
|
|
282371
|
+
pointB.setFrom(e1.pointB);
|
|
282372
|
+
}
|
|
282373
|
+
announceEdge(pointA, pointB, indexA, indexB, e1.facetIndex);
|
|
282083
282374
|
}
|
|
282084
282375
|
}
|
|
282085
282376
|
/**
|
|
282086
|
-
*
|
|
282087
|
-
* * Each edge is a LineSegment3d.
|
|
282377
|
+
* Collect boundary edges of the facet set as an unordered collection of line segments.
|
|
282088
282378
|
* @param source polyface or visitor.
|
|
282089
|
-
* @param includeTypical true to
|
|
282090
|
-
* @param includeMismatch true to include edges
|
|
282091
|
-
*
|
|
282379
|
+
* @param includeTypical true to include typical boundary edges with a single adjacent facet. Default is true.
|
|
282380
|
+
* @param includeMismatch true to include non-manifold edges (more than 2 adjacent facets, or mismatched
|
|
282381
|
+
* orientations). Default is true.
|
|
282382
|
+
* @param includeNull true to include edges with identical start and end vertex indices. Default is true.
|
|
282383
|
+
* @see [[announceBoundaryChainsAsLineString3d]] for boundary linestring announcement
|
|
282384
|
+
* @see [[collectBoundaryEdges]] for boundary chain collection
|
|
282385
|
+
* @see [[announceBoundaryEdges]] for boundary edge announcement
|
|
282092
282386
|
*/
|
|
282093
282387
|
static boundaryEdges(source, includeTypical = true, includeMismatch = true, includeNull = true) {
|
|
282094
282388
|
const result = new _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_6__.BagOfCurves();
|
|
@@ -282101,33 +282395,32 @@ class PolyfaceQuery {
|
|
|
282101
282395
|
return result;
|
|
282102
282396
|
}
|
|
282103
282397
|
/**
|
|
282104
|
-
* Collect boundary edges.
|
|
282105
|
-
* * Return the edges as the simplest collection of chains of line segments.
|
|
282398
|
+
* Collect boundary edges of the facet set as the simplest collection of chains of line segments.
|
|
282106
282399
|
* @param source polyface or visitor.
|
|
282107
|
-
* @param includeTypical true to include typical boundary edges with a single adjacent facet.
|
|
282108
|
-
* @param includeMismatch true to include edges
|
|
282109
|
-
*
|
|
282400
|
+
* @param includeTypical true to include typical boundary edges with a single adjacent facet. Default is true.
|
|
282401
|
+
* @param includeMismatch true to include non-manifold edges (more than 2 adjacent facets, or mismatched
|
|
282402
|
+
* orientations). Default is true.
|
|
282403
|
+
* @param includeNull true to include edges with identical start and end vertex indices. Default is true.
|
|
282404
|
+
* @see [[announceBoundaryChainsAsLineString3d]] for boundary linestring announcement
|
|
282405
|
+
* @see [[announceBoundaryEdges]] for boundary edge announcement
|
|
282406
|
+
* @see [[boundaryEdges]] for boundary edge collection
|
|
282110
282407
|
*/
|
|
282111
282408
|
static collectBoundaryEdges(source, includeTypical = true, includeMismatch = true, includeNull = true) {
|
|
282112
282409
|
const collector = new _curve_internalContexts_MultiChainCollector__WEBPACK_IMPORTED_MODULE_13__.MultiChainCollector(_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance, _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance);
|
|
282113
|
-
|
|
282410
|
+
const announceEdge = (ptA, ptB) => collector.captureCurve(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d.create(ptA, ptB));
|
|
282411
|
+
PolyfaceQuery.announceBoundaryEdges(source, announceEdge, includeTypical, includeMismatch, includeNull);
|
|
282114
282412
|
return collector.grabResult(true);
|
|
282115
282413
|
}
|
|
282116
282414
|
/**
|
|
282117
|
-
* Load
|
|
282118
|
-
* @param polyface a mesh or
|
|
282119
|
-
|
|
282415
|
+
* Load an IndexedEdgeMatcher from the edges of a mesh.
|
|
282416
|
+
* @param polyface a mesh or visitor
|
|
282417
|
+
*/
|
|
282120
282418
|
static createIndexedEdges(polyface) {
|
|
282121
|
-
if (polyface instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
282122
|
-
return this.createIndexedEdges(polyface.createVisitor(1));
|
|
282123
282419
|
const edges = new _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__.IndexedEdgeMatcher();
|
|
282124
|
-
polyface.
|
|
282125
|
-
|
|
282126
|
-
|
|
282127
|
-
|
|
282128
|
-
edges.addEdge(polyface.clientPointIndex(i), polyface.clientPointIndex(i + 1), polyface.currentReadIndex());
|
|
282129
|
-
}
|
|
282130
|
-
}
|
|
282420
|
+
const visitor = polyface instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface ? polyface.createVisitor(1) : polyface;
|
|
282421
|
+
visitor.setNumWrap(1);
|
|
282422
|
+
for (visitor.reset(); visitor.moveToNextFacet();)
|
|
282423
|
+
edges.addPath(visitor.pointIndex, visitor.currentReadIndex(), false);
|
|
282131
282424
|
return edges;
|
|
282132
282425
|
}
|
|
282133
282426
|
/**
|
|
@@ -282163,8 +282456,8 @@ class PolyfaceQuery {
|
|
|
282163
282456
|
for (const pair of manifoldEdges) {
|
|
282164
282457
|
if (!Array.isArray(pair) || pair.length !== 2)
|
|
282165
282458
|
continue;
|
|
282166
|
-
const indexA = pair[0].
|
|
282167
|
-
const indexB = pair[0].
|
|
282459
|
+
const indexA = pair[0].startVertex;
|
|
282460
|
+
const indexB = pair[0].endVertex;
|
|
282168
282461
|
if (!mesh.data.getPoint(indexA, pointA) || !mesh.data.getPoint(indexB, pointB))
|
|
282169
282462
|
continue;
|
|
282170
282463
|
const face0 = analyzeFace(pair[0].facetIndex);
|
|
@@ -282339,7 +282632,7 @@ class PolyfaceQuery {
|
|
|
282339
282632
|
}
|
|
282340
282633
|
/**
|
|
282341
282634
|
* Return the boundary of facets that are facing the eye.
|
|
282342
|
-
* @param polyface
|
|
282635
|
+
* @param source polyface or visitor. Must be capable of constructing a subset visitor.
|
|
282343
282636
|
* @param visibilitySubset selector among the visible facet sets extracted by partitionFacetIndicesByVisibilityVector
|
|
282344
282637
|
* * 0 ==> forward facing
|
|
282345
282638
|
* * 1 ==> rear facing
|
|
@@ -282347,21 +282640,29 @@ class PolyfaceQuery {
|
|
|
282347
282640
|
* @param vectorToEye the vector to eye
|
|
282348
282641
|
* @param sideAngleTolerance the tolerance of side angle
|
|
282349
282642
|
*/
|
|
282350
|
-
static boundaryOfVisibleSubset(
|
|
282351
|
-
const
|
|
282643
|
+
static boundaryOfVisibleSubset(source, visibilitySelect, vectorToEye, sideAngleTolerance = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createDegrees(1.0e-3)) {
|
|
282644
|
+
const visitor = source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface ? source.createVisitor(0) : source;
|
|
282645
|
+
if (!visitor.createSubsetVisitor)
|
|
282646
|
+
return undefined;
|
|
282647
|
+
const partitionedIndices = this.partitionFacetIndicesByVisibilityVector(source, vectorToEye, sideAngleTolerance);
|
|
282352
282648
|
if (partitionedIndices[visibilitySelect].length === 0)
|
|
282353
282649
|
return undefined;
|
|
282354
|
-
const
|
|
282355
|
-
return this.boundaryEdges(
|
|
282650
|
+
const subsetVisitor = visitor.createSubsetVisitor(partitionedIndices[visibilitySelect], 1);
|
|
282651
|
+
return this.boundaryEdges(subsetVisitor, true, false, false);
|
|
282356
282652
|
}
|
|
282357
282653
|
/**
|
|
282358
|
-
*
|
|
282359
|
-
* *
|
|
282360
|
-
*
|
|
282654
|
+
* Announce boundary edges of the facet set as linestrings.
|
|
282655
|
+
* * Ignores non-manifold interior edges and null edges.
|
|
282656
|
+
* @param source polyface or visitor.
|
|
282657
|
+
* @param announceChain function to be called with each chain of boundary edges.
|
|
282658
|
+
* @see [[collectBoundaryEdges]] for boundary chain collection
|
|
282659
|
+
* @see [[announceBoundaryEdges]] for boundary edge announcement
|
|
282660
|
+
* @see [[boundaryEdges]] for boundary edge collection
|
|
282361
282661
|
*/
|
|
282362
|
-
static announceBoundaryChainsAsLineString3d(
|
|
282662
|
+
static announceBoundaryChainsAsLineString3d(source, announceChain) {
|
|
282363
282663
|
const collector = new _curve_internalContexts_MultiChainCollector__WEBPACK_IMPORTED_MODULE_13__.MultiChainCollector(_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance); // no planarity tolerance needed
|
|
282364
|
-
|
|
282664
|
+
const announceEdge = (ptA, ptB) => collector.captureCurve(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d.create(ptA, ptB));
|
|
282665
|
+
PolyfaceQuery.announceBoundaryEdges(source, announceEdge, true, false, false);
|
|
282365
282666
|
collector.announceChainsAsLineString3d(announceChain);
|
|
282366
282667
|
}
|
|
282367
282668
|
/**
|
|
@@ -282378,7 +282679,7 @@ class PolyfaceQuery {
|
|
|
282378
282679
|
const numFacets = PolyfaceQuery.visitorClientFacetCount(mesh);
|
|
282379
282680
|
const smoothEdges = PolyfaceQuery.collectEdgesByDihedralAngle(mesh, maxSmoothEdgeAngle);
|
|
282380
282681
|
const partitions = PolyfaceQuery.partitionFacetIndicesBySortableEdgeClusters(smoothEdges, numFacets);
|
|
282381
|
-
const builder =
|
|
282682
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_16__.PolyfaceBuilder.create();
|
|
282382
282683
|
const visitor = mesh;
|
|
282383
282684
|
const planarPartitions = [];
|
|
282384
282685
|
const partitionNormals = []; // average normal in each nontrivial partition
|
|
@@ -282398,7 +282699,7 @@ class PolyfaceQuery {
|
|
|
282398
282699
|
if (_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.areaNormalGo(visitor.point, normal))
|
|
282399
282700
|
averageNormal.addInPlace(normal);
|
|
282400
282701
|
}
|
|
282401
|
-
partitionNormals.push(
|
|
282702
|
+
partitionNormals.push(_geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_17__.Ray3d.createCapture(point0, averageNormal));
|
|
282402
282703
|
planarPartitions.push(partition);
|
|
282403
282704
|
}
|
|
282404
282705
|
}
|
|
@@ -282407,8 +282708,8 @@ class PolyfaceQuery {
|
|
|
282407
282708
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(planarPartitions.length === fragmentPolyfaces.length);
|
|
282408
282709
|
const gapTolerance = 1.0e-4;
|
|
282409
282710
|
const planarityTolerance = 1.0e-4;
|
|
282410
|
-
const localToWorld =
|
|
282411
|
-
const worldToLocal =
|
|
282711
|
+
const localToWorld = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_18__.Transform.createIdentity();
|
|
282712
|
+
const worldToLocal = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_18__.Transform.createIdentity();
|
|
282412
282713
|
for (let i = 0; i < fragmentPolyfaces.length; ++i) {
|
|
282413
282714
|
const fragment = fragmentPolyfaces[i];
|
|
282414
282715
|
const edges = [];
|
|
@@ -282417,7 +282718,7 @@ class PolyfaceQuery {
|
|
|
282417
282718
|
edges.push(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d.create(pointA, pointB));
|
|
282418
282719
|
edgeStrings.push([pointA.clone(), pointB.clone()]);
|
|
282419
282720
|
}, true, false, false);
|
|
282420
|
-
const chains =
|
|
282721
|
+
const chains = _curve_CurveOps__WEBPACK_IMPORTED_MODULE_19__.CurveOps.collectChains(edges, gapTolerance, planarityTolerance);
|
|
282421
282722
|
if (chains) {
|
|
282422
282723
|
// avoid FrameBuilder: it can flip the normal of a nonconvex facet!
|
|
282423
282724
|
partitionNormals[i].toRigidZFrame(localToWorld);
|
|
@@ -282427,11 +282728,11 @@ class PolyfaceQuery {
|
|
|
282427
282728
|
// But we aren't triangulating here. So if we don't have holes, we can skip regularization
|
|
282428
282729
|
// to avoid splitting the loop.
|
|
282429
282730
|
const regularize = !(chains instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_5__.Loop);
|
|
282430
|
-
const graph =
|
|
282731
|
+
const graph = _topology_Merging__WEBPACK_IMPORTED_MODULE_20__.HalfEdgeGraphMerge.formGraphFromChains(edgeStrings, regularize, _topology_Graph__WEBPACK_IMPORTED_MODULE_21__.HalfEdgeMask.BOUNDARY_EDGE);
|
|
282431
282732
|
if (graph) {
|
|
282432
|
-
|
|
282733
|
+
_topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_22__.HalfEdgeGraphSearch.collectConnectedComponentsWithExteriorParityMasks(graph, new _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_22__.HalfEdgeMaskTester(_topology_Graph__WEBPACK_IMPORTED_MODULE_21__.HalfEdgeMask.BOUNDARY_EDGE), _topology_Graph__WEBPACK_IMPORTED_MODULE_21__.HalfEdgeMask.EXTERIOR);
|
|
282433
282734
|
// this.purgeNullFaces(HalfEdgeMask.EXTERIOR);
|
|
282434
|
-
const polyface1 =
|
|
282735
|
+
const polyface1 = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_16__.PolyfaceBuilder.graphToPolyface(graph);
|
|
282435
282736
|
builder.addIndexedPolyface(polyface1, false, localToWorld);
|
|
282436
282737
|
}
|
|
282437
282738
|
}
|
|
@@ -282457,7 +282758,7 @@ class PolyfaceQuery {
|
|
|
282457
282758
|
static fillSimpleHoles(mesh, options, unfilledChains) {
|
|
282458
282759
|
if (mesh instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
282459
282760
|
return this.fillSimpleHoles(mesh.createVisitor(0), options, unfilledChains);
|
|
282460
|
-
const builder =
|
|
282761
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_16__.PolyfaceBuilder.create();
|
|
282461
282762
|
const chains = [];
|
|
282462
282763
|
PolyfaceQuery.announceBoundaryChainsAsLineString3d(mesh, (ls) => { ls.reverseInPlace(); chains.push(ls); });
|
|
282463
282764
|
for (const c of chains) {
|
|
@@ -282467,11 +282768,11 @@ class PolyfaceQuery {
|
|
|
282467
282768
|
rejected = true;
|
|
282468
282769
|
else if (options.maxEdgesAroundHole !== undefined && points.length > options.maxEdgesAroundHole)
|
|
282469
282770
|
rejected = true;
|
|
282470
|
-
else if (options.maxPerimeter !== undefined &&
|
|
282771
|
+
else if (options.maxPerimeter !== undefined && _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_23__.Point3dArray.sumEdgeLengths(points, false) > options.maxPerimeter)
|
|
282471
282772
|
rejected = true;
|
|
282472
282773
|
else if (options.upVector !== undefined && _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.sumTriangleAreasPerpendicularToUpVector(points, options.upVector) <= 0.0)
|
|
282473
282774
|
rejected = true;
|
|
282474
|
-
if (!rejected &&
|
|
282775
|
+
if (!rejected && _topology_SpaceTriangulation__WEBPACK_IMPORTED_MODULE_24__.SpacePolygonTriangulation.triangulateSimplestSpaceLoop(points, (_loop, triangles) => {
|
|
282475
282776
|
for (const t of triangles)
|
|
282476
282777
|
builder.addPolygon(t);
|
|
282477
282778
|
})) {
|
|
@@ -282495,13 +282796,13 @@ class PolyfaceQuery {
|
|
|
282495
282796
|
}
|
|
282496
282797
|
polyface.setNumWrap(0);
|
|
282497
282798
|
const polyfaces = [];
|
|
282498
|
-
const options =
|
|
282799
|
+
const options = _curve_StrokeOptions__WEBPACK_IMPORTED_MODULE_25__.StrokeOptions.createForFacets();
|
|
282499
282800
|
options.needNormals = polyface.normal !== undefined;
|
|
282500
282801
|
options.needParams = polyface.param !== undefined;
|
|
282501
282802
|
options.needColors = polyface.color !== undefined;
|
|
282502
282803
|
options.needTwoSided = polyface.twoSided;
|
|
282503
282804
|
for (const partition of partitions) {
|
|
282504
|
-
const builder =
|
|
282805
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_16__.PolyfaceBuilder.create(options);
|
|
282505
282806
|
polyface.reset();
|
|
282506
282807
|
for (const facetIndex of partition) {
|
|
282507
282808
|
polyface.moveToReadIndex(facetIndex);
|
|
@@ -282517,12 +282818,12 @@ class PolyfaceQuery {
|
|
|
282517
282818
|
return this.cloneFiltered(source.createVisitor(0), filter);
|
|
282518
282819
|
}
|
|
282519
282820
|
source.setNumWrap(0);
|
|
282520
|
-
const options =
|
|
282821
|
+
const options = _curve_StrokeOptions__WEBPACK_IMPORTED_MODULE_25__.StrokeOptions.createForFacets();
|
|
282521
282822
|
options.needNormals = source.normal !== undefined;
|
|
282522
282823
|
options.needParams = source.param !== undefined;
|
|
282523
282824
|
options.needColors = source.color !== undefined;
|
|
282524
282825
|
options.needTwoSided = source.twoSided;
|
|
282525
|
-
const builder =
|
|
282826
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_16__.PolyfaceBuilder.create(options);
|
|
282526
282827
|
source.reset();
|
|
282527
282828
|
for (; source.moveToNextFacet();) {
|
|
282528
282829
|
if (filter(source))
|
|
@@ -282534,12 +282835,12 @@ class PolyfaceQuery {
|
|
|
282534
282835
|
static cloneWithDanglingEdgesRemoved(source) {
|
|
282535
282836
|
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
282536
282837
|
return this.cloneWithDanglingEdgesRemoved(source.createVisitor(0));
|
|
282537
|
-
const options =
|
|
282838
|
+
const options = _curve_StrokeOptions__WEBPACK_IMPORTED_MODULE_25__.StrokeOptions.createForFacets();
|
|
282538
282839
|
options.needNormals = source.normal !== undefined;
|
|
282539
282840
|
options.needParams = source.param !== undefined;
|
|
282540
282841
|
options.needColors = source.color !== undefined;
|
|
282541
282842
|
options.needTwoSided = source.twoSided;
|
|
282542
|
-
const builder =
|
|
282843
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_16__.PolyfaceBuilder.create(options);
|
|
282543
282844
|
// Finds an odd palindrome in data as indexed by indices.
|
|
282544
282845
|
// An odd palindrome in a face loop corresponds to dangling edges in the face.
|
|
282545
282846
|
// If one is found, indices is mutated to excise the palindrome (data is untouched).
|
|
@@ -282697,7 +282998,7 @@ class PolyfaceQuery {
|
|
|
282697
282998
|
* * Input facets are ASSUMED to be convex and planar, and not overlap in the z direction.
|
|
282698
282999
|
*/
|
|
282699
283000
|
static sweepLineStringToFacetsXYReturnSweptFacets(lineStringPoints, polyface) {
|
|
282700
|
-
const builder =
|
|
283001
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_16__.PolyfaceBuilder.create();
|
|
282701
283002
|
this.announceSweepLinestringToConvexPolyfaceXY(lineStringPoints, polyface, (_linestring, _segmentIndex, _polyface, _facetIndex, points) => {
|
|
282702
283003
|
if (points.length === 4)
|
|
282703
283004
|
builder.addQuadFacet(points);
|
|
@@ -282711,89 +283012,94 @@ class PolyfaceQuery {
|
|
|
282711
283012
|
return this.sweepLineStringToFacetsXYReturnSweptFacets(linestringPoints, polyface);
|
|
282712
283013
|
}
|
|
282713
283014
|
/**
|
|
282714
|
-
* Sweep the line string to intersections with a mesh.
|
|
282715
|
-
* * Return collected line segments.
|
|
282716
|
-
* * If no options are given, the default sweep direction is the z-axis, and chains are assembled and returned.
|
|
282717
|
-
* * See [[SweepLineStringToFacetsOptions]] for input and output options, including filtering by forward/side/rear facets.
|
|
283015
|
+
* Sweep the line string to intersections with a mesh and return collected line segments.
|
|
282718
283016
|
* * Facets are ASSUMED to be convex and planar, and not overlap in the sweep direction.
|
|
282719
|
-
|
|
282720
|
-
|
|
283017
|
+
* @param points the linestring to drape onto the mesh.
|
|
283018
|
+
* @param source target facet set. For best results, facets should be convex and planar.
|
|
283019
|
+
* @param options input, filtering, search, and output options.
|
|
283020
|
+
* * If `undefined`, the default sweep direction is the positive z-axis, and chains are assembled and returned.
|
|
283021
|
+
* * For faster _vertical_ sweep, a pre-computed range tree can be supplied in `options.searcher`.
|
|
283022
|
+
* * For faster _non-vertical_ sweep, first transform inputs with the inverse of the transform
|
|
283023
|
+
* `T = Transform.createRigidFromOriginAndVector(undefined, options.vectorToEye)`, construct the searcher on these
|
|
283024
|
+
* local facets, call `sweepLineStringToFacets/XY` with these local inputs (and default sweep direction), and lastly,
|
|
283025
|
+
* transform the returned draped linework back to world coordinates with `T`.
|
|
283026
|
+
*/
|
|
283027
|
+
static sweepLineStringToFacets(points, source, options) {
|
|
282721
283028
|
let result = [];
|
|
282722
|
-
// setup default options
|
|
282723
283029
|
if (options === undefined)
|
|
282724
|
-
options = SweepLineStringToFacetsOptions.create(
|
|
282725
|
-
true, true, true, true);
|
|
283030
|
+
options = SweepLineStringToFacetsOptions.create();
|
|
282726
283031
|
let chainContext;
|
|
282727
283032
|
if (options.assembleChains)
|
|
282728
|
-
chainContext =
|
|
282729
|
-
const
|
|
282730
|
-
|
|
282731
|
-
|
|
282732
|
-
|
|
282733
|
-
|
|
282734
|
-
|
|
282735
|
-
|
|
282736
|
-
const
|
|
282737
|
-
|
|
282738
|
-
|
|
282739
|
-
|
|
282740
|
-
|
|
282741
|
-
|
|
282742
|
-
|
|
282743
|
-
|
|
282744
|
-
|
|
283033
|
+
chainContext = _topology_ChainMerge__WEBPACK_IMPORTED_MODULE_26__.ChainMergeContext.create();
|
|
283034
|
+
const addSegment = chainContext ? (ptA, ptB) => chainContext.addSegment(ptA, ptB) : (ptA, ptB) => result.push(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d.create(ptA, ptB));
|
|
283035
|
+
const workNormal = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createZero();
|
|
283036
|
+
const visitor = source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface ? source.createVisitor(0) : source;
|
|
283037
|
+
visitor.setNumWrap(0);
|
|
283038
|
+
if (options.searcher && options.vectorToEye.isParallelTo(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ())) {
|
|
283039
|
+
const searchRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_27__.Range3d.createNull();
|
|
283040
|
+
const workPoint0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero();
|
|
283041
|
+
const workPoint1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero();
|
|
283042
|
+
let edgeClipper;
|
|
283043
|
+
const clipEdgeToConvexPolygon = (_facetRange, readIndex) => {
|
|
283044
|
+
if (visitor.moveToReadIndex(readIndex) && (options.collectAll || options.collectFromThisFacetNormal(_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.areaNormalGo(visitor.point, workNormal))))
|
|
283045
|
+
edgeClipper?.processPolygon(visitor.point, (ptA, ptB) => addSegment(ptA, ptB));
|
|
283046
|
+
return true;
|
|
283047
|
+
};
|
|
283048
|
+
for (let i = 1; i < points.length; i++) {
|
|
283049
|
+
points.getPoint3dAtUncheckedPointIndex(i - 1, workPoint0);
|
|
283050
|
+
points.getPoint3dAtUncheckedPointIndex(i, workPoint1);
|
|
283051
|
+
if (edgeClipper = _multiclip_SweepLineStringToFacetContext__WEBPACK_IMPORTED_MODULE_14__.EdgeClipData.createPointPointSweep(workPoint0, workPoint1, options.vectorToEye)) {
|
|
283052
|
+
searchRange.setNull();
|
|
283053
|
+
searchRange.extend(workPoint0, workPoint1);
|
|
283054
|
+
options.searcher.searchRange2d(searchRange, clipEdgeToConvexPolygon);
|
|
282745
283055
|
}
|
|
282746
283056
|
}
|
|
282747
|
-
|
|
282748
|
-
|
|
282749
|
-
|
|
283057
|
+
}
|
|
283058
|
+
else {
|
|
283059
|
+
const context = _multiclip_SweepLineStringToFacetContext__WEBPACK_IMPORTED_MODULE_14__.ClipSweptLineStringContext.create(points, options.vectorToEye);
|
|
283060
|
+
if (context) {
|
|
283061
|
+
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
283062
|
+
if (options.collectAll || options.collectFromThisFacetNormal(_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.areaNormalGo(visitor.point, workNormal)))
|
|
283063
|
+
context.processPolygon(visitor.point.getArray(), addSegment);
|
|
283064
|
+
}
|
|
282750
283065
|
}
|
|
282751
283066
|
}
|
|
283067
|
+
if (chainContext) {
|
|
283068
|
+
chainContext.clusterAndMergeVerticesXYZ();
|
|
283069
|
+
result = chainContext.collectMaximalChains();
|
|
283070
|
+
}
|
|
282752
283071
|
return result;
|
|
282753
283072
|
}
|
|
282754
283073
|
/**
|
|
282755
283074
|
* Sweep the line string in the z-direction to intersections with a mesh, using a search object for speedup.
|
|
282756
|
-
* @param
|
|
282757
|
-
* @param
|
|
282758
|
-
* @param
|
|
282759
|
-
* @example Using a 5x5 indexed search grid:
|
|
282760
|
-
* ```
|
|
282761
|
-
* const xyRange = Range2d.createFrom(myPolyface.range());
|
|
282762
|
-
* const searcher = GriddedRaggedRange2dSetWithOverflow.create<number>(xyRange, 5, 5)!;
|
|
282763
|
-
* for (const visitor = myPolyface.createVisitor(0); visitor.moveToNextFacet();) {
|
|
282764
|
-
* searcher.addRange(visitor.point.getRange(), visitor.currentReadIndex());
|
|
282765
|
-
* }
|
|
282766
|
-
* const drapedLineStrings = PolyfaceQuery.sweepLineStringToFacetsXY(lineString, myPolyface, searcher);
|
|
282767
|
-
* ```
|
|
283075
|
+
* @param points the linestring to drape onto the mesh.
|
|
283076
|
+
* @param source target facet set. For best results, facets should be convex and planar.
|
|
283077
|
+
* @param searcher object for searching facet 2D ranges tagged by mesh read index.
|
|
282768
283078
|
* @returns the collected line strings.
|
|
282769
|
-
|
|
282770
|
-
|
|
282771
|
-
|
|
282772
|
-
const
|
|
282773
|
-
const
|
|
282774
|
-
|
|
282775
|
-
|
|
282776
|
-
|
|
282777
|
-
|
|
282778
|
-
|
|
282779
|
-
let
|
|
282780
|
-
|
|
282781
|
-
|
|
282782
|
-
|
|
282783
|
-
|
|
283079
|
+
* @see [[sweepLineStringToFacets]] for further options.
|
|
283080
|
+
*/
|
|
283081
|
+
static sweepLineStringToFacetsXY(points, source, searcher) {
|
|
283082
|
+
const chainContext = _topology_ChainMerge__WEBPACK_IMPORTED_MODULE_26__.ChainMergeContext.create();
|
|
283083
|
+
const vectorToEye = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ();
|
|
283084
|
+
const searchRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_27__.Range3d.create();
|
|
283085
|
+
const workPoint0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero();
|
|
283086
|
+
const workPoint1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero();
|
|
283087
|
+
const visitor = source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface ? source.createVisitor(0) : source;
|
|
283088
|
+
visitor.setNumWrap(0);
|
|
283089
|
+
let edgeClipper;
|
|
283090
|
+
const clipEdgeToConvexPolygon = (_facetRange, readIndex) => {
|
|
283091
|
+
if (visitor.moveToReadIndex(readIndex))
|
|
283092
|
+
edgeClipper?.processPolygon(visitor.point, (ptA, ptB) => chainContext.addSegment(ptA, ptB));
|
|
283093
|
+
return true;
|
|
283094
|
+
};
|
|
283095
|
+
const lineStringSource = Array.isArray(points) ? new _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_28__.Point3dArrayCarrier(points) : points;
|
|
282784
283096
|
for (let i = 1; i < lineStringSource.length; i++) {
|
|
282785
|
-
|
|
282786
|
-
|
|
282787
|
-
|
|
282788
|
-
|
|
282789
|
-
|
|
282790
|
-
|
|
282791
|
-
searchRange.extendPoint(point1);
|
|
282792
|
-
searchByReadIndex.searchRange2d(searchRange, (_facetRange, readIndex) => {
|
|
282793
|
-
if (visitor.moveToReadIndex(readIndex))
|
|
282794
|
-
edgeClipper.processPolygon(visitor.point, (pointA, pointB) => chainContext.addSegment(pointA, pointB));
|
|
282795
|
-
return true;
|
|
282796
|
-
});
|
|
283097
|
+
lineStringSource.getPoint3dAtUncheckedPointIndex(i - 1, workPoint0);
|
|
283098
|
+
lineStringSource.getPoint3dAtUncheckedPointIndex(i, workPoint1);
|
|
283099
|
+
if (edgeClipper = _multiclip_SweepLineStringToFacetContext__WEBPACK_IMPORTED_MODULE_14__.EdgeClipData.createPointPointSweep(workPoint0, workPoint1, vectorToEye)) {
|
|
283100
|
+
searchRange.setNull();
|
|
283101
|
+
searchRange.extend(workPoint0, workPoint1);
|
|
283102
|
+
searcher.searchRange2d(searchRange, clipEdgeToConvexPolygon);
|
|
282797
283103
|
}
|
|
282798
283104
|
}
|
|
282799
283105
|
chainContext.clusterAndMergeVerticesXYZ();
|
|
@@ -282808,20 +283114,16 @@ class PolyfaceQuery {
|
|
|
282808
283114
|
*/
|
|
282809
283115
|
static sweepLinestringToFacetsXYReturnLines(linestringPoints, polyface) {
|
|
282810
283116
|
const options = SweepLineStringToFacetsOptions.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createSmallAngle(), false, true, true, true);
|
|
282811
|
-
|
|
282812
|
-
return result;
|
|
283117
|
+
return PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface, options);
|
|
282813
283118
|
}
|
|
282814
283119
|
/**
|
|
282815
283120
|
* Find segments (within the linestring) which project to facets.
|
|
282816
283121
|
* * Return chains.
|
|
282817
|
-
* * This calls [[sweepLineStringToFacets]] with options
|
|
282818
|
-
* `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(),true, true, true, true);`
|
|
283122
|
+
* * This calls [[sweepLineStringToFacets]] with default options.
|
|
282819
283123
|
* @deprecated in 4.x. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
|
|
282820
283124
|
*/
|
|
282821
283125
|
static sweepLinestringToFacetsXYReturnChains(linestringPoints, polyface) {
|
|
282822
|
-
|
|
282823
|
-
const result = PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface, options);
|
|
282824
|
-
return result;
|
|
283126
|
+
return PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface);
|
|
282825
283127
|
}
|
|
282826
283128
|
/**
|
|
282827
283129
|
* Find segments (within the linestring) which project to facets.
|
|
@@ -282833,7 +283135,7 @@ class PolyfaceQuery {
|
|
|
282833
283135
|
* * Facets are ASSUMED to be convex and planar, and not overlap in the z direction.
|
|
282834
283136
|
*/
|
|
282835
283137
|
static async asyncSweepLinestringToFacetsXYReturnChains(linestringPoints, polyface) {
|
|
282836
|
-
const chainContext =
|
|
283138
|
+
const chainContext = _topology_ChainMerge__WEBPACK_IMPORTED_MODULE_26__.ChainMergeContext.create();
|
|
282837
283139
|
await Promise.resolve(this.asyncAnnounceSweepLinestringToConvexPolyfaceXY(linestringPoints, polyface, (_linestring, _segmentIndex, _polyface, _facetIndex, points, indexA, indexB) => {
|
|
282838
283140
|
chainContext.addSegment(points[indexA], points[indexB]);
|
|
282839
283141
|
}));
|
|
@@ -282849,7 +283151,7 @@ class PolyfaceQuery {
|
|
|
282849
283151
|
if (polyface instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface) {
|
|
282850
283152
|
return this.collectRangeLengthData(polyface.createVisitor(0));
|
|
282851
283153
|
}
|
|
282852
|
-
const rangeData = new
|
|
283154
|
+
const rangeData = new _RangeLengthData__WEBPACK_IMPORTED_MODULE_29__.RangeLengthData();
|
|
282853
283155
|
// polyface is a visitor
|
|
282854
283156
|
for (polyface.reset(); polyface.moveToNextFacet();)
|
|
282855
283157
|
rangeData.accumulateGrowableXYZArrayRange(polyface.point);
|
|
@@ -282862,9 +283164,9 @@ class PolyfaceQuery {
|
|
|
282862
283164
|
static cloneWithTVertexFixup(polyface) {
|
|
282863
283165
|
const oldFacetVisitor = polyface.createVisitor(1); // this is to visit the existing facets
|
|
282864
283166
|
const newFacetVisitor = polyface.createVisitor(0); // this is to build the new facets
|
|
282865
|
-
const rangeSearcher =
|
|
282866
|
-
const builder =
|
|
282867
|
-
const edgeRange =
|
|
283167
|
+
const rangeSearcher = _multiclip_XYPointBuckets__WEBPACK_IMPORTED_MODULE_30__.XYPointBuckets.create(polyface.data.point, 30);
|
|
283168
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_16__.PolyfaceBuilder.create();
|
|
283169
|
+
const edgeRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_27__.Range3d.createNull();
|
|
282868
283170
|
const point0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
282869
283171
|
const point1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
282870
283172
|
const spacePoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
@@ -282996,7 +283298,7 @@ class PolyfaceQuery {
|
|
|
282996
283298
|
* @param clusterSelector indicates whether to copy 0, 1, or all facets in each cluster of duplicate facets.
|
|
282997
283299
|
*/
|
|
282998
283300
|
static cloneByFacetDuplication(source, includeSingletons, clusterSelector) {
|
|
282999
|
-
const builder =
|
|
283301
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_16__.PolyfaceBuilder.create();
|
|
283000
283302
|
const visitor = source.createVisitor(0);
|
|
283001
283303
|
this.announceDuplicateFacetIndices(source, (clusterFacetIndices) => {
|
|
283002
283304
|
let numToSelect = 0;
|
|
@@ -283023,7 +283325,7 @@ class PolyfaceQuery {
|
|
|
283023
283325
|
static cloneWithColinearEdgeFixup(polyface) {
|
|
283024
283326
|
const oldFacetVisitor = polyface.createVisitor(2); // this is to visit the existing facets
|
|
283025
283327
|
const newFacetVisitor = polyface.createVisitor(0); // this is to build the new facets
|
|
283026
|
-
const builder =
|
|
283328
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_16__.PolyfaceBuilder.create();
|
|
283027
283329
|
const vector01 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
283028
283330
|
const vector12 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
283029
283331
|
const numPoint = polyface.data.point.length;
|
|
@@ -283073,11 +283375,11 @@ class PolyfaceQuery {
|
|
|
283073
283375
|
static setEdgeVisibility(polyface, clusters, value) {
|
|
283074
283376
|
for (const cluster of clusters) {
|
|
283075
283377
|
if (cluster instanceof _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__.SortableEdge) {
|
|
283076
|
-
this.setSingleEdgeVisibility(polyface, cluster.facetIndex, cluster.
|
|
283378
|
+
this.setSingleEdgeVisibility(polyface, cluster.facetIndex, cluster.startVertex, value);
|
|
283077
283379
|
}
|
|
283078
283380
|
else if (Array.isArray(cluster)) {
|
|
283079
283381
|
for (const e1 of cluster)
|
|
283080
|
-
this.setSingleEdgeVisibility(polyface, e1.facetIndex, e1.
|
|
283382
|
+
this.setSingleEdgeVisibility(polyface, e1.facetIndex, e1.startVertex, value);
|
|
283081
283383
|
}
|
|
283082
283384
|
}
|
|
283083
283385
|
}
|
|
@@ -283179,8 +283481,8 @@ class PolyfaceQuery {
|
|
|
283179
283481
|
&& undefined !== PolyfaceQuery.computeFacetUnitNormal(visitor, e1.facetIndex, normal1)) {
|
|
283180
283482
|
const edgeAngle = normal0.smallerUnorientedAngleTo(normal1);
|
|
283181
283483
|
if (edgeAngle.radians > sharpEdgeAngle.radians) {
|
|
283182
|
-
this.setSingleEdgeVisibility(mesh, e0.facetIndex, e0.
|
|
283183
|
-
this.setSingleEdgeVisibility(mesh, e1.facetIndex, e1.
|
|
283484
|
+
this.setSingleEdgeVisibility(mesh, e0.facetIndex, e0.startVertex, true);
|
|
283485
|
+
this.setSingleEdgeVisibility(mesh, e1.facetIndex, e1.startVertex, true);
|
|
283184
283486
|
}
|
|
283185
283487
|
}
|
|
283186
283488
|
}
|
|
@@ -283216,7 +283518,7 @@ class PolyfaceQuery {
|
|
|
283216
283518
|
* @internal
|
|
283217
283519
|
*/
|
|
283218
283520
|
static convertToHalfEdgeGraph(mesh) {
|
|
283219
|
-
const builder = new
|
|
283521
|
+
const builder = new _topology_HalfEdgeGraphFromIndexedLoopsContext__WEBPACK_IMPORTED_MODULE_31__.HalfEdgeGraphFromIndexedLoopsContext();
|
|
283220
283522
|
const visitor = mesh.createVisitor(0);
|
|
283221
283523
|
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
283222
283524
|
builder.insertLoop(visitor.pointIndex);
|
|
@@ -283233,11 +283535,11 @@ class PolyfaceQuery {
|
|
|
283233
283535
|
}
|
|
283234
283536
|
/** Examine adjacent facet orientations throughout the mesh. If possible, reverse a subset to achieve proper pairing. */
|
|
283235
283537
|
static reorientVertexOrderAroundFacetsForConsistentOrientation(mesh) {
|
|
283236
|
-
return
|
|
283538
|
+
return _FacetOrientation__WEBPACK_IMPORTED_MODULE_32__.FacetOrientationFixup.doFixup(mesh);
|
|
283237
283539
|
}
|
|
283238
283540
|
/** Set up indexed normals with one normal in the plane of each facet of the mesh. */
|
|
283239
283541
|
static buildPerFaceNormals(polyface) {
|
|
283240
|
-
|
|
283542
|
+
_multiclip_BuildAverageNormalsContext__WEBPACK_IMPORTED_MODULE_33__.BuildAverageNormalsContext.buildPerFaceNormals(polyface);
|
|
283241
283543
|
}
|
|
283242
283544
|
/**
|
|
283243
283545
|
* * At each vertex of the mesh:
|
|
@@ -283251,7 +283553,7 @@ class PolyfaceQuery {
|
|
|
283251
283553
|
* @param toleranceAngle averaging is done between normals up to this angle.
|
|
283252
283554
|
*/
|
|
283253
283555
|
static buildAverageNormals(polyface, toleranceAngle = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createDegrees(31.0)) {
|
|
283254
|
-
|
|
283556
|
+
_multiclip_BuildAverageNormalsContext__WEBPACK_IMPORTED_MODULE_33__.BuildAverageNormalsContext.buildFastAverageNormals(polyface, toleranceAngle);
|
|
283255
283557
|
}
|
|
283256
283558
|
/**
|
|
283257
283559
|
* Offset the faces of the mesh.
|
|
@@ -283261,9 +283563,9 @@ class PolyfaceQuery {
|
|
|
283261
283563
|
* @returns shifted mesh.
|
|
283262
283564
|
*/
|
|
283263
283565
|
static cloneOffset(source, signedOffsetDistance, offsetOptions = OffsetMeshOptions.create()) {
|
|
283264
|
-
const strokeOptions =
|
|
283265
|
-
const offsetBuilder =
|
|
283266
|
-
|
|
283566
|
+
const strokeOptions = _curve_StrokeOptions__WEBPACK_IMPORTED_MODULE_25__.StrokeOptions.createForFacets();
|
|
283567
|
+
const offsetBuilder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_16__.PolyfaceBuilder.create(strokeOptions);
|
|
283568
|
+
_multiclip_OffsetMeshContext__WEBPACK_IMPORTED_MODULE_34__.OffsetMeshContext.buildOffsetMeshWithEdgeChamfers(source, offsetBuilder, signedOffsetDistance, offsetOptions);
|
|
283267
283569
|
return offsetBuilder.claimPolyface();
|
|
283268
283570
|
}
|
|
283269
283571
|
static _workTriangle;
|
|
@@ -283300,17 +283602,17 @@ class PolyfaceQuery {
|
|
|
283300
283602
|
const numEdges = visitor.pointCount; // #vertices = #edges since numWrap is zero
|
|
283301
283603
|
const vertices = visitor.point;
|
|
283302
283604
|
if (3 === numEdges) {
|
|
283303
|
-
const tri = this._workTriangle =
|
|
283605
|
+
const tri = this._workTriangle = _geometry3d_BarycentricTriangle__WEBPACK_IMPORTED_MODULE_35__.BarycentricTriangle.create(vertices.getPoint3dAtUncheckedPointIndex(0), vertices.getPoint3dAtUncheckedPointIndex(1), vertices.getPoint3dAtUncheckedPointIndex(2), this._workTriangle);
|
|
283304
283606
|
const detail3 = this._workTriDetail = tri.intersectRay3d(ray, this._workTriDetail);
|
|
283305
283607
|
tri.snapLocationToEdge(detail3, options?.distanceTolerance, options?.parameterTolerance);
|
|
283306
|
-
detail = this._workFacetDetail3 =
|
|
283608
|
+
detail = this._workFacetDetail3 = _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_36__.TriangularFacetLocationDetail.create(visitor.currentReadIndex(), detail3, this._workFacetDetail3);
|
|
283307
283609
|
}
|
|
283308
283610
|
else {
|
|
283309
283611
|
const detailN = this._workPolyDetail = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.intersectRay3d(vertices, ray, tol, this._workPolyDetail);
|
|
283310
283612
|
if (_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.isConvex(vertices))
|
|
283311
|
-
detail = this._workFacetDetailC =
|
|
283613
|
+
detail = this._workFacetDetailC = _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_36__.ConvexFacetLocationDetail.create(visitor.currentReadIndex(), numEdges, detailN, this._workFacetDetailC);
|
|
283312
283614
|
else
|
|
283313
|
-
detail = this._workFacetDetailNC =
|
|
283615
|
+
detail = this._workFacetDetailNC = _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_36__.NonConvexFacetLocationDetail.create(visitor.currentReadIndex(), numEdges, detailN, this._workFacetDetailNC);
|
|
283314
283616
|
}
|
|
283315
283617
|
if (detail.isInsideOrOn) { // set optional caches, process the intersection
|
|
283316
283618
|
if (options?.needNormal && visitor.normal)
|
|
@@ -283950,14 +284252,14 @@ let numNodeCreated = 0;
|
|
|
283950
284252
|
* * _range = the union of ranges below in the heap
|
|
283951
284253
|
* * _appData = application data associated with the node.
|
|
283952
284254
|
* * Construction methods may place multiple _appData items in each node.
|
|
283953
|
-
*
|
|
284255
|
+
* * In common use, only the leaves will have _appData. However, the class definitions allow _appData at all nodes, and search algorithms must include them.
|
|
283954
284256
|
* * CONSTRUCTION
|
|
283955
284257
|
* * The RangeTreeNode.createByIndexSplits method constructs the tree with simple right-left splits within an array of input items.
|
|
283956
284258
|
* * The appData is placed entirely in the leaves.
|
|
283957
|
-
* * caller can specify:
|
|
284259
|
+
* * The caller can specify:
|
|
283958
284260
|
* * the number of _appData items per leaf
|
|
283959
284261
|
* * the number of children per node within the tree.
|
|
283960
|
-
* * "
|
|
284262
|
+
* * Compared to "shallow" trees with many children per node and many appData per leaf, "deep" trees with 2 children per node and 1 appData per leaf may have:
|
|
283961
284263
|
* * faster search because lower nodes have smaller ranges that will be skipped by search algorithms.
|
|
283962
284264
|
* * larger memory use because of more nodes
|
|
283963
284265
|
* * For future construction methods:
|
|
@@ -286870,15 +287172,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
286870
287172
|
/* harmony export */ EdgeClipData: () => (/* binding */ EdgeClipData),
|
|
286871
287173
|
/* harmony export */ SweepLineStringToFacetContext: () => (/* binding */ SweepLineStringToFacetContext)
|
|
286872
287174
|
/* harmony export */ });
|
|
286873
|
-
/* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
|
|
286874
|
-
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
286875
|
-
/* harmony import */ var _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../geometry3d/Segment1d */ "../../core/geometry/lib/esm/geometry3d/Segment1d.js");
|
|
286876
|
-
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
286877
|
-
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
286878
287175
|
/* harmony import */ var _clipping_ClipPlane__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../clipping/ClipPlane */ "../../core/geometry/lib/esm/clipping/ClipPlane.js");
|
|
286879
287176
|
/* harmony import */ var _clipping_ConvexClipPlaneSet__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../clipping/ConvexClipPlaneSet */ "../../core/geometry/lib/esm/clipping/ConvexClipPlaneSet.js");
|
|
286880
|
-
/* harmony import */ var
|
|
287177
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
286881
287178
|
/* harmony import */ var _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../geometry3d/Matrix3d */ "../../core/geometry/lib/esm/geometry3d/Matrix3d.js");
|
|
287179
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
287180
|
+
/* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
|
|
287181
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
287182
|
+
/* harmony import */ var _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../geometry3d/Segment1d */ "../../core/geometry/lib/esm/geometry3d/Segment1d.js");
|
|
287183
|
+
/* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
|
|
286882
287184
|
/*---------------------------------------------------------------------------------------------
|
|
286883
287185
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
286884
287186
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -286901,24 +287203,23 @@ class SweepLineStringToFacetContext {
|
|
|
286901
287203
|
_numSpacePoints;
|
|
286902
287204
|
constructor(spacePoints) {
|
|
286903
287205
|
this._spacePoints = spacePoints;
|
|
286904
|
-
this._spacePointsRange =
|
|
286905
|
-
spacePoints.setRange(this._spacePointsRange);
|
|
287206
|
+
this._spacePointsRange = spacePoints.getRange();
|
|
286906
287207
|
this._numSpacePoints = this._spacePoints.length;
|
|
286907
287208
|
}
|
|
286908
287209
|
static create(xyz) {
|
|
286909
287210
|
if (xyz.length > 1) {
|
|
286910
|
-
return new SweepLineStringToFacetContext(xyz
|
|
287211
|
+
return new SweepLineStringToFacetContext(xyz);
|
|
286911
287212
|
}
|
|
286912
287213
|
return undefined;
|
|
286913
287214
|
}
|
|
286914
287215
|
// temporaries reused over multiple calls to process a single facet . ..
|
|
286915
|
-
_segmentPoint0 =
|
|
286916
|
-
_segmentPoint1 =
|
|
286917
|
-
_localSegmentPoint0 =
|
|
286918
|
-
_localSegmentPoint1 =
|
|
286919
|
-
_clipFractions =
|
|
286920
|
-
_localFrame =
|
|
286921
|
-
_polygonRange =
|
|
287216
|
+
_segmentPoint0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.create();
|
|
287217
|
+
_segmentPoint1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.create();
|
|
287218
|
+
_localSegmentPoint0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.create();
|
|
287219
|
+
_localSegmentPoint1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.create();
|
|
287220
|
+
_clipFractions = _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_1__.Segment1d.create(0, 1);
|
|
287221
|
+
_localFrame = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_2__.Transform.createIdentity();
|
|
287222
|
+
_polygonRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_3__.Range3d.create();
|
|
286922
287223
|
/** process a single polygon.
|
|
286923
287224
|
* @returns number crudely indicating how much work was done.
|
|
286924
287225
|
*/
|
|
@@ -286994,7 +287295,7 @@ class EdgeClipData {
|
|
|
286994
287295
|
}
|
|
286995
287296
|
/** create object from segment and sweep. Inputs are not captured. */
|
|
286996
287297
|
static createPointPointSweep(pointA, pointB, sweep) {
|
|
286997
|
-
const edgeVector =
|
|
287298
|
+
const edgeVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.createStartEnd(pointA, pointB);
|
|
286998
287299
|
const fraction = edgeVector.fractionOfProjectionToVector(sweep);
|
|
286999
287300
|
// The unbounded plane of the swept edge will intersect facets in lines that may extend beyond the swept bounded line.
|
|
287000
287301
|
// That linework will be clipped between two facing planes with normal along the perpendicular dropped from the edge vector to the sweep vector.
|
|
@@ -287043,16 +287344,16 @@ class ClipSweptLineStringContext {
|
|
|
287043
287344
|
}
|
|
287044
287345
|
static create(xyz, sweepVector) {
|
|
287045
287346
|
if (sweepVector === undefined)
|
|
287046
|
-
sweepVector =
|
|
287347
|
+
sweepVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Vector3d.create(0, 0, 1);
|
|
287047
287348
|
if (xyz.length > 1) {
|
|
287048
|
-
const point =
|
|
287049
|
-
const newPoint =
|
|
287349
|
+
const point = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.createZero();
|
|
287350
|
+
const newPoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_0__.Point3d.createZero();
|
|
287050
287351
|
const edgeData = [];
|
|
287051
287352
|
xyz.getPoint3dAtUncheckedPointIndex(0, point);
|
|
287052
287353
|
let localToWorldMatrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__.Matrix3d.createRigidHeadsUp(sweepVector);
|
|
287053
287354
|
if (localToWorldMatrix === undefined)
|
|
287054
287355
|
localToWorldMatrix = _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__.Matrix3d.createIdentity();
|
|
287055
|
-
const localToWorld =
|
|
287356
|
+
const localToWorld = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_2__.Transform.createOriginAndMatrix(point, localToWorldMatrix);
|
|
287056
287357
|
const worldToLocal = localToWorld.inverse();
|
|
287057
287358
|
const localRange = xyz.getRange(worldToLocal);
|
|
287058
287359
|
for (let i = 1; i < xyz.length; i++) {
|
|
@@ -287073,7 +287374,7 @@ class ClipSweptLineStringContext {
|
|
|
287073
287374
|
*/
|
|
287074
287375
|
processPolygon(polygon, announceEdge) {
|
|
287075
287376
|
if (this._worldToLocal !== undefined && this._localRange !== undefined) {
|
|
287076
|
-
const polygonRange =
|
|
287377
|
+
const polygonRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_3__.Range3d.createTransformedArray(this._worldToLocal, polygon);
|
|
287077
287378
|
if (!polygonRange.intersectsRangeXY(this._localRange))
|
|
287078
287379
|
return;
|
|
287079
287380
|
}
|
|
@@ -301721,7 +302022,7 @@ class ChainMergeContext {
|
|
|
301721
302022
|
}
|
|
301722
302023
|
return n;
|
|
301723
302024
|
}
|
|
301724
|
-
/** Collect chains which have maximum edge count, broken at
|
|
302025
|
+
/** Collect chains which have maximum edge count, broken at vertices with more than 2 edges.
|
|
301725
302026
|
* * This is assumed to be preceded by a call to a vertex-cluster step such as `clusterAndMergeVerticesYXZ`
|
|
301726
302027
|
*/
|
|
301727
302028
|
collectMaximalChains() {
|
|
@@ -329806,7 +330107,7 @@ class TestContext {
|
|
|
329806
330107
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
329807
330108
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
329808
330109
|
await core_frontend_1.NoRenderApp.startup({
|
|
329809
|
-
applicationVersion: "5.0.0-dev.
|
|
330110
|
+
applicationVersion: "5.0.0-dev.114",
|
|
329810
330111
|
applicationId: this.settings.gprid,
|
|
329811
330112
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
329812
330113
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -354854,7 +355155,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
354854
355155
|
/***/ ((module) => {
|
|
354855
355156
|
|
|
354856
355157
|
"use strict";
|
|
354857
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.
|
|
355158
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.114","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","source-map-loader":"^5.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.3.0","@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
|
|
354858
355159
|
|
|
354859
355160
|
/***/ }),
|
|
354860
355161
|
|