@buerli.io/react-cad 0.12.0 → 0.13.1-beta.10

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 (103) hide show
  1. package/build/components/UI/CAD/ModelTree/AssemblyNode.d.ts +3 -0
  2. package/build/components/UI/CAD/PluginsWindows.d.ts +5 -2
  3. package/build/components/UI/CAD/ToolBar/AssemblyModeCmds.d.ts +2 -2
  4. package/build/components/UI/CAD/ToolBar/PartModeCmds.d.ts +2 -2
  5. package/build/components/UI/CAD/ToolBar/useCommands.d.ts +5 -2
  6. package/build/components/UI/CAD/common/Collapse.d.ts +8 -0
  7. package/build/components/UI/CAD/common/ContextMenu.d.ts +4 -2
  8. package/build/components/UI/CAD/common/MultiSelect.d.ts +12 -0
  9. package/build/components/UI/CAD/common/NameEdit.d.ts +1 -3
  10. package/build/components/UI/CAD/common/primitives.d.ts +1 -0
  11. package/build/components/UI/CAD/hooks/index.d.ts +1 -0
  12. package/build/components/UI/CAD/hooks/useContextMenuItems.d.ts +1 -1
  13. package/build/components/UI/CAD/hooks/useCurrentInstance.d.ts +1 -1
  14. package/build/components/UI/CAD/hooks/useCurrentProduct.d.ts +1 -1
  15. package/build/components/UI/CAD/hooks/useGlobalMateInfo.d.ts +6 -0
  16. package/build/components/UI/CAD/hooks/useObjectDetails.d.ts +2 -2
  17. package/build/components/UI/CAD/hooks/useRollbackBar.d.ts +3 -3
  18. package/build/components/UI/CAD/hooks/useRoot.d.ts +1 -1
  19. package/build/components/UI/CAD/index.d.ts +1 -0
  20. package/build/components/UI/CAD/plugins/ProductManagement/types.d.ts +0 -1
  21. package/build/components/UI/CAD/store/CADActions.d.ts +1 -0
  22. package/build/components/UI/CAD/store/CADStore.d.ts +8 -1
  23. package/build/components/UI/editors/BooleanEditor/BooleanEditor.d.ts +1 -1
  24. package/build/components/UI/editors/BooleanEditor/useBoolParam.d.ts +1 -1
  25. package/build/components/UI/editors/CSysEditor/CSysEditor.d.ts +4 -3
  26. package/build/components/UI/editors/CSysEditor/useCSysParam.d.ts +2 -2
  27. package/build/components/UI/editors/ExpressionEditor/ExpressionEditor.d.ts +9 -3
  28. package/build/components/UI/editors/ExpressionEditor/useExpressionsParam.d.ts +4 -3
  29. package/build/components/UI/editors/NumberEditor/Mentions.d.ts +11 -0
  30. package/build/components/UI/editors/NumberEditor/NumberEditor.d.ts +4 -3
  31. package/build/components/UI/editors/NumberEditor/useNumParam.d.ts +2 -2
  32. package/build/components/UI/editors/PointEditor/PointEditor.d.ts +5 -4
  33. package/build/components/UI/editors/PointEditor/usePointParam.d.ts +3 -3
  34. package/build/components/UI/editors/RefsEditors/ChainFinder.d.ts +2 -2
  35. package/build/components/UI/editors/RefsEditors/MateEditor.d.ts +1 -0
  36. package/build/components/UI/editors/RefsEditors/MateOrientationEditor.d.ts +9 -0
  37. package/build/components/UI/editors/RefsEditors/RefEditor.d.ts +3 -2
  38. package/build/components/UI/editors/RefsEditors/RefsEditor.d.ts +1 -0
  39. package/build/components/UI/editors/RefsEditors/useMateParam.d.ts +3 -3
  40. package/build/components/UI/editors/RefsEditors/useModes.d.ts +6 -2
  41. package/build/components/UI/editors/RefsEditors/useSelectedItems.d.ts +2 -2
  42. package/build/components/UI/editors/TypeWrapper.d.ts +5 -0
  43. package/build/components/UI/editors/Wrapper.d.ts +2 -1
  44. package/build/components/graphics/CSysDisplay.d.ts +24 -7
  45. package/build/components/graphics/SelectedMateObj.d.ts +2 -2
  46. package/build/components/graphics/utils/MatePathTransform.d.ts +1 -1
  47. package/build/components/graphics/utils/useCsysMatrix.d.ts +1 -1
  48. package/build/index.cjs.js +22938 -19739
  49. package/build/index.d.ts +12 -3
  50. package/build/index.js +23587 -20400
  51. package/build/plugins/Dimensions/utils.d.ts +4 -4
  52. package/build/plugins/Expressions/useContextMenuItems.d.ts +5 -0
  53. package/build/plugins/HLConstraints/CircularPattern/Root.d.ts +6 -0
  54. package/build/plugins/HLConstraints/CircularPattern/View.d.ts +6 -0
  55. package/build/plugins/HLConstraints/CircularPattern/index.d.ts +5 -0
  56. package/build/plugins/HLConstraints/Gear/Root.d.ts +6 -0
  57. package/build/plugins/HLConstraints/Gear/View.d.ts +6 -0
  58. package/build/plugins/HLConstraints/Gear/index.d.ts +5 -0
  59. package/build/plugins/HLConstraints/Group/Root.d.ts +6 -0
  60. package/build/plugins/HLConstraints/Group/index.d.ts +4 -0
  61. package/build/plugins/HLConstraints/LinearPattern/Root.d.ts +6 -0
  62. package/build/plugins/HLConstraints/LinearPattern/View.d.ts +6 -0
  63. package/build/plugins/HLConstraints/LinearPattern/index.d.ts +5 -0
  64. package/build/plugins/HLConstraints/Spherical/Root.d.ts +6 -0
  65. package/build/plugins/HLConstraints/Spherical/View.d.ts +6 -0
  66. package/build/plugins/HLConstraints/Spherical/index.d.ts +5 -0
  67. package/build/plugins/HLConstraints/components/CSysDisplayWrapper.d.ts +7 -0
  68. package/build/plugins/HLConstraints/components/HLConstrIcon.d.ts +7 -0
  69. package/build/plugins/HLConstraints/components/LimitedValue.d.ts +2 -2
  70. package/build/plugins/HLConstraints/components/Limits.d.ts +12 -1
  71. package/build/plugins/HLConstraints/validators.d.ts +1 -1
  72. package/build/plugins/Sketch/Root/Constraints/constraintsHelpers.d.ts +6 -4
  73. package/build/plugins/Sketch/Root/Constraints/utils.d.ts +3 -3
  74. package/build/plugins/Sketch/Root/CopyPatterns.d.ts +0 -5
  75. package/build/plugins/Sketch/Root/SketchGroup.d.ts +1 -0
  76. package/build/plugins/Sketch/View/graphics/TmpAngularDimension.d.ts +0 -2
  77. package/build/plugins/Sketch/View/graphics/hooks.d.ts +4 -2
  78. package/build/plugins/Sketch/View/graphics/primitives.d.ts +0 -14
  79. package/build/plugins/Sketch/View/handlers/HandlersConstructors.d.ts +2 -2
  80. package/build/plugins/Sketch/View/handlers/Use.d.ts +3 -0
  81. package/build/plugins/Sketch/View/handlers/filletHelpers.d.ts +18 -38
  82. package/build/plugins/Sketch/View/handlers/hoverHelpers.d.ts +3 -0
  83. package/build/plugins/Sketch/View/handlers/splitHelpers.d.ts +14 -29
  84. package/build/plugins/Sketch/types.d.ts +8 -8
  85. package/build/plugins/Sketch/utils/Interaction.d.ts +2 -1
  86. package/build/plugins/Sketch/utils/OverdefinedStateManager.d.ts +6 -0
  87. package/build/plugins/components/PluginForm.d.ts +1 -1
  88. package/build/utils/conversionUtils.d.ts +16 -0
  89. package/build/utils/getHighlightedColor.d.ts +1 -1
  90. package/build/utils/helpers.d.ts +6 -27
  91. package/build/utils/mateUtils.d.ts +2 -0
  92. package/build/utils/selection/filters.d.ts +1 -0
  93. package/build/utils/selection/scopes/mateSelection.d.ts +10 -10
  94. package/build/utils/selection/scopes/treeObjInteraction.d.ts +3 -3
  95. package/build/utils/sketchIntersectionUtils.d.ts +29 -0
  96. package/build/utils/sketchUtils.d.ts +173 -0
  97. package/build/utils/useScale.d.ts +3 -1
  98. package/build/utils/validation.d.ts +3 -4
  99. package/package.json +9 -11
  100. package/build/plugins/Sketch/View/graphics/RubberBandSelection.d.ts +0 -2
  101. package/build/plugins/Sketch/View/handlers/UseRef.d.ts +0 -3
  102. package/build/plugins/Sketch/utils/getEntities.d.ts +0 -2
  103. package/build/plugins/Sketch/utils/getGeometryPriority.d.ts +0 -2
