brepjs 12.8.2 → 12.9.1
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/dist/2d/lib/svgPath.d.ts.map +1 -1
- package/dist/2d/lib/vectorOperations.d.ts +4 -1
- package/dist/2d/lib/vectorOperations.d.ts.map +1 -1
- package/dist/2d.cjs +2 -2
- package/dist/2d.js +5 -5
- package/dist/{Blueprint-DbVaf6k7.js → Blueprint-1HGbugaC.js} +33 -63
- package/dist/{Blueprint-CQ28WJhz.cjs → Blueprint-CUyXM6CV.cjs} +15 -45
- package/dist/{boolean2D-0blbVtJ8.cjs → boolean2D-9OnbotKT.cjs} +9 -9
- package/dist/{boolean2D-y3E92F0u.js → boolean2D-CR4efa35.js} +11 -11
- package/dist/{booleanFns-gmsX3Cv2.cjs → booleanFns-BBd2oTvv.cjs} +43 -40
- package/dist/{booleanFns-BCTjYZAg.js → booleanFns-Br2KdGJq.js} +53 -50
- package/dist/brepjs.cjs +379 -284
- package/dist/brepjs.js +1437 -1341
- package/dist/core/definitionMaps.d.ts +2 -7
- package/dist/core/definitionMaps.d.ts.map +1 -1
- package/dist/core/dimensionTypes.d.ts +52 -0
- package/dist/core/dimensionTypes.d.ts.map +1 -0
- package/dist/core/disposal.d.ts +18 -0
- package/dist/core/disposal.d.ts.map +1 -1
- package/dist/core/errors.d.ts +1 -8
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/kernelErrorTranslation.d.ts +15 -0
- package/dist/core/kernelErrorTranslation.d.ts.map +1 -0
- package/dist/core/planeOps.d.ts +14 -0
- package/dist/core/planeOps.d.ts.map +1 -1
- package/dist/core/result.d.ts +4 -0
- package/dist/core/result.d.ts.map +1 -1
- package/dist/core/shapeTypes.d.ts +14 -146
- package/dist/core/shapeTypes.d.ts.map +1 -1
- package/dist/core/typeDiscriminants.d.ts +14 -0
- package/dist/core/typeDiscriminants.d.ts.map +1 -0
- package/dist/core/validityTypes.d.ts +100 -0
- package/dist/core/validityTypes.d.ts.map +1 -0
- package/dist/core.cjs +52 -11
- package/dist/core.d.ts +1 -1
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +118 -75
- package/dist/{curveFns-mROFhiuG.js → curveFns-1u0oZ0u0.js} +14 -14
- package/dist/{curveFns-BZngcnQ1.cjs → curveFns-BwLvO_Ia.cjs} +2 -2
- package/dist/{drawFns-Bwakrq7w.js → drawFns-B0na6sbo.js} +16 -16
- package/dist/{drawFns-CjRc1NfQ.cjs → drawFns-CzlEePor.cjs} +18 -18
- package/dist/{faceFns-DB1Fc5gy.cjs → faceFns-BAKkZG6D.cjs} +2 -2
- package/dist/{faceFns-B8GnxjdY.js → faceFns-DGMp47Os.js} +3 -3
- package/dist/{helpers-C8NoT0Wu.cjs → helpers-DVdscQxW.cjs} +73 -8
- package/dist/{helpers-X0juxnwj.js → helpers-sJjnIXDA.js} +85 -20
- package/dist/index.d.ts +10 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/io.cjs +4 -4
- package/dist/io.js +4 -4
- package/dist/kernel/brepkit/booleanOps.d.ts +23 -0
- package/dist/kernel/brepkit/booleanOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/constructionOps.d.ts +51 -0
- package/dist/kernel/brepkit/constructionOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/evolutionOps.d.ts +31 -0
- package/dist/kernel/brepkit/evolutionOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/geometryOps.d.ts +56 -0
- package/dist/kernel/brepkit/geometryOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/helpers.d.ts +84 -0
- package/dist/kernel/brepkit/helpers.d.ts.map +1 -0
- package/dist/kernel/brepkit/internalOps.d.ts +28 -0
- package/dist/kernel/brepkit/internalOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/ioOps.d.ts +43 -0
- package/dist/kernel/brepkit/ioOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/measureOps.d.ts +30 -0
- package/dist/kernel/brepkit/measureOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/meshOps.d.ts +7 -0
- package/dist/kernel/brepkit/meshOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/modifierOps.d.ts +15 -0
- package/dist/kernel/brepkit/modifierOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/repairOps.d.ts +14 -0
- package/dist/kernel/brepkit/repairOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/sweepOps.d.ts +27 -0
- package/dist/kernel/brepkit/sweepOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/topologyOps.d.ts +16 -0
- package/dist/kernel/brepkit/topologyOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/transformOps.d.ts +14 -0
- package/dist/kernel/brepkit/transformOps.d.ts.map +1 -0
- package/dist/kernel/brepkitAdapter.d.ts +1 -1
- package/dist/kernel/brepkitAdapter.d.ts.map +1 -1
- package/dist/kernel/brepkitWasmTypes.d.ts +8 -0
- package/dist/kernel/brepkitWasmTypes.d.ts.map +1 -1
- package/dist/kernel/defaultAdapter.d.ts.map +1 -1
- package/dist/kernel/extendedConstructorOps.d.ts +9 -1
- package/dist/kernel/extendedConstructorOps.d.ts.map +1 -1
- package/dist/kernel/index.d.ts +1 -0
- package/dist/kernel/index.d.ts.map +1 -1
- package/dist/kernel/interfaces/boolean-ops.d.ts +25 -0
- package/dist/kernel/interfaces/boolean-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/construction-ops.d.ts +76 -0
- package/dist/kernel/interfaces/construction-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/core.d.ts +45 -0
- package/dist/kernel/interfaces/core.d.ts.map +1 -0
- package/dist/kernel/interfaces/evolution-ops.d.ts +19 -0
- package/dist/kernel/interfaces/evolution-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/geometry-ops.d.ts +77 -0
- package/dist/kernel/interfaces/geometry-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/index.d.ts +29 -0
- package/dist/kernel/interfaces/index.d.ts.map +1 -0
- package/dist/kernel/interfaces/io-ops.d.ts +66 -0
- package/dist/kernel/interfaces/io-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/measure-ops.d.ts +35 -0
- package/dist/kernel/interfaces/measure-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/mesh-ops.d.ts +21 -0
- package/dist/kernel/interfaces/mesh-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/modifier-ops.d.ts +22 -0
- package/dist/kernel/interfaces/modifier-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/repair-ops.d.ts +36 -0
- package/dist/kernel/interfaces/repair-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/sweep-ops.d.ts +49 -0
- package/dist/kernel/interfaces/sweep-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/topology-ops.d.ts +30 -0
- package/dist/kernel/interfaces/topology-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/transform-ops.d.ts +20 -0
- package/dist/kernel/interfaces/transform-ops.d.ts.map +1 -0
- package/dist/kernel/modifierOps.d.ts +2 -2
- package/dist/kernel/modifierOps.d.ts.map +1 -1
- package/dist/kernel/types.d.ts +2 -446
- package/dist/kernel/types.d.ts.map +1 -1
- package/dist/{loft-hp3pc1M7.cjs → loft-BNvBZzqe.cjs} +5 -5
- package/dist/{loft-Bhw-FMoL.js → loft-D0aCZRaB.js} +7 -7
- package/dist/measurement/measureFns.d.ts +2 -2
- package/dist/measurement/measureFns.d.ts.map +1 -1
- package/dist/{measurement-D8EJ694A.js → measurement-C7o5jE6G.js} +2 -2
- package/dist/{measurement-BoNTUBAp.cjs → measurement-DZcaxo1A.cjs} +2 -2
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-BnV0ZR8w.cjs → meshFns-7dgZgNYK.cjs} +4 -4
- package/dist/{meshFns-nQjK38EC.js → meshFns-CtUl9fGY.js} +3 -3
- package/dist/operations/compoundOpsFns.d.ts +38 -0
- package/dist/operations/compoundOpsFns.d.ts.map +1 -0
- package/dist/operations/extrude.d.ts +2 -12
- package/dist/operations/extrude.d.ts.map +1 -1
- package/dist/operations/extrudeFns.d.ts +2 -93
- package/dist/operations/extrudeFns.d.ts.map +1 -1
- package/dist/operations/guidedSweepFns.d.ts +3 -22
- package/dist/operations/guidedSweepFns.d.ts.map +1 -1
- package/dist/operations/loft.d.ts +2 -16
- package/dist/operations/loft.d.ts.map +1 -1
- package/dist/operations/multiSweepFns.d.ts +3 -29
- package/dist/operations/multiSweepFns.d.ts.map +1 -1
- package/dist/operations/roofFns.d.ts +2 -2
- package/dist/operations/roofFns.d.ts.map +1 -1
- package/dist/operations/sweepFns.d.ts +121 -0
- package/dist/operations/sweepFns.d.ts.map +1 -0
- package/dist/{operations-BfbkK6DU.js → operations-DisJ5F8s.js} +110 -57
- package/dist/{operations-CYpmLSC4.cjs → operations-DwZ-RBO1.cjs} +97 -44
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +14 -14
- package/dist/originTrackingFns-NJ1dWoiF.js +137 -0
- package/dist/originTrackingFns-dhaCe8Yb.cjs +136 -0
- package/dist/query/edgeFinder.d.ts +4 -14
- package/dist/query/edgeFinder.d.ts.map +1 -1
- package/dist/query/faceFinder.d.ts +4 -14
- package/dist/query/faceFinder.d.ts.map +1 -1
- package/dist/query/finderCore.d.ts +6 -0
- package/dist/query/finderCore.d.ts.map +1 -1
- package/dist/query/shapeFinders.d.ts +32 -0
- package/dist/query/shapeFinders.d.ts.map +1 -0
- package/dist/query/wireFinder.d.ts +4 -9
- package/dist/query/wireFinder.d.ts.map +1 -1
- package/dist/query.cjs +54 -32
- package/dist/query.js +56 -34
- package/dist/{result-fAX0OZzI.cjs → result-DJAAj1yb.cjs} +8 -59
- package/dist/{result-BaSD1fqR.js → result-DtuwWSUD.js} +38 -89
- package/dist/result.cjs +1 -1
- package/dist/result.js +22 -22
- package/dist/shapeFns-BJbua5kT.js +34 -0
- package/dist/shapeFns-w9tWELHX.cjs +33 -0
- package/dist/{shapeTypes-CpSaBLDv.js → shapeTypes-CAEAyk8j.js} +233 -172
- package/dist/{shapeTypes-7xEam9Ri.cjs → shapeTypes-owrg2MNK.cjs} +421 -360
- package/dist/sketching/Sketcher.d.ts.map +1 -1
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/{solidBuilders-994_MQwB.cjs → solidBuilders-BLQ4I6Ig.cjs} +3 -3
- package/dist/{solidBuilders-DmwhTCCd.js → solidBuilders-BS-1220W.js} +3 -3
- package/dist/{surfaceBuilders-nQdJ56fe.js → surfaceBuilders-Dj6AjhOv.js} +7 -7
- package/dist/{surfaceBuilders-5VA34a3_.cjs → surfaceBuilders-KU_7OD2q.cjs} +3 -3
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/compoundOpsFns.d.ts +3 -35
- package/dist/topology/compoundOpsFns.d.ts.map +1 -1
- package/dist/topology/index.d.ts +0 -1
- package/dist/topology/index.d.ts.map +1 -1
- package/dist/topology/metadataPropagation.d.ts +30 -0
- package/dist/topology/metadataPropagation.d.ts.map +1 -0
- package/dist/topology/modifierFns.d.ts.map +1 -1
- package/dist/topology/originTrackingFns.d.ts +23 -0
- package/dist/topology/originTrackingFns.d.ts.map +1 -0
- package/dist/topology/shapeFns.d.ts +6 -120
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/topology/topologyQueryFns.d.ts +67 -0
- package/dist/topology/topologyQueryFns.d.ts.map +1 -0
- package/dist/topology/transformFns.d.ts +49 -0
- package/dist/topology/transformFns.d.ts.map +1 -0
- package/dist/topology/wrapperFns.d.ts.map +1 -1
- package/dist/{topology-ANwCzGL8.cjs → topology-CyPHYYjV.cjs} +205 -20
- package/dist/{topology-C7x98OVn.js → topology-D6LeuhI_.js} +235 -50
- package/dist/topology.cjs +18 -17
- package/dist/topology.js +92 -91
- package/dist/topologyQueryFns-De439iBP.js +119 -0
- package/dist/topologyQueryFns-fz5kz5e1.cjs +118 -0
- package/dist/{types-CWDdqcrq.js → types-CcKqsmd0.js} +2 -2
- package/dist/utils/precisionRound.d.ts +4 -0
- package/dist/utils/precisionRound.d.ts.map +1 -1
- package/dist/utils/vec2d.d.ts +5 -0
- package/dist/utils/vec2d.d.ts.map +1 -1
- package/dist/{vecOps-ZDdZWbwT.js → vecOps-LTN--A58.js} +15 -15
- package/dist/{vectors-D_IiZx0q.cjs → vectors-C8N_QeEX.cjs} +9 -1
- package/dist/{vectors-Bx8wkNui.js → vectors-DTREgnVp.js} +15 -7
- package/dist/vectors.cjs +1 -1
- package/dist/vectors.js +23 -23
- package/package.json +3 -3
- package/dist/core/geometryHelpers.d.ts +0 -30
- package/dist/core/geometryHelpers.d.ts.map +0 -1
- package/dist/core/memory.d.ts +0 -6
- package/dist/core/memory.d.ts.map +0 -1
- package/dist/core/typeErrors.d.ts +0 -17
- package/dist/core/typeErrors.d.ts.map +0 -1
- package/dist/cornerFinder-Ckz-mPHE.js +0 -59
- package/dist/cornerFinder-ZmOyOOsh.cjs +0 -58
- package/dist/shapeFns-C2SnNvdH.cjs +0 -468
- package/dist/shapeFns-FDuKkrDR.js +0 -469
- package/dist/utils/round2.d.ts +0 -3
- package/dist/utils/round2.d.ts.map +0 -1
- package/dist/utils/round5.d.ts +0 -3
- package/dist/utils/round5.d.ts.map +0 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { DistanceResult, KernelShape } from '../types.js';
|
|
2
|
+
export interface KernelMeasureOps {
|
|
3
|
+
volume(shape: KernelShape): number;
|
|
4
|
+
area(shape: KernelShape): number;
|
|
5
|
+
length(shape: KernelShape): number;
|
|
6
|
+
centerOfMass(shape: KernelShape): [number, number, number];
|
|
7
|
+
linearCenterOfMass(shape: KernelShape): [number, number, number];
|
|
8
|
+
boundingBox(shape: KernelShape): {
|
|
9
|
+
min: [number, number, number];
|
|
10
|
+
max: [number, number, number];
|
|
11
|
+
};
|
|
12
|
+
/** Minimum distance between two shapes with witness points. */
|
|
13
|
+
distance(shape1: KernelShape, shape2: KernelShape): DistanceResult;
|
|
14
|
+
/** Compute surface curvature at a UV point on a face. */
|
|
15
|
+
surfaceCurvature(face: KernelShape, u: number, v: number): {
|
|
16
|
+
gaussian: number;
|
|
17
|
+
mean: number;
|
|
18
|
+
max: number;
|
|
19
|
+
min: number;
|
|
20
|
+
maxDirection: [number, number, number];
|
|
21
|
+
minDirection: [number, number, number];
|
|
22
|
+
};
|
|
23
|
+
/** Surface-based center of mass (uses surface properties, not volume). */
|
|
24
|
+
surfaceCenterOfMass(face: KernelShape): [number, number, number];
|
|
25
|
+
/** Create a persistent distance query tool for repeated measurements. */
|
|
26
|
+
createDistanceQuery(referenceShape: KernelShape): {
|
|
27
|
+
distanceTo(shape: KernelShape): {
|
|
28
|
+
value: number;
|
|
29
|
+
point1: [number, number, number];
|
|
30
|
+
point2: [number, number, number];
|
|
31
|
+
};
|
|
32
|
+
dispose(): void;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=measure-ops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measure-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/measure-ops.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;IACnC,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;IACjC,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;IACnC,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3D,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACjE,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG;QAC/B,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAC9B,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;KAC/B,CAAC;IAEF,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,GAAG,cAAc,CAAC;IAEnE,yDAAyD;IACzD,gBAAgB,CACd,IAAI,EAAE,WAAW,EACjB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,GACR;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QACvC,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;KACxC,CAAC;IAEF,0EAA0E;IAC1E,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjE,yEAAyE;IACzE,mBAAmB,CAAC,cAAc,EAAE,WAAW,GAAG;QAChD,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG;YAC9B,KAAK,EAAE,MAAM,CAAC;YACd,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;YACjC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;SAClC,CAAC;QACF,OAAO,IAAI,IAAI,CAAC;KACjB,CAAC;CACH"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { KernelEdgeMeshResult, KernelMeshResult, KernelShape, MeshOptions } from '../types.js';
|
|
2
|
+
export interface KernelMeshOps {
|
|
3
|
+
mesh(shape: KernelShape, options: MeshOptions): KernelMeshResult;
|
|
4
|
+
/**
|
|
5
|
+
* Tessellate edges for wireframe display.
|
|
6
|
+
*
|
|
7
|
+
* **Cross-kernel note**: brepkit only supports linear deflection;
|
|
8
|
+
* `angularTolerance` is ignored (a one-time warning is emitted).
|
|
9
|
+
*/
|
|
10
|
+
meshEdges(shape: KernelShape, tolerance: number, angularTolerance: number): KernelEdgeMeshResult;
|
|
11
|
+
/** Check if a shape already has triangulation data. */
|
|
12
|
+
hasTriangulation(shape: KernelShape): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Pre-compute mesh data for a shape (incremental meshing).
|
|
15
|
+
*
|
|
16
|
+
* **Cross-kernel note**: brepkit only supports linear deflection;
|
|
17
|
+
* `angularTolerance` is ignored.
|
|
18
|
+
*/
|
|
19
|
+
meshShape(shape: KernelShape, tolerance: number, angularTolerance: number): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=mesh-ops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mesh-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/mesh-ops.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEpG,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,GAAG,gBAAgB,CAAC;IAEjE;;;;;OAKG;IACH,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,oBAAoB,CAAC;IAEjG,uDAAuD;IACvD,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC;IAE9C;;;;;OAKG;IACH,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CAClF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { KernelShape } from '../types.js';
|
|
2
|
+
export interface KernelModifierOps {
|
|
3
|
+
fillet(shape: KernelShape, edges: KernelShape[], radius: number | [number, number] | ((edge: KernelShape) => number | [number, number])): KernelShape;
|
|
4
|
+
chamfer(shape: KernelShape, edges: KernelShape[], distance: number | [number, number] | ((edge: KernelShape) => number | [number, number])): KernelShape;
|
|
5
|
+
chamferDistAngle(shape: KernelShape, edges: KernelShape[], distance: number, angleDeg: number): KernelShape;
|
|
6
|
+
shell(shape: KernelShape, faces: KernelShape[], thickness: number, tolerance?: number): KernelShape;
|
|
7
|
+
thicken(shape: KernelShape, thickness: number): KernelShape;
|
|
8
|
+
offset(shape: KernelShape, distance: number, tolerance?: number): KernelShape;
|
|
9
|
+
/** Variable-radius fillet. Each entry specifies edges and radii per edge. */
|
|
10
|
+
filletVariable(shape: KernelShape, spec: string): KernelShape;
|
|
11
|
+
/** Draft (taper) faces of a solid along a pull direction with a neutral plane. */
|
|
12
|
+
draft(shape: KernelShape, faces: KernelShape[], pullDirection: [number, number, number], neutralPlane: [number, number, number], angleDeg: number): KernelShape;
|
|
13
|
+
/** Remove faces from a solid (defeaturing). */
|
|
14
|
+
defeature(shape: KernelShape, faces: KernelShape[]): KernelShape;
|
|
15
|
+
/** 2D offset for wires on a plane. */
|
|
16
|
+
offsetWire2D(wire: KernelShape, offset: number, joinType?: number | 'arc' | 'intersection' | 'tangent'): KernelShape;
|
|
17
|
+
/** Simplify a shape by merging same-domain faces and edges. */
|
|
18
|
+
simplify(shape: KernelShape): KernelShape;
|
|
19
|
+
/** Return a copy of the shape with reversed orientation. */
|
|
20
|
+
reverseShape(shape: KernelShape): KernelShape;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=modifier-ops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modifier-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/modifier-ops.ts"],"names":[],"mappings":"AA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AE,MAAM,EAAE,MAAM,CAAC,EACvC,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EACtC,QAAQ,EAAE,MAAM,GACf,WAAW,CAAC;IAEf,+CAA+C;IAC/C,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC;IAEjE,sCAAsC;IACtC,YAAY,CACV,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,cAAc,GAAG,SAAS,GACrD,WAAW,CAAC;IAEf,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC;IAE1C,4DAA4D;IAC5D,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC;CAC/C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { KernelShape } from '../types.js';
|
|
2
|
+
export interface KernelRepairOps {
|
|
3
|
+
/**
|
|
4
|
+
* Check if a shape is topologically and geometrically valid.
|
|
5
|
+
*
|
|
6
|
+
* Uses relaxed validation when available — accepts NURBS approximation
|
|
7
|
+
* tolerances that strict mode would flag.
|
|
8
|
+
*
|
|
9
|
+
* **Cross-kernel note**: OCCT uses `BRepCheck_Analyzer` (no relaxed
|
|
10
|
+
* variant). brepkit uses `validateSolidRelaxed()`.
|
|
11
|
+
*/
|
|
12
|
+
isValid(shape: KernelShape): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Strict validation — fails on any geometric or topological issue,
|
|
15
|
+
* including NURBS approximation gaps.
|
|
16
|
+
*
|
|
17
|
+
* **Cross-kernel note**: OCCT's `BRepCheck_Analyzer` is inherently
|
|
18
|
+
* strict, so this is identical to `isValid`. brepkit uses
|
|
19
|
+
* `validateSolid()` (strict).
|
|
20
|
+
*/
|
|
21
|
+
isValidStrict?(shape: KernelShape): boolean;
|
|
22
|
+
healSolid(shape: KernelShape): KernelShape | null;
|
|
23
|
+
healFace(shape: KernelShape): KernelShape;
|
|
24
|
+
healWire(wire: KernelShape, face?: KernelShape): KernelShape;
|
|
25
|
+
/** Merge coincident vertices within tolerance. Returns merge count. */
|
|
26
|
+
mergeCoincidentVertices(shape: KernelShape, tolerance: number): number;
|
|
27
|
+
/** Remove zero-length (degenerate) edges. Returns removal count. */
|
|
28
|
+
removeDegenerateEdges(shape: KernelShape, tolerance: number): number;
|
|
29
|
+
/** Fix face orientations for consistent normals. Returns fix count. */
|
|
30
|
+
fixFaceOrientations(shape: KernelShape): number;
|
|
31
|
+
/** Run ShapeFix_Shape on a shape (fixes orientation, etc.). */
|
|
32
|
+
fixShape(shape: KernelShape): KernelShape;
|
|
33
|
+
/** Fix self-intersections in a wire. */
|
|
34
|
+
fixSelfIntersection(wire: KernelShape): KernelShape;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=repair-ops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repair-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/repair-ops.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,eAAe;IAC9B;;;;;;;;OAQG;IACH,OAAO,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC;IAErC;;;;;;;OAOG;IACH,aAAa,CAAC,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC;IAE5C,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC;IAC1C,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC;IAE7D,uEAAuE;IACvE,uBAAuB,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IACvE,oEAAoE;IACpE,qBAAqB,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IACrE,uEAAuE;IACvE,mBAAmB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;IAEhD,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC;IAC1C,wCAAwC;IACxC,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW,CAAC;CACrD"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { KernelShape, KernelType } from '../types.js';
|
|
2
|
+
export interface KernelSweepOps {
|
|
3
|
+
extrude(face: KernelShape, direction: [number, number, number], length: number): KernelShape;
|
|
4
|
+
revolve(shape: KernelShape, axis: KernelType, angle: number): KernelShape;
|
|
5
|
+
loft(wires: KernelShape[], ruled?: boolean, startShape?: KernelShape, endShape?: KernelShape): KernelShape;
|
|
6
|
+
sweep(wire: KernelShape, spine: KernelShape, options?: {
|
|
7
|
+
transitionMode?: number;
|
|
8
|
+
}): KernelShape;
|
|
9
|
+
simplePipe(profile: KernelShape, spine: KernelShape): KernelShape;
|
|
10
|
+
/** Helical sweep of a profile around an axis. */
|
|
11
|
+
helicalSweep(profile: KernelShape, axisOrigin: [number, number, number], axisDirection: [number, number, number], radius: number, pitch: number, turns: number): KernelShape;
|
|
12
|
+
/** Sweep with options (contact mode, scale law, segments). */
|
|
13
|
+
sweepWithOptions(profile: KernelShape, pathEdge: KernelShape, contactMode: string, scaleValues: number[], segments: number): KernelShape;
|
|
14
|
+
/** Sweep a profile along a spine with advanced options (transition mode, auxiliary spine, law). */
|
|
15
|
+
sweepPipeShell(profile: KernelShape, spine: KernelShape, options?: {
|
|
16
|
+
transitionMode?: 'transformed' | 'round' | 'right';
|
|
17
|
+
auxiliary?: KernelShape;
|
|
18
|
+
law?: KernelType;
|
|
19
|
+
contact?: boolean;
|
|
20
|
+
correction?: boolean;
|
|
21
|
+
frenet?: boolean;
|
|
22
|
+
support?: KernelType;
|
|
23
|
+
shellMode?: boolean;
|
|
24
|
+
tolerance?: number | undefined;
|
|
25
|
+
boundTolerance?: number | undefined;
|
|
26
|
+
angularTolerance?: number | undefined;
|
|
27
|
+
maxDegree?: number | undefined;
|
|
28
|
+
maxSegments?: number | undefined;
|
|
29
|
+
}): KernelShape | {
|
|
30
|
+
shape: KernelShape;
|
|
31
|
+
firstShape: KernelShape;
|
|
32
|
+
lastShape: KernelShape;
|
|
33
|
+
};
|
|
34
|
+
/** Loft through wires with options for shell mode, ruled surface, and vertex caps. */
|
|
35
|
+
loftAdvanced(wires: KernelShape[], options?: {
|
|
36
|
+
solid?: boolean;
|
|
37
|
+
ruled?: boolean;
|
|
38
|
+
tolerance?: number;
|
|
39
|
+
startVertex?: KernelShape;
|
|
40
|
+
endVertex?: KernelShape;
|
|
41
|
+
}): KernelShape;
|
|
42
|
+
/** Build an extrusion scaling law (s-curve or linear). */
|
|
43
|
+
buildExtrusionLaw(profile: 'linear' | 's-curve', length: number, endFactor: number): KernelType;
|
|
44
|
+
/** Revolve a shape around an axis defined by center+direction (Vec3s, not KernelType axis). */
|
|
45
|
+
revolveVec(shape: KernelShape, center: [number, number, number], direction: [number, number, number], angle: number): KernelShape;
|
|
46
|
+
/** Create a draft prism (tapered extrusion with draft angle). */
|
|
47
|
+
draftPrism(shape: KernelShape, face: KernelShape, baseFace: KernelShape, height: number | null, angleDeg: number, fuse: boolean): KernelShape;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=sweep-ops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sweep-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/sweep-ops.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE3D,MAAM,WAAW,cAAc;IAC7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AiE;IACjE,UAAU,CACR,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,WAAW,EACrB,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,OAAO,GACZ,WAAW,CAAC;CAChB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { KernelShape, ShapeOrientation, ShapeType } from '../types.js';
|
|
2
|
+
export interface KernelTopologyOps {
|
|
3
|
+
/** Iterate sub-shapes of a given type. */
|
|
4
|
+
iterShapes(shape: KernelShape, type: ShapeType): KernelShape[];
|
|
5
|
+
/** Iterate a TopTools_ListOfShape, calling a callback for each item. */
|
|
6
|
+
iterShapeList(list: KernelShape, callback: (item: KernelShape) => void): void;
|
|
7
|
+
/** Get the topological type of a shape. */
|
|
8
|
+
shapeType(shape: KernelShape): ShapeType;
|
|
9
|
+
/** Test if two shapes are the same topological entity. */
|
|
10
|
+
isSame(a: KernelShape, b: KernelShape): boolean;
|
|
11
|
+
/** Test if two shapes are geometrically equal (same location + orientation). */
|
|
12
|
+
isEqual(a: KernelShape, b: KernelShape): boolean;
|
|
13
|
+
/** Downcast a shape to a more specific type (e.g., TopoDS_Shape → TopoDS_Edge). */
|
|
14
|
+
downcast(shape: KernelShape, type?: ShapeType): KernelShape;
|
|
15
|
+
/** Compute a hash code for a shape (used for face tracking). */
|
|
16
|
+
hashCode(shape: KernelShape, upperBound: number): number;
|
|
17
|
+
/** Check if a shape handle is null. */
|
|
18
|
+
isNull(shape: KernelShape): boolean;
|
|
19
|
+
/** Get the orientation of a shape (forward, reversed, internal, external). */
|
|
20
|
+
shapeOrientation(shape: KernelShape): ShapeOrientation;
|
|
21
|
+
/** Get edge-to-face adjacency map as JSON. */
|
|
22
|
+
edgeToFaceMap(shape: KernelShape): string;
|
|
23
|
+
/** Get shared edges between two faces. */
|
|
24
|
+
sharedEdges(faceA: KernelShape, faceB: KernelShape): KernelShape[];
|
|
25
|
+
/** Get faces adjacent to a given face within a shape. */
|
|
26
|
+
adjacentFaces(shape: KernelShape, face: KernelShape): KernelShape[];
|
|
27
|
+
/** Sew shapes together at shared edges. */
|
|
28
|
+
sew(shapes: KernelShape[], tolerance?: number): KernelShape;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=topology-ops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topology-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/topology-ops.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE5E,MAAM,WAAW,iBAAiB;IAChC,0CAA0C;IAC1C,UAAU,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,GAAG,WAAW,EAAE,CAAC;IAC/D,wEAAwE;IACxE,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,GAAG,IAAI,CAAC;IAC9E,2CAA2C;IAC3C,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,0DAA0D;IAC1D,MAAM,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IAChD,gFAAgF;IAChF,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IACjD,mFAAmF;IACnF,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAC5D,gEAAgE;IAChE,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IACzD,uCAAuC;IACvC,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC;IACpC,8EAA8E;IAC9E,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,gBAAgB,CAAC;IACvD,8CAA8C;IAC9C,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;IAC1C,0CAA0C;IAC1C,WAAW,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,WAAW,EAAE,CAAC;IACnE,yDAAyD;IACzD,aAAa,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,GAAG,WAAW,EAAE,CAAC;IAEpE,2CAA2C;IAC3C,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;CAC7D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { KernelShape, KernelType } from '../types.js';
|
|
2
|
+
export interface KernelTransformOps {
|
|
3
|
+
transform(shape: KernelShape, trsf: KernelType): KernelShape;
|
|
4
|
+
translate(shape: KernelShape, x: number, y: number, z: number): KernelShape;
|
|
5
|
+
rotate(shape: KernelShape, angle: number, axis?: readonly [number, number, number], center?: readonly [number, number, number]): KernelShape;
|
|
6
|
+
mirror(shape: KernelShape, origin: readonly [number, number, number], normal: readonly [number, number, number]): KernelShape;
|
|
7
|
+
scale(shape: KernelShape, center: readonly [number, number, number], factor: number): KernelShape;
|
|
8
|
+
generalTransform(shape: KernelShape, linear: readonly [number, number, number, number, number, number, number, number, number], translation: readonly [number, number, number], isOrthogonal: boolean): KernelShape;
|
|
9
|
+
/** Apply a non-orthogonal general transform (gp_GTrsf path for shear / non-uniform scale). */
|
|
10
|
+
generalTransformNonOrthogonal(shape: KernelShape, linear: readonly [number, number, number, number, number, number, number, number, number], translation: readonly [number, number, number]): KernelShape;
|
|
11
|
+
/** Position a shape at a parameter along a spine curve (Frenet frame transform). */
|
|
12
|
+
positionOnCurve(shape: KernelShape, spine: KernelShape, param: number): KernelShape;
|
|
13
|
+
/** Generate a linear pattern of shapes with pooled transforms for performance. */
|
|
14
|
+
linearPattern(shape: KernelShape, direction: [number, number, number], spacing: number, count: number): KernelShape[];
|
|
15
|
+
/** Generate a circular pattern of shapes. */
|
|
16
|
+
circularPattern(shape: KernelShape, center: [number, number, number], axis: [number, number, number], angleStep: number, count: number): KernelShape[];
|
|
17
|
+
/** Generate a 2D grid pattern (brepkit-native). Returns a compound. */
|
|
18
|
+
gridPattern?(shape: KernelShape, directionX: [number, number, number], directionY: [number, number, number], spacingX: number, spacingY: number, countX: number, countY: number): KernelShape;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=transform-ops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/transform-ops.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE3D,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,GAAG,WAAW,CAAC;IAC7D,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAC5E,MAAM,CACJ,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EACxC,MAAM,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GACzC,WAAW,CAAC;IACf,MAAM,CACJ,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EACzC,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GACxC,WAAW,CAAC;IACf,KAAK,CAAC,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;IACjB,uEAAuE;IACvE,WAAW,CAAC,CACV,KAAK,EAAE,WAAW,EAClB,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EACpC,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EACpC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,WAAW,CAAC;CAChB"}
|
|
@@ -29,9 +29,9 @@ export declare function thicken(oc: KernelInstance, shape: KernelShape, thicknes
|
|
|
29
29
|
export declare function chamferDistAngle(oc: KernelInstance, shape: KernelShape, edges: KernelShape[], distance: number, angleDeg: number): KernelShape;
|
|
30
30
|
/**
|
|
31
31
|
* Offsets a 2D wire by the given distance.
|
|
32
|
-
* joinType:
|
|
32
|
+
* joinType: a string ('arc', 'intersection', 'tangent') or raw OCCT enum value.
|
|
33
33
|
*/
|
|
34
|
-
export declare function offsetWire2D(oc: KernelInstance, wire: KernelShape, offsetVal: number, joinType?: number): KernelShape;
|
|
34
|
+
export declare function offsetWire2D(oc: KernelInstance, wire: KernelShape, offsetVal: number, joinType?: number | 'arc' | 'intersection' | 'tangent'): KernelShape;
|
|
35
35
|
/**
|
|
36
36
|
* Offsets all faces of a shape by a given distance.
|
|
37
37
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modifierOps.d.ts","sourceRoot":"","sources":["../../src/kernel/modifierOps.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GACxB,MAAM,GACN,CAAC,MAAM,EAAE,MAAM,CAAC,GAChB,CAAC,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEvD;;;GAGG;AACH,wBAAgB,MAAM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