@buerli.io/react-cad 0.11.0 → 0.12.0
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/build/components/graphics/CompositeCurveObj.d.ts +11 -0
- package/build/index.cjs.js +1446 -923
- package/build/index.d.ts +3 -1
- package/build/index.js +1439 -918
- package/build/plugins/CompositeCurve/Root.d.ts +6 -0
- package/build/plugins/CompositeCurve/View.d.ts +6 -0
- package/build/plugins/CompositeCurve/index.d.ts +5 -0
- package/build/plugins/Extrusion/View.d.ts +6 -0
- package/build/plugins/Extrusion/index.d.ts +7 -1
- package/build/plugins/Sketch/View/graphics/IconGroups.d.ts +7 -0
- package/build/plugins/Sketch/View/graphics/Regions.d.ts +5 -0
- package/build/plugins/Sketch/View/graphics/hooks.d.ts +1 -5
- package/build/plugins/Sketch/View/handlers/HandlersConstructors.d.ts +2 -0
- package/build/plugins/Sketch/View/handlers/SSelect.d.ts +3 -0
- package/build/plugins/Sketch/description.d.ts +0 -2
- package/build/plugins/Sketch/types.d.ts +8 -7
- package/build/plugins/Sketch/utils/getEntities.d.ts +2 -0
- package/build/plugins/Sketch/utils/useSketchRegions.d.ts +2 -0
- package/build/plugins/Twist/View.d.ts +6 -0
- package/build/plugins/Twist/index.d.ts +7 -1
- package/build/utils/helpers.d.ts +2 -0
- package/build/utils/selection/filters.d.ts +1 -0
- package/package.json +6 -6
- package/build/plugins/Sketch/utils/getConstrEntities.d.ts +0 -2
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { PluginDescription } from '@buerli.io/core';
|
|
2
2
|
import { Root } from './Root';
|
|
3
|
+
import { View } from './View';
|
|
4
|
+
export declare type ExtrusionPState = {
|
|
5
|
+
originPos: THREE.Vector3 | undefined;
|
|
6
|
+
xDir: THREE.Vector3 | undefined;
|
|
7
|
+
yDir: THREE.Vector3 | undefined;
|
|
8
|
+
};
|
|
3
9
|
declare const description: PluginDescription;
|
|
4
|
-
export { Root, description };
|
|
10
|
+
export { Root, View, description };
|
|
@@ -30,11 +30,7 @@ export declare const useUserData: (objId: ObjectID) => {
|
|
|
30
30
|
onHUD?: undefined;
|
|
31
31
|
};
|
|
32
32
|
export declare const useHandlersAndColor: (drawingId: DrawingID, objId: ObjectID) => {
|
|
33
|
-
handlers:
|
|
34
|
-
onClick: (e: MouseEvent | import("@react-three/fiber").ThreeEvent<MouseEvent>) => void;
|
|
35
|
-
onPointerOut: (e: PointerEvent | import("@react-three/fiber").ThreeEvent<PointerEvent>) => void;
|
|
36
|
-
onPointerOver: (e: PointerEvent | import("@react-three/fiber").ThreeEvent<PointerEvent>) => void;
|
|
37
|
-
} | Record<string, (e: import("@react-three/fiber/dist/declarations/src/core/events").IntersectionEvent<PointerEvent> & import("@react-three/fiber").Properties<PointerEvent> & import("../../types").PointerEventsT) => void>;
|
|
33
|
+
handlers: Record<string, (e: import("@react-three/fiber/dist/declarations/src/core/events").IntersectionEvent<PointerEvent> & import("@react-three/fiber").Properties<PointerEvent> & import("../../types").PointerEventsT) => void>;
|
|
38
34
|
color: number;
|
|
39
35
|
};
|
|
40
36
|
export {};
|
|
@@ -8,9 +8,11 @@ import { Fillet } from './Fillet';
|
|
|
8
8
|
import { Trim } from './Trim';
|
|
9
9
|
import { Split } from './Split';
|
|
10
10
|
import { UseRef } from './UseRef';
|
|
11
|
+
import { SSelect } from './SSelect';
|
|
11
12
|
export declare const HandlersConstructors: {
|
|
12
13
|
createAngle: typeof CreateAngle;
|
|
13
14
|
drag: typeof Drag;
|
|
15
|
+
sSelect: typeof SSelect;
|
|
14
16
|
drawPoint: typeof DrawPoint;
|
|
15
17
|
drawLine: typeof DrawLine;
|
|
16
18
|
drawCircle: typeof DrawCircle;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ThreeEvent, ReactThreeFiber } from '@react-three/fiber';
|
|
3
|
-
import { IStructureObject, ObjectID
|
|
3
|
+
import { IStructureObject, ObjectID } from '@buerli.io/core';
|
|
4
4
|
import { InfinityPlane } from '../../components/graphics/InfinityPlane';
|
|
5
5
|
import { Geometry } from 'three-stdlib';
|
|
6
6
|
export declare type HighlightedConstraintsT = Array<{
|
|
@@ -10,9 +10,6 @@ export declare type HighlightedConstraintsT = Array<{
|
|
|
10
10
|
export declare type SketchPState = {
|
|
11
11
|
alwaysShowConstr: boolean;
|
|
12
12
|
showCoincidence: boolean;
|
|
13
|
-
constraintsToGeometry: {
|
|
14
|
-
[key: number]: ObjectID;
|
|
15
|
-
};
|
|
16
13
|
showRigidSets: boolean;
|
|
17
14
|
activeHandler: HandlersList | undefined;
|
|
18
15
|
handlers: {
|
|
@@ -25,12 +22,16 @@ export declare type SketchPState = {
|
|
|
25
22
|
interaction: {
|
|
26
23
|
cycle: number;
|
|
27
24
|
objects: ObjectID[];
|
|
28
|
-
|
|
25
|
+
lastHoveredPos: {
|
|
26
|
+
[key: ObjectID]: THREE.Vector3;
|
|
27
|
+
};
|
|
28
|
+
constraintsToGeometry: {
|
|
29
|
+
[key: ObjectID]: ObjectID;
|
|
30
|
+
};
|
|
29
31
|
};
|
|
30
32
|
isDragged: boolean;
|
|
31
33
|
scale: number;
|
|
32
34
|
step: number;
|
|
33
|
-
dimPluginId: PluginID | undefined;
|
|
34
35
|
mousePos: THREE.Vector3 | undefined;
|
|
35
36
|
drawnObjectsRef: React.MutableRefObject<THREE.Group> | undefined;
|
|
36
37
|
rubberBandRectangle: {
|
|
@@ -57,7 +58,7 @@ export declare enum HandlersList {
|
|
|
57
58
|
TRIM = "trim",
|
|
58
59
|
SPLIT = "split",
|
|
59
60
|
USEREF = "useReference",
|
|
60
|
-
|
|
61
|
+
SSELECT = "sSelect"
|
|
61
62
|
}
|
|
62
63
|
export declare type PointerEventsT = {
|
|
63
64
|
target: any;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { PluginDescription } from '@buerli.io/core';
|
|
2
2
|
import { Root } from './Root';
|
|
3
|
+
import { View } from './View';
|
|
4
|
+
export declare type TwistPState = {
|
|
5
|
+
originPos: THREE.Vector3 | undefined;
|
|
6
|
+
xDir: THREE.Vector3 | undefined;
|
|
7
|
+
yDir: THREE.Vector3 | undefined;
|
|
8
|
+
};
|
|
3
9
|
declare const description: PluginDescription;
|
|
4
|
-
export { Root, description };
|
|
10
|
+
export { Root, View, description };
|
package/build/utils/helpers.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare function getDescendants(tree: IStructureTree, objectId: ObjectID)
|
|
|
19
19
|
export declare function getAncestorIdByClass(drawingId: DrawingID, objectId: ObjectID, parentClass: CCClasses): number | null;
|
|
20
20
|
export declare const isSketchGeometry: (arg: IStructureObject | CCClasses) => boolean;
|
|
21
21
|
export declare const is2DConstraint: (arg: IStructureObject | CCClasses) => boolean;
|
|
22
|
+
export declare const isSketchRegion: (arg: IStructureObject | CCClasses) => boolean;
|
|
22
23
|
export declare const degreesToRadians: (degrees: number) => number;
|
|
23
24
|
export declare const radiansToDegrees: (radians: number) => number;
|
|
24
25
|
export declare const getPointOnPlane: (unprojectedPoint: THREE.Vector3, camera: THREE.Camera, globalToLocalM: THREE.Matrix4) => THREE.Vector3;
|
|
@@ -35,3 +36,4 @@ export declare function fmod(num: number, denom: number): number;
|
|
|
35
36
|
export declare function numberToHexColor(color: number): string;
|
|
36
37
|
export declare const solveQuadratic: (a: number, b: number, c: number) => number[];
|
|
37
38
|
export declare const solveQuartic: (a: number, b: number, c: number, d: number, e: number) => number[];
|
|
39
|
+
export declare function getRegionCoordSys(drawingId: DrawingID, regionObj: IStructureObject): THREE.Vector3[];
|
|
@@ -8,3 +8,4 @@ export declare const workPlaneFilter: (scope: any, data: any) => boolean;
|
|
|
8
8
|
export declare const workAxisFilter: (scope: any, data: any) => boolean;
|
|
9
9
|
export declare const csysFilter: (scope: any, data: any) => boolean;
|
|
10
10
|
export declare const mateFilter: (scope: any, data: any) => boolean;
|
|
11
|
+
export declare const curveEntityFilter: (scope: any, data: any) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buerli.io/react-cad",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "buerli CAD components",
|
|
5
5
|
"author": "AWV Informatik AG <info@awv-informatik.ch>",
|
|
6
6
|
"repository": {},
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"@babel/preset-env": "^7.15.0",
|
|
38
38
|
"@babel/preset-react": "^7.14.5",
|
|
39
39
|
"@babel/preset-typescript": "^7.10.4",
|
|
40
|
-
"@buerli.io/icons": "^1.0.
|
|
40
|
+
"@buerli.io/icons": "^1.0.13",
|
|
41
41
|
"@react-three/drei": "9.92.3",
|
|
42
|
-
"@react-three/fiber": "8.
|
|
42
|
+
"@react-three/fiber": "8.15.14",
|
|
43
43
|
"@rollup/plugin-babel": "^5.3.0",
|
|
44
44
|
"@rollup/plugin-image": "^2.1.0",
|
|
45
45
|
"@rollup/plugin-node-resolve": "^13.0.4",
|
|
@@ -85,13 +85,13 @@
|
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"@react-three/drei": ">=9.92.3",
|
|
88
|
-
"@react-three/fiber": ">=8.
|
|
88
|
+
"@react-three/fiber": ">=8.15.14",
|
|
89
89
|
"three": ">=0.153",
|
|
90
90
|
"react": ">=18.0"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@buerli.io/classcad": "0.
|
|
94
|
-
"@buerli.io/react": "0.
|
|
93
|
+
"@buerli.io/classcad": "0.12.0",
|
|
94
|
+
"@buerli.io/react": "0.12.0",
|
|
95
95
|
"@dnd-kit/core": "^6.0.8",
|
|
96
96
|
"@dnd-kit/modifiers": "^6.0.1",
|
|
97
97
|
"@dnd-kit/sortable": "^7.0.2",
|