@itwin/ecschema-rpcinterface-tests 4.9.0-dev.19 → 4.9.0-dev.20
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 +305 -285
- 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_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_meshoptimizer_0_20_0_node_modules_meshoptimizer_index_m-a5ae61.bundled-tests.js.map +1 -1
- package/package.json +16 -16
|
@@ -68371,6 +68371,16 @@ class Schema {
|
|
|
68371
68371
|
setDescription(description) {
|
|
68372
68372
|
this._description = description;
|
|
68373
68373
|
}
|
|
68374
|
+
/**
|
|
68375
|
+
* @alpha
|
|
68376
|
+
* Used for schema editing.
|
|
68377
|
+
*/
|
|
68378
|
+
setAlias(alias) {
|
|
68379
|
+
if (!_ECName__WEBPACK_IMPORTED_MODULE_5__.ECName.validate(alias)) {
|
|
68380
|
+
throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECName, "The specified schema alias is invalid.");
|
|
68381
|
+
}
|
|
68382
|
+
this._alias = alias;
|
|
68383
|
+
}
|
|
68374
68384
|
}
|
|
68375
68385
|
/**
|
|
68376
68386
|
* Hackish approach that works like a "friend class" so we can access protected members without making them public.
|
|
@@ -190395,7 +190405,7 @@ class CurveOps {
|
|
|
190395
190405
|
* @returns object with named chains, insideOffsets, outsideOffsets
|
|
190396
190406
|
*/
|
|
190397
190407
|
static collectInsideAndOutsideXYOffsets(fragments, offsetDistance, gapTolerance) {
|
|
190398
|
-
const collector = new _internalContexts_MultiChainCollector__WEBPACK_IMPORTED_MODULE_5__.MultiChainCollector(gapTolerance);
|
|
190408
|
+
const collector = new _internalContexts_MultiChainCollector__WEBPACK_IMPORTED_MODULE_5__.MultiChainCollector(gapTolerance, gapTolerance);
|
|
190399
190409
|
for (const s of fragments) {
|
|
190400
190410
|
collector.captureCurve(s);
|
|
190401
190411
|
}
|
|
@@ -190436,7 +190446,7 @@ class CurveOps {
|
|
|
190436
190446
|
* @param planeTolerance tolerance for considering a closed chain to be planar. If undefined, only create Path. If defined, create Loops for closed chains within tolerance of a plane.
|
|
190437
190447
|
* @returns chains, possibly wrapped in a [[BagOfCurves]].
|
|
190438
190448
|
*/
|
|
190439
|
-
static collectChains(fragments, gapTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.smallMetricDistance, planeTolerance
|
|
190449
|
+
static collectChains(fragments, gapTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.smallMetricDistance, planeTolerance) {
|
|
190440
190450
|
const collector = new _internalContexts_MultiChainCollector__WEBPACK_IMPORTED_MODULE_5__.MultiChainCollector(gapTolerance, planeTolerance);
|
|
190441
190451
|
for (const s of fragments) {
|
|
190442
190452
|
collector.captureCurve(s);
|
|
@@ -190444,16 +190454,16 @@ class CurveOps {
|
|
|
190444
190454
|
return collector.grabResult(true);
|
|
190445
190455
|
}
|
|
190446
190456
|
/**
|
|
190447
|
-
* Restructure curve fragments
|
|
190457
|
+
* Restructure curve fragments, to be stroked and passed into the callback.
|
|
190448
190458
|
* * Chain formation is dependent upon input fragment order, as a greedy algorithm is employed.
|
|
190449
190459
|
* @param fragments fragments to be chained and stroked
|
|
190450
190460
|
* @param announceChain callback to process each stroked Path and Loop
|
|
190451
190461
|
* @param strokeOptions options for stroking the chains
|
|
190452
190462
|
* @param gapTolerance distance to be treated as "effectively zero" when assembling fragments head-to-tail. Also used for removing duplicate points in the stroked chains.
|
|
190453
|
-
* @param
|
|
190463
|
+
* @param _planeTolerance unused, pass undefined
|
|
190454
190464
|
*/
|
|
190455
|
-
static collectChainsAsLineString3d(fragments, announceChain, strokeOptions, gapTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.smallMetricDistance,
|
|
190456
|
-
const collector = new _internalContexts_MultiChainCollector__WEBPACK_IMPORTED_MODULE_5__.MultiChainCollector(gapTolerance
|
|
190465
|
+
static collectChainsAsLineString3d(fragments, announceChain, strokeOptions, gapTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_6__.Geometry.smallMetricDistance, _planeTolerance) {
|
|
190466
|
+
const collector = new _internalContexts_MultiChainCollector__WEBPACK_IMPORTED_MODULE_5__.MultiChainCollector(gapTolerance); // no planarity tolerance needed
|
|
190457
190467
|
for (const s of fragments) {
|
|
190458
190468
|
collector.captureCurve(s);
|
|
190459
190469
|
}
|
|
@@ -202505,7 +202515,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
202505
202515
|
* Manage a growing array of arrays of curve primitives that are to be joined "head to tail" in paths.
|
|
202506
202516
|
* * The caller makes a sequence of calls to announce individual primitives.
|
|
202507
202517
|
* * This collector (unlike the simpler [[ChainCollectorContext]]) expects to have inputs arriving in random order, leaving multiple open chains in play at any time.
|
|
202508
|
-
* * When all curves have been announced, the call to `
|
|
202518
|
+
* * When all curves have been announced, the call to `grabResult` restructures the various active chains into Paths (and optionally, Loops).
|
|
202509
202519
|
* * Chain formation is dependent upon input fragment order, as a greedy algorithm is employed.
|
|
202510
202520
|
* * Usage pattern is
|
|
202511
202521
|
* * initialization: `context = new MultiChainCollector(gapTol, planeTol)`
|
|
@@ -202520,7 +202530,7 @@ class MultiChainCollector {
|
|
|
202520
202530
|
* @param gapTolerance tolerance for calling endpoints identical
|
|
202521
202531
|
* @param planeTolerance tolerance for considering a closed chain to be planar. If undefined, only create Path. If defined, create Loops for closed chains within tolerance of a plane.
|
|
202522
202532
|
*/
|
|
202523
|
-
constructor(gapTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance, planeTolerance
|
|
202533
|
+
constructor(gapTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance, planeTolerance) {
|
|
202524
202534
|
this._chains = [];
|
|
202525
202535
|
this._gapTolerance = gapTolerance;
|
|
202526
202536
|
this._snapTolerance = _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance;
|
|
@@ -202740,7 +202750,7 @@ class MultiChainCollector {
|
|
|
202740
202750
|
/**
|
|
202741
202751
|
* Convert an array of curve primitives into the simplest possible strongly typed curve structure.
|
|
202742
202752
|
* @param curves input array, assembled correctly into a single contiguous path, captured by returned object
|
|
202743
|
-
* @param makeLoopIfClosed whether to return a Loop from physically closed curves
|
|
202753
|
+
* @param makeLoopIfClosed whether to return a Loop from physically closed coplanar curves, otherwise Path
|
|
202744
202754
|
* @return Loop or Path if multiple curves; the primitive if only one curve; undefined if no curves
|
|
202745
202755
|
*/
|
|
202746
202756
|
promoteArrayToCurves(curves, makeLoopIfClosed) {
|
|
@@ -202798,7 +202808,10 @@ class MultiChainCollector {
|
|
|
202798
202808
|
}
|
|
202799
202809
|
return bag;
|
|
202800
202810
|
}
|
|
202801
|
-
/**
|
|
202811
|
+
/**
|
|
202812
|
+
* Return chains as individual calls to announceChain.
|
|
202813
|
+
* * Does not use planeTolerance.
|
|
202814
|
+
*/
|
|
202802
202815
|
announceChainsAsLineString3d(announceChain, options) {
|
|
202803
202816
|
const chains = this._chains;
|
|
202804
202817
|
if (chains.length === 1) {
|
|
@@ -209823,7 +209836,8 @@ class FrameBuilder {
|
|
|
209823
209836
|
* * x axis in direction of first nonzero vector present or implied by the input.
|
|
209824
209837
|
* * y axis is perpendicular to x and contains (in positive side) the next vector present or implied by the input.
|
|
209825
209838
|
* * The calculation favors the first points found. It does not try to get a "best" plane.
|
|
209826
|
-
* @param defaultUpVector optional vector to cross with vector0 to create vector1 when it is unknown
|
|
209839
|
+
* @param defaultUpVector optional vector to cross with vector0 to create vector1 when it is unknown.
|
|
209840
|
+
* The z-column of the returned frame points into the same halfspace as this vector.
|
|
209827
209841
|
* @param params any number of geometric objects to examine in [[announce]] for point/vector data sufficient to construct a frame.
|
|
209828
209842
|
* If the last argument is a `Transform`, it is populated with the computed frame and returned.
|
|
209829
209843
|
* @returns computed localToWorld frame, or undefined if insufficient data.
|
|
@@ -209831,17 +209845,17 @@ class FrameBuilder {
|
|
|
209831
209845
|
static createRightHandedFrame(defaultUpVector, ...params) {
|
|
209832
209846
|
// if last arg is a Transform, remove it from the array and use for the return value
|
|
209833
209847
|
let frame = (params.length > 0 && params[params.length - 1] instanceof _Transform__WEBPACK_IMPORTED_MODULE_2__.Transform) ? params.pop() : undefined;
|
|
209848
|
+
const flipFrame = (f) => {
|
|
209849
|
+
if (defaultUpVector && f.matrix.dotColumnZ(defaultUpVector) < 0.0)
|
|
209850
|
+
f.matrix.scaleColumnsInPlace(1, -1, -1);
|
|
209851
|
+
return f;
|
|
209852
|
+
};
|
|
209834
209853
|
const builder = new FrameBuilder();
|
|
209835
209854
|
for (const data of params) {
|
|
209836
209855
|
builder.announce(data);
|
|
209837
209856
|
builder.applyDefaultUpVector(defaultUpVector);
|
|
209838
|
-
if (frame = builder.getValidatedFrame(false, frame))
|
|
209839
|
-
|
|
209840
|
-
if (frame.matrix.dotColumnZ(defaultUpVector) < 0.0)
|
|
209841
|
-
frame.matrix.scaleColumnsInPlace(1, -1, -1);
|
|
209842
|
-
}
|
|
209843
|
-
return frame;
|
|
209844
|
-
}
|
|
209857
|
+
if (frame = builder.getValidatedFrame(false, frame))
|
|
209858
|
+
return flipFrame(frame);
|
|
209845
209859
|
}
|
|
209846
209860
|
const evaluatePrimitiveFrame = (curve, result) => {
|
|
209847
209861
|
return curve.fractionToFrenetFrame(0.0, result);
|
|
@@ -209849,13 +209863,14 @@ class FrameBuilder {
|
|
|
209849
209863
|
// try direct evaluation of curve primitives using the above lambda
|
|
209850
209864
|
for (const data of params) {
|
|
209851
209865
|
if (data instanceof _curve_CurvePrimitive__WEBPACK_IMPORTED_MODULE_4__.CurvePrimitive) {
|
|
209852
|
-
|
|
209866
|
+
if (frame = evaluatePrimitiveFrame(data, frame))
|
|
209867
|
+
return flipFrame(frame);
|
|
209853
209868
|
}
|
|
209854
209869
|
else if (data instanceof _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_10__.CurveCollection) {
|
|
209855
209870
|
const children = data.collectCurvePrimitives();
|
|
209856
209871
|
for (const curve of children) {
|
|
209857
209872
|
if (frame = evaluatePrimitiveFrame(curve, frame))
|
|
209858
|
-
return frame;
|
|
209873
|
+
return flipFrame(frame);
|
|
209859
209874
|
}
|
|
209860
209875
|
}
|
|
209861
209876
|
}
|
|
@@ -221468,10 +221483,10 @@ class PolygonOps {
|
|
|
221468
221483
|
return s;
|
|
221469
221484
|
}
|
|
221470
221485
|
/**
|
|
221471
|
-
* Return a Ray3d with (assuming the polygon is planar and not self-intersecting)
|
|
221472
|
-
* * origin at the centroid of the (3D) polygon
|
|
221473
|
-
* *
|
|
221474
|
-
* *
|
|
221486
|
+
* Return a Ray3d with (assuming the polygon is planar and not self-intersecting):
|
|
221487
|
+
* * `origin` at the centroid of the (3D) polygon
|
|
221488
|
+
* * `direction` is the unit vector perpendicular to the plane
|
|
221489
|
+
* * `a` is the area.
|
|
221475
221490
|
* @param points
|
|
221476
221491
|
*/
|
|
221477
221492
|
static centroidAreaNormal(points) {
|
|
@@ -221787,20 +221802,16 @@ class PolygonOps {
|
|
|
221787
221802
|
static orientLoopsCCWForOutwardNormalInPlace(loops, outwardNormal) {
|
|
221788
221803
|
if (loops instanceof _IndexedXYZCollection__WEBPACK_IMPORTED_MODULE_5__.IndexedXYZCollection)
|
|
221789
221804
|
return this.orientLoopsCCWForOutwardNormalInPlace([loops], outwardNormal);
|
|
221790
|
-
const orientations = [];
|
|
221791
221805
|
const unitNormal = _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
221792
221806
|
// orient individually ... (no hole analysis)
|
|
221793
221807
|
let numReverse = 0;
|
|
221794
221808
|
for (const loop of loops) {
|
|
221795
221809
|
if (this.unitNormal(loop, unitNormal)) {
|
|
221796
221810
|
const q = unitNormal.dotProduct(outwardNormal);
|
|
221797
|
-
|
|
221798
|
-
if (q <= 0.0)
|
|
221811
|
+
if (q < 0.0) {
|
|
221799
221812
|
loop.reverseInPlace();
|
|
221800
|
-
|
|
221801
|
-
|
|
221802
|
-
else {
|
|
221803
|
-
orientations.push(0.0);
|
|
221813
|
+
numReverse++;
|
|
221814
|
+
}
|
|
221804
221815
|
}
|
|
221805
221816
|
}
|
|
221806
221817
|
return numReverse;
|
|
@@ -239162,8 +239173,9 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
|
|
|
239162
239173
|
if (surface.capped && contour.isAnyRegionType) {
|
|
239163
239174
|
const contourA = surface.getSweepContourRef();
|
|
239164
239175
|
contourA.purgeFacets();
|
|
239165
|
-
contourA.
|
|
239166
|
-
contourA.emitFacets(this,
|
|
239176
|
+
const reverseNearCap = contourA.localToWorld.matrix.dotColumnZ(sweepVector) > 0;
|
|
239177
|
+
contourA.emitFacets(this, reverseNearCap, undefined);
|
|
239178
|
+
contourA.emitFacets(this, !reverseNearCap, sweepTransform);
|
|
239167
239179
|
}
|
|
239168
239180
|
}
|
|
239169
239181
|
/** Add facets from a ruled sweep. */
|
|
@@ -240001,15 +240013,7 @@ class ClipCandidate {
|
|
|
240001
240013
|
}
|
|
240002
240014
|
}
|
|
240003
240015
|
/**
|
|
240004
|
-
* A pair of PolyfaceBuilder objects, for use by clippers that emit inside and outside parts.
|
|
240005
|
-
* * There are nominally 4 builders:
|
|
240006
|
-
* * builderA collects simple "inside" clip.
|
|
240007
|
-
* * builderB collects simple "outside" clip.
|
|
240008
|
-
* * builderA1 collects "side" clip for inside.
|
|
240009
|
-
* * builderB1 collets "side" clip for outside.
|
|
240010
|
-
* * `static ClippedPolyfaceBuilders.create(keepInside, keepOutside)` initializes `builderA` and `builderB` (each optionally to undefined), with undefined `builderA1` and `builderB1`
|
|
240011
|
-
* * `builders.enableSideBuilders()` makes `builderA1` and `builderB1` match `builderA` and `builderB`.
|
|
240012
|
-
* * construction methods aim their facets at appropriate builders if defined.
|
|
240016
|
+
* A pair of [[PolyfaceBuilder]] objects, for use by clippers that emit inside and outside parts.
|
|
240013
240017
|
* * @public
|
|
240014
240018
|
*/
|
|
240015
240019
|
class ClippedPolyfaceBuilders {
|
|
@@ -240018,10 +240022,21 @@ class ClippedPolyfaceBuilders {
|
|
|
240018
240022
|
this.builderB = builderB;
|
|
240019
240023
|
this.buildClosureFaces = buildClosureFaces;
|
|
240020
240024
|
}
|
|
240021
|
-
/**
|
|
240025
|
+
/**
|
|
240026
|
+
* Static constructor with default options for the builders.
|
|
240027
|
+
* @param keepInside whether to collect clipped facets inside the clipper to `this.builderA` (default true)
|
|
240028
|
+
* @param keepOutside whether to collect clipped facets outside the clipper to `this.builderB` (default false)
|
|
240029
|
+
* @param buildSideFaces whether to add side facets to active builders (default false)
|
|
240030
|
+
*/
|
|
240022
240031
|
static create(keepInside = true, keepOutside = false, buildSideFaces = false) {
|
|
240023
240032
|
return new ClippedPolyfaceBuilders(keepInside ? _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_1__.PolyfaceBuilder.create() : undefined, keepOutside ? _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_1__.PolyfaceBuilder.create() : undefined, buildSideFaces);
|
|
240024
240033
|
}
|
|
240034
|
+
/**
|
|
240035
|
+
* Return the computed facets from the selected builder.
|
|
240036
|
+
* @param selector the polyface to return: 0 - builderA (typically inside facets), 1 - builderB (typically outside facets)
|
|
240037
|
+
* @param fixup whether to clean up the polyface
|
|
240038
|
+
* @param tolerance compression tolerance (default [[Geometry.smallMetricDistance]]).
|
|
240039
|
+
*/
|
|
240025
240040
|
claimPolyface(selector, fixup, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance) {
|
|
240026
240041
|
const builder = selector === 0 ? this.builderA : this.builderB;
|
|
240027
240042
|
if (builder) {
|
|
@@ -240345,9 +240360,9 @@ class PolyfaceClip {
|
|
|
240345
240360
|
}
|
|
240346
240361
|
else {
|
|
240347
240362
|
if (destination.builderA)
|
|
240348
|
-
contour.emitFacets(destination.builderA,
|
|
240363
|
+
contour.emitFacets(destination.builderA, false);
|
|
240349
240364
|
if (destination.builderB)
|
|
240350
|
-
contour.emitFacets(destination.builderB,
|
|
240365
|
+
contour.emitFacets(destination.builderB, true);
|
|
240351
240366
|
}
|
|
240352
240367
|
}
|
|
240353
240368
|
}
|
|
@@ -240361,9 +240376,9 @@ class PolyfaceClip {
|
|
|
240361
240376
|
}
|
|
240362
240377
|
else {
|
|
240363
240378
|
if (destination.builderA)
|
|
240364
|
-
contour.emitFacets(destination.builderA,
|
|
240379
|
+
contour.emitFacets(destination.builderA, false);
|
|
240365
240380
|
if (destination.builderB)
|
|
240366
|
-
contour.emitFacets(destination.builderB,
|
|
240381
|
+
contour.emitFacets(destination.builderB, true);
|
|
240367
240382
|
}
|
|
240368
240383
|
}
|
|
240369
240384
|
}
|
|
@@ -241263,42 +241278,44 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
241263
241278
|
/* harmony export */ "PolyfaceQuery": () => (/* binding */ PolyfaceQuery),
|
|
241264
241279
|
/* harmony export */ "SweepLineStringToFacetsOptions": () => (/* binding */ SweepLineStringToFacetsOptions)
|
|
241265
241280
|
/* harmony export */ });
|
|
241266
|
-
/* harmony import */ var
|
|
241267
|
-
/* harmony import */ var
|
|
241268
|
-
/* harmony import */ var
|
|
241269
|
-
/* harmony import */ var
|
|
241270
|
-
/* harmony import */ var
|
|
241271
|
-
/* harmony import */ var
|
|
241272
|
-
/* harmony import */ var
|
|
241273
|
-
/* harmony import */ var
|
|
241274
|
-
/* harmony import */ var
|
|
241275
|
-
/* harmony import */ var
|
|
241276
|
-
/* harmony import */ var
|
|
241277
|
-
/* harmony import */ var
|
|
241278
|
-
/* harmony import */ var
|
|
241279
|
-
/* harmony import */ var
|
|
241280
|
-
/* harmony import */ var
|
|
241281
|
-
/* harmony import */ var
|
|
241282
|
-
/* harmony import */ var
|
|
241283
|
-
/* harmony import */ var
|
|
241284
|
-
/* harmony import */ var
|
|
241285
|
-
/* harmony import */ var
|
|
241286
|
-
/* harmony import */ var
|
|
241287
|
-
/* harmony import */ var
|
|
241288
|
-
/* harmony import */ var
|
|
241289
|
-
/* harmony import */ var
|
|
241290
|
-
/* harmony import */ var
|
|
241291
|
-
/* harmony import */ var
|
|
241292
|
-
/* harmony import */ var
|
|
241293
|
-
/* harmony import */ var
|
|
241294
|
-
/* harmony import */ var
|
|
241295
|
-
/* harmony import */ var
|
|
241296
|
-
/* harmony import */ var
|
|
241297
|
-
/* harmony import */ var
|
|
241298
|
-
/* harmony import */ var
|
|
241299
|
-
/* harmony import */ var
|
|
241300
|
-
/* harmony import */ var
|
|
241301
|
-
/* harmony import */ var
|
|
241281
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
241282
|
+
/* harmony import */ var _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../curve/CurveCollection */ "../../core/geometry/lib/esm/curve/CurveCollection.js");
|
|
241283
|
+
/* harmony import */ var _curve_CurveOps__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../curve/CurveOps */ "../../core/geometry/lib/esm/curve/CurveOps.js");
|
|
241284
|
+
/* harmony import */ var _curve_internalContexts_MultiChainCollector__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../curve/internalContexts/MultiChainCollector */ "../../core/geometry/lib/esm/curve/internalContexts/MultiChainCollector.js");
|
|
241285
|
+
/* harmony import */ var _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../curve/LineSegment3d */ "../../core/geometry/lib/esm/curve/LineSegment3d.js");
|
|
241286
|
+
/* harmony import */ var _curve_LineString3d__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../curve/LineString3d */ "../../core/geometry/lib/esm/curve/LineString3d.js");
|
|
241287
|
+
/* harmony import */ var _curve_Loop__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../curve/Loop */ "../../core/geometry/lib/esm/curve/Loop.js");
|
|
241288
|
+
/* harmony import */ var _curve_StrokeOptions__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../curve/StrokeOptions */ "../../core/geometry/lib/esm/curve/StrokeOptions.js");
|
|
241289
|
+
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
241290
|
+
/* harmony import */ var _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Angle */ "../../core/geometry/lib/esm/geometry3d/Angle.js");
|
|
241291
|
+
/* harmony import */ var _geometry3d_BarycentricTriangle__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../geometry3d/BarycentricTriangle */ "../../core/geometry/lib/esm/geometry3d/BarycentricTriangle.js");
|
|
241292
|
+
/* harmony import */ var _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../geometry3d/Point3dArrayCarrier */ "../../core/geometry/lib/esm/geometry3d/Point3dArrayCarrier.js");
|
|
241293
|
+
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
241294
|
+
/* harmony import */ var _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../geometry3d/PointHelpers */ "../../core/geometry/lib/esm/geometry3d/PointHelpers.js");
|
|
241295
|
+
/* harmony import */ var _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../geometry3d/PolygonOps */ "../../core/geometry/lib/esm/geometry3d/PolygonOps.js");
|
|
241296
|
+
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
241297
|
+
/* harmony import */ var _geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../geometry3d/Ray3d */ "../../core/geometry/lib/esm/geometry3d/Ray3d.js");
|
|
241298
|
+
/* harmony import */ var _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../geometry3d/Transform */ "../../core/geometry/lib/esm/geometry3d/Transform.js");
|
|
241299
|
+
/* harmony import */ var _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../geometry4d/Matrix4d */ "../../core/geometry/lib/esm/geometry4d/Matrix4d.js");
|
|
241300
|
+
/* harmony import */ var _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../geometry4d/MomentData */ "../../core/geometry/lib/esm/geometry4d/MomentData.js");
|
|
241301
|
+
/* harmony import */ var _numerics_UnionFind__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../numerics/UnionFind */ "../../core/geometry/lib/esm/numerics/UnionFind.js");
|
|
241302
|
+
/* harmony import */ var _topology_ChainMerge__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../topology/ChainMerge */ "../../core/geometry/lib/esm/topology/ChainMerge.js");
|
|
241303
|
+
/* harmony import */ var _topology_Graph__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../topology/Graph */ "../../core/geometry/lib/esm/topology/Graph.js");
|
|
241304
|
+
/* harmony import */ var _topology_HalfEdgeGraphFromIndexedLoopsContext__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../topology/HalfEdgeGraphFromIndexedLoopsContext */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js");
|
|
241305
|
+
/* harmony import */ var _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../topology/HalfEdgeGraphSearch */ "../../core/geometry/lib/esm/topology/HalfEdgeGraphSearch.js");
|
|
241306
|
+
/* harmony import */ var _topology_Merging__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../topology/Merging */ "../../core/geometry/lib/esm/topology/Merging.js");
|
|
241307
|
+
/* harmony import */ var _topology_SpaceTriangulation__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../topology/SpaceTriangulation */ "../../core/geometry/lib/esm/topology/SpaceTriangulation.js");
|
|
241308
|
+
/* harmony import */ var _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./FacetLocationDetail */ "../../core/geometry/lib/esm/polyface/FacetLocationDetail.js");
|
|
241309
|
+
/* harmony import */ var _FacetOrientation__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./FacetOrientation */ "../../core/geometry/lib/esm/polyface/FacetOrientation.js");
|
|
241310
|
+
/* harmony import */ var _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./IndexedEdgeMatcher */ "../../core/geometry/lib/esm/polyface/IndexedEdgeMatcher.js");
|
|
241311
|
+
/* harmony import */ var _IndexedPolyfaceVisitor__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./IndexedPolyfaceVisitor */ "../../core/geometry/lib/esm/polyface/IndexedPolyfaceVisitor.js");
|
|
241312
|
+
/* harmony import */ var _multiclip_BuildAverageNormalsContext__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./multiclip/BuildAverageNormalsContext */ "../../core/geometry/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js");
|
|
241313
|
+
/* harmony import */ var _multiclip_OffsetMeshContext__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./multiclip/OffsetMeshContext */ "../../core/geometry/lib/esm/polyface/multiclip/OffsetMeshContext.js");
|
|
241314
|
+
/* harmony import */ var _multiclip_SweepLineStringToFacetContext__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./multiclip/SweepLineStringToFacetContext */ "../../core/geometry/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js");
|
|
241315
|
+
/* harmony import */ var _multiclip_XYPointBuckets__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./multiclip/XYPointBuckets */ "../../core/geometry/lib/esm/polyface/multiclip/XYPointBuckets.js");
|
|
241316
|
+
/* harmony import */ var _Polyface__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Polyface */ "../../core/geometry/lib/esm/polyface/Polyface.js");
|
|
241317
|
+
/* harmony import */ var _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./PolyfaceBuilder */ "../../core/geometry/lib/esm/polyface/PolyfaceBuilder.js");
|
|
241318
|
+
/* harmony import */ var _RangeLengthData__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./RangeLengthData */ "../../core/geometry/lib/esm/polyface/RangeLengthData.js");
|
|
241302
241319
|
/*---------------------------------------------------------------------------------------------
|
|
241303
241320
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
241304
241321
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -241341,6 +241358,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
241341
241358
|
|
|
241342
241359
|
|
|
241343
241360
|
|
|
241361
|
+
|
|
241362
|
+
|
|
241344
241363
|
|
|
241345
241364
|
|
|
241346
241365
|
|
|
@@ -241367,7 +241386,7 @@ class SweepLineStringToFacetsOptions {
|
|
|
241367
241386
|
* * Default `collectOnForwardFacets`, `collectOnSideFacets`, `collectOnRearFacets` are all `true`.
|
|
241368
241387
|
*/
|
|
241369
241388
|
static create(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets) {
|
|
241370
|
-
return new SweepLineStringToFacetsOptions(vectorToEye === undefined ?
|
|
241389
|
+
return new SweepLineStringToFacetsOptions(vectorToEye === undefined ? _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ() : vectorToEye.clone(), sideAngle === undefined ? _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createRadians(_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallAngleRadians) : sideAngle.clone(), _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.resolveValue(assembleChains, true), _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.resolveValue(collectOnForwardFacets, true), _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.resolveValue(collectOnSideFacets, true), _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.resolveValue(collectOnRearFacets, true));
|
|
241371
241390
|
}
|
|
241372
241391
|
/** Return `true` if all outputs are requested. */
|
|
241373
241392
|
get collectAll() {
|
|
@@ -241398,7 +241417,7 @@ class SweepLineStringToFacetsOptions {
|
|
|
241398
241417
|
*/
|
|
241399
241418
|
class OffsetMeshOptions {
|
|
241400
241419
|
/** Constructor -- CAPTURE parameters. */
|
|
241401
|
-
constructor(smoothSingleAngleBetweenNormals =
|
|
241420
|
+
constructor(smoothSingleAngleBetweenNormals = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createDegrees(25), smoothAccumulatedAngleBetweenNormals = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createDegrees(60), chamferAngleBetweenNormals = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createDegrees(90)) {
|
|
241402
241421
|
this.smoothSingleAngleBetweenNormals = smoothSingleAngleBetweenNormals.clone();
|
|
241403
241422
|
this.smoothAccumulatedAngleBetweenNormals = smoothAccumulatedAngleBetweenNormals.clone();
|
|
241404
241423
|
this.chamferAngleBetweenNormals = chamferAngleBetweenNormals.clone();
|
|
@@ -241415,7 +241434,7 @@ class OffsetMeshOptions {
|
|
|
241415
241434
|
* is larger than `chamferTurnAngleBetweenNormals`, a chamfer edge may be added to prevent offset mesh from having
|
|
241416
241435
|
* facets that extend out too far away from the source mesh. Default value is `120` degrees.
|
|
241417
241436
|
*/
|
|
241418
|
-
static create(smoothSingleAngleBetweenNormals =
|
|
241437
|
+
static create(smoothSingleAngleBetweenNormals = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createDegrees(25), smoothAccumulatedAngleBetweenNormals = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createDegrees(60), chamferTurnAngleBetweenNormals = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createDegrees(120)) {
|
|
241419
241438
|
const mySmoothSingleRadiansBetweenNormals = smoothSingleAngleBetweenNormals.clone();
|
|
241420
241439
|
const mySmoothAccumulatedRadiansBetweenNormals = smoothAccumulatedAngleBetweenNormals.clone();
|
|
241421
241440
|
const myChamferTurnAngleBetweenNormals = chamferTurnAngleBetweenNormals.clone();
|
|
@@ -241451,12 +241470,12 @@ var DuplicateFacetClusterSelector;
|
|
|
241451
241470
|
class PolyfaceQuery {
|
|
241452
241471
|
/** Copy the points from a visitor into a linestring loop. */
|
|
241453
241472
|
static visitorToLoop(visitor) {
|
|
241454
|
-
const ls =
|
|
241455
|
-
return
|
|
241473
|
+
const ls = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_4__.LineString3d.createPoints(visitor.point.getPoint3dArray());
|
|
241474
|
+
return _curve_Loop__WEBPACK_IMPORTED_MODULE_5__.Loop.create(ls);
|
|
241456
241475
|
}
|
|
241457
241476
|
/** Create a linestring loop for each facet of the polyface. */
|
|
241458
241477
|
static indexedPolyfaceToLoops(polyface) {
|
|
241459
|
-
const result =
|
|
241478
|
+
const result = _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_6__.BagOfCurves.create();
|
|
241460
241479
|
const visitor = polyface.createVisitor(1);
|
|
241461
241480
|
while (visitor.moveToNextFacet()) {
|
|
241462
241481
|
const loop = PolyfaceQuery.visitorToLoop(visitor);
|
|
@@ -241474,14 +241493,14 @@ class PolyfaceQuery {
|
|
|
241474
241493
|
static sumFacetAreas(source, vectorToEye) {
|
|
241475
241494
|
let sum = 0;
|
|
241476
241495
|
if (source !== undefined) {
|
|
241477
|
-
if (source instanceof
|
|
241496
|
+
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
241478
241497
|
return PolyfaceQuery.sumFacetAreas(source.createVisitor(1), vectorToEye);
|
|
241479
241498
|
let unitVectorToEye;
|
|
241480
241499
|
if (vectorToEye !== undefined)
|
|
241481
241500
|
unitVectorToEye = vectorToEye.normalize();
|
|
241482
241501
|
source.reset();
|
|
241483
241502
|
while (source.moveToNextFacet()) {
|
|
241484
|
-
const areaNormal =
|
|
241503
|
+
const areaNormal = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.areaNormal(source.point.getPoint3dArray());
|
|
241485
241504
|
sum += unitVectorToEye ? areaNormal.dotProduct(unitVectorToEye) : areaNormal.magnitude();
|
|
241486
241505
|
}
|
|
241487
241506
|
}
|
|
@@ -241496,12 +241515,12 @@ class PolyfaceQuery {
|
|
|
241496
241515
|
*/
|
|
241497
241516
|
static sumTetrahedralVolumes(source, origin) {
|
|
241498
241517
|
let sum = 0;
|
|
241499
|
-
if (source instanceof
|
|
241518
|
+
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
241500
241519
|
return PolyfaceQuery.sumTetrahedralVolumes(source.createVisitor(0), origin);
|
|
241501
241520
|
let myOrigin = origin;
|
|
241502
|
-
const facetOrigin =
|
|
241503
|
-
const targetA =
|
|
241504
|
-
const targetB =
|
|
241521
|
+
const facetOrigin = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
241522
|
+
const targetA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
241523
|
+
const targetB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
241505
241524
|
source.reset();
|
|
241506
241525
|
while (source.moveToNextFacet()) {
|
|
241507
241526
|
if (myOrigin === undefined)
|
|
@@ -241523,20 +241542,20 @@ class PolyfaceQuery {
|
|
|
241523
241542
|
* moments with respect to the centroid.
|
|
241524
241543
|
*/
|
|
241525
241544
|
static sumVolumeBetweenFacetsAndPlane(source, plane) {
|
|
241526
|
-
if (source instanceof
|
|
241545
|
+
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
241527
241546
|
return PolyfaceQuery.sumVolumeBetweenFacetsAndPlane(source.createVisitor(0), plane);
|
|
241528
|
-
const facetOrigin =
|
|
241529
|
-
const targetA =
|
|
241530
|
-
const targetB =
|
|
241531
|
-
const triangleNormal =
|
|
241547
|
+
const facetOrigin = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
241548
|
+
const targetA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
241549
|
+
const targetB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
241550
|
+
const triangleNormal = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
241532
241551
|
const planeNormal = plane.getNormalRef();
|
|
241533
241552
|
let h0, hA, hB;
|
|
241534
241553
|
let signedVolumeSum = 0.0;
|
|
241535
241554
|
let signedTriangleArea;
|
|
241536
241555
|
let singleFacetArea;
|
|
241537
|
-
const positiveAreaMomentSums =
|
|
241538
|
-
const negativeAreaMomentSums =
|
|
241539
|
-
const singleFacetProducts =
|
|
241556
|
+
const positiveAreaMomentSums = _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_9__.MomentData.create(undefined, true);
|
|
241557
|
+
const negativeAreaMomentSums = _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_9__.MomentData.create(undefined, true);
|
|
241558
|
+
const singleFacetProducts = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_10__.Matrix4d.createZero();
|
|
241540
241559
|
const projectToPlane = plane.getProjectionToPlane();
|
|
241541
241560
|
source.reset();
|
|
241542
241561
|
// For each facet:
|
|
@@ -241563,7 +241582,7 @@ class PolyfaceQuery {
|
|
|
241563
241582
|
}
|
|
241564
241583
|
singleFacetProducts.setZero();
|
|
241565
241584
|
source.point.multiplyTransformInPlace(projectToPlane);
|
|
241566
|
-
|
|
241585
|
+
_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.addSecondMomentAreaProducts(source.point, facetOrigin, singleFacetProducts);
|
|
241567
241586
|
if (singleFacetArea > 0) {
|
|
241568
241587
|
positiveAreaMomentSums.accumulateProductsFromOrigin(facetOrigin, singleFacetProducts, 1.0);
|
|
241569
241588
|
}
|
|
@@ -241573,8 +241592,8 @@ class PolyfaceQuery {
|
|
|
241573
241592
|
}
|
|
241574
241593
|
positiveAreaMomentSums.shiftOriginAndSumsToCentroidOfSums();
|
|
241575
241594
|
negativeAreaMomentSums.shiftOriginAndSumsToCentroidOfSums();
|
|
241576
|
-
const positiveAreaMoments =
|
|
241577
|
-
const negativeAreaMoments =
|
|
241595
|
+
const positiveAreaMoments = _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_9__.MomentData.inertiaProductsToPrincipalAxes(positiveAreaMomentSums.origin, positiveAreaMomentSums.sums);
|
|
241596
|
+
const negativeAreaMoments = _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_9__.MomentData.inertiaProductsToPrincipalAxes(negativeAreaMomentSums.origin, negativeAreaMomentSums.sums);
|
|
241578
241597
|
return {
|
|
241579
241598
|
volume: signedVolumeSum / 6.0,
|
|
241580
241599
|
positiveProjectedFacetAreaMoments: positiveAreaMoments,
|
|
@@ -241583,23 +241602,23 @@ class PolyfaceQuery {
|
|
|
241583
241602
|
}
|
|
241584
241603
|
/** Return the inertia products [xx,xy,xz,xw,yw, etc] integrated over all all facets as viewed from origin. */
|
|
241585
241604
|
static sumFacetSecondAreaMomentProducts(source, origin) {
|
|
241586
|
-
if (source instanceof
|
|
241605
|
+
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
241587
241606
|
return PolyfaceQuery.sumFacetSecondAreaMomentProducts(source.createVisitor(0), origin);
|
|
241588
|
-
const products =
|
|
241607
|
+
const products = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_10__.Matrix4d.createZero();
|
|
241589
241608
|
source.reset();
|
|
241590
241609
|
while (source.moveToNextFacet()) {
|
|
241591
|
-
|
|
241610
|
+
_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.addSecondMomentAreaProducts(source.point, origin, products);
|
|
241592
241611
|
}
|
|
241593
241612
|
return products;
|
|
241594
241613
|
}
|
|
241595
241614
|
/** Return the inertia products [xx,xy,xz,xw,yw, etc] integrated over all tetrahedral volumes from origin. */
|
|
241596
241615
|
static sumFacetSecondVolumeMomentProducts(source, origin) {
|
|
241597
|
-
if (source instanceof
|
|
241616
|
+
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
241598
241617
|
return PolyfaceQuery.sumFacetSecondVolumeMomentProducts(source.createVisitor(0), origin);
|
|
241599
|
-
const products =
|
|
241618
|
+
const products = _geometry4d_Matrix4d__WEBPACK_IMPORTED_MODULE_10__.Matrix4d.createZero();
|
|
241600
241619
|
source.reset();
|
|
241601
241620
|
while (source.moveToNextFacet()) {
|
|
241602
|
-
|
|
241621
|
+
_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.addSecondMomentVolumeProducts(source.point, origin, products);
|
|
241603
241622
|
}
|
|
241604
241623
|
return products;
|
|
241605
241624
|
}
|
|
@@ -241614,7 +241633,7 @@ class PolyfaceQuery {
|
|
|
241614
241633
|
if (!origin)
|
|
241615
241634
|
return undefined;
|
|
241616
241635
|
const inertiaProducts = PolyfaceQuery.sumFacetSecondAreaMomentProducts(source, origin);
|
|
241617
|
-
return
|
|
241636
|
+
return _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_9__.MomentData.inertiaProductsToPrincipalAxes(origin, inertiaProducts);
|
|
241618
241637
|
}
|
|
241619
241638
|
/**
|
|
241620
241639
|
* Compute area moments for the mesh. In the returned MomentData:
|
|
@@ -241629,7 +241648,7 @@ class PolyfaceQuery {
|
|
|
241629
241648
|
if (!origin)
|
|
241630
241649
|
return undefined;
|
|
241631
241650
|
const inertiaProducts = PolyfaceQuery.sumFacetSecondVolumeMomentProducts(source, origin);
|
|
241632
|
-
return
|
|
241651
|
+
return _geometry4d_MomentData__WEBPACK_IMPORTED_MODULE_9__.MomentData.inertiaProductsToPrincipalAxes(origin, inertiaProducts);
|
|
241633
241652
|
}
|
|
241634
241653
|
/**
|
|
241635
241654
|
* Determine whether all facets are convex.
|
|
@@ -241637,13 +241656,13 @@ class PolyfaceQuery {
|
|
|
241637
241656
|
* @returns `true` if all facets are convex; `false` otherwise.
|
|
241638
241657
|
*/
|
|
241639
241658
|
static areFacetsConvex(source) {
|
|
241640
|
-
if (source instanceof
|
|
241659
|
+
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
241641
241660
|
return this.areFacetsConvex(source.createVisitor(0));
|
|
241642
241661
|
source.setNumWrap(0);
|
|
241643
241662
|
source.reset();
|
|
241644
241663
|
while (source.moveToNextFacet()) {
|
|
241645
241664
|
if (source.pointCount > 3) {
|
|
241646
|
-
if (!
|
|
241665
|
+
if (!_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.isConvex(source.point))
|
|
241647
241666
|
return false;
|
|
241648
241667
|
}
|
|
241649
241668
|
}
|
|
@@ -241668,7 +241687,7 @@ class PolyfaceQuery {
|
|
|
241668
241687
|
*/
|
|
241669
241688
|
static dihedralAngleSummary(source, ignoreBoundaries = false) {
|
|
241670
241689
|
// more info can be found at geometry/internaldocs/Polyface.md
|
|
241671
|
-
const edges = new
|
|
241690
|
+
const edges = new _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__.IndexedEdgeMatcher();
|
|
241672
241691
|
const visitor = source.createVisitor(1);
|
|
241673
241692
|
visitor.reset();
|
|
241674
241693
|
// find centroid normals of all facets
|
|
@@ -241676,7 +241695,7 @@ class PolyfaceQuery {
|
|
|
241676
241695
|
let normalCounter = 0;
|
|
241677
241696
|
while (visitor.moveToNextFacet()) {
|
|
241678
241697
|
const numEdges = visitor.pointCount - 1;
|
|
241679
|
-
const normal =
|
|
241698
|
+
const normal = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.centroidAreaNormal(visitor.point);
|
|
241680
241699
|
if (normal === undefined)
|
|
241681
241700
|
return -2;
|
|
241682
241701
|
centroidNormal.push(normal);
|
|
@@ -241697,11 +241716,11 @@ class PolyfaceQuery {
|
|
|
241697
241716
|
let numPositive = 0;
|
|
241698
241717
|
let numPlanar = 0;
|
|
241699
241718
|
let numNegative = 0;
|
|
241700
|
-
const edgeVector =
|
|
241719
|
+
const edgeVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
241701
241720
|
for (const cluster of manifoldClusters) {
|
|
241702
241721
|
const sideA = cluster[0];
|
|
241703
241722
|
const sideB = cluster[1];
|
|
241704
|
-
if (sideA instanceof
|
|
241723
|
+
if (sideA instanceof _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__.SortableEdge && sideB instanceof _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__.SortableEdge
|
|
241705
241724
|
&& source.data.point.vectorIndexIndex(sideA.vertexIndexA, sideA.vertexIndexB, edgeVector)) {
|
|
241706
241725
|
const dihedralAngle = centroidNormal[sideA.facetIndex].direction.signedAngleTo(centroidNormal[sideB.facetIndex].direction, edgeVector);
|
|
241707
241726
|
if (dihedralAngle.isAlmostZero)
|
|
@@ -241748,7 +241767,7 @@ class PolyfaceQuery {
|
|
|
241748
241767
|
* * Any edge with 2 adjacent facets in the same direction triggers a `false` return.
|
|
241749
241768
|
*/
|
|
241750
241769
|
static isPolyfaceManifold(source, allowSimpleBoundaries = false) {
|
|
241751
|
-
const edges = new
|
|
241770
|
+
const edges = new _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__.IndexedEdgeMatcher();
|
|
241752
241771
|
const visitor = source.createVisitor(1);
|
|
241753
241772
|
visitor.reset();
|
|
241754
241773
|
while (visitor.moveToNextFacet()) {
|
|
@@ -241776,10 +241795,10 @@ class PolyfaceQuery {
|
|
|
241776
241795
|
* @param includeNull true to announce edges with identical start and end vertex indices.
|
|
241777
241796
|
*/
|
|
241778
241797
|
static announceBoundaryEdges(source, announceEdge, includeTypical = true, includeMismatch = true, includeNull = true) {
|
|
241779
|
-
if (source === undefined)
|
|
241780
|
-
return
|
|
241781
|
-
const edges = new
|
|
241782
|
-
const visitor = source instanceof
|
|
241798
|
+
if (source === undefined || (!includeTypical && !includeMismatch && !includeNull))
|
|
241799
|
+
return;
|
|
241800
|
+
const edges = new _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__.IndexedEdgeMatcher();
|
|
241801
|
+
const visitor = source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface ? source.createVisitor(1) : source;
|
|
241783
241802
|
visitor.setNumWrap(1);
|
|
241784
241803
|
visitor.reset();
|
|
241785
241804
|
while (visitor.moveToNextFacet()) {
|
|
@@ -241789,29 +241808,18 @@ class PolyfaceQuery {
|
|
|
241789
241808
|
}
|
|
241790
241809
|
}
|
|
241791
241810
|
const boundaryEdges = [];
|
|
241792
|
-
|
|
241793
|
-
|
|
241794
|
-
|
|
241795
|
-
const badList = [];
|
|
241796
|
-
if (includeTypical && boundaryEdges.length > 0)
|
|
241797
|
-
badList.push(boundaryEdges);
|
|
241798
|
-
if (includeNull && nullEdges.length > 0)
|
|
241799
|
-
badList.push(nullEdges);
|
|
241800
|
-
if (includeMismatch && allOtherEdges.length > 0)
|
|
241801
|
-
badList.push(allOtherEdges);
|
|
241802
|
-
if (badList.length === 0)
|
|
241803
|
-
return undefined;
|
|
241811
|
+
edges.sortAndCollectClusters(undefined, includeTypical ? boundaryEdges : undefined, includeNull ? boundaryEdges : undefined, includeMismatch ? boundaryEdges : undefined);
|
|
241812
|
+
if (boundaryEdges.length === 0)
|
|
241813
|
+
return;
|
|
241804
241814
|
const sourcePolyface = visitor.clientPolyface();
|
|
241805
|
-
const pointA =
|
|
241806
|
-
const pointB =
|
|
241807
|
-
for (const
|
|
241808
|
-
|
|
241809
|
-
|
|
241810
|
-
|
|
241811
|
-
|
|
241812
|
-
|
|
241813
|
-
announceEdge(pointA, pointB, indexA, indexB, e1.facetIndex);
|
|
241814
|
-
}
|
|
241815
|
+
const pointA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
241816
|
+
const pointB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
241817
|
+
for (const e of boundaryEdges) {
|
|
241818
|
+
const e1 = e instanceof _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__.SortableEdge ? e : e[0];
|
|
241819
|
+
const indexA = e1.vertexIndexA;
|
|
241820
|
+
const indexB = e1.vertexIndexB;
|
|
241821
|
+
if (sourcePolyface.data.getPoint(indexA, pointA) && sourcePolyface.data.getPoint(indexB, pointB))
|
|
241822
|
+
announceEdge(pointA, pointB, indexA, indexB, e1.facetIndex);
|
|
241815
241823
|
}
|
|
241816
241824
|
}
|
|
241817
241825
|
/**
|
|
@@ -241823,9 +241831,9 @@ class PolyfaceQuery {
|
|
|
241823
241831
|
* @param includeNull true to include edges with identical start and end vertex indices.
|
|
241824
241832
|
*/
|
|
241825
241833
|
static boundaryEdges(source, includeTypical = true, includeMismatch = true, includeNull = true) {
|
|
241826
|
-
const result = new
|
|
241834
|
+
const result = new _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_6__.BagOfCurves();
|
|
241827
241835
|
const announceEdge = (pointA, pointB, _indexA, _indexB, _readIndex) => {
|
|
241828
|
-
result.tryAddChild(
|
|
241836
|
+
result.tryAddChild(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d.create(pointA, pointB));
|
|
241829
241837
|
};
|
|
241830
241838
|
PolyfaceQuery.announceBoundaryEdges(source, announceEdge, includeTypical, includeMismatch, includeNull);
|
|
241831
241839
|
if (result.children.length === 0)
|
|
@@ -241836,13 +241844,13 @@ class PolyfaceQuery {
|
|
|
241836
241844
|
* Collect boundary edges.
|
|
241837
241845
|
* * Return the edges as the simplest collection of chains of line segments.
|
|
241838
241846
|
* @param source polyface or visitor.
|
|
241839
|
-
* @param includeTypical true to
|
|
241847
|
+
* @param includeTypical true to include typical boundary edges with a single adjacent facet.
|
|
241840
241848
|
* @param includeMismatch true to include edges with more than 2 adjacent facets.
|
|
241841
241849
|
* @param includeNull true to include edges with identical start and end vertex indices.
|
|
241842
241850
|
*/
|
|
241843
241851
|
static collectBoundaryEdges(source, includeTypical = true, includeMismatch = true, includeNull = true) {
|
|
241844
|
-
const collector = new
|
|
241845
|
-
PolyfaceQuery.announceBoundaryEdges(source, (ptA, ptB) => collector.captureCurve(
|
|
241852
|
+
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);
|
|
241853
|
+
PolyfaceQuery.announceBoundaryEdges(source, (ptA, ptB) => collector.captureCurve(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d.create(ptA, ptB)), includeTypical, includeMismatch, includeNull);
|
|
241846
241854
|
return collector.grabResult(true);
|
|
241847
241855
|
}
|
|
241848
241856
|
/**
|
|
@@ -241850,9 +241858,9 @@ class PolyfaceQuery {
|
|
|
241850
241858
|
* @param polyface a mesh or a visitor assumed to have numWrap === 1.
|
|
241851
241859
|
*/
|
|
241852
241860
|
static createIndexedEdges(polyface) {
|
|
241853
|
-
if (polyface instanceof
|
|
241861
|
+
if (polyface instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
241854
241862
|
return this.createIndexedEdges(polyface.createVisitor(1));
|
|
241855
|
-
const edges = new
|
|
241863
|
+
const edges = new _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__.IndexedEdgeMatcher();
|
|
241856
241864
|
polyface.reset();
|
|
241857
241865
|
while (polyface.moveToNextFacet()) {
|
|
241858
241866
|
const numEdges = polyface.pointCount - 1;
|
|
@@ -241871,8 +241879,8 @@ class PolyfaceQuery {
|
|
|
241871
241879
|
* @param vectorToEye normal of plane in which to compute silhouette edges.
|
|
241872
241880
|
* @param sideAngle angular tolerance for perpendicularity test.
|
|
241873
241881
|
*/
|
|
241874
|
-
static announceSilhouetteEdges(source, announce, vectorToEye, sideAngle =
|
|
241875
|
-
if (source instanceof
|
|
241882
|
+
static announceSilhouetteEdges(source, announce, vectorToEye, sideAngle = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createSmallAngle()) {
|
|
241883
|
+
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
241876
241884
|
return this.announceSilhouetteEdges(source.createVisitor(1), announce, vectorToEye, sideAngle);
|
|
241877
241885
|
const mesh = source.clientPolyface();
|
|
241878
241886
|
if (undefined === mesh)
|
|
@@ -241882,9 +241890,9 @@ class PolyfaceQuery {
|
|
|
241882
241890
|
const manifoldEdges = [];
|
|
241883
241891
|
allEdges.sortAndCollectClusters(manifoldEdges);
|
|
241884
241892
|
const sideAngleTol = sideAngle.radians < 0.0 ? -sideAngle.radians : sideAngle.radians;
|
|
241885
|
-
const pointA =
|
|
241886
|
-
const pointB =
|
|
241887
|
-
const normal =
|
|
241893
|
+
const pointA = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
241894
|
+
const pointB = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
241895
|
+
const normal = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
241888
241896
|
const analyzeFace = (iFacet) => {
|
|
241889
241897
|
if (!PolyfaceQuery.computeFacetUnitNormal(source, iFacet, normal))
|
|
241890
241898
|
return { isSideFace: false, perpAngle: 0.0 };
|
|
@@ -241923,9 +241931,9 @@ class PolyfaceQuery {
|
|
|
241923
241931
|
* @param vectorToEye normal of plane in which to compute silhouette edges.
|
|
241924
241932
|
* @param sideAngle angular tolerance for perpendicularity test.
|
|
241925
241933
|
*/
|
|
241926
|
-
static collectSilhouetteEdges(source, vectorToEye, sideAngle =
|
|
241927
|
-
const collector = new
|
|
241928
|
-
PolyfaceQuery.announceSilhouetteEdges(source, (ptA, ptB) => collector.captureCurve(
|
|
241934
|
+
static collectSilhouetteEdges(source, vectorToEye, sideAngle = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createSmallAngle()) {
|
|
241935
|
+
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);
|
|
241936
|
+
PolyfaceQuery.announceSilhouetteEdges(source, (ptA, ptB) => collector.captureCurve(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d.create(ptA, ptB)), vectorToEye, sideAngle);
|
|
241929
241937
|
return collector.grabResult(true);
|
|
241930
241938
|
}
|
|
241931
241939
|
/**
|
|
@@ -241934,7 +241942,7 @@ class PolyfaceQuery {
|
|
|
241934
241942
|
* * Facets are ASSUMED to be convex and planar, and not overlap in the z direction.
|
|
241935
241943
|
*/
|
|
241936
241944
|
static announceSweepLinestringToConvexPolyfaceXY(linestringPoints, polyface, announce) {
|
|
241937
|
-
const context =
|
|
241945
|
+
const context = _multiclip_SweepLineStringToFacetContext__WEBPACK_IMPORTED_MODULE_14__.SweepLineStringToFacetContext.create(linestringPoints);
|
|
241938
241946
|
if (context) {
|
|
241939
241947
|
const visitor = polyface.createVisitor(0);
|
|
241940
241948
|
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
@@ -241976,7 +241984,7 @@ class PolyfaceQuery {
|
|
|
241976
241984
|
* @internal
|
|
241977
241985
|
*/
|
|
241978
241986
|
static async asyncAnnounceSweepLinestringToConvexPolyfaceXY(linestringPoints, polyface, announce) {
|
|
241979
|
-
const context =
|
|
241987
|
+
const context = _multiclip_SweepLineStringToFacetContext__WEBPACK_IMPORTED_MODULE_14__.SweepLineStringToFacetContext.create(linestringPoints);
|
|
241980
241988
|
this.awaitBlockCount = 0;
|
|
241981
241989
|
let workTotal = 0;
|
|
241982
241990
|
if (context) {
|
|
@@ -241996,11 +242004,11 @@ class PolyfaceQuery {
|
|
|
241996
242004
|
* * Return array of arrays of facet indices.
|
|
241997
242005
|
*/
|
|
241998
242006
|
static partitionFacetIndicesByVertexConnectedComponent(polyface) {
|
|
241999
|
-
if (polyface instanceof
|
|
242007
|
+
if (polyface instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface) {
|
|
242000
242008
|
return this.partitionFacetIndicesByVertexConnectedComponent(polyface.createVisitor(0));
|
|
242001
242009
|
}
|
|
242002
242010
|
// The polyface is really a visitor
|
|
242003
|
-
const context = new
|
|
242011
|
+
const context = new _numerics_UnionFind__WEBPACK_IMPORTED_MODULE_15__.UnionFindContext(this.visitorClientPointCount(polyface));
|
|
242004
242012
|
for (polyface.reset(); polyface.moveToNextFacet();) {
|
|
242005
242013
|
const firstVertexIndexOnThisFacet = polyface.pointIndex[0];
|
|
242006
242014
|
for (const vertexIndex of polyface.pointIndex)
|
|
@@ -242033,7 +242041,7 @@ class PolyfaceQuery {
|
|
|
242033
242041
|
* * Return array of arrays of facet indices.
|
|
242034
242042
|
*/
|
|
242035
242043
|
static partitionFacetIndicesByVisibilityVector(polyface, vectorToEye, sideAngleTolerance) {
|
|
242036
|
-
if (polyface instanceof
|
|
242044
|
+
if (polyface instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface) {
|
|
242037
242045
|
return this.partitionFacetIndicesByVisibilityVector(polyface.createVisitor(0), vectorToEye, sideAngleTolerance);
|
|
242038
242046
|
}
|
|
242039
242047
|
const facetsInComponent = [];
|
|
@@ -242045,7 +242053,7 @@ class PolyfaceQuery {
|
|
|
242045
242053
|
const sideComponent = facetsInComponent[2];
|
|
242046
242054
|
const radiansTol = Math.max(sideAngleTolerance.radians, 1.0e-8);
|
|
242047
242055
|
for (polyface.reset(); polyface.moveToNextFacet();) {
|
|
242048
|
-
const areaNormal =
|
|
242056
|
+
const areaNormal = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.areaNormalGo(polyface.point);
|
|
242049
242057
|
const index = polyface.currentReadIndex();
|
|
242050
242058
|
if (areaNormal) {
|
|
242051
242059
|
const angle = areaNormal.angleFromPerpendicular(vectorToEye);
|
|
@@ -242072,76 +242080,92 @@ class PolyfaceQuery {
|
|
|
242072
242080
|
* @param vectorToEye the vector to eye
|
|
242073
242081
|
* @param sideAngleTolerance the tolerance of side angle
|
|
242074
242082
|
*/
|
|
242075
|
-
static boundaryOfVisibleSubset(polyface, visibilitySelect, vectorToEye, sideAngleTolerance =
|
|
242083
|
+
static boundaryOfVisibleSubset(polyface, visibilitySelect, vectorToEye, sideAngleTolerance = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createDegrees(1.0e-3)) {
|
|
242076
242084
|
const partitionedIndices = this.partitionFacetIndicesByVisibilityVector(polyface, vectorToEye, sideAngleTolerance);
|
|
242077
242085
|
if (partitionedIndices[visibilitySelect].length === 0)
|
|
242078
242086
|
return undefined;
|
|
242079
|
-
const visitor =
|
|
242087
|
+
const visitor = _IndexedPolyfaceVisitor__WEBPACK_IMPORTED_MODULE_16__.IndexedPolyfaceSubsetVisitor.createSubsetVisitor(polyface, partitionedIndices[visibilitySelect], 1);
|
|
242080
242088
|
return this.boundaryEdges(visitor, true, false, false);
|
|
242081
242089
|
}
|
|
242082
242090
|
/**
|
|
242083
242091
|
* Search for edges with only 1 adjacent facet.
|
|
242084
|
-
* *
|
|
242085
|
-
* * Emit the
|
|
242092
|
+
* * Accumulate them into chains.
|
|
242093
|
+
* * Emit the chains to the `announceChain` callback.
|
|
242086
242094
|
*/
|
|
242087
|
-
static announceBoundaryChainsAsLineString3d(mesh,
|
|
242088
|
-
const collector = new
|
|
242089
|
-
PolyfaceQuery.announceBoundaryEdges(mesh, (pointA, pointB, _indexA, _indexB) => collector.captureCurve(
|
|
242090
|
-
collector.announceChainsAsLineString3d(
|
|
242095
|
+
static announceBoundaryChainsAsLineString3d(mesh, announceChain) {
|
|
242096
|
+
const collector = new _curve_internalContexts_MultiChainCollector__WEBPACK_IMPORTED_MODULE_13__.MultiChainCollector(_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance); // no planarity tolerance needed
|
|
242097
|
+
PolyfaceQuery.announceBoundaryEdges(mesh, (pointA, pointB, _indexA, _indexB) => collector.captureCurve(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d.create(pointA, pointB)), true, false, false);
|
|
242098
|
+
collector.announceChainsAsLineString3d(announceChain);
|
|
242091
242099
|
}
|
|
242092
242100
|
/**
|
|
242093
242101
|
* Return a mesh with
|
|
242094
|
-
* * clusters of adjacent, coplanar facets merged into larger facets.
|
|
242095
|
-
* * other facets
|
|
242102
|
+
* * clusters of adjacent, coplanar facets merged into larger (possibly non-convex) facets.
|
|
242103
|
+
* * other facets are unchanged.
|
|
242096
242104
|
* @param mesh existing mesh or visitor.
|
|
242097
242105
|
* @param maxSmoothEdgeAngle maximum dihedral angle across an edge between facets deemed coplanar. If undefined,
|
|
242098
242106
|
* uses `Geometry.smallAngleRadians`.
|
|
242099
242107
|
*/
|
|
242100
242108
|
static cloneWithMaximalPlanarFacets(mesh, maxSmoothEdgeAngle) {
|
|
242101
|
-
if (mesh instanceof
|
|
242109
|
+
if (mesh instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
242102
242110
|
return this.cloneWithMaximalPlanarFacets(mesh.createVisitor(0), maxSmoothEdgeAngle);
|
|
242103
242111
|
const numFacets = PolyfaceQuery.visitorClientFacetCount(mesh);
|
|
242104
242112
|
const smoothEdges = PolyfaceQuery.collectEdgesByDihedralAngle(mesh, maxSmoothEdgeAngle);
|
|
242105
242113
|
const partitions = PolyfaceQuery.partitionFacetIndicesBySortableEdgeClusters(smoothEdges, numFacets);
|
|
242106
|
-
const builder =
|
|
242114
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_17__.PolyfaceBuilder.create();
|
|
242107
242115
|
const visitor = mesh;
|
|
242108
242116
|
const planarPartitions = [];
|
|
242117
|
+
const partitionNormals = []; // average normal in each nontrivial partition
|
|
242118
|
+
const normal = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createZero();
|
|
242109
242119
|
for (const partition of partitions) {
|
|
242110
242120
|
if (partition.length === 1) {
|
|
242111
242121
|
if (visitor.moveToReadIndex(partition[0]))
|
|
242112
242122
|
builder.addFacetFromVisitor(visitor);
|
|
242113
242123
|
}
|
|
242114
|
-
else {
|
|
242115
|
-
|
|
242124
|
+
else if (partition.length > 1) { // nontrivial set of contiguous coplanar facets
|
|
242125
|
+
const averageNormal = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createZero();
|
|
242126
|
+
const point0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero();
|
|
242127
|
+
if (visitor.moveToReadIndex(partition[0]))
|
|
242128
|
+
visitor.point.getPoint3dAtCheckedPointIndex(0, point0);
|
|
242129
|
+
for (const facetIndex of partition) {
|
|
242130
|
+
if (visitor.moveToReadIndex(facetIndex))
|
|
242131
|
+
if (_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.areaNormalGo(visitor.point, normal))
|
|
242132
|
+
averageNormal.addInPlace(normal);
|
|
242133
|
+
}
|
|
242134
|
+
partitionNormals.push(_geometry3d_Ray3d__WEBPACK_IMPORTED_MODULE_18__.Ray3d.createCapture(point0, averageNormal));
|
|
242116
242135
|
planarPartitions.push(partition);
|
|
242117
242136
|
}
|
|
242118
242137
|
}
|
|
242119
242138
|
const fragmentPolyfaces = PolyfaceQuery.clonePartitions(mesh, planarPartitions);
|
|
242139
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(planarPartitions.length === partitionNormals.length);
|
|
242140
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(planarPartitions.length === fragmentPolyfaces.length);
|
|
242120
242141
|
const gapTolerance = 1.0e-4;
|
|
242121
242142
|
const planarityTolerance = 1.0e-4;
|
|
242122
|
-
|
|
242143
|
+
const localToWorld = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_19__.Transform.createIdentity();
|
|
242144
|
+
const worldToLocal = _geometry3d_Transform__WEBPACK_IMPORTED_MODULE_19__.Transform.createIdentity();
|
|
242145
|
+
for (let i = 0; i < fragmentPolyfaces.length; ++i) {
|
|
242146
|
+
const fragment = fragmentPolyfaces[i];
|
|
242123
242147
|
const edges = [];
|
|
242124
242148
|
const edgeStrings = [];
|
|
242125
242149
|
PolyfaceQuery.announceBoundaryEdges(fragment, (pointA, pointB, _indexA, _indexB) => {
|
|
242126
|
-
edges.push(
|
|
242150
|
+
edges.push(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d.create(pointA, pointB));
|
|
242127
242151
|
edgeStrings.push([pointA.clone(), pointB.clone()]);
|
|
242128
|
-
});
|
|
242129
|
-
const chains =
|
|
242152
|
+
}, true, false, false);
|
|
242153
|
+
const chains = _curve_CurveOps__WEBPACK_IMPORTED_MODULE_20__.CurveOps.collectChains(edges, gapTolerance, planarityTolerance);
|
|
242130
242154
|
if (chains) {
|
|
242131
|
-
|
|
242132
|
-
|
|
242133
|
-
|
|
242134
|
-
|
|
242135
|
-
|
|
242136
|
-
if
|
|
242137
|
-
|
|
242138
|
-
|
|
242139
|
-
|
|
242140
|
-
|
|
242141
|
-
|
|
242142
|
-
|
|
242143
|
-
|
|
242144
|
-
|
|
242155
|
+
// avoid FrameBuilder: it can flip the normal of a nonconvex facet!
|
|
242156
|
+
partitionNormals[i].toRigidZFrame(localToWorld);
|
|
242157
|
+
if (localToWorld.inverse(worldToLocal)) {
|
|
242158
|
+
worldToLocal.multiplyPoint3dArrayArrayInPlace(edgeStrings);
|
|
242159
|
+
// Regularize adds bridge edges to holes, and adds other edges to aid triangulation.
|
|
242160
|
+
// But we aren't triangulating here. So if we don't have holes, we can skip regularization
|
|
242161
|
+
// to avoid splitting the loop.
|
|
242162
|
+
const regularize = !(chains instanceof _curve_Loop__WEBPACK_IMPORTED_MODULE_5__.Loop);
|
|
242163
|
+
const graph = _topology_Merging__WEBPACK_IMPORTED_MODULE_21__.HalfEdgeGraphMerge.formGraphFromChains(edgeStrings, regularize, _topology_Graph__WEBPACK_IMPORTED_MODULE_22__.HalfEdgeMask.BOUNDARY_EDGE);
|
|
242164
|
+
if (graph) {
|
|
242165
|
+
_topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_23__.HalfEdgeGraphSearch.collectConnectedComponentsWithExteriorParityMasks(graph, new _topology_HalfEdgeGraphSearch__WEBPACK_IMPORTED_MODULE_23__.HalfEdgeMaskTester(_topology_Graph__WEBPACK_IMPORTED_MODULE_22__.HalfEdgeMask.BOUNDARY_EDGE), _topology_Graph__WEBPACK_IMPORTED_MODULE_22__.HalfEdgeMask.EXTERIOR);
|
|
242166
|
+
// this.purgeNullFaces(HalfEdgeMask.EXTERIOR);
|
|
242167
|
+
const polyface1 = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_17__.PolyfaceBuilder.graphToPolyface(graph);
|
|
242168
|
+
builder.addIndexedPolyface(polyface1, false, localToWorld);
|
|
242145
242169
|
}
|
|
242146
242170
|
}
|
|
242147
242171
|
}
|
|
@@ -242164,9 +242188,9 @@ class PolyfaceQuery {
|
|
|
242164
242188
|
* @param unfilledChains optional array to receive the points around holes that were not filled.
|
|
242165
242189
|
*/
|
|
242166
242190
|
static fillSimpleHoles(mesh, options, unfilledChains) {
|
|
242167
|
-
if (mesh instanceof
|
|
242191
|
+
if (mesh instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
242168
242192
|
return this.fillSimpleHoles(mesh.createVisitor(0), options, unfilledChains);
|
|
242169
|
-
const builder =
|
|
242193
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_17__.PolyfaceBuilder.create();
|
|
242170
242194
|
const chains = [];
|
|
242171
242195
|
PolyfaceQuery.announceBoundaryChainsAsLineString3d(mesh, (ls) => { ls.reverseInPlace(); chains.push(ls); });
|
|
242172
242196
|
for (const c of chains) {
|
|
@@ -242176,11 +242200,11 @@ class PolyfaceQuery {
|
|
|
242176
242200
|
rejected = true;
|
|
242177
242201
|
else if (options.maxEdgesAroundHole !== undefined && points.length > options.maxEdgesAroundHole)
|
|
242178
242202
|
rejected = true;
|
|
242179
|
-
else if (options.maxPerimeter !== undefined &&
|
|
242203
|
+
else if (options.maxPerimeter !== undefined && _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_24__.Point3dArray.sumEdgeLengths(points, false) > options.maxPerimeter)
|
|
242180
242204
|
rejected = true;
|
|
242181
|
-
else if (options.upVector !== undefined &&
|
|
242205
|
+
else if (options.upVector !== undefined && _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.sumTriangleAreasPerpendicularToUpVector(points, options.upVector) <= 0.0)
|
|
242182
242206
|
rejected = true;
|
|
242183
|
-
if (!rejected &&
|
|
242207
|
+
if (!rejected && _topology_SpaceTriangulation__WEBPACK_IMPORTED_MODULE_25__.SpacePolygonTriangulation.triangulateSimplestSpaceLoop(points, (_loop, triangles) => {
|
|
242184
242208
|
for (const t of triangles)
|
|
242185
242209
|
builder.addPolygon(t);
|
|
242186
242210
|
})) {
|
|
@@ -242199,18 +242223,18 @@ class PolyfaceQuery {
|
|
|
242199
242223
|
}
|
|
242200
242224
|
/** Clone the facets in each partition to a separate polyface. */
|
|
242201
242225
|
static clonePartitions(polyface, partitions) {
|
|
242202
|
-
if (polyface instanceof
|
|
242226
|
+
if (polyface instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface) {
|
|
242203
242227
|
return this.clonePartitions(polyface.createVisitor(0), partitions);
|
|
242204
242228
|
}
|
|
242205
242229
|
polyface.setNumWrap(0);
|
|
242206
242230
|
const polyfaces = [];
|
|
242207
|
-
const options =
|
|
242231
|
+
const options = _curve_StrokeOptions__WEBPACK_IMPORTED_MODULE_26__.StrokeOptions.createForFacets();
|
|
242208
242232
|
options.needNormals = polyface.normal !== undefined;
|
|
242209
242233
|
options.needParams = polyface.param !== undefined;
|
|
242210
242234
|
options.needColors = polyface.color !== undefined;
|
|
242211
242235
|
options.needTwoSided = polyface.twoSided;
|
|
242212
242236
|
for (const partition of partitions) {
|
|
242213
|
-
const builder =
|
|
242237
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_17__.PolyfaceBuilder.create(options);
|
|
242214
242238
|
polyface.reset();
|
|
242215
242239
|
for (const facetIndex of partition) {
|
|
242216
242240
|
polyface.moveToReadIndex(facetIndex);
|
|
@@ -242222,16 +242246,16 @@ class PolyfaceQuery {
|
|
|
242222
242246
|
}
|
|
242223
242247
|
/** Clone facets that pass a filter function. */
|
|
242224
242248
|
static cloneFiltered(source, filter) {
|
|
242225
|
-
if (source instanceof
|
|
242249
|
+
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface) {
|
|
242226
242250
|
return this.cloneFiltered(source.createVisitor(0), filter);
|
|
242227
242251
|
}
|
|
242228
242252
|
source.setNumWrap(0);
|
|
242229
|
-
const options =
|
|
242253
|
+
const options = _curve_StrokeOptions__WEBPACK_IMPORTED_MODULE_26__.StrokeOptions.createForFacets();
|
|
242230
242254
|
options.needNormals = source.normal !== undefined;
|
|
242231
242255
|
options.needParams = source.param !== undefined;
|
|
242232
242256
|
options.needColors = source.color !== undefined;
|
|
242233
242257
|
options.needTwoSided = source.twoSided;
|
|
242234
|
-
const builder =
|
|
242258
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_17__.PolyfaceBuilder.create(options);
|
|
242235
242259
|
source.reset();
|
|
242236
242260
|
for (; source.moveToNextFacet();) {
|
|
242237
242261
|
if (filter(source))
|
|
@@ -242241,14 +242265,14 @@ class PolyfaceQuery {
|
|
|
242241
242265
|
}
|
|
242242
242266
|
/** Clone the facets with in-facet dangling edges removed. */
|
|
242243
242267
|
static cloneWithDanglingEdgesRemoved(source) {
|
|
242244
|
-
if (source instanceof
|
|
242268
|
+
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
242245
242269
|
return this.cloneWithDanglingEdgesRemoved(source.createVisitor(0));
|
|
242246
|
-
const options =
|
|
242270
|
+
const options = _curve_StrokeOptions__WEBPACK_IMPORTED_MODULE_26__.StrokeOptions.createForFacets();
|
|
242247
242271
|
options.needNormals = source.normal !== undefined;
|
|
242248
242272
|
options.needParams = source.param !== undefined;
|
|
242249
242273
|
options.needColors = source.color !== undefined;
|
|
242250
242274
|
options.needTwoSided = source.twoSided;
|
|
242251
|
-
const builder =
|
|
242275
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_17__.PolyfaceBuilder.create(options);
|
|
242252
242276
|
// Finds an odd palindrome in data as indexed by indices.
|
|
242253
242277
|
// An odd palindrome in a face loop corresponds to dangling edges in the face.
|
|
242254
242278
|
// If one is found, indices is mutated to excise the palindrome (data is untouched).
|
|
@@ -242295,7 +242319,7 @@ class PolyfaceQuery {
|
|
|
242295
242319
|
* * If `source` is a visitor, this is an upper bound on the number of addressed mesh vertices.
|
|
242296
242320
|
*/
|
|
242297
242321
|
static visitorClientPointCount(source) {
|
|
242298
|
-
if (source instanceof
|
|
242322
|
+
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
242299
242323
|
return source.data.point.length;
|
|
242300
242324
|
const polyface = source.clientPolyface();
|
|
242301
242325
|
if (polyface !== undefined)
|
|
@@ -242316,7 +242340,7 @@ class PolyfaceQuery {
|
|
|
242316
242340
|
* * If `source` is a visitor, this is the number of facets it can visit.
|
|
242317
242341
|
*/
|
|
242318
242342
|
static visitorClientFacetCount(source) {
|
|
242319
|
-
if (source instanceof
|
|
242343
|
+
if (source instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface) {
|
|
242320
242344
|
if (source.facetCount !== undefined)
|
|
242321
242345
|
return source.facetCount;
|
|
242322
242346
|
source = source.createVisitor(0);
|
|
@@ -242342,9 +242366,9 @@ class PolyfaceQuery {
|
|
|
242342
242366
|
* @return collection of facet index arrays, one array per connected component.
|
|
242343
242367
|
*/
|
|
242344
242368
|
static partitionFacetIndicesBySortableEdgeClusters(edgeClusters, numFacets) {
|
|
242345
|
-
const context = new
|
|
242369
|
+
const context = new _numerics_UnionFind__WEBPACK_IMPORTED_MODULE_15__.UnionFindContext(numFacets);
|
|
242346
242370
|
for (const cluster of edgeClusters) {
|
|
242347
|
-
if (cluster instanceof
|
|
242371
|
+
if (cluster instanceof _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__.SortableEdge) {
|
|
242348
242372
|
// this edge does not connect anywhere. Ignore it!!
|
|
242349
242373
|
}
|
|
242350
242374
|
else {
|
|
@@ -242378,11 +242402,11 @@ class PolyfaceQuery {
|
|
|
242378
242402
|
* @return collection of facet index arrays, one per connected component.
|
|
242379
242403
|
*/
|
|
242380
242404
|
static partitionFacetIndicesByEdgeConnectedComponent(polyface, stopAtVisibleEdges = false) {
|
|
242381
|
-
if (polyface instanceof
|
|
242405
|
+
if (polyface instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface) {
|
|
242382
242406
|
return this.partitionFacetIndicesByEdgeConnectedComponent(polyface.createVisitor(0), stopAtVisibleEdges);
|
|
242383
242407
|
}
|
|
242384
242408
|
polyface.setNumWrap(1);
|
|
242385
|
-
const matcher = new
|
|
242409
|
+
const matcher = new _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__.IndexedEdgeMatcher();
|
|
242386
242410
|
polyface.reset();
|
|
242387
242411
|
let numFacets = 0;
|
|
242388
242412
|
while (polyface.moveToNextFacet()) {
|
|
@@ -242406,7 +242430,7 @@ class PolyfaceQuery {
|
|
|
242406
242430
|
* * Input facets are ASSUMED to be convex and planar, and not overlap in the z direction.
|
|
242407
242431
|
*/
|
|
242408
242432
|
static sweepLineStringToFacetsXYReturnSweptFacets(lineStringPoints, polyface) {
|
|
242409
|
-
const builder =
|
|
242433
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_17__.PolyfaceBuilder.create();
|
|
242410
242434
|
this.announceSweepLinestringToConvexPolyfaceXY(lineStringPoints, polyface, (_linestring, _segmentIndex, _polyface, _facetIndex, points) => {
|
|
242411
242435
|
if (points.length === 4)
|
|
242412
242436
|
builder.addQuadFacet(points);
|
|
@@ -242430,26 +242454,26 @@ class PolyfaceQuery {
|
|
|
242430
242454
|
let result = [];
|
|
242431
242455
|
// setup default options
|
|
242432
242456
|
if (options === undefined)
|
|
242433
|
-
options = SweepLineStringToFacetsOptions.create(
|
|
242457
|
+
options = SweepLineStringToFacetsOptions.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createRadians(_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallAngleRadians), // tight geometry tolerance for vertical side facets
|
|
242434
242458
|
true, true, true, true);
|
|
242435
242459
|
let chainContext;
|
|
242436
242460
|
if (options.assembleChains)
|
|
242437
|
-
chainContext =
|
|
242438
|
-
const context =
|
|
242461
|
+
chainContext = _topology_ChainMerge__WEBPACK_IMPORTED_MODULE_27__.ChainMergeContext.create();
|
|
242462
|
+
const context = _multiclip_SweepLineStringToFacetContext__WEBPACK_IMPORTED_MODULE_14__.ClipSweptLineStringContext.create(linestringPoints, options.vectorToEye);
|
|
242439
242463
|
if (context) {
|
|
242440
242464
|
let visitor;
|
|
242441
|
-
if (polyfaceOrVisitor instanceof
|
|
242465
|
+
if (polyfaceOrVisitor instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
242442
242466
|
visitor = polyfaceOrVisitor.createVisitor(0);
|
|
242443
242467
|
else
|
|
242444
242468
|
visitor = polyfaceOrVisitor;
|
|
242445
|
-
const workNormal =
|
|
242469
|
+
const workNormal = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createZero();
|
|
242446
242470
|
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
242447
|
-
if (options.collectFromThisFacetNormal(
|
|
242471
|
+
if (options.collectFromThisFacetNormal(_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.areaNormalGo(visitor.point, workNormal))) {
|
|
242448
242472
|
context.processPolygon(visitor.point.getArray(), (pointA, pointB) => {
|
|
242449
242473
|
if (chainContext !== undefined)
|
|
242450
242474
|
chainContext.addSegment(pointA, pointB);
|
|
242451
242475
|
else
|
|
242452
|
-
result.push(
|
|
242476
|
+
result.push(_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d.create(pointA, pointB));
|
|
242453
242477
|
});
|
|
242454
242478
|
}
|
|
242455
242479
|
}
|
|
@@ -242477,25 +242501,25 @@ class PolyfaceQuery {
|
|
|
242477
242501
|
* @returns the collected line strings.
|
|
242478
242502
|
*/
|
|
242479
242503
|
static sweepLineStringToFacetsXY(lineStringPoints, polyfaceOrVisitor, searchByReadIndex) {
|
|
242480
|
-
const chainContext =
|
|
242481
|
-
const sweepVector =
|
|
242482
|
-
const searchRange =
|
|
242504
|
+
const chainContext = _topology_ChainMerge__WEBPACK_IMPORTED_MODULE_27__.ChainMergeContext.create();
|
|
242505
|
+
const sweepVector = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(0, 0, 1);
|
|
242506
|
+
const searchRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_28__.Range3d.create();
|
|
242483
242507
|
let visitor;
|
|
242484
|
-
if (polyfaceOrVisitor instanceof
|
|
242508
|
+
if (polyfaceOrVisitor instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
242485
242509
|
visitor = polyfaceOrVisitor.createVisitor(0);
|
|
242486
242510
|
else
|
|
242487
242511
|
visitor = polyfaceOrVisitor;
|
|
242488
242512
|
let lineStringSource;
|
|
242489
242513
|
if (Array.isArray(lineStringPoints))
|
|
242490
|
-
lineStringSource = new
|
|
242514
|
+
lineStringSource = new _geometry3d_Point3dArrayCarrier__WEBPACK_IMPORTED_MODULE_29__.Point3dArrayCarrier(lineStringPoints);
|
|
242491
242515
|
else
|
|
242492
242516
|
lineStringSource = lineStringPoints;
|
|
242493
242517
|
for (let i = 1; i < lineStringSource.length; i++) {
|
|
242494
242518
|
const point0 = lineStringSource.getPoint3dAtUncheckedPointIndex(i - 1);
|
|
242495
242519
|
const point1 = lineStringSource.getPoint3dAtUncheckedPointIndex(i);
|
|
242496
|
-
const edgeClipper =
|
|
242520
|
+
const edgeClipper = _multiclip_SweepLineStringToFacetContext__WEBPACK_IMPORTED_MODULE_14__.EdgeClipData.createPointPointSweep(point0, point1, sweepVector);
|
|
242497
242521
|
if (edgeClipper !== undefined) {
|
|
242498
|
-
|
|
242522
|
+
_geometry3d_Range__WEBPACK_IMPORTED_MODULE_28__.Range3d.createNull(searchRange);
|
|
242499
242523
|
searchRange.extendPoint(point0);
|
|
242500
242524
|
searchRange.extendPoint(point1);
|
|
242501
242525
|
searchByReadIndex.searchRange2d(searchRange, (_facetRange, readIndex) => {
|
|
@@ -242516,7 +242540,7 @@ class PolyfaceQuery {
|
|
|
242516
242540
|
* @deprecated in 4.x. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
|
|
242517
242541
|
*/
|
|
242518
242542
|
static sweepLinestringToFacetsXYReturnLines(linestringPoints, polyface) {
|
|
242519
|
-
const options = SweepLineStringToFacetsOptions.create(
|
|
242543
|
+
const options = SweepLineStringToFacetsOptions.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createSmallAngle(), false, true, true, true);
|
|
242520
242544
|
const result = PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface, options);
|
|
242521
242545
|
return result;
|
|
242522
242546
|
}
|
|
@@ -242528,7 +242552,7 @@ class PolyfaceQuery {
|
|
|
242528
242552
|
* @deprecated in 4.x. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
|
|
242529
242553
|
*/
|
|
242530
242554
|
static sweepLinestringToFacetsXYReturnChains(linestringPoints, polyface) {
|
|
242531
|
-
const options = SweepLineStringToFacetsOptions.create(
|
|
242555
|
+
const options = SweepLineStringToFacetsOptions.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createSmallAngle(), true, true, true, true);
|
|
242532
242556
|
const result = PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface, options);
|
|
242533
242557
|
return result;
|
|
242534
242558
|
}
|
|
@@ -242542,7 +242566,7 @@ class PolyfaceQuery {
|
|
|
242542
242566
|
* * Facets are ASSUMED to be convex and planar, and not overlap in the z direction.
|
|
242543
242567
|
*/
|
|
242544
242568
|
static async asyncSweepLinestringToFacetsXYReturnChains(linestringPoints, polyface) {
|
|
242545
|
-
const chainContext =
|
|
242569
|
+
const chainContext = _topology_ChainMerge__WEBPACK_IMPORTED_MODULE_27__.ChainMergeContext.create();
|
|
242546
242570
|
await Promise.resolve(this.asyncAnnounceSweepLinestringToConvexPolyfaceXY(linestringPoints, polyface, (_linestring, _segmentIndex, _polyface, _facetIndex, points, indexA, indexB) => {
|
|
242547
242571
|
chainContext.addSegment(points[indexA], points[indexB]);
|
|
242548
242572
|
}));
|
|
@@ -242555,10 +242579,10 @@ class PolyfaceQuery {
|
|
|
242555
242579
|
* * Return statistical summary of x,y,z ranges.
|
|
242556
242580
|
*/
|
|
242557
242581
|
static collectRangeLengthData(polyface) {
|
|
242558
|
-
if (polyface instanceof
|
|
242582
|
+
if (polyface instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface) {
|
|
242559
242583
|
return this.collectRangeLengthData(polyface.createVisitor(0));
|
|
242560
242584
|
}
|
|
242561
|
-
const rangeData = new
|
|
242585
|
+
const rangeData = new _RangeLengthData__WEBPACK_IMPORTED_MODULE_30__.RangeLengthData();
|
|
242562
242586
|
// polyface is a visitor
|
|
242563
242587
|
for (polyface.reset(); polyface.moveToNextFacet();)
|
|
242564
242588
|
rangeData.accumulateGrowableXYZArrayRange(polyface.point);
|
|
@@ -242571,13 +242595,13 @@ class PolyfaceQuery {
|
|
|
242571
242595
|
static cloneWithTVertexFixup(polyface) {
|
|
242572
242596
|
const oldFacetVisitor = polyface.createVisitor(1); // this is to visit the existing facets
|
|
242573
242597
|
const newFacetVisitor = polyface.createVisitor(0); // this is to build the new facets
|
|
242574
|
-
const rangeSearcher =
|
|
242575
|
-
const builder =
|
|
242576
|
-
const edgeRange =
|
|
242577
|
-
const point0 =
|
|
242578
|
-
const point1 =
|
|
242579
|
-
const spacePoint =
|
|
242580
|
-
const segment =
|
|
242598
|
+
const rangeSearcher = _multiclip_XYPointBuckets__WEBPACK_IMPORTED_MODULE_31__.XYPointBuckets.create(polyface.data.point, 30);
|
|
242599
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_17__.PolyfaceBuilder.create();
|
|
242600
|
+
const edgeRange = _geometry3d_Range__WEBPACK_IMPORTED_MODULE_28__.Range3d.createNull();
|
|
242601
|
+
const point0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
242602
|
+
const point1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
242603
|
+
const spacePoint = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
242604
|
+
const segment = _curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d.create(point0, point1);
|
|
242581
242605
|
for (oldFacetVisitor.reset(); oldFacetVisitor.moveToNextFacet();) {
|
|
242582
242606
|
newFacetVisitor.clearArrays();
|
|
242583
242607
|
for (let i = 0; i + 1 < oldFacetVisitor.point.length; i++) {
|
|
@@ -242586,11 +242610,11 @@ class PolyfaceQuery {
|
|
|
242586
242610
|
oldFacetVisitor.point.getPoint3dAtUncheckedPointIndex(i + 1, point1);
|
|
242587
242611
|
newFacetVisitor.pushDataFrom(oldFacetVisitor, i);
|
|
242588
242612
|
edgeRange.setNull();
|
|
242589
|
-
|
|
242613
|
+
_curve_LineSegment3d__WEBPACK_IMPORTED_MODULE_12__.LineSegment3d.create(point0, point1, segment);
|
|
242590
242614
|
let detailArray;
|
|
242591
242615
|
edgeRange.extend(point0);
|
|
242592
242616
|
edgeRange.extend(point1);
|
|
242593
|
-
edgeRange.ensureMinLengths(
|
|
242617
|
+
edgeRange.ensureMinLengths(_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance); // add some slop in case segment is axis-aligned
|
|
242594
242618
|
rangeSearcher.announcePointsInRange(edgeRange, (index, _x, _y, _z) => {
|
|
242595
242619
|
// x,y,z has x,y within the range of the search; test for exact on (in full 3d)
|
|
242596
242620
|
polyface.data.point.getPoint3dAtUncheckedPointIndex(index, spacePoint);
|
|
@@ -242705,7 +242729,7 @@ class PolyfaceQuery {
|
|
|
242705
242729
|
* @param clusterSelector indicates whether to copy 0, 1, or all facets in each cluster of duplicate facets.
|
|
242706
242730
|
*/
|
|
242707
242731
|
static cloneByFacetDuplication(source, includeSingletons, clusterSelector) {
|
|
242708
|
-
const builder =
|
|
242732
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_17__.PolyfaceBuilder.create();
|
|
242709
242733
|
const visitor = source.createVisitor(0);
|
|
242710
242734
|
this.announceDuplicateFacetIndices(source, (clusterFacetIndices) => {
|
|
242711
242735
|
let numToSelect = 0;
|
|
@@ -242732,9 +242756,9 @@ class PolyfaceQuery {
|
|
|
242732
242756
|
static cloneWithColinearEdgeFixup(polyface) {
|
|
242733
242757
|
const oldFacetVisitor = polyface.createVisitor(2); // this is to visit the existing facets
|
|
242734
242758
|
const newFacetVisitor = polyface.createVisitor(0); // this is to build the new facets
|
|
242735
|
-
const builder =
|
|
242736
|
-
const vector01 =
|
|
242737
|
-
const vector12 =
|
|
242759
|
+
const builder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_17__.PolyfaceBuilder.create();
|
|
242760
|
+
const vector01 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
242761
|
+
const vector12 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
242738
242762
|
const numPoint = polyface.data.point.length;
|
|
242739
242763
|
const pointState = new Int32Array(numPoint);
|
|
242740
242764
|
// FIRST PASS: in each sector of each facet, determine if the sector has colinear incoming and outgoing vectors.
|
|
@@ -242781,7 +242805,7 @@ class PolyfaceQuery {
|
|
|
242781
242805
|
*/
|
|
242782
242806
|
static setEdgeVisibility(polyface, clusters, value) {
|
|
242783
242807
|
for (const cluster of clusters) {
|
|
242784
|
-
if (cluster instanceof
|
|
242808
|
+
if (cluster instanceof _IndexedEdgeMatcher__WEBPACK_IMPORTED_MODULE_11__.SortableEdge) {
|
|
242785
242809
|
this.setSingleEdgeVisibility(polyface, cluster.facetIndex, cluster.vertexIndexA, value);
|
|
242786
242810
|
}
|
|
242787
242811
|
else if (Array.isArray(cluster)) {
|
|
@@ -242829,17 +242853,17 @@ class PolyfaceQuery {
|
|
|
242829
242853
|
* @param sharpEdges true to reverse the angle threshold test and return sharp edges; otherwise return smooth edges (default).
|
|
242830
242854
|
*/
|
|
242831
242855
|
static collectEdgesByDihedralAngle(mesh, maxSmoothEdgeAngle, sharpEdges = false) {
|
|
242832
|
-
if (mesh instanceof
|
|
242856
|
+
if (mesh instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
242833
242857
|
return this.collectEdgesByDihedralAngle(mesh.createVisitor(1), maxSmoothEdgeAngle, sharpEdges);
|
|
242834
242858
|
mesh.setNumWrap(1);
|
|
242835
242859
|
const allEdges = this.createIndexedEdges(mesh);
|
|
242836
242860
|
const manifoldEdges = [];
|
|
242837
242861
|
allEdges.sortAndCollectClusters(manifoldEdges);
|
|
242838
242862
|
if (undefined === maxSmoothEdgeAngle || maxSmoothEdgeAngle.radians < 0)
|
|
242839
|
-
maxSmoothEdgeAngle =
|
|
242863
|
+
maxSmoothEdgeAngle = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createRadians(_Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallAngleRadians);
|
|
242840
242864
|
const outEdges = [];
|
|
242841
|
-
const normal0 =
|
|
242842
|
-
const normal1 =
|
|
242865
|
+
const normal0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
242866
|
+
const normal1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
242843
242867
|
for (const pair of manifoldEdges) {
|
|
242844
242868
|
if (Array.isArray(pair) && pair.length === 2) {
|
|
242845
242869
|
const e0 = pair[0];
|
|
@@ -242878,8 +242902,8 @@ class PolyfaceQuery {
|
|
|
242878
242902
|
this.markAllEdgeVisibility(mesh, false);
|
|
242879
242903
|
this.setEdgeVisibility(mesh, boundaryEdges, true);
|
|
242880
242904
|
if (sharpEdgeAngle !== undefined) {
|
|
242881
|
-
const normal0 =
|
|
242882
|
-
const normal1 =
|
|
242905
|
+
const normal0 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
242906
|
+
const normal1 = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
242883
242907
|
for (const pair of pairedEdges) {
|
|
242884
242908
|
if (Array.isArray(pair) && pair.length === 2) {
|
|
242885
242909
|
const e0 = pair[0];
|
|
@@ -242902,9 +242926,9 @@ class PolyfaceQuery {
|
|
|
242902
242926
|
*/
|
|
242903
242927
|
static computeFacetUnitNormal(visitor, facetIndex, result) {
|
|
242904
242928
|
if (!result)
|
|
242905
|
-
result =
|
|
242929
|
+
result = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
242906
242930
|
if (visitor.moveToReadIndex(facetIndex)) {
|
|
242907
|
-
if (
|
|
242931
|
+
if (_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.unitNormal(visitor.point, result))
|
|
242908
242932
|
return result;
|
|
242909
242933
|
}
|
|
242910
242934
|
return undefined;
|
|
@@ -242925,13 +242949,13 @@ class PolyfaceQuery {
|
|
|
242925
242949
|
* @internal
|
|
242926
242950
|
*/
|
|
242927
242951
|
static convertToHalfEdgeGraph(mesh) {
|
|
242928
|
-
const builder = new
|
|
242952
|
+
const builder = new _topology_HalfEdgeGraphFromIndexedLoopsContext__WEBPACK_IMPORTED_MODULE_32__.HalfEdgeGraphFromIndexedLoopsContext();
|
|
242929
242953
|
const visitor = mesh.createVisitor(0);
|
|
242930
242954
|
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
242931
242955
|
builder.insertLoop(visitor.pointIndex);
|
|
242932
242956
|
}
|
|
242933
242957
|
const graph = builder.graph;
|
|
242934
|
-
const xyz =
|
|
242958
|
+
const xyz = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create();
|
|
242935
242959
|
graph.announceNodes((_graph, halfEdge) => {
|
|
242936
242960
|
const vertexIndex = halfEdge.i;
|
|
242937
242961
|
mesh.data.getPoint(vertexIndex, xyz);
|
|
@@ -242942,11 +242966,11 @@ class PolyfaceQuery {
|
|
|
242942
242966
|
}
|
|
242943
242967
|
/** Examine adjacent facet orientations throughout the mesh. If possible, reverse a subset to achieve proper pairing. */
|
|
242944
242968
|
static reorientVertexOrderAroundFacetsForConsistentOrientation(mesh) {
|
|
242945
|
-
return
|
|
242969
|
+
return _FacetOrientation__WEBPACK_IMPORTED_MODULE_33__.FacetOrientationFixup.doFixup(mesh);
|
|
242946
242970
|
}
|
|
242947
242971
|
/** Set up indexed normals with one normal in the plane of each facet of the mesh. */
|
|
242948
242972
|
static buildPerFaceNormals(polyface) {
|
|
242949
|
-
|
|
242973
|
+
_multiclip_BuildAverageNormalsContext__WEBPACK_IMPORTED_MODULE_34__.BuildAverageNormalsContext.buildPerFaceNormals(polyface);
|
|
242950
242974
|
}
|
|
242951
242975
|
/**
|
|
242952
242976
|
* * At each vertex of the mesh:
|
|
@@ -242959,8 +242983,8 @@ class PolyfaceQuery {
|
|
|
242959
242983
|
* @param polyface polyface to update.
|
|
242960
242984
|
* @param toleranceAngle averaging is done between normals up to this angle.
|
|
242961
242985
|
*/
|
|
242962
|
-
static buildAverageNormals(polyface, toleranceAngle =
|
|
242963
|
-
|
|
242986
|
+
static buildAverageNormals(polyface, toleranceAngle = _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createDegrees(31.0)) {
|
|
242987
|
+
_multiclip_BuildAverageNormalsContext__WEBPACK_IMPORTED_MODULE_34__.BuildAverageNormalsContext.buildFastAverageNormals(polyface, toleranceAngle);
|
|
242964
242988
|
}
|
|
242965
242989
|
/**
|
|
242966
242990
|
* Offset the faces of the mesh.
|
|
@@ -242970,9 +242994,9 @@ class PolyfaceQuery {
|
|
|
242970
242994
|
* @returns shifted mesh.
|
|
242971
242995
|
*/
|
|
242972
242996
|
static cloneOffset(source, signedOffsetDistance, offsetOptions = OffsetMeshOptions.create()) {
|
|
242973
|
-
const strokeOptions =
|
|
242974
|
-
const offsetBuilder =
|
|
242975
|
-
|
|
242997
|
+
const strokeOptions = _curve_StrokeOptions__WEBPACK_IMPORTED_MODULE_26__.StrokeOptions.createForFacets();
|
|
242998
|
+
const offsetBuilder = _PolyfaceBuilder__WEBPACK_IMPORTED_MODULE_17__.PolyfaceBuilder.create(strokeOptions);
|
|
242999
|
+
_multiclip_OffsetMeshContext__WEBPACK_IMPORTED_MODULE_35__.OffsetMeshContext.buildOffsetMeshWithEdgeChamfers(source, offsetBuilder, signedOffsetDistance, offsetOptions);
|
|
242976
243000
|
return offsetBuilder.claimPolyface();
|
|
242977
243001
|
}
|
|
242978
243002
|
/**
|
|
@@ -242994,7 +243018,7 @@ class PolyfaceQuery {
|
|
|
242994
243018
|
* @see PolygonOps.intersectRay3d
|
|
242995
243019
|
*/
|
|
242996
243020
|
static intersectRay3d(visitor, ray, options) {
|
|
242997
|
-
if (visitor instanceof
|
|
243021
|
+
if (visitor instanceof _Polyface__WEBPACK_IMPORTED_MODULE_7__.Polyface)
|
|
242998
243022
|
return PolyfaceQuery.intersectRay3d(visitor.createVisitor(0), ray, options);
|
|
242999
243023
|
let detail;
|
|
243000
243024
|
visitor.setNumWrap(0);
|
|
@@ -243002,17 +243026,17 @@ class PolyfaceQuery {
|
|
|
243002
243026
|
const numEdges = visitor.pointCount; // #vertices = #edges since numWrap is zero
|
|
243003
243027
|
const vertices = visitor.point;
|
|
243004
243028
|
if (3 === numEdges) {
|
|
243005
|
-
const tri = this._workTriangle =
|
|
243029
|
+
const tri = this._workTriangle = _geometry3d_BarycentricTriangle__WEBPACK_IMPORTED_MODULE_36__.BarycentricTriangle.create(vertices.getPoint3dAtUncheckedPointIndex(0), vertices.getPoint3dAtUncheckedPointIndex(1), vertices.getPoint3dAtUncheckedPointIndex(2), this._workTriangle);
|
|
243006
243030
|
const detail3 = this._workTriDetail = tri.intersectRay3d(ray, this._workTriDetail);
|
|
243007
243031
|
tri.snapLocationToEdge(detail3, options?.distanceTolerance, options?.parameterTolerance);
|
|
243008
|
-
detail = this._workFacetDetail3 =
|
|
243032
|
+
detail = this._workFacetDetail3 = _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_37__.TriangularFacetLocationDetail.create(visitor.currentReadIndex(), detail3, this._workFacetDetail3);
|
|
243009
243033
|
}
|
|
243010
243034
|
else {
|
|
243011
|
-
const detailN = this._workPolyDetail =
|
|
243012
|
-
if (
|
|
243013
|
-
detail = this._workFacetDetailC =
|
|
243035
|
+
const detailN = this._workPolyDetail = _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.intersectRay3d(vertices, ray, options?.distanceTolerance, this._workPolyDetail);
|
|
243036
|
+
if (_geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_8__.PolygonOps.isConvex(vertices))
|
|
243037
|
+
detail = this._workFacetDetailC = _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_37__.ConvexFacetLocationDetail.create(visitor.currentReadIndex(), numEdges, detailN, this._workFacetDetailC);
|
|
243014
243038
|
else
|
|
243015
|
-
detail = this._workFacetDetailNC =
|
|
243039
|
+
detail = this._workFacetDetailNC = _FacetLocationDetail__WEBPACK_IMPORTED_MODULE_37__.NonConvexFacetLocationDetail.create(visitor.currentReadIndex(), numEdges, detailN, this._workFacetDetailNC);
|
|
243016
243040
|
}
|
|
243017
243041
|
if (detail.isInsideOrOn) { // set optional caches, process the intersection
|
|
243018
243042
|
if (options?.needNormal && visitor.normal)
|
|
@@ -260138,10 +260162,6 @@ class SweepContour {
|
|
|
260138
260162
|
static createForPolygon(points, defaultNormal) {
|
|
260139
260163
|
const localToWorld = _geometry3d_FrameBuilder__WEBPACK_IMPORTED_MODULE_3__.FrameBuilder.createRightHandedFrame(defaultNormal, points);
|
|
260140
260164
|
if (localToWorld) {
|
|
260141
|
-
if (defaultNormal !== undefined) {
|
|
260142
|
-
if (localToWorld.matrix.dotColumnZ(defaultNormal))
|
|
260143
|
-
localToWorld.matrix.scaleColumnsInPlace(1.0, -1.0, -1.0);
|
|
260144
|
-
}
|
|
260145
260165
|
const linestrings = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_4__.LineString3d.createArrayOfLineString3d(points);
|
|
260146
260166
|
const loops = [];
|
|
260147
260167
|
for (const ls of linestrings) {
|
|
@@ -265256,8 +265276,8 @@ class HalfEdgeGraphMerge {
|
|
|
265256
265276
|
}
|
|
265257
265277
|
/**
|
|
265258
265278
|
* * Input is random linestrings, not necessarily loops
|
|
265259
|
-
* * Graph gets full splitEdges, regularize, and triangulate.
|
|
265260
|
-
* @returns
|
|
265279
|
+
* * Graph gets full splitEdges, regularize (optional), and triangulate.
|
|
265280
|
+
* @returns graph, or undefined if bad data.
|
|
265261
265281
|
*/
|
|
265262
265282
|
static formGraphFromChains(chains, regularize = true, mask = _Graph__WEBPACK_IMPORTED_MODULE_3__.HalfEdgeMask.PRIMARY_EDGE) {
|
|
265263
265283
|
if (chains.length < 1)
|
|
@@ -301952,7 +301972,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
301952
301972
|
/***/ ((module) => {
|
|
301953
301973
|
|
|
301954
301974
|
"use strict";
|
|
301955
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.9.0-dev.
|
|
301975
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.9.0-dev.20","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 ES2020 --outDir lib/esm","clean":"rimraf 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 --includes=../../generated-docs/extract --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 -f visualstudio \\"./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 -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","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:^4.9.0-dev.20","@itwin/core-bentley":"workspace:^4.9.0-dev.20","@itwin/core-common":"workspace:^4.9.0-dev.20","@itwin/core-geometry":"workspace:^4.9.0-dev.20","@itwin/core-orbitgt":"workspace:^4.9.0-dev.20","@itwin/core-quantity":"workspace:^4.9.0-dev.20"},"//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/certa":"workspace:*","@itwin/eslint-plugin":"^4.0.2","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.56.0","glob":"^10.3.12","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.3.3","typemoq":"^2.1.0","webpack":"^5.76.0"},"//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.2.5","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","meshoptimizer":"~0.20.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
|
|
301956
301976
|
|
|
301957
301977
|
/***/ })
|
|
301958
301978
|
|