@buerli.io/react-cad 0.11.0 → 0.13.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.
Files changed (52) hide show
  1. package/build/components/UI/CAD/ModelTree/AssemblyNode.d.ts +3 -0
  2. package/build/components/UI/CAD/common/Collapse.d.ts +8 -0
  3. package/build/components/UI/CAD/common/ContextMenu.d.ts +4 -2
  4. package/build/components/UI/CAD/common/primitives.d.ts +1 -0
  5. package/build/components/UI/CAD/hooks/index.d.ts +1 -0
  6. package/build/components/UI/CAD/hooks/useGlobalMateInfo.d.ts +6 -0
  7. package/build/components/UI/CAD/store/CADActions.d.ts +1 -0
  8. package/build/components/UI/CAD/store/CADStore.d.ts +8 -1
  9. package/build/components/graphics/CSysDisplay.d.ts +19 -2
  10. package/build/components/graphics/CompositeCurveObj.d.ts +11 -0
  11. package/build/index.cjs.js +10298 -8509
  12. package/build/index.d.ts +10 -3
  13. package/build/index.js +10258 -8479
  14. package/build/plugins/CompositeCurve/Root.d.ts +6 -0
  15. package/build/plugins/CompositeCurve/View.d.ts +6 -0
  16. package/build/plugins/CompositeCurve/index.d.ts +5 -0
  17. package/build/plugins/Extrusion/View.d.ts +6 -0
  18. package/build/plugins/Extrusion/index.d.ts +7 -1
  19. package/build/plugins/HLConstraints/CircularPattern/Root.d.ts +6 -0
  20. package/build/plugins/HLConstraints/CircularPattern/View.d.ts +6 -0
  21. package/build/plugins/HLConstraints/CircularPattern/index.d.ts +5 -0
  22. package/build/plugins/HLConstraints/Gear/Root.d.ts +6 -0
  23. package/build/plugins/HLConstraints/Gear/View.d.ts +6 -0
  24. package/build/plugins/HLConstraints/Gear/index.d.ts +5 -0
  25. package/build/plugins/HLConstraints/Group/Root.d.ts +6 -0
  26. package/build/plugins/HLConstraints/Group/index.d.ts +4 -0
  27. package/build/plugins/HLConstraints/LinearPattern/Root.d.ts +6 -0
  28. package/build/plugins/HLConstraints/LinearPattern/View.d.ts +6 -0
  29. package/build/plugins/HLConstraints/LinearPattern/index.d.ts +5 -0
  30. package/build/plugins/HLConstraints/Spherical/Root.d.ts +6 -0
  31. package/build/plugins/HLConstraints/Spherical/View.d.ts +6 -0
  32. package/build/plugins/HLConstraints/Spherical/index.d.ts +5 -0
  33. package/build/plugins/HLConstraints/components/CSysDisplayWrapper.d.ts +7 -0
  34. package/build/plugins/HLConstraints/components/HLConstrIcon.d.ts +7 -0
  35. package/build/plugins/HLConstraints/components/LimitedValue.d.ts +1 -1
  36. package/build/plugins/HLConstraints/components/Limits.d.ts +6 -0
  37. package/build/plugins/Sketch/View/graphics/IconGroups.d.ts +7 -0
  38. package/build/plugins/Sketch/View/graphics/Regions.d.ts +5 -0
  39. package/build/plugins/Sketch/View/graphics/hooks.d.ts +1 -5
  40. package/build/plugins/Sketch/View/handlers/HandlersConstructors.d.ts +2 -0
  41. package/build/plugins/Sketch/View/handlers/SSelect.d.ts +3 -0
  42. package/build/plugins/Sketch/description.d.ts +0 -2
  43. package/build/plugins/Sketch/types.d.ts +8 -7
  44. package/build/plugins/Sketch/utils/getEntities.d.ts +2 -0
  45. package/build/plugins/Sketch/utils/useSketchRegions.d.ts +2 -0
  46. package/build/plugins/Twist/View.d.ts +6 -0
  47. package/build/plugins/Twist/index.d.ts +7 -1
  48. package/build/utils/helpers.d.ts +2 -0
  49. package/build/utils/mateUtils.d.ts +4 -0
  50. package/build/utils/selection/filters.d.ts +2 -0
  51. package/package.json +6 -6
  52. package/build/plugins/Sketch/utils/getConstrEntities.d.ts +0 -2
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const Root: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }>;
@@ -0,0 +1,6 @@
1
+ import { DrawingID, PluginID } from '@buerli.io/core';
2
+ import React from 'react';
3
+ export declare const View: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }>;
@@ -0,0 +1,5 @@
1
+ import { PluginDescription } from '@buerli.io/core';
2
+ import { Root } from './Root';
3
+ import { View } from './View';
4
+ declare const description: PluginDescription;
5
+ export { Root, View, description };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const View: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }>;
@@ -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 };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const Root: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const View: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }>;
@@ -0,0 +1,5 @@
1
+ import { PluginDescription } from '@buerli.io/core';
2
+ import { Root } from './Root';
3
+ import { View } from './View';
4
+ declare const description: PluginDescription;
5
+ export { Root, View, description };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const Root: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const View: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }>;
@@ -0,0 +1,5 @@
1
+ import { PluginDescription } from '@buerli.io/core';
2
+ import { Root } from './Root';
3
+ import { View } from './View';
4
+ declare const description: PluginDescription;
5
+ export { Root, View, description };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const Root: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }>;
@@ -0,0 +1,4 @@
1
+ import { PluginDescription } from '@buerli.io/core';
2
+ import { Root } from './Root';
3
+ declare const description: PluginDescription;
4
+ export { Root, description };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const Root: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const View: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }>;
@@ -0,0 +1,5 @@
1
+ import { PluginDescription } from '@buerli.io/core';
2
+ import { Root } from './Root';
3
+ import { View } from './View';
4
+ declare const description: PluginDescription;
5
+ export { Root, View, description };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const Root: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const View: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }>;
@@ -0,0 +1,5 @@
1
+ import { PluginDescription } from '@buerli.io/core';
2
+ import { Root } from './Root';
3
+ import { View } from './View';
4
+ declare const description: PluginDescription;
5
+ export { Root, View, description };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const CSysDisplayWrapper: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ onlySelInstance?: boolean;
7
+ }>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { DrawingID, ObjectID } from '@buerli.io/core';
3
+ export declare const HLConstrIcon: React.FC<{
4
+ drawingId: DrawingID;
5
+ objectId: ObjectID;
6
+ isInteractable?: boolean;
7
+ }>;
@@ -4,7 +4,7 @@ export declare const LimitedValue: React.FC<{
4
4
  drawingId: DrawingID;
5
5
  objId: ObjectID;
6
6
  memberName: string;
7
- limitsName: string;
7
+ limitsName?: string;
8
8
  onUpdate: (value: number | string) => Promise<void>;
9
9
  caption?: string;
10
10
  angle?: boolean;
@@ -2,12 +2,18 @@ import React from 'react';
2
2
  import { DrawingID, ObjectID } from '@buerli.io/core';
3
3
  import { LimitsParam } from '@buerli.io/classcad';
4
4
  import { MemberParam } from '../../../types';
5
+ export declare enum LimitsDiplayType {
6
+ MIN = 0,
7
+ MAX = 1,
8
+ MINMAX = 2
9
+ }
5
10
  export declare function useLimitsParam(drawingId: DrawingID, objId: ObjectID, memberName: string, options?: {
6
11
  angle?: boolean;
7
12
  forceNoLimits?: boolean;
8
13
  }): MemberParam<LimitsParam>;
9
14
  export declare const Limits: React.FC<{
10
15
  param: MemberParam<LimitsParam>;
16
+ displayType?: LimitsDiplayType;
11
17
  onUpdate?: any;
12
18
  caption?: string;
13
19
  validator?: (numParam: LimitsParam, pName?: string) => string[];
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { ObjectID } from '@buerli.io/core';
3
+ export declare const IconGroups: React.FC<{
4
+ sketchId: ObjectID;
5
+ ids: ObjectID[];
6
+ showAll?: boolean;
7
+ }>;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ObjectID } from '@buerli.io/core';
3
+ export declare const Regions: React.FC<{
4
+ sketchId: ObjectID;
5
+ }>;
@@ -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;
@@ -0,0 +1,3 @@
1
+ import { DrawingID, PluginID } from '@buerli.io/core';
2
+ import { Handler } from '../../types';
3
+ export declare function SSelect(drawingId: DrawingID, pluginId: PluginID): Handler;
@@ -1,4 +1,2 @@
1
1
  import { PluginDescription } from '@buerli.io/core';
2
- import { SketchPState } from './types';
3
- export declare const getInitialState: () => SketchPState;
4
2
  export declare const description: PluginDescription;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { ThreeEvent, ReactThreeFiber } from '@react-three/fiber';
3
- import { IStructureObject, ObjectID, PluginID } from '@buerli.io/core';
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
- lastPos: THREE.Vector3 | undefined;
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
- GSELECTION = "globalSelection"
61
+ SSELECT = "sSelect"
61
62
  }
