@itwin/core-geometry 5.0.0-dev.40 → 5.0.0-dev.49
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/CHANGELOG.md +11 -1
- package/lib/cjs/bspline/KnotVector.d.ts +8 -6
- package/lib/cjs/bspline/KnotVector.d.ts.map +1 -1
- package/lib/cjs/bspline/KnotVector.js +12 -6
- package/lib/cjs/bspline/KnotVector.js.map +1 -1
- package/lib/cjs/core-geometry.d.ts +1 -0
- package/lib/cjs/core-geometry.d.ts.map +1 -1
- package/lib/cjs/core-geometry.js +1 -0
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.js +1 -1
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +0 -2
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +0 -4
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.d.ts +7 -10
- package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js +7 -10
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.d.ts +0 -5
- package/lib/cjs/geometry3d/GrowableXYArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js +0 -7
- package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/cjs/polyface/FacetFaceData.d.ts +1 -1
- package/lib/cjs/polyface/FacetFaceData.js +1 -1
- package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts +9 -6
- package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js +9 -6
- package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts +233 -0
- package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts.map +1 -0
- package/lib/cjs/polyface/IndexedPolyfaceWalker.js +349 -0
- package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -0
- package/lib/cjs/polyface/Polyface.d.ts +35 -10
- package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
- package/lib/cjs/polyface/Polyface.js +55 -10
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts +0 -20
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +0 -28
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.d.ts +28 -0
- package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.js +19 -0
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.d.ts +1 -2
- package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +1 -1
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js +1 -1
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/esm/bspline/KnotVector.d.ts +8 -6
- package/lib/esm/bspline/KnotVector.d.ts.map +1 -1
- package/lib/esm/bspline/KnotVector.js +12 -6
- package/lib/esm/bspline/KnotVector.js.map +1 -1
- package/lib/esm/core-geometry.d.ts +1 -0
- package/lib/esm/core-geometry.d.ts.map +1 -1
- package/lib/esm/core-geometry.js +1 -0
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.js +1 -1
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +0 -2
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +0 -4
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.d.ts +7 -10
- package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js +7 -10
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.d.ts +0 -5
- package/lib/esm/geometry3d/GrowableXYArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js +0 -7
- package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/esm/polyface/FacetFaceData.d.ts +1 -1
- package/lib/esm/polyface/FacetFaceData.js +1 -1
- package/lib/esm/polyface/FacetFaceData.js.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.d.ts +9 -6
- package/lib/esm/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js +9 -6
- package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts +233 -0
- package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts.map +1 -0
- package/lib/esm/polyface/IndexedPolyfaceWalker.js +345 -0
- package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -0
- package/lib/esm/polyface/Polyface.d.ts +35 -10
- package/lib/esm/polyface/Polyface.d.ts.map +1 -1
- package/lib/esm/polyface/Polyface.js +55 -10
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts +0 -20
- package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +0 -28
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.d.ts +28 -0
- package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceData.js +19 -0
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.d.ts +1 -2
- package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +1 -1
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js +1 -1
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/package.json +4 -4
|
@@ -29,7 +29,7 @@ export declare class HalfEdgeGraphFromIndexedLoopsContext {
|
|
|
29
29
|
* * those coordinates and indices will never be referenced again by this construction sequence -- the caller is free to mutate them as needed.
|
|
30
30
|
* * if [indexB, indexA] appeared previously (and its outer HalfEdge was left "unmatched"),
|
|
31
31
|
* the "unmatched" HalfEdge is used in the loop being constructed, and its EXTERIOR mask is cleared.
|
|
32
|
-
* @param indices Array of indices around the
|
|
32
|
+
* @param indices Array of indices around the loop. This is accessed cyclically, so first and last indices should be different.
|
|
33
33
|
* @param announceMatedHalfEdges optional function to be called as mated pairs are created. At the call,
|
|
34
34
|
* the given HalfEdge and its mate will have a pair of successive indices from the array.
|
|
35
35
|
*/
|
|
@@ -36,7 +36,7 @@ export class HalfEdgeGraphFromIndexedLoopsContext {
|
|
|
36
36
|
* * those coordinates and indices will never be referenced again by this construction sequence -- the caller is free to mutate them as needed.
|
|
37
37
|
* * if [indexB, indexA] appeared previously (and its outer HalfEdge was left "unmatched"),
|
|
38
38
|
* the "unmatched" HalfEdge is used in the loop being constructed, and its EXTERIOR mask is cleared.
|
|
39
|
-
* @param indices Array of indices around the
|
|
39
|
+
* @param indices Array of indices around the loop. This is accessed cyclically, so first and last indices should be different.
|
|
40
40
|
* @param announceMatedHalfEdges optional function to be called as mated pairs are created. At the call,
|
|
41
41
|
* the given HalfEdge and its mate will have a pair of successive indices from the array.
|
|
42
42
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HalfEdgeGraphFromIndexedLoopsContext.js","sourceRoot":"","sources":["../../../src/topology/HalfEdgeGraphFromIndexedLoopsContext.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEhE;;GAEG;AAEH;;;;;;;GAOG;AACH,MAAM,OAAO,oCAAoC;IAC/C;QACE,IAAI,CAAC,eAAe,GAAG,IAAI,GAAG,EAAG,CAAC;QAClC,IAAI,CAAC,MAAM,GAAG,IAAI,aAAa,EAAG,CAAC;QACnC,IAAI,CAAC,2BAA2B,GAAG,EAAE,CAAC;IACxC,CAAC;IAGD,IAAW,KAAK,KAAmB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAA,CAAC;IAI/C,iBAAiB,CAAC,MAAc,EAAE,MAAc;QACtD,OAAO,GAAG,MAAM,CAAC,QAAQ,EAAE,IAAI,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;IACrD,CAAC;IACD;;;;;;;;;;;;;;;OAeG;IACI,UAAU,CAAC,OAAiB,EAAE,sBAAqD;QACxF,MAAM,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AC;gBACtC,SAAS,GAAG,SAAS,CAAC;YACxB,CAAC;YACD,OAAO,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC;QAC7C,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { HalfEdge, HalfEdgeGraph, HalfEdgeMask } from \"./Graph\";\n\n/** @packageDocumentation\n * @module Topology\n */\n\n/**\n * Context for building a half edge graph from loops defined only by indices.\n * * Direct use case:\n * * Create the context.\n * * Repeatedly call insertLoop(indicesAroundLoop) to announce various loops.\n * * Finish by accessing the graph property.\n * @internal\n */\nexport class HalfEdgeGraphFromIndexedLoopsContext {\n public constructor(){\n this._unmatchedEdges = new Map ();\n this._graph = new HalfEdgeGraph ();\n this._halfEdgesAroundCurrentLoop = [];\n }\n private _unmatchedEdges: Map<string, HalfEdge>;\n private _graph: HalfEdgeGraph;\n public get graph(): HalfEdgeGraph {return this._graph;}\n\n // for multiple uses by insert loop.\n private _halfEdgesAroundCurrentLoop: HalfEdge[];\n private indexPairToString(index0: number, index1: number): string{\n return `${index0.toString()},${index1.toString()}`;\n }\n /** Create a loop with specified indices at its vertices.\n * * For an edge with index pair [indexA, indexB]:\n * * if [indexB, indexA] has never appeared, a HalfEdge mated pair is created.\n * * One of that mated pair becomes a HalfEdge in this loop.\n * * The other is \"unmatched\" and gets the EXTERIOR mask.\n * * When announceMatedHalfEdges(halfEdge) is called:\n * * halfEdge and its mate are \"new\"\n * * all coordinates are zeros.\n * * each contains (as its `i` property) one index of the [indexA,indexB] pair.\n * * those coordinates and indices will never be referenced again by this construction sequence -- the caller is free to mutate them as needed.\n * * if [indexB, indexA] appeared previously (and its outer HalfEdge was left \"unmatched\"),\n * the \"unmatched\" HalfEdge is used in the loop being constructed, and its EXTERIOR mask is cleared.\n * @param indices Array of indices around the loop. This is accessed cyclically, so first and last indices should be different.\n * @param announceMatedHalfEdges optional function to be called as mated pairs are created. At the call,\n * the given HalfEdge and its mate will have a pair of successive indices from the array.\n */\n public insertLoop(indices: number[], announceMatedHalfEdges?: (halfEdge: HalfEdge) => void): HalfEdge | undefined{\n const n = indices.length;\n if (n > 2) {\n let index0 = indices[indices.length - 1];\n this._halfEdgesAroundCurrentLoop.length = 0;\n for (const index1 of indices) {\n const insideString = this.indexPairToString (index0, index1);\n const halfEdgePreviouslyConstructedFromOppositeSide: HalfEdge | undefined = this._unmatchedEdges.get (insideString);\n if (halfEdgePreviouslyConstructedFromOppositeSide === undefined){\n // This is the first appearance of this edge in either direction.\n const outsideString = this.indexPairToString (index1, index0); // string referencing the \"other\" side of the new edge.\n const newHalfEdgeAroundLoop = this._graph.createEdgeIdId (index0, index1);\n if (announceMatedHalfEdges !== undefined)\n announceMatedHalfEdges (newHalfEdgeAroundLoop);\n this._unmatchedEdges.set (outsideString, newHalfEdgeAroundLoop.edgeMate);\n this._halfEdgesAroundCurrentLoop.push (newHalfEdgeAroundLoop);\n newHalfEdgeAroundLoop.edgeMate.setMask (HalfEdgeMask.EXTERIOR);\n } else {\n this._halfEdgesAroundCurrentLoop.push (halfEdgePreviouslyConstructedFromOppositeSide);\n halfEdgePreviouslyConstructedFromOppositeSide.clearMask (HalfEdgeMask.EXTERIOR);\n }\n index0 = index1;\n }\n let halfEdgeA = this._halfEdgesAroundCurrentLoop[this._halfEdgesAroundCurrentLoop.length - 1];\n for (const halfEdgeB of this._halfEdgesAroundCurrentLoop){\n const halfEdgeC = halfEdgeA.faceSuccessor;\n HalfEdge.pinch (halfEdgeB, halfEdgeC);\n halfEdgeA = halfEdgeB;\n }\n return this._halfEdgesAroundCurrentLoop[0];\n }\n return undefined;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/core-geometry",
|
|
3
|
-
"version": "5.0.0-dev.
|
|
3
|
+
"version": "5.0.0-dev.49",
|
|
4
4
|
"description": "iTwin.js Core Geometry library",
|
|
5
5
|
"main": "lib/cjs/core-geometry.js",
|
|
6
6
|
"module": "lib/esm/core-geometry.js",
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@itwin/eslint-plugin": "5.0.0-dev.1",
|
|
27
27
|
"@types/flatbuffers": "~1.10.0",
|
|
28
|
-
"@types/node": "~20.
|
|
28
|
+
"@types/node": "~20.17.0",
|
|
29
29
|
"@vitest/coverage-v8": "^2.1.0",
|
|
30
30
|
"eslint": "^9.13.0",
|
|
31
31
|
"rimraf": "^3.0.2",
|
|
32
32
|
"typescript": "~5.6.2",
|
|
33
33
|
"vitest": "^2.1.0",
|
|
34
|
-
"@itwin/build-tools": "5.0.0-dev.
|
|
34
|
+
"@itwin/build-tools": "5.0.0-dev.49"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"flatbuffers": "~1.12.0",
|
|
38
|
-
"@itwin/core-bentley": "5.0.0-dev.
|
|
38
|
+
"@itwin/core-bentley": "5.0.0-dev.49"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "npm run -s build:cjs && npm run -s build:esm",
|