brep-io-kernel 1.0.21 → 1.0.22
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/README.md +4 -1
- package/dist-kernel/brep-kernel.js +11065 -10512
- package/package.json +3 -2
- package/src/BREP/Edge.js +2 -0
- package/src/BREP/Face.js +2 -0
- package/src/BREP/SolidMethods/visualize.js +372 -365
- package/src/BREP/Vertex.js +2 -17
- package/src/PartHistory.js +4 -25
- package/src/SketchSolver2D.js +3 -0
- package/src/UI/AccordionWidget.js +1 -1
- package/src/UI/EnvMonacoEditor.js +0 -3
- package/src/UI/HistoryWidget.js +3 -0
- package/src/UI/SceneListing.js +45 -7
- package/src/UI/SelectionFilter.js +469 -442
- package/src/UI/SelectionState.js +464 -0
- package/src/UI/assembly/AssemblyConstraintCollectionWidget.js +40 -1
- package/src/UI/assembly/AssemblyConstraintsWidget.js +17 -3
- package/src/UI/assembly/constraintSelectionUtils.js +3 -182
- package/src/UI/{assembly/constraintFaceUtils.js → faceUtils.js} +30 -5
- package/src/UI/featureDialogs.js +99 -69
- package/src/UI/pmi/LabelOverlay.js +32 -0
- package/src/UI/pmi/PMIMode.js +23 -0
- package/src/UI/pmi/dimensions/HoleCalloutAnnotation.js +7 -1
- package/src/UI/toolbarButtons/orientToFaceButton.js +3 -36
- package/src/UI/toolbarButtons/registerDefaultButtons.js +2 -0
- package/src/UI/toolbarButtons/selectionStateButton.js +206 -0
- package/src/UI/viewer.js +16 -16
- package/src/assemblyConstraints/AssemblyConstraintHistory.js +18 -42
- package/src/assemblyConstraints/constraints/AngleConstraint.js +1 -0
- package/src/assemblyConstraints/constraints/DistanceConstraint.js +1 -0
- package/src/features/selectionUtils.js +21 -5
- package/src/features/sketch/SketchFeature.js +2 -2
- package/src/features/sketch/sketchSolver2D/constraintDefinitions.js +3 -2
- package/src/utils/selectionResolver.js +258 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brep-io-kernel",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.22",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "pnpm generateLicenses && pnpm build:kernel && vite --host 0.0.0.0",
|
|
6
6
|
"build": "pnpm generateLicenses && vite build",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"./BREP": "./dist-kernel/brep-kernel.js",
|
|
22
22
|
"./PartHistory": "./dist-kernel/brep-kernel.js",
|
|
23
23
|
"./AssemblyConstraintHistory": "./dist-kernel/brep-kernel.js",
|
|
24
|
-
"./AssemblyConstraintRegistry": "./dist-kernel/brep-kernel.js"
|
|
24
|
+
"./AssemblyConstraintRegistry": "./dist-kernel/brep-kernel.js",
|
|
25
|
+
"./SketchSolver2D": "./src/SketchSolver2D.js"
|
|
25
26
|
},
|
|
26
27
|
"files": [
|
|
27
28
|
"src/**",
|
package/src/BREP/Edge.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as THREE from "three";
|
|
2
2
|
import { CADmaterials } from "../UI/CADmaterials.js";
|
|
3
|
+
import { SelectionState } from "../UI/SelectionState.js";
|
|
3
4
|
import { Line2 } from "three/examples/jsm/Addons.js";
|
|
4
5
|
|
|
5
6
|
export class Edge extends Line2 {
|
|
@@ -10,6 +11,7 @@ export class Edge extends Line2 {
|
|
|
10
11
|
this.type = 'EDGE';
|
|
11
12
|
this.renderOrder = 2;
|
|
12
13
|
this.closedLoop = false;
|
|
14
|
+
SelectionState.attach(this);
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
// Total polyline length in world space
|
package/src/BREP/Face.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as THREE from "three";
|
|
2
2
|
import { CADmaterials } from "../UI/CADmaterials.js";
|
|
3
|
+
import { SelectionState } from "../UI/SelectionState.js";
|
|
3
4
|
import { computeTriangleArea } from "./triangleUtils.js";
|
|
4
5
|
|
|
5
6
|
export class Face extends THREE.Mesh {
|
|
@@ -10,6 +11,7 @@ export class Face extends THREE.Mesh {
|
|
|
10
11
|
this.type = 'FACE';
|
|
11
12
|
this.renderOrder = 1;
|
|
12
13
|
this.parentSolid = null;
|
|
14
|
+
SelectionState.attach(this);
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
// Compute the average geometric normal of this face's triangles in world space.
|