62
63
  export declare type PointerEventsT = {
63
64
  target: any;
@@ -0,0 +1,2 @@
1
+ import { DrawingID, ObjectID } from '@buerli.io/core';
2
+ export declare const getEntities: (drawingId: DrawingID, objectId: ObjectID) => number[];
@@ -0,0 +1,2 @@
1
+ import { DrawingID, ObjectID } from '@buerli.io/core';
2
+ export declare const useSketchRegions: (drawingId: DrawingID, sketchId: ObjectID) => number[];
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const View: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }>;
@@ -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 };
@@ -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[];
@@ -0,0 +1,4 @@
1
+ import { DrawingID, ObjectID } from '@buerli.io/core';
2
+ export declare const getAncestors: (drawingId: DrawingID, objectId: ObjectID) => number[];
3
+ export declare const getActiveReference: (drawingId: DrawingID, matePath: ObjectID[], activeRefs: ObjectID[]) => number | undefined;
4
+ export declare const getProductRigidSet: (drawingId: DrawingID, productId: ObjectID, rigidSets: ObjectID[]) => number | undefined;
@@ -8,3 +8,5 @@ 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 instanceFilter: (scope: any, data: any) => boolean;
12
+ 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.11.0",
3
+ "version": "0.13.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.12",
40
+ "@buerli.io/icons": "^1.0.14",
41
41
  "@react-three/drei": "9.92.3",
42
- "@react-three/fiber": "8.13.0",
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.13.0",
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.11.0",
94
- "@buerli.io/react": "0.11.0",
93
+ "@buerli.io/classcad": "0.13.0",
94
+ "@buerli.io/react": "0.13.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",
@@ -1,2 +0,0 @@
1
- import { DrawingID, ObjectID } from '@buerli.io/core';
2
- export declare const getConstrEntities: (drawingId: DrawingID, constrId: ObjectID) => number[];