@buerli.io/core 0.13.0 → 0.13.1-beta.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.
Files changed (81) hide show
  1. package/CHANGELOG.md +7 -7
  2. package/README.md +12 -12
  3. package/build/cjs/geometry/ThreeGeometryCreator.js +320 -320
  4. package/build/cjs/geometry/index.js +17 -17
  5. package/build/cjs/graphic/filters.js +25 -25
  6. package/build/cjs/index.js +25 -25
  7. package/build/cjs/store/index.js +37 -37
  8. package/build/cjs/store/states/buerli.js +98 -98
  9. package/build/cjs/store/states/cad.js +47 -47
  10. package/build/cjs/store/states/drawing.js +49 -49
  11. package/build/cjs/store/states/geometry.js +157 -157
  12. package/build/cjs/store/states/graphic.js +112 -112
  13. package/build/cjs/store/states/interaction.js +55 -55
  14. package/build/cjs/store/states/message.js +25 -25
  15. package/build/cjs/store/states/plugin.js +115 -115
  16. package/build/cjs/store/states/selection.js +267 -267
  17. package/build/cjs/store/states/structure.js +250 -250
  18. package/build/cjs/store/store.js +9 -9
  19. package/build/cjs/store/subscribtion/selection.js +49 -49
  20. package/build/cjs/store/subscribtion/subscribeToDrawing.js +13 -13
  21. package/build/cjs/types/IGraphicPackage.js +46 -46
  22. package/build/cjs/types/IStructurePatch.js +2 -2
  23. package/build/cjs/types/IStructureTree.js +28 -28
  24. package/build/cjs/types/InteractionInfo.js +11 -11
  25. package/build/cjs/types/index.js +20 -20
  26. package/build/cjs/utils/Math.js +91 -91
  27. package/build/cjs/utils/Measure.js +576 -576
  28. package/build/cjs/utils/Timing.js +34 -34
  29. package/build/esm/geometry/ThreeGeometryCreator.js +291 -291
  30. package/build/esm/geometry/index.js +1 -1
  31. package/build/esm/graphic/filters.js +12 -12
  32. package/build/esm/index.js +9 -9
  33. package/build/esm/store/index.js +26 -26
  34. package/build/esm/store/states/buerli.js +92 -92
  35. package/build/esm/store/states/cad.js +42 -42
  36. package/build/esm/store/states/drawing.js +45 -45
  37. package/build/esm/store/states/geometry.js +129 -129
  38. package/build/esm/store/states/graphic.js +107 -107
  39. package/build/esm/store/states/interaction.js +50 -50
  40. package/build/esm/store/states/message.js +21 -21
  41. package/build/esm/store/states/plugin.js +109 -109
  42. package/build/esm/store/states/selection.js +261 -261
  43. package/build/esm/store/states/structure.js +219 -219
  44. package/build/esm/store/store.js +3 -3
  45. package/build/esm/store/subscribtion/selection.js +44 -44
  46. package/build/esm/store/subscribtion/subscribeToDrawing.js +9 -9
  47. package/build/esm/types/IGraphicPackage.js +43 -43
  48. package/build/esm/types/IStructurePatch.js +1 -1
  49. package/build/esm/types/IStructureTree.js +24 -24
  50. package/build/esm/types/InteractionInfo.js +6 -6
  51. package/build/esm/types/index.js +4 -4
  52. package/build/esm/utils/Math.js +65 -65
  53. package/build/esm/utils/Measure.js +550 -550
  54. package/build/esm/utils/Timing.js +31 -31
  55. package/build/types/geometry/ThreeGeometryCreator.d.ts +256 -256
  56. package/build/types/geometry/index.d.ts +1 -1
  57. package/build/types/graphic/filters.d.ts +11 -11
  58. package/build/types/index.d.ts +37 -37
  59. package/build/types/store/index.d.ts +16 -16
  60. package/build/types/store/states/buerli.d.ts +41 -41
  61. package/build/types/store/states/cad.d.ts +53 -53
  62. package/build/types/store/states/drawing.d.ts +45 -45
  63. package/build/types/store/states/geometry.d.ts +65 -65
  64. package/build/types/store/states/graphic.d.ts +22 -22
  65. package/build/types/store/states/interaction.d.ts +34 -34
  66. package/build/types/store/states/message.d.ts +30 -30
  67. package/build/types/store/states/plugin.d.ts +53 -53
  68. package/build/types/store/states/selection.d.ts +62 -62
  69. package/build/types/store/states/structure.d.ts +47 -47
  70. package/build/types/store/store.d.ts +2 -2
  71. package/build/types/store/subscribtion/selection.d.ts +7 -7
  72. package/build/types/store/subscribtion/subscribeToDrawing.d.ts +4 -4
  73. package/build/types/types/IGraphicPackage.d.ts +160 -160
  74. package/build/types/types/IStructurePatch.d.ts +6 -6
  75. package/build/types/types/IStructureTree.d.ts +80 -80
  76. package/build/types/types/InteractionInfo.d.ts +43 -43
  77. package/build/types/types/index.d.ts +4 -4
  78. package/build/types/utils/Math.d.ts +21 -21
  79. package/build/types/utils/Measure.d.ts +64 -64
  80. package/build/types/utils/Timing.d.ts +8 -8
  81. package/package.json +44 -44