@@ -1,5 +1,5 @@
1
- import { DrawingID, ObjectID, IStructureObject } from '@buerli.io/core';
1
+ import { DrawingID, ObjectID, ScgObject } from '@buerli.io/core';
2
2
  export declare function useDimensionSetId(drawingId: DrawingID, ownerId: ObjectID): ObjectID | undefined;
3
- export declare const isAngular: (dim: IStructureObject) => boolean;
4
- export declare const isRadial: (dim: IStructureObject) => boolean;
5
- export declare const isDiameter: (dim: IStructureObject) => boolean;
3
+ export declare const isAngular: (dim: ScgObject) => boolean;
4
+ export declare const isRadial: (dim: ScgObject) => boolean;
5
+ export declare const isDiameter: (dim: ScgObject) => boolean;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import 'antd/dist/antd.css';
3
+ import { DrawingID, ObjectID } from '@buerli.io/core';
4
+ import { MenuElement } from '../../components/UI/CAD/common/ContextMenu';
5
+ export declare function useContextMenuItems(drawingId: DrawingID, productId: ObjectID, setEditName: React.Dispatch<React.SetStateAction<boolean>>): MenuElement[];
@@ -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,8 +4,8 @@ export declare const LimitedValue: React.FC<{
4
4
  drawingId: DrawingID;
5
5
  objId: ObjectID;
6
6
  memberName: string;
7
- limitsName: string;
8
- onUpdate: (value: number | string) => Promise<void>;
7
+ limitsName?: string;
8
+ onUpdate: (value: number | string) => Promise<any>;
9
9
  caption?: string;
10
10
  angle?: boolean;
11
11
  disabled?: boolean;
@@ -1,14 +1,25 @@
1
1
  import React from 'react';
2
2
  import { DrawingID, ObjectID } from '@buerli.io/core';
3
- import { LimitsParam } from '@buerli.io/classcad';
4
3
  import { MemberParam } from '../../../types';
4
+ export declare enum LimitsDiplayType {
5
+ MIN = 0,
6
+ MAX = 1,
7
+ MINMAX = 2
8
+ }
9
+ export declare type LimitsParam<T = string | number> = {
10
+ min: T | null;
11
+ max: T | null;
12
+ };
5
13
  export declare function useLimitsParam(drawingId: DrawingID, objId: ObjectID, memberName: string, options?: {
6
14
  angle?: boolean;
7
15
  forceNoLimits?: boolean;
8
16
  }): MemberParam<LimitsParam>;
9
17
  export declare const Limits: React.FC<{
10
18
  param: MemberParam<LimitsParam>;
19
+ displayType?: LimitsDiplayType;
11
20
  onUpdate?: any;
21
+ iconMinURL?: string;
22
+ iconMaxURL?: string;
12
23
  caption?: string;
13
24
  validator?: (numParam: LimitsParam, pName?: string) => string[];
14
25
  }>;
@@ -1,2 +1,2 @@
1
- import { LimitsParam } from '@buerli.io/classcad';
1
+ import { LimitsParam } from "./components/Limits";
2
2
  export declare function validateLimits(limits: LimitsParam, name: string): string[];
@@ -1,16 +1,18 @@
1
- import { IStructureObject, IStructureTree, ObjectID } from '@buerli.io/core';
1
+ import { ScgObject, ScgTree, ObjectID } from '@buerli.io/core';
2
+ import { ScgClassType } from '@buerli.io/classcad';
2
3
  declare type GeometryChecker = {
3
4
  type: string;
4
- check: (object: IStructureObject) => number | number[];
5
+ check: (object: ScgObject) => number | number[];
5
6
  };
6
7
  declare type ConstraintGeometryCombination = {
7
8
  entityAdapter: (entities: ObjectID[]) => ObjectID[][];
8
9
  input: GeometryChecker[];
9
10
  };
10
- declare function createHelper(type: string, name: string, ...constraintGeometryCombinations: ConstraintGeometryCombination[]): {
11
+ declare function createHelper(objClass: ScgClassType, type: string, name: string, ...constraintGeometryCombinations: ConstraintGeometryCombination[]): {
12
+ objClass: ScgClassType;
11
13
  type: string;
12
14
  name: string;
13
- adapt(entities: ObjectID[], tree: IStructureTree): number[][] | undefined;
15
+ adapt(entities: ObjectID[], tree: ScgTree): number[][] | undefined;
14
16
  getTooltip(): string[];
15
17
  };
16
18
  export declare const constraintsHelpers: {
@@ -1,6 +1,6 @@
1
- import { CCClasses } from '@buerli.io/classcad';
1
+ import { ScgClassType } from '@buerli.io/classcad';
2
2
  export declare const classNameMap: {
3
3
  [key: string]: string;
4
4
  };
5
- export declare function getKeyCode(constrClass: CCClasses): "KeyF" | "KeyH" | "KeyV" | "KeyI" | "KeyT" | "KeyP" | "KeyC" | "KeyE" | "KeyO" | "KeyD" | "KeyR" | null | undefined;
6
- export declare function getHotKey(constrClass: CCClasses): string;
5
+ export declare function getKeyCode(constrClass: ScgClassType): "KeyF" | "KeyH" | "KeyV" | "KeyI" | "KeyT" | "KeyP" | "KeyC" | "KeyE" | "KeyO" | "KeyD" | "KeyR" | null | undefined;
6
+ export declare function getHotKey(constrClass: ScgClassType): string;
@@ -1,7 +1,2 @@
1
1
  import React from 'react';
2
- export declare enum Patterns {
3
- RECTANGULAR = "RECTANGULAR",
4
- CIRCULAR = "CIRCULAR",
5
- MIRROR = "MIRROR"
6
- }
7
2
  export declare const CopyPatterns: React.FC;
@@ -4,5 +4,6 @@ export declare const SketchGroup: React.FC<{
4
4
  helpUrl?: string | URL;
5
5
  collapse?: boolean;
6
6
  postfix?: React.ReactNode;
7
+ info?: React.ReactNode;
7
8
  children?: React.ReactNode;
8
9
  }>;
@@ -1,7 +1,5 @@
1
1
  import * as THREE from 'three';
2
2
  import React from 'react';
3
- export declare const calcSector: (dimPos: THREE.Vector3, dir0: THREE.Vector3, dir1: THREE.Vector3, center: THREE.Vector3) => 0 | 1 | 2 | 3;
4
- export declare const calcPreviewValue: (dir0: THREE.Vector3, dir1: THREE.Vector3, sector: number, reflex: number) => number;
5
3
  export declare const TmpPositionHandler: React.FC<{
6
4
  position: THREE.Vector3;
7
5
  }>;
@@ -1,10 +1,11 @@
1
- import { IStructureObject, DrawingID, ObjectID } from '@buerli.io/core';
1
+ import { ScgObject, DrawingID, ObjectID } from '@buerli.io/core';
2
2
  export declare const useGeomParams: (objId: ObjectID) => {
3
3
  renderOrder: number;
4
4
  polygonOffsetUnits: number;
5
5
  isHovered: boolean;
6
6
  isSelected: boolean;
7
7
  isHighlighted: boolean;
8
+ isConstrOverdefined: boolean;
8
9
  };
9
10
  declare type ObjState = {
10
11
  isSketchActive: boolean;
@@ -12,9 +13,10 @@ declare type ObjState = {
12
13
  isGHovered: boolean;
13
14
  isSHovered: boolean;
14
15
  isSelected: boolean;
16
+ isConstrOverdefined: boolean;
15
17
  lgsState: number;
16
18
  };
17
- export declare const getColor: (object: IStructureObject, objState: ObjState) => number;
19
+ export declare const getColor: (object: ScgObject, objState: ObjState) => number;
18
20
  /**
19
21
  * Return pointerHandlers of currently enabled sketch Handler.
20
22
  * @param objId
@@ -18,20 +18,6 @@ export declare const Point: React.FC<{
18
18
  position: THREE.Vector3;
19
19
  size?: number;
20
20
  } & commonProps>;
21
- export declare function getArcAngles(params: {
22
- start: THREE.Vector3;
23
- end: THREE.Vector3;
24
- center: THREE.Vector3;
25
- clockwise: boolean;
26
- radius: number;
27
- }): {
28
- center: THREE.Vector3;
29
- mid: THREE.Vector3;
30
- radius: number;
31
- startAngle: number;
32
- endAngle: number;
33
- bulge: number;
34
- };
35
21
  export declare const Arc: React.FC<{
36
22
  start: THREE.Vector3;
37
23
  end: THREE.Vector3;
@@ -7,7 +7,6 @@ import { DrawCircle } from './DrawCircle';
7
7
  import { Fillet } from './Fillet';
8
8
  import { Trim } from './Trim';
9
9
  import { Split } from './Split';
10
- import { UseRef } from './UseRef';
11
10
  import { SSelect } from './SSelect';
12
11
  export declare const HandlersConstructors: {
13
12
  createAngle: typeof CreateAngle;
@@ -19,7 +18,8 @@ export declare const HandlersConstructors: {
19
18
  fillet: typeof Fillet;
20
19
  trim: typeof Trim;
21
20
  split: typeof Split;
22
- useReference: typeof UseRef;
21
+ useGeometry: (drawingId: DrawingID, pluginId: PluginID) => import("../../types").Handler;
22
+ useReference: (drawingId: DrawingID, pluginId: PluginID) => import("../../types").Handler;
23
23
  drawRect2Points: (drawingId: DrawingID, pluginId: PluginID) => import("../../types").Handler;
24
24
  drawRectCenter: (drawingId: DrawingID, pluginId: PluginID) => import("../../types").Handler;
25
25
  drawArcCenter: (drawingId: DrawingID, pluginId: PluginID) => import("../../types").Handler;
@@ -0,0 +1,3 @@
1
+ import { DrawingID, PluginID } from '@buerli.io/core';
2
+ import { HandlersList, Handler } from '../../types';
3
+ export declare function Use(drawingId: DrawingID, pluginId: PluginID, useType: HandlersList.USEGEOM | HandlersList.USEREF): Handler;
@@ -1,42 +1,22 @@
1
1
  import * as THREE from 'three';
2
- import { IStructureTree, ObjectID, IStructureObject } from '@buerli.io/core';
3
- export declare function getSketchDescendants(tree: IStructureTree, sketchId: ObjectID): number[];
4
- export declare function findPointsAt(pos: THREE.Vector3, tree: IStructureTree, sketchId: ObjectID): IStructureObject[];
5
- export declare function findConstraints(type: string, objA: IStructureObject, objB: IStructureObject, tree: IStructureTree, sketchId: ObjectID): number[];
6
- declare type FilletInfo = {
7
- lines: Array<IStructureObject>;
8
- lineStarts: Array<IStructureObject>;
9
- lineEnds: Array<IStructureObject>;
10
- control: THREE.Vector3;
11
- };
12
- declare type NewFilletInfo = FilletInfo & {
13
- incidence: ObjectID;
2
+ import { ObjectID, DrawingID } from '@buerli.io/core';
3
+ export declare type FilletablePointInfo = {
4
+ offset: number;
5
+ arcStartPos: THREE.Vector3;
6
+ arcEndPos: THREE.Vector3;
7
+ arcCenterPos: THREE.Vector3;
8
+ clockwise: boolean;
9
+ lineIds: ObjectID[];
14
10
  };
15
- declare type ExistingFilletInfo = FilletInfo & {
16
- object: IStructureObject;
17
- objectEnds: IStructureObject[];
18
- filletPoint: IStructureObject;
11
+ export declare type FilletArcsInfo = {
12
+ controlPos: THREE.Vector3;
13
+ arcStartPos: THREE.Vector3;
14
+ arcEndPos: THREE.Vector3;
19
15
  };
20
- export declare function recognizeFilletableAngle(pos: THREE.Vector3, tree: IStructureTree, sketchId: ObjectID): NewFilletInfo | null;
21
- export declare function getTouchPoints(info: FilletInfo, distance: number): THREE.Vector3[] | null;
22
- export declare function calculateCenterPoint(start: THREE.Vector3, end: THREE.Vector3, control: THREE.Vector3): THREE.Vector3;
23
16
  export declare function evaluateClockwise(start: THREE.Vector3, end: THREE.Vector3, control: THREE.Vector3): boolean;
24
- export declare function calculateFilletParams(info: FilletInfo, distance: number): {
25
- start: THREE.Vector3;
26
- end: THREE.Vector3;
27
- center: THREE.Vector3;
28
- clockwise: boolean;
29
- control: THREE.Vector3;
30
- } | null;
31
- export declare function calculateNewFilletData(object: IStructureObject, tree: IStructureTree, sketchId: ObjectID): {
32
- info: NewFilletInfo;
33
- params: {
34
- start: THREE.Vector3;
35
- end: THREE.Vector3;
36
- center: THREE.Vector3;
37
- clockwise: boolean;
38
- control: THREE.Vector3;
39
- };
40
- } | null;
41
- export declare function recognizeFilletByArc(object: IStructureObject, tree: IStructureTree, sketchId: ObjectID): ExistingFilletInfo | null;
42
- export {};
17
+ export declare const getFilletablePointsMap: (drawingId: DrawingID, sketchId: ObjectID) => {
18
+ [key: number]: FilletablePointInfo;
19
+ };
20
+ export declare const getFilletArcsMap: (drawingId: DrawingID, sketchId: ObjectID) => {
21
+ [key: number]: FilletArcsInfo;
22
+ };
@@ -0,0 +1,3 @@
1
+ import * as THREE from 'three';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const hoverIntersections: (drawingId: DrawingID, pluginId: PluginID, intersections: THREE.Intersection[]) => void;
@@ -1,34 +1,19 @@
1
1
  import * as THREE from 'three';
2
- import { DrawingID, ObjectID } from "@buerli.io/core";
3
- import { CCClasses } from "@buerli.io/classcad";
2
+ import { DrawingID, ObjectID } from '@buerli.io/core';
3
+ import { ScgClassType } from '@buerli.io/classcad';
4
+ import { CCArcInfo, CCCircleInfo, CCLineInfo } from '../../../../utils/sketchIntersectionUtils';
4
5
  declare type CommonInfo = {
5
- class: CCClasses.CCLine | CCClasses.CCArc | CCClasses.CCCircle;
6
+ class: ScgClassType.CCLine | ScgClassType.CCArc | ScgClassType.CCCircle;
6
7
  bb: THREE.Box2;
8
+ isSplittable: boolean;
7
9
  };
8
- declare type LineInfo = CommonInfo & {
9
- start: THREE.Vector3;
10
- end: THREE.Vector3;
11
- dir: THREE.Vector3;
12
- };
13
- declare type ArcInfo = CommonInfo & {
14
- start: THREE.Vector3;
15
- end: THREE.Vector3;
16
- center: THREE.Vector3;
17
- radius: number;
18
- clockwise: boolean;
19
- startAngle: number;
20
- endAngle: number;
21
- angularlength: number;
22
- };
23
- declare type CircleInfo = CommonInfo & {
24
- center: THREE.Vector3;
25
- radius: number;
26
- };
27
- export declare type ObjInfo = LineInfo | ArcInfo | CircleInfo;
28
- export declare function getSketchObjInfo(drawingId: DrawingID, objId: ObjectID): LineInfo | CircleInfo | undefined;
29
- export declare function getNormalizedPosition(point: THREE.Vector3, sketchObject: ObjInfo): number;
30
- export declare function getParameterizedPosition(t: number, sketchObject: ObjInfo): THREE.Vector3;
31
- export declare function calculateIntersections(object: ObjInfo, sketchObjects: ObjInfo[]): number[];
32
- export declare function calculateClosestIntersection(point: THREE.Vector3, object1: ObjInfo, object2: ObjInfo): number[][];
33
- export declare function getClosestPoint(point: THREE.Vector3, sketchObject: ObjInfo): THREE.Vector3;
10
+ declare type CCLineInfoE = CommonInfo & CCLineInfo;
11
+ declare type CCArcInfoE = CommonInfo & CCArcInfo;
12
+ declare type CCCircleInfoE = CommonInfo & CCCircleInfo;
13
+ export declare type SketchObjInfoE = CCLineInfoE | CCArcInfoE | CCCircleInfoE;
14
+ export declare function getSketchObjInfo(drawingId: DrawingID, objId: ObjectID, unsplittableIds: ObjectID[]): CCLineInfoE | CCCircleInfoE | undefined;
15
+ export declare function getRigidsetEntityIds(drawingId: DrawingID, sketchId: ObjectID): number[];
16
+ export declare function calculateIntersections(object: SketchObjInfoE, sketchObjects: SketchObjInfoE[]): number[];
17
+ export declare function calculateClosestIntersection(point: THREE.Vector3, object1: SketchObjInfoE, object2: SketchObjInfoE): number[][];
18
+ export declare function getClosestPoint(point: THREE.Vector3, sketchObject: SketchObjInfoE): THREE.Vector3;
34
19
  export {};
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { ThreeEvent, ReactThreeFiber } from '@react-three/fiber';
3
- import { IStructureObject, ObjectID } from '@buerli.io/core';
2
+ import { ScgObject, ObjectID } from '@buerli.io/core';
4
3
  import { InfinityPlane } from '../../components/graphics/InfinityPlane';
5
4
  import { Geometry } from 'three-stdlib';
6
5
  export declare type HighlightedConstraintsT = Array<{
@@ -29,15 +28,13 @@ export declare type SketchPState = {
29
28
  [key: ObjectID]: ObjectID;
30
29
  };
31
30
  };
31
+ overdefined: {
32
+ [key: ObjectID]: ObjectID[];
33
+ };
32
34
  isDragged: boolean;
33
35
  scale: number;
34
36
  step: number;
35
37
  mousePos: THREE.Vector3 | undefined;
36
- drawnObjectsRef: React.MutableRefObject<THREE.Group> | undefined;
37
- rubberBandRectangle: {
38
- min: THREE.Vector2;
39
- max: THREE.Vector2;
40
- } | undefined;
41
38
  cursor: null | string;
42
39
  needsUpdate: number;
43
40
  };
@@ -57,6 +54,7 @@ export declare enum HandlersList {
57
54
  HOVER = "hover",
58
55
  TRIM = "trim",
59
56
  SPLIT = "split",
57
+ USEGEOM = "useGeometry",
60
58
  USEREF = "useReference",
61
59
  SSELECT = "sSelect"
62
60
  }
@@ -66,7 +64,7 @@ export declare type PointerEventsT = {
66
64
  };
67
65
  export declare type Handler = {
68
66
  name: HandlersList;
69
- filter: (object: IStructureObject) => boolean;
67
+ filter: (object: ScgObject) => boolean;
70
68
  onActivate?: () => void;
71
69
  onDeactivate?: (() => void) | (() => Promise<void>);
72
70
  pointerHandlers: Record<string, (e: ThreeEvent<PointerEvent> & PointerEventsT) => void>;
@@ -121,6 +119,8 @@ export declare type TmpObject = TmpLineT | TmpPointT | TmpArcT | TmpCircleT | Tm
121
119
  export declare type TmpObjects = {
122
120
  [key: string]: TmpObject;
123
121
  };
122
+ export declare type ConstraintType = 'COINCIDENT' | 'COLINEAR' | 'CONCENTRIC' | 'EQUAL_LENGTH' | 'EQUAL_RADIUS' | 'FIXATION' | 'HORIZONTAL' | 'MIDPOINT' | 'PARALLEL' | 'PERPENDICULAR' | 'SPLINE_FIT_POINT' | 'SYMMETRY' | 'TANGENT' | 'VERTICAL';
123
+ export declare type DimensionType = 'RADIUS' | 'DIAMETER' | 'OFFSET' | 'HORIZONTAL_DISTANCE' | 'VERTICAL_DISTANCE' | 'ANGLE' | 'ANGLEOX';
124
124
  declare global {
125
125
  type InfinityPlaneT = ReactThreeFiber.Object3DNode<InfinityPlane, typeof InfinityPlane>;
126
126
  namespace JSX {
@@ -2,5 +2,6 @@ import * as THREE from 'three';
2
2
  import { DrawingID, PluginID, ObjectID } from '@buerli.io/core';
3
3
  export declare const hover: (drawingId: DrawingID, pluginId: PluginID, objIds: ObjectID[], hoverPos?: THREE.Vector3) => void;
4
4
  export declare const unhover: (drawingId: DrawingID, pluginId: PluginID, objId: ObjectID) => void;
5
- export declare const select: (drawingId: DrawingID, pluginId: PluginID, selectedId: ObjectID) => void;
5
+ export declare const select: (drawingId: DrawingID, selectedId: ObjectID) => void;
6
+ export declare const setSelected: (drawingId: DrawingID, selectedIds: ObjectID[]) => void;
6
7
  export declare const tab: (drawingId: DrawingID, pluginId: PluginID) => void;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const OverdefinedStateManager: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }>;
@@ -15,7 +15,7 @@ import { MemberParam } from '../../types';
15
15
  export declare const PluginForm: React.FC<{
16
16
  drawingId: DrawingID;
17
17
  pluginId: PluginID;
18
- update: () => Promise<void>;
18
+ update: () => Promise<any>;
19
19
  params: Record<string, MemberParam<any>>;
20
20
  children?: React.ReactNode;
21
21
  validator?: () => string[];
@@ -0,0 +1,16 @@
1
+ import { DrawingID, ObjectID } from "@buerli.io/core";
2
+ import { MateParam } from "../components/UI/editors/RefsEditors";
3
+ export declare const mateV1: (mateV0: MateParam) => {
4
+ flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z";
5
+ reorient: "0" | "90" | "180" | "270";
6
+ path: number[] | undefined;
7
+ csys: number | undefined;
8
+ };
9
+ export declare const solidV1: (drawingId: DrawingID, id: ObjectID) => {
10
+ id: string | number;
11
+ indices?: number[] | undefined;
12
+ };
13
+ export declare const solidsV1: (drawingId: DrawingID, ids: ObjectID[]) => {
14
+ id: string | number;
15
+ indices?: number[] | undefined;
16
+ }[];
@@ -1 +1 @@
1
- export declare const getHighlightedColor: (isGHovered: boolean, isGSelected: boolean, isSHovered: boolean, isSSelected: boolean) => "green" | "red" | "#3280ff" | "#8040c0" | undefined;
1
+ export declare const getHighlightedColor: (isGHovered: boolean, isGSelected: boolean, isSHovered: boolean, isSSelected: boolean) => "red" | "green" | "#3280ff" | "#8040c0" | undefined;
@@ -1,39 +1,18 @@
1
- import { CCClasses } from '@buerli.io/classcad';
2
- import { DrawingID, GeometryElement, GraphicID, IStructureObject, IStructureTree, MemberType, ObjectID, PointMem, PointMemValue, SelectedItem, ContainerGeometryT } from '@buerli.io/core';
1
+ import { DrawingID, GeometryElement, GraphicID, ScgObject, MemberType, ObjectID, ScgPointMem, ScgPoint, ContainerGeometryT } from '@buerli.io/core';
3
2
  import * as THREE from 'three';
4
- export declare function membersValues(drawingId: DrawingID, ccObjId: DrawingID): any;
5
- export declare function addMembers(drawingId: DrawingID, ccObjId: DrawingID): {
6
- members?: undefined;
7
- } | {
8
- members: any;
9
- };
10
3
  export declare function useGlobalToLocalMatrix(drawingId: DrawingID, objId: ObjectID | undefined): THREE.Matrix4;
11
4
  export declare function getGlobalToLocalMatrix(drawingId: DrawingID, objId: ObjectID): THREE.Matrix4;
12
- export declare function setReference(index: number, state: any, set: any): (selected: SelectedItem[]) => void;
13
- export declare function convertToVector(point: PointMem | undefined): THREE.Vector3;
14
- export declare function convertToArray(point: PointMem): number[];
5
+ export declare function convertToVector(point: ScgPointMem | undefined): THREE.Vector3;
6
+ export declare function convertToArray(point: ScgPointMem): number[];
15
7
  export declare function linesIntersection(point1: THREE.Vector3, dir1: THREE.Vector3, point2: THREE.Vector3, dir2: THREE.Vector3): THREE.Vector3 | null;
16
8
  export declare const angleVecVec: (a: THREE.Vector3, b: THREE.Vector3) => number;
17
- export declare const calculateTangent: (tree: IStructureTree, object: IStructureObject, point: THREE.Vector3) => THREE.Vector3 | undefined;
18
- export declare function getDescendants(tree: IStructureTree, objectId: ObjectID): number[];
19
- export declare function getAncestorIdByClass(drawingId: DrawingID, objectId: ObjectID, parentClass: CCClasses): number | null;
20
- export declare const isSketchGeometry: (arg: IStructureObject | CCClasses) => boolean;
21
- export declare const is2DConstraint: (arg: IStructureObject | CCClasses) => boolean;
22
- export declare const isSketchRegion: (arg: IStructureObject | CCClasses) => boolean;
23
9
  export declare const degreesToRadians: (degrees: number) => number;
24
10
  export declare const radiansToDegrees: (radians: number) => number;
25
11
  export declare const getPointOnPlane: (unprojectedPoint: THREE.Vector3, camera: THREE.Camera, globalToLocalM: THREE.Matrix4) => THREE.Vector3;
26
12
  export declare const closestAngle: (value: number, to: number) => number;
27
- export declare const stringifyValue: (value: string | number | PointMemValue, type: MemberType) => string;
28
- export declare function findObject(drawingId: DrawingID, id: GraphicID | ObjectID, unrollRefs?: boolean): IStructureObject | ContainerGeometryT | GeometryElement | undefined;
29
- export declare function round(value: number, digits: number): number;
30
- export declare function rgbToHex(color: {
31
- r: number;
32
- g: number;
33
- b: number;
34
- }): string;
13
+ export declare const stringifyValue: (value: string | number | ScgPoint, type: MemberType) => string;
14
+ export declare function findObject(drawingId: DrawingID, id: GraphicID | ObjectID, unrollRefs?: boolean): ScgObject | ContainerGeometryT | GeometryElement | undefined;
35
15
  export declare function fmod(num: number, denom: number): number;
36
- export declare function numberToHexColor(color: number): string;
37
16
  export declare const solveQuadratic: (a: number, b: number, c: number) => number[];
38
17
  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[];
18
+ export declare function getRegionCoordSys(drawingId: DrawingID, regionObj: ScgObject): THREE.Vector3[];
@@ -0,0 +1,2 @@
1
+ import { DrawingID, ObjectID } from '@buerli.io/core';
2
+ export declare const getProductRigidSet: (drawingId: DrawingID, instanceId: ObjectID, rigidSets: ObjectID[]) => number | undefined;
@@ -8,4 +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;
11
12
  export declare const curveEntityFilter: (scope: any, data: any) => boolean;