@@ -1,160 +1,160 @@
1
- import { ObjectID } from './IStructureTree';
2
- export declare type GraphicID = number;
3
- export interface IGraphicPackage {
4
- containers: IGraphicContainer[];
5
- properties: IGraphicPackageProperties;
6
- }
7
- export interface IGraphicPackageProperties {
8
- version: number;
9
- }
10
- export interface IGraphicContainer {
11
- /** The CADEntity id */
12
- id: ObjectID;
13
- /** The CC_Solid id */
14
- owner: ObjectID;
15
- type: ContainerType;
16
- properties: IGraphicContainerProps;
17
- meshes: IGraphicMesh[];
18
- lines: IGraphicLine[];
19
- vertices: IGraphicVertex[];
20
- edges: IGraphicEdge[];
21
- arcs: IGraphicArc[];
22
- cones: IGraphicCone[];
23
- coordinateSystems: IGraphicCoordSys[];
24
- namedPoints: IGraphicNamedPoint[];
25
- labels: IGraphicLabel[];
26
- }
27
- export interface IGraphicContainerProps {
28
- material: IGraphicMaterial;
29
- layer: string;
30
- min: number[];
31
- max: number[];
32
- chordHeightTol: number;
33
- angleTol: number;
34
- }
35
- export interface IGraphicElement {
36
- id: GraphicID;
37
- properties: any;
38
- }
39
- export interface IGraphicCoordSys extends IGraphicElement {
40
- origin: number[];
41
- xAxis: number[];
42
- yAxis: number[];
43
- zAxis: number[];
44
- }
45
- export interface IGraphicNamedPoint extends IGraphicElement {
46
- origin: number[];
47
- }
48
- export interface IGraphicLabel extends IGraphicElement {
49
- origin: number[];
50
- label: string;
51
- fontSize: number;
52
- }
53
- export interface IGraphicCone extends IGraphicElement {
54
- diameterBottom: number;
55
- origin: number[];
56
- axis: number[];
57
- }
58
- export interface IGraphicArc extends IGraphicElement {
59
- angle: number;
60
- radius: number;
61
- center: number[];
62
- xAxis: number[];
63
- zAxis: number[];
64
- isCircle: boolean;
65
- pointIds: number[];
66
- properties: IGraphicLineProperties;
67
- }
68
- export interface IGraphicEdge extends IGraphicElement {
69
- points: number[];
70
- pointIds: number[];
71
- properties: IGraphicLineProperties;
72
- }
73
- export interface IGraphicLine extends IGraphicElement {
74
- points: number[];
75
- pointIds: number[];
76
- properties: IGraphicLineProperties;
77
- }
78
- export interface IGraphicLineProperties {
79
- material: IGraphicMaterial;
80
- importName: string;
81
- }
82
- export interface IGraphicMesh extends IGraphicElement {
83
- vertices: number[];
84
- normals: number[];
85
- indices: number[];
86
- loops: number[][];
87
- properties: IGraphicMeshProperties;
88
- }
89
- export interface IGraphicMeshProperties {
90
- operationId: number;
91
- surface: IGraphicSurface | IGraphicPlane | IGraphicCylinder | IGraphicCone | IGraphicSphere;
92
- material: IGraphicMaterial;
93
- importId: string;
94
- importName: string;
95
- }
96
- export interface IGraphicSurface {
97
- type: GraphicType.PLANE | GraphicType.CYLINDER | GraphicType.CONE | GraphicType.SPHERE | GraphicType.NURBSSURFACE;
98
- }
99
- export interface IGraphicPlane extends IGraphicSurface {
100
- pointOnPlane: number[];
101
- normal: number[];
102
- }
103
- export interface IGraphicCylinder extends IGraphicSurface {
104
- origin: number[];
105
- axis: number[];
106
- radius: number;
107
- height: number;
108
- }
109
- export interface IGraphicCone extends IGraphicSurface {
110
- origin: number[];
111
- axis: number[];
112
- radiusBottom: number;
113
- radiusTop: number;
114
- height: number;
115
- }
116
- export interface IGraphicSphere extends IGraphicSurface {
117
- radius: number;
118
- }
119
- export declare enum GraphicType {
120
- POINT = "point",
121
- LINE = "line",
122
- ARC = "arc",
123
- CIRCLE = "circle",
124
- PLANE = "plane",
125
- CYLINDER = "cylinder",
126
- CONE = "cone",
127
- SPHERE = "sphere",
128
- NURBSCURVE = "nurbsCurve",
129
- NURBSSURFACE = "nurbsSurface",
130
- NONE = "none",
131
- BREP = "brep",
132
- POLYBREP = "polyBrep",
133
- CURVEARRAY = "curveArray",
134
- CURVELINE = "curveLine",
135
- CURVESPLINE = "curveSpline",
136
- CURVEARC = "curveArc",
137
- CURVECIRCLE = "curveCircle",
138
- CURVEPOINT = "curvePoint",
139
- LOOP = "loop"
140
- }
141
- export declare enum ContainerType {
142
- NONE = 0,
143
- BREP = 1,
144
- CURVEARRAY = 2,
145
- POLYBREP = 3
146
- }
147
- declare type RoA = ReadonlyArray<GraphicType>;
148
- export declare const MeshTypes: RoA;
149
- export declare const EdgeTypes: RoA;
150
- export declare const CurveTypes: RoA;
151
- export declare const EntityTypes: RoA;
152
- export declare const PointTypes: RoA;
153
- export interface IGraphicMaterial {
154
- color: number[];
155
- opacity: number;
156
- }
157
- export interface IGraphicVertex extends IGraphicElement {
158
- p: number[];
159
- }
160
- export {};
1
+ import { ObjectID } from './IStructureTree';
2
+ export declare type GraphicID = number;
3
+ export interface IGraphicPackage {
4
+ containers: IGraphicContainer[];
5
+ properties: IGraphicPackageProperties;
6
+ }
7
+ export interface IGraphicPackageProperties {
8
+ version: number;
9
+ }
10
+ export interface IGraphicContainer {
11
+ /** The CADEntity id */
12
+ id: ObjectID;
13
+ /** The CC_Solid id */
14
+ owner: ObjectID;
15
+ type: ContainerType;
16
+ properties: IGraphicContainerProps;
17
+ meshes: IGraphicMesh[];
18
+ lines: IGraphicLine[];
19
+ vertices: IGraphicVertex[];
20
+ edges: IGraphicEdge[];
21
+ arcs: IGraphicArc[];
22
+ cones: IGraphicCone[];
23
+ coordinateSystems: IGraphicCoordSys[];
24
+ namedPoints: IGraphicNamedPoint[];
25
+ labels: IGraphicLabel[];
26
+ }
27
+ export interface IGraphicContainerProps {
28
+ material: IGraphicMaterial;
29
+ layer: string;
30
+ min: number[];
31
+ max: number[];
32
+ chordHeightTol: number;
33
+ angleTol: number;
34
+ }
35
+ export interface IGraphicElement {
36
+ id: GraphicID;
37
+ properties: any;
38
+ }
39
+ export interface IGraphicCoordSys extends IGraphicElement {
40
+ origin: number[];
41
+ xAxis: number[];
42
+ yAxis: number[];
43
+ zAxis: number[];
44
+ }
45
+ export interface IGraphicNamedPoint extends IGraphicElement {
46
+ origin: number[];
47
+ }
48
+ export interface IGraphicLabel extends IGraphicElement {
49
+ origin: number[];
50
+ label: string;
51
+ fontSize: number;
52
+ }
53
+ export interface IGraphicCone extends IGraphicElement {
54
+ diameterBottom: number;
55
+ origin: number[];
56
+ axis: number[];
57
+ }
58
+ export interface IGraphicArc extends IGraphicElement {
59
+ angle: number;
60
+ radius: number;
61
+ center: number[];
62
+ xAxis: number[];
63
+ zAxis: number[];
64
+ isCircle: boolean;
65
+ pointIds: number[];
66
+ properties: IGraphicLineProperties;
67
+ }
68
+ export interface IGraphicEdge extends IGraphicElement {
69
+ points: number[];
70
+ pointIds: number[];
71
+ properties: IGraphicLineProperties;
72
+ }
73
+ export interface IGraphicLine extends IGraphicElement {
74
+ points: number[];
75
+ pointIds: number[];
76
+ properties: IGraphicLineProperties;
77
+ }
78
+ export interface IGraphicLineProperties {
79
+ material: IGraphicMaterial;
80
+ importName: string;
81
+ }
82
+ export interface IGraphicMesh extends IGraphicElement {
83
+ vertices: number[];
84
+ normals: number[];
85
+ indices: number[];
86
+ loops: number[][];
87
+ properties: IGraphicMeshProperties;
88
+ }
89
+ export interface IGraphicMeshProperties {
90
+ operationId: number;
91
+ surface: IGraphicSurface | IGraphicPlane | IGraphicCylinder | IGraphicCone | IGraphicSphere;
92
+ material: IGraphicMaterial;
93
+ importId: string;
94
+ importName: string;
95
+ }
96
+ export interface IGraphicSurface {
97
+ type: GraphicType.PLANE | GraphicType.CYLINDER | GraphicType.CONE | GraphicType.SPHERE | GraphicType.NURBSSURFACE;
98
+ }
99
+ export interface IGraphicPlane extends IGraphicSurface {
100
+ pointOnPlane: number[];
101
+ normal: number[];
102
+ }
103
+ export interface IGraphicCylinder extends IGraphicSurface {
104
+ origin: number[];
105
+ axis: number[];
106
+ radius: number;
107
+ height: number;
108
+ }
109
+ export interface IGraphicCone extends IGraphicSurface {
110
+ origin: number[];
111
+ axis: number[];
112
+ radiusBottom: number;
113
+ radiusTop: number;
114
+ height: number;
115
+ }
116
+ export interface IGraphicSphere extends IGraphicSurface {
117
+ radius: number;
118
+ }
119
+ export declare enum GraphicType {
120
+ POINT = "point",
121
+ LINE = "line",
122
+ ARC = "arc",
123
+ CIRCLE = "circle",
124
+ PLANE = "plane",
125
+ CYLINDER = "cylinder",
126
+ CONE = "cone",
127
+ SPHERE = "sphere",
128
+ NURBSCURVE = "nurbsCurve",
129
+ NURBSSURFACE = "nurbsSurface",
130
+ NONE = "none",
131
+ BREP = "brep",
132
+ POLYBREP = "polyBrep",
133
+ CURVEARRAY = "curveArray",
134
+ CURVELINE = "curveLine",
135
+ CURVESPLINE = "curveSpline",
136
+ CURVEARC = "curveArc",
137
+ CURVECIRCLE = "curveCircle",
138
+ CURVEPOINT = "curvePoint",
139
+ LOOP = "loop"
140
+ }
141
+ export declare enum ContainerType {
142
+ NONE = 0,
143
+ BREP = 1,
144
+ CURVEARRAY = 2,
145
+ POLYBREP = 3
146
+ }
147
+ declare type RoA = ReadonlyArray<GraphicType>;
148
+ export declare const MeshTypes: RoA;
149
+ export declare const EdgeTypes: RoA;
150
+ export declare const CurveTypes: RoA;
151
+ export declare const EntityTypes: RoA;
152
+ export declare const PointTypes: RoA;
153
+ export interface IGraphicMaterial {
154
+ color: number[];
155
+ opacity: number;
156
+ }
157
+ export interface IGraphicVertex extends IGraphicElement {
158
+ p: number[];
159
+ }
160
+ export {};
@@ -1,6 +1,6 @@
1
- import { IStructureObject } from './IStructureTree';
2
- export interface IStructurePatch {
3
- op: 'add' | 'remove' | 'replace';
4
- path: string;
5
- value: number | IStructureObject;
6
- }
1
+ import { IStructureObject } from './IStructureTree';
2
+ export interface IStructurePatch {
3
+ op: 'add' | 'remove' | 'replace';
4
+ path: string;
5
+ value: number | IStructureObject;
6
+ }
@@ -1,80 +1,80 @@
1
- /**
2
- * Defines the default structure tree.
3
- * Should be used to initialize a new structure tree.
4
- */
5
- export declare const DEFAULT_STRUCTURE_TREE: () => IStructureProtocol;
6
- /** Object Id's in classcad are always >= 1. */
7
- export declare type ObjectID = number;
8
- /** Object identifier */
9
- export declare type ObjectIdent = string;
10
- /** Zero is no Id in classcad, and no object will exist in the CCDatabase for Id === 0! */
11
- export declare const NOID = 0;
12
- export interface IStructureTree {
13
- [key: string]: IStructureObject;
14
- }
15
- export interface IStructureProtocol {
16
- tree: IStructureTree;
17
- /** Id of the current root (root part or assembly). Can be zero -->> object does not exist! */
18
- root: ObjectID;
19
- /** Id of the current product (root or node in part/assembly container). Can be undefined or zero -->> object does not exist! */
20
- currentProduct?: ObjectID;
21
- /**
22
- * Id of the current node in the expanded assembly tree. Can be undefined or zero -->> object does not exist!
23
- * @deprecated currentNode will be removed in a future release, use currentInstance instead.
24
- */
25
- currentNode?: ObjectID;
26
- /** Id of the current instance in the expanded assembly tree. Can be undefined or zero -->> object does not exist! */
27
- currentInstance?: ObjectID;
28
- /** Id of the test root. Can be undefined or zero -->> object does not exist! */
29
- testRoot?: ObjectID;
30
- }
31
- export interface IStructureObject {
32
- name: string;
33
- class: string;
34
- id: ObjectID;
35
- flags: number;
36
- coordinateSystem?: number[][];
37
- parent: ObjectID | null;
38
- children?: ObjectID[];
39
- members?: {
40
- [key: string]: IStructureMember;
41
- };
42
- geometryIdList?: number[];
43
- visible?: boolean;
44
- dimensions?: ObjectID[];
45
- expressionSet?: ObjectID;
46
- geometrySet?: ObjectID;
47
- solids?: number[];
48
- instances?: ObjectID[];
49
- instancesNested?: ObjectID[];
50
- link?: ObjectID;
51
- }
52
- export declare enum MemberType {
53
- ARRAY = "array",
54
- ID = "id",
55
- POINT = "point",
56
- REAL = "real",
57
- STRING = "string"
58
- }
59
- interface IMemberBase {
60
- type: MemberType;
61
- expression: string;
62
- visible: number;
63
- }
64
- interface IValueMem<T extends number[] | number | string | PointMemValue> extends IMemberBase {
65
- value: T;
66
- }
67
- export declare type ArrayMem = IValueMem<never> & {
68
- members: IStructureMember[];
69
- };
70
- export declare type IdMem = IValueMem<number>;
71
- export declare type RealMem = IValueMem<number>;
72
- export declare type StringMem = IValueMem<string>;
73
- export declare type PointMem = IValueMem<PointMemValue>;
74
- export declare type PointMemValue = {
75
- x: number;
76
- y: number;
77
- z: number;
78
- };
79
- export declare type IStructureMember = RealMem | StringMem | PointMem | IdMem | ArrayMem;
80
- export {};
1
+ /**
2
+ * Defines the default structure tree.
3
+ * Should be used to initialize a new structure tree.
4
+ */
5
+ export declare const DEFAULT_STRUCTURE_TREE: () => IStructureProtocol;
6
+ /** Object Id's in classcad are always >= 1. */
7
+ export declare type ObjectID = number;
8
+ /** Object identifier */
9
+ export declare type ObjectIdent = string;
10
+ /** Zero is no Id in classcad, and no object will exist in the CCDatabase for Id === 0! */
11
+ export declare const NOID = 0;
12
+ export interface IStructureTree {
13
+ [key: string]: IStructureObject;
14
+ }
15
+ export interface IStructureProtocol {
16
+ tree: IStructureTree;
17
+ /** Id of the current root (root part or assembly). Can be zero -->> object does not exist! */
18
+ root: ObjectID;
19
+ /** Id of the current product (root or node in part/assembly container). Can be undefined or zero -->> object does not exist! */
20
+ currentProduct?: ObjectID;
21
+ /**
22
+ * Id of the current node in the expanded assembly tree. Can be undefined or zero -->> object does not exist!
23
+ * @deprecated currentNode will be removed in a future release, use currentInstance instead.
24
+ */
25
+ currentNode?: ObjectID;
26
+ /** Id of the current instance in the expanded assembly tree. Can be undefined or zero -->> object does not exist! */
27
+ currentInstance?: ObjectID;
28
+ /** Id of the test root. Can be undefined or zero -->> object does not exist! */
29
+ testRoot?: ObjectID;
30
+ }
31
+ export interface IStructureObject {
32
+ name: string;
33
+ class: string;
34
+ id: ObjectID;
35
+ flags: number;
36
+ coordinateSystem?: number[][];
37
+ parent: ObjectID | null;
38
+ children?: ObjectID[];
39
+ members?: {
40
+ [key: string]: IStructureMember;
41
+ };
42
+ geometryIdList?: number[];
43
+ visible?: boolean;
44
+ dimensions?: ObjectID[];
45
+ expressionSet?: ObjectID;
46
+ geometrySet?: ObjectID;
47
+ solids?: number[];
48
+ instances?: ObjectID[];
49
+ instancesNested?: ObjectID[];
50
+ link?: ObjectID;
51
+ }
52
+ export declare enum MemberType {
53
+ ARRAY = "array",
54
+ ID = "id",
55
+ POINT = "point",
56
+ REAL = "real",
57
+ STRING = "string"
58
+ }
59
+ interface IMemberBase {
60
+ type: MemberType;
61
+ expression: string;
62
+ visible: number;
63
+ }
64
+ interface IValueMem<T extends number[] | number | string | PointMemValue> extends IMemberBase {
65
+ value: T;
66
+ }
67
+ export declare type ArrayMem = IValueMem<never> & {
68
+ members: IStructureMember[];
69
+ };
70
+ export declare type IdMem = IValueMem<number>;
71
+ export declare type RealMem = IValueMem<number>;
72
+ export declare type StringMem = IValueMem<string>;
73
+ export declare type PointMem = IValueMem<PointMemValue>;
74
+ export declare type PointMemValue = {
75
+ x: number;
76
+ y: number;
77
+ z: number;
78
+ };
79
+ export declare type IStructureMember = RealMem | StringMem | PointMem | IdMem | ArrayMem;
80
+ export {};
@@ -1,43 +1,43 @@
1
- import { GraphicID } from './IGraphicPackage';
2
- import { ObjectID } from './IStructureTree';
3
- /**
4
- * It contains general information that can be used to identify CCObjects as well as Brep Elements.
5
- */
6
- export declare type InteractionInfo<T = any> = {
7
- /**
8
- * Unique identifier of the interaction info.
9
- */
10
- uniqueIdent: string;
11
- /**
12
- * Identifies the object of the Part (for BaseModeling).
13
- * Needed to identify the location ot the object in the tree.
14
- */
15
- objectId: ObjectID;
16
- /**
17
- * Identifies the instance of the Assembly (for BaseModeling).
18
- * Needed to identify the location ot the object in the tree.
19
- */
20
- prodRefId?: ObjectID | null;
21
- /**
22
- * Indentifies an object in the tree by it's full path, starting at AllObjects.
23
- * It is optional, but should be filled if possible. It can be used to get the full,
24
- * proper transformation of the identified object.
25
- */
26
- objectPath?: ObjectID[];
27
- /**
28
- * Identifies the cad entity of the graphic/geometry cache.
29
- * Optional but needed for graphic/geometry element identification.
30
- */
31
- containerId?: ObjectID;
32
- /**
33
- * Identifies a single graphic/geometry element of a cad entity.
34
- * Optional but needed for graphic/geometry element identification.
35
- */
36
- graphicId?: GraphicID;
37
- /**
38
- * Arbitrary object that contains user specific information.
39
- */
40
- userData?: T;
41
- };
42
- export declare const createInfo: (data: Omit<InteractionInfo, 'uniqueIdent'>) => InteractionInfo;
43
- export declare const createUniqueIdent: (data: Omit<InteractionInfo, 'uniqueIdent'>) => string;
1
+ import { GraphicID } from './IGraphicPackage';
2
+ import { ObjectID } from './IStructureTree';
3
+ /**
4
+ * It contains general information that can be used to identify CCObjects as well as Brep Elements.
5
+ */
6
+ export declare type InteractionInfo<T = any> = {
7
+ /**
8
+ * Unique identifier of the interaction info.
9
+ */
10
+ uniqueIdent: string;
11
+ /**
12
+ * Identifies the object of the Part (for BaseModeling).
13
+ * Needed to identify the location ot the object in the tree.
14
+ */
15
+ objectId: ObjectID;
16
+ /**
17
+ * Identifies the instance of the Assembly (for BaseModeling).
18
+ * Needed to identify the location ot the object in the tree.
19
+ */
20
+ prodRefId?: ObjectID | null;
21
+ /**
22
+ * Indentifies an object in the tree by it's full path, starting at AllObjects.
23
+ * It is optional, but should be filled if possible. It can be used to get the full,
24
+ * proper transformation of the identified object.
25
+ */
26
+ objectPath?: ObjectID[];
27
+ /**
28
+ * Identifies the cad entity of the graphic/geometry cache.
29
+ * Optional but needed for graphic/geometry element identification.
30
+ */
31
+ containerId?: ObjectID;
32
+ /**
33
+ * Identifies a single graphic/geometry element of a cad entity.
34
+ * Optional but needed for graphic/geometry element identification.
35
+ */
36
+ graphicId?: GraphicID;
37
+ /**
38
+ * Arbitrary object that contains user specific information.
39
+ */
40
+ userData?: T;
41
+ };
42
+ export declare const createInfo: (data: Omit<InteractionInfo, 'uniqueIdent'>) => InteractionInfo;
43
+ export declare const createUniqueIdent: (data: Omit<InteractionInfo, 'uniqueIdent'>) => string;
@@ -1,4 +1,4 @@
1
- export * from './IGraphicPackage';
2
- export * from './InteractionInfo';
3
- export * from './IStructurePatch';
4
- export * from './IStructureTree';
1
+ export * from './IGraphicPackage';
2
+ export * from './InteractionInfo';
3
+ export * from './IStructurePatch';
4
+ export * from './IStructureTree';
@@ -1,21 +1,21 @@
1
- import * as THREE from 'three';
2
- export declare const MathUtils: {
3
- convertToMatrix4: (coordinateSystem: number[][]) => THREE.Matrix4;
4
- convertToMatrix3: (coordinateSystem: number[][]) => THREE.Matrix3;
5
- convertToCoordinateSystem: (matrix: THREE.Matrix4) => number[][];
6
- round(value: number, digits: number): number;
7
- /**
8
- * Calculates a transformation matrix.
9
- *
10
- * xDir and yDir are NOT orthogonal in general case, thus the y-axis is calculated as a series of cross products.
11
- *
12
- * @param originPos The origin position.
13
- * @param xDir The x direction.
14
- * @param yDir The y direction.
15
- * @param offset The offset vector.
16
- * @param rotation The rotation vector.
17
- * @param inverted The inverted flag --- 0: do not invert; 1: do invert.
18
- * @returns The calculated THREE.Matrix4
19
- */
20
- calcluateTransform: (originPos: THREE.Vector3, xDir: THREE.Vector3, yDir: THREE.Vector3, offset: THREE.Vector3, rotation: THREE.Vector3, inverted: 0 | 1) => THREE.Matrix4;
21
- };
1
+ import * as THREE from 'three';
2
+ export declare const MathUtils: {
3
+ convertToMatrix4: (coordinateSystem: number[][]) => THREE.Matrix4;
4
+ convertToMatrix3: (coordinateSystem: number[][]) => THREE.Matrix3;
5
+ convertToCoordinateSystem: (matrix: THREE.Matrix4) => number[][];
6
+ round(value: number, digits: number): number;
7
+ /**
8
+ * Calculates a transformation matrix.
9
+ *
10
+ * xDir and yDir are NOT orthogonal in general case, thus the y-axis is calculated as a series of cross products.
11
+ *
12
+ * @param originPos The origin position.
13
+ * @param xDir The x direction.
14
+ * @param yDir The y direction.
15
+ * @param offset The offset vector.
16
+ * @param rotation The rotation vector.
17
+ * @param inverted The inverted flag --- 0: do not invert; 1: do invert.
18
+ * @returns The calculated THREE.Matrix4
19
+ */
20
+ calcluateTransform: (originPos: THREE.Vector3, xDir: THREE.Vector3, yDir: THREE.Vector3, offset: THREE.Vector3, rotation: THREE.Vector3, inverted: 0 | 1) => THREE.Matrix4;
21
+ };