@bitbybit-dev/base 0.20.1 → 0.20.3
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/LICENSE +1 -1
- package/lib/api/inputs/base-inputs.d.ts +8 -0
- package/lib/api/inputs/index.d.ts +3 -0
- package/lib/api/inputs/index.js +3 -0
- package/lib/api/inputs/inputs.d.ts +3 -0
- package/lib/api/inputs/inputs.js +3 -0
- package/lib/api/inputs/line-inputs.d.ts +240 -0
- package/lib/api/inputs/line-inputs.js +247 -0
- package/lib/api/inputs/mesh-inputs.d.ts +82 -0
- package/lib/api/inputs/mesh-inputs.js +83 -0
- package/lib/api/inputs/point-inputs.d.ts +153 -0
- package/lib/api/inputs/point-inputs.js +188 -0
- package/lib/api/inputs/polyline-inputs.d.ts +206 -0
- package/lib/api/inputs/polyline-inputs.js +229 -0
- package/lib/api/inputs/text-inputs.d.ts +1 -1
- package/lib/api/inputs/transforms-inputs.d.ts +18 -0
- package/lib/api/inputs/transforms-inputs.js +29 -0
- package/lib/api/inputs/vector-inputs.d.ts +8 -0
- package/lib/api/inputs/vector-inputs.js +8 -0
- package/lib/api/models/index.d.ts +1 -0
- package/lib/api/models/index.js +1 -0
- package/lib/api/models/point/bucket.d.ts +1 -0
- package/lib/api/models/point/bucket.js +1 -0
- package/lib/api/models/point/hex-grid-data.d.ts +8 -0
- package/lib/api/models/point/hex-grid-data.js +2 -0
- package/lib/api/models/point/index.d.ts +1 -0
- package/lib/api/models/point/index.js +1 -0
- package/lib/api/services/dates.js +45 -15
- package/lib/api/services/index.d.ts +3 -0
- package/lib/api/services/index.js +3 -0
- package/lib/api/services/line.d.ts +149 -0
- package/lib/api/services/line.js +320 -0
- package/lib/api/services/lists.d.ts +1 -1
- package/lib/api/services/lists.js +1 -2
- package/lib/api/services/mesh.d.ts +66 -0
- package/lib/api/services/mesh.js +235 -0
- package/lib/api/services/point.d.ts +96 -1
- package/lib/api/services/point.js +540 -1
- package/lib/api/services/polyline.d.ts +149 -0
- package/lib/api/services/polyline.js +444 -0
- package/lib/api/services/transforms.d.ts +26 -1
- package/lib/api/services/transforms.js +66 -3
- package/lib/api/services/vector.d.ts +18 -0
- package/lib/api/services/vector.js +27 -0
- package/lib/api/unit-test-helper.d.ts +20 -0
- package/lib/api/unit-test-helper.js +130 -0
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -18,6 +18,14 @@ export declare namespace Base {
|
|
|
18
18
|
origin: Base.Point2;
|
|
19
19
|
direction: Base.Vector2;
|
|
20
20
|
};
|
|
21
|
+
type Segment2 = [Point2, Point2];
|
|
22
|
+
type Segment3 = [Point3, Point3];
|
|
23
|
+
type TrianglePlane3 = {
|
|
24
|
+
normal: Vector3;
|
|
25
|
+
d: number;
|
|
26
|
+
};
|
|
27
|
+
type Triangle3 = [Base.Point3, Base.Point3, Base.Point3];
|
|
28
|
+
type Mesh3 = Triangle3[];
|
|
21
29
|
type Plane3 = {
|
|
22
30
|
origin: Base.Point3;
|
|
23
31
|
normal: Base.Vector3;
|
package/lib/api/inputs/index.js
CHANGED
package/lib/api/inputs/inputs.js
CHANGED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { Base } from "./base-inputs";
|
|
2
|
+
export declare namespace Line {
|
|
3
|
+
class LinePointsDto {
|
|
4
|
+
/**
|
|
5
|
+
* Provide options without default values
|
|
6
|
+
*/
|
|
7
|
+
constructor(start?: Base.Point3, end?: Base.Point3);
|
|
8
|
+
/**
|
|
9
|
+
* Start point
|
|
10
|
+
* @default undefined
|
|
11
|
+
*/
|
|
12
|
+
start?: Base.Point3;
|
|
13
|
+
/**
|
|
14
|
+
* End point
|
|
15
|
+
* @default undefined
|
|
16
|
+
*/
|
|
17
|
+
end?: Base.Point3;
|
|
18
|
+
}
|
|
19
|
+
class LineStartEndPointsDto {
|
|
20
|
+
/**
|
|
21
|
+
* Provide options without default values
|
|
22
|
+
*/
|
|
23
|
+
constructor(startPoints?: Base.Point3[], endPoints?: Base.Point3[]);
|
|
24
|
+
/**
|
|
25
|
+
* Start points
|
|
26
|
+
* @default undefined
|
|
27
|
+
*/
|
|
28
|
+
startPoints: Base.Point3[];
|
|
29
|
+
/**
|
|
30
|
+
* End points
|
|
31
|
+
* @default undefined
|
|
32
|
+
*/
|
|
33
|
+
endPoints: Base.Point3[];
|
|
34
|
+
}
|
|
35
|
+
class DrawLineDto<T> {
|
|
36
|
+
/**
|
|
37
|
+
* Provide options without default values
|
|
38
|
+
*/
|
|
39
|
+
constructor(line?: LinePointsDto, opacity?: number, colours?: string | string[], size?: number, updatable?: boolean, lineMesh?: T);
|
|
40
|
+
/**
|
|
41
|
+
* Line
|
|
42
|
+
* @default undefined
|
|
43
|
+
*/
|
|
44
|
+
line?: LinePointsDto;
|
|
45
|
+
/**
|
|
46
|
+
* Value between 0 and 1
|
|
47
|
+
* @default 1
|
|
48
|
+
* @minimum 0
|
|
49
|
+
* @maximum 1
|
|
50
|
+
* @step 0.1
|
|
51
|
+
*/
|
|
52
|
+
opacity?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Hex colour string
|
|
55
|
+
* @default #444444
|
|
56
|
+
*/
|
|
57
|
+
colours?: string | string[];
|
|
58
|
+
/**
|
|
59
|
+
* Width of the line
|
|
60
|
+
* @default 3
|
|
61
|
+
* @minimum 0
|
|
62
|
+
* @maximum Infinity
|
|
63
|
+
* @step 0.1
|
|
64
|
+
*/
|
|
65
|
+
size?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Indicates wether the position of this line will change in time
|
|
68
|
+
* @default false
|
|
69
|
+
*/
|
|
70
|
+
updatable?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Line mesh variable in case it already exists and needs updating
|
|
73
|
+
* @default undefined
|
|
74
|
+
*/
|
|
75
|
+
lineMesh?: T;
|
|
76
|
+
}
|
|
77
|
+
class DrawLinesDto<T> {
|
|
78
|
+
/**
|
|
79
|
+
* Provide options without default values
|
|
80
|
+
*/
|
|
81
|
+
constructor(lines?: LinePointsDto[], opacity?: number, colours?: string | string[], size?: number, updatable?: boolean, linesMesh?: T);
|
|
82
|
+
/**
|
|
83
|
+
* Lines
|
|
84
|
+
* @default undefined
|
|
85
|
+
*/
|
|
86
|
+
lines?: LinePointsDto[];
|
|
87
|
+
/**
|
|
88
|
+
* Value between 0 and 1
|
|
89
|
+
* @default 1
|
|
90
|
+
* @minimum 0
|
|
91
|
+
* @maximum 1
|
|
92
|
+
* @step 0.1
|
|
93
|
+
*/
|
|
94
|
+
opacity?: number;
|
|
95
|
+
/**
|
|
96
|
+
* Hex colour string
|
|
97
|
+
* @default #444444
|
|
98
|
+
*/
|
|
99
|
+
colours?: string | string[];
|
|
100
|
+
/**
|
|
101
|
+
* Width of the line
|
|
102
|
+
* @default 3
|
|
103
|
+
* @minimum 0
|
|
104
|
+
* @maximum Infinity
|
|
105
|
+
* @step 0.1
|
|
106
|
+
*/
|
|
107
|
+
size?: number;
|
|
108
|
+
/**
|
|
109
|
+
* Indicates wether the position of these lines will change in time
|
|
110
|
+
* @default false
|
|
111
|
+
*/
|
|
112
|
+
updatable?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Line mesh variable in case it already exists and needs updating
|
|
115
|
+
* @default undefined
|
|
116
|
+
*/
|
|
117
|
+
linesMesh?: T;
|
|
118
|
+
}
|
|
119
|
+
class PointsLinesDto {
|
|
120
|
+
constructor(points?: Base.Point3[]);
|
|
121
|
+
/**
|
|
122
|
+
* Points
|
|
123
|
+
* @default undefined
|
|
124
|
+
*/
|
|
125
|
+
points?: Base.Point3[];
|
|
126
|
+
}
|
|
127
|
+
class LineDto {
|
|
128
|
+
constructor(line?: LinePointsDto);
|
|
129
|
+
/**
|
|
130
|
+
* Line to convert
|
|
131
|
+
* @default undefined
|
|
132
|
+
*/
|
|
133
|
+
line?: LinePointsDto;
|
|
134
|
+
}
|
|
135
|
+
class SegmentDto {
|
|
136
|
+
constructor(segment?: Base.Segment3);
|
|
137
|
+
/**
|
|
138
|
+
* Segment
|
|
139
|
+
* @default undefined
|
|
140
|
+
*/
|
|
141
|
+
segment?: Base.Segment3;
|
|
142
|
+
}
|
|
143
|
+
class SegmentsDto {
|
|
144
|
+
constructor(segments?: Base.Segment3[]);
|
|
145
|
+
/**
|
|
146
|
+
* Segments
|
|
147
|
+
* @default undefined
|
|
148
|
+
*/
|
|
149
|
+
segments?: Base.Segment3[];
|
|
150
|
+
}
|
|
151
|
+
class LinesDto {
|
|
152
|
+
constructor(lines?: LinePointsDto[]);
|
|
153
|
+
/**
|
|
154
|
+
* Lines to convert
|
|
155
|
+
* @default undefined
|
|
156
|
+
*/
|
|
157
|
+
lines?: LinePointsDto[];
|
|
158
|
+
}
|
|
159
|
+
class LineLineIntersectionDto {
|
|
160
|
+
constructor(line1?: LinePointsDto, line2?: LinePointsDto, tolerance?: number);
|
|
161
|
+
/**
|
|
162
|
+
* First line
|
|
163
|
+
* @default undefined
|
|
164
|
+
*/
|
|
165
|
+
line1?: LinePointsDto;
|
|
166
|
+
/**
|
|
167
|
+
* Second line
|
|
168
|
+
* @default undefined
|
|
169
|
+
*/
|
|
170
|
+
line2?: LinePointsDto;
|
|
171
|
+
/**
|
|
172
|
+
* Set to false if you want to check for infinite lines
|
|
173
|
+
* @default true
|
|
174
|
+
*/
|
|
175
|
+
checkSegmentsOnly?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* Tolerance for intersection
|
|
178
|
+
* @default 0.01
|
|
179
|
+
* @minimum 0
|
|
180
|
+
* @maximum Infinity
|
|
181
|
+
* @step 0.1
|
|
182
|
+
*/
|
|
183
|
+
tolerance?: number;
|
|
184
|
+
}
|
|
185
|
+
class PointOnLineDto {
|
|
186
|
+
constructor(line?: LinePointsDto, param?: number);
|
|
187
|
+
/**
|
|
188
|
+
* Line to get point on
|
|
189
|
+
* @default undefined
|
|
190
|
+
*/
|
|
191
|
+
line?: LinePointsDto;
|
|
192
|
+
/**
|
|
193
|
+
* Param to use for point on line
|
|
194
|
+
* @default 0.5
|
|
195
|
+
* @minimum -Infinity
|
|
196
|
+
* @maximum Infinity
|
|
197
|
+
* @step 0.1
|
|
198
|
+
*/
|
|
199
|
+
param?: number;
|
|
200
|
+
}
|
|
201
|
+
class TransformLineDto {
|
|
202
|
+
constructor(line?: LinePointsDto, transformation?: Base.TransformMatrixes);
|
|
203
|
+
/**
|
|
204
|
+
* Line to transform
|
|
205
|
+
* @default undefined
|
|
206
|
+
*/
|
|
207
|
+
line?: LinePointsDto;
|
|
208
|
+
/**
|
|
209
|
+
* Transformation matrix or a list of transformation matrixes
|
|
210
|
+
* @default undefined
|
|
211
|
+
*/
|
|
212
|
+
transformation?: Base.TransformMatrixes;
|
|
213
|
+
}
|
|
214
|
+
class TransformsLinesDto {
|
|
215
|
+
constructor(lines?: LinePointsDto[], transformation?: Base.TransformMatrixes[]);
|
|
216
|
+
/**
|
|
217
|
+
* Lines to transform
|
|
218
|
+
* @default undefined
|
|
219
|
+
*/
|
|
220
|
+
lines?: LinePointsDto[];
|
|
221
|
+
/**
|
|
222
|
+
* Transformations matrix or a list of transformations matrixes
|
|
223
|
+
* @default undefined
|
|
224
|
+
*/
|
|
225
|
+
transformation?: Base.TransformMatrixes[];
|
|
226
|
+
}
|
|
227
|
+
class TransformLinesDto {
|
|
228
|
+
constructor(lines?: LinePointsDto[], transformation?: Base.TransformMatrixes);
|
|
229
|
+
/**
|
|
230
|
+
* Lines to transform
|
|
231
|
+
* @default undefined
|
|
232
|
+
*/
|
|
233
|
+
lines?: LinePointsDto[];
|
|
234
|
+
/**
|
|
235
|
+
* Transformation matrix or a list of transformation matrixes
|
|
236
|
+
* @default undefined
|
|
237
|
+
*/
|
|
238
|
+
transformation?: Base.TransformMatrixes;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
2
|
+
export var Line;
|
|
3
|
+
(function (Line) {
|
|
4
|
+
class LinePointsDto {
|
|
5
|
+
/**
|
|
6
|
+
* Provide options without default values
|
|
7
|
+
*/
|
|
8
|
+
constructor(start, end) {
|
|
9
|
+
if (start !== undefined) {
|
|
10
|
+
this.start = start;
|
|
11
|
+
}
|
|
12
|
+
if (end !== undefined) {
|
|
13
|
+
this.end = end;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
Line.LinePointsDto = LinePointsDto;
|
|
18
|
+
class LineStartEndPointsDto {
|
|
19
|
+
/**
|
|
20
|
+
* Provide options without default values
|
|
21
|
+
*/
|
|
22
|
+
constructor(startPoints, endPoints) {
|
|
23
|
+
if (startPoints !== undefined) {
|
|
24
|
+
this.startPoints = startPoints;
|
|
25
|
+
}
|
|
26
|
+
if (endPoints !== undefined) {
|
|
27
|
+
this.endPoints = endPoints;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
Line.LineStartEndPointsDto = LineStartEndPointsDto;
|
|
32
|
+
class DrawLineDto {
|
|
33
|
+
/**
|
|
34
|
+
* Provide options without default values
|
|
35
|
+
*/
|
|
36
|
+
constructor(line, opacity, colours, size, updatable, lineMesh) {
|
|
37
|
+
/**
|
|
38
|
+
* Value between 0 and 1
|
|
39
|
+
* @default 1
|
|
40
|
+
* @minimum 0
|
|
41
|
+
* @maximum 1
|
|
42
|
+
* @step 0.1
|
|
43
|
+
*/
|
|
44
|
+
this.opacity = 1;
|
|
45
|
+
/**
|
|
46
|
+
* Hex colour string
|
|
47
|
+
* @default #444444
|
|
48
|
+
*/
|
|
49
|
+
this.colours = "#444444";
|
|
50
|
+
/**
|
|
51
|
+
* Width of the line
|
|
52
|
+
* @default 3
|
|
53
|
+
* @minimum 0
|
|
54
|
+
* @maximum Infinity
|
|
55
|
+
* @step 0.1
|
|
56
|
+
*/
|
|
57
|
+
this.size = 3;
|
|
58
|
+
/**
|
|
59
|
+
* Indicates wether the position of this line will change in time
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
this.updatable = false;
|
|
63
|
+
if (line !== undefined) {
|
|
64
|
+
this.line = line;
|
|
65
|
+
}
|
|
66
|
+
if (opacity !== undefined) {
|
|
67
|
+
this.opacity = opacity;
|
|
68
|
+
}
|
|
69
|
+
if (colours !== undefined) {
|
|
70
|
+
this.colours = colours;
|
|
71
|
+
}
|
|
72
|
+
if (size !== undefined) {
|
|
73
|
+
this.size = size;
|
|
74
|
+
}
|
|
75
|
+
if (updatable !== undefined) {
|
|
76
|
+
this.updatable = updatable;
|
|
77
|
+
}
|
|
78
|
+
if (lineMesh !== undefined) {
|
|
79
|
+
this.lineMesh = lineMesh;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
Line.DrawLineDto = DrawLineDto;
|
|
84
|
+
class DrawLinesDto {
|
|
85
|
+
/**
|
|
86
|
+
* Provide options without default values
|
|
87
|
+
*/
|
|
88
|
+
constructor(lines, opacity, colours, size, updatable, linesMesh) {
|
|
89
|
+
/**
|
|
90
|
+
* Value between 0 and 1
|
|
91
|
+
* @default 1
|
|
92
|
+
* @minimum 0
|
|
93
|
+
* @maximum 1
|
|
94
|
+
* @step 0.1
|
|
95
|
+
*/
|
|
96
|
+
this.opacity = 1;
|
|
97
|
+
/**
|
|
98
|
+
* Hex colour string
|
|
99
|
+
* @default #444444
|
|
100
|
+
*/
|
|
101
|
+
this.colours = "#444444";
|
|
102
|
+
/**
|
|
103
|
+
* Width of the line
|
|
104
|
+
* @default 3
|
|
105
|
+
* @minimum 0
|
|
106
|
+
* @maximum Infinity
|
|
107
|
+
* @step 0.1
|
|
108
|
+
*/
|
|
109
|
+
this.size = 3;
|
|
110
|
+
/**
|
|
111
|
+
* Indicates wether the position of these lines will change in time
|
|
112
|
+
* @default false
|
|
113
|
+
*/
|
|
114
|
+
this.updatable = false;
|
|
115
|
+
if (lines !== undefined) {
|
|
116
|
+
this.lines = lines;
|
|
117
|
+
}
|
|
118
|
+
if (opacity !== undefined) {
|
|
119
|
+
this.opacity = opacity;
|
|
120
|
+
}
|
|
121
|
+
if (colours !== undefined) {
|
|
122
|
+
this.colours = colours;
|
|
123
|
+
}
|
|
124
|
+
if (size !== undefined) {
|
|
125
|
+
this.size = size;
|
|
126
|
+
}
|
|
127
|
+
if (updatable !== undefined) {
|
|
128
|
+
this.updatable = updatable;
|
|
129
|
+
}
|
|
130
|
+
if (linesMesh !== undefined) {
|
|
131
|
+
this.linesMesh = linesMesh;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
Line.DrawLinesDto = DrawLinesDto;
|
|
136
|
+
class PointsLinesDto {
|
|
137
|
+
constructor(points) {
|
|
138
|
+
if (points !== undefined) {
|
|
139
|
+
this.points = points;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
Line.PointsLinesDto = PointsLinesDto;
|
|
144
|
+
class LineDto {
|
|
145
|
+
constructor(line) {
|
|
146
|
+
if (line !== undefined) {
|
|
147
|
+
this.line = line;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
Line.LineDto = LineDto;
|
|
152
|
+
class SegmentDto {
|
|
153
|
+
constructor(segment) {
|
|
154
|
+
if (segment !== undefined) {
|
|
155
|
+
this.segment = segment;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
Line.SegmentDto = SegmentDto;
|
|
160
|
+
class SegmentsDto {
|
|
161
|
+
constructor(segments) {
|
|
162
|
+
if (segments !== undefined) {
|
|
163
|
+
this.segments = segments;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
Line.SegmentsDto = SegmentsDto;
|
|
168
|
+
class LinesDto {
|
|
169
|
+
constructor(lines) {
|
|
170
|
+
if (lines !== undefined) {
|
|
171
|
+
this.lines = lines;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
Line.LinesDto = LinesDto;
|
|
176
|
+
class LineLineIntersectionDto {
|
|
177
|
+
constructor(line1, line2, tolerance) {
|
|
178
|
+
/**
|
|
179
|
+
* Set to false if you want to check for infinite lines
|
|
180
|
+
* @default true
|
|
181
|
+
*/
|
|
182
|
+
this.checkSegmentsOnly = true;
|
|
183
|
+
if (line1 !== undefined) {
|
|
184
|
+
this.line1 = line1;
|
|
185
|
+
}
|
|
186
|
+
if (line2 !== undefined) {
|
|
187
|
+
this.line2 = line2;
|
|
188
|
+
}
|
|
189
|
+
if (tolerance !== undefined) {
|
|
190
|
+
this.tolerance = tolerance;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
Line.LineLineIntersectionDto = LineLineIntersectionDto;
|
|
195
|
+
class PointOnLineDto {
|
|
196
|
+
constructor(line, param) {
|
|
197
|
+
/**
|
|
198
|
+
* Param to use for point on line
|
|
199
|
+
* @default 0.5
|
|
200
|
+
* @minimum -Infinity
|
|
201
|
+
* @maximum Infinity
|
|
202
|
+
* @step 0.1
|
|
203
|
+
*/
|
|
204
|
+
this.param = 0.5;
|
|
205
|
+
if (line !== undefined) {
|
|
206
|
+
this.line = line;
|
|
207
|
+
}
|
|
208
|
+
if (param !== undefined) {
|
|
209
|
+
this.param = param;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
Line.PointOnLineDto = PointOnLineDto;
|
|
214
|
+
class TransformLineDto {
|
|
215
|
+
constructor(line, transformation) {
|
|
216
|
+
if (line !== undefined) {
|
|
217
|
+
this.line = line;
|
|
218
|
+
}
|
|
219
|
+
if (transformation !== undefined) {
|
|
220
|
+
this.transformation = transformation;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
Line.TransformLineDto = TransformLineDto;
|
|
225
|
+
class TransformsLinesDto {
|
|
226
|
+
constructor(lines, transformation) {
|
|
227
|
+
if (lines !== undefined) {
|
|
228
|
+
this.lines = lines;
|
|
229
|
+
}
|
|
230
|
+
if (transformation !== undefined) {
|
|
231
|
+
this.transformation = transformation;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
Line.TransformsLinesDto = TransformsLinesDto;
|
|
236
|
+
class TransformLinesDto {
|
|
237
|
+
constructor(lines, transformation) {
|
|
238
|
+
if (lines !== undefined) {
|
|
239
|
+
this.lines = lines;
|
|
240
|
+
}
|
|
241
|
+
if (transformation !== undefined) {
|
|
242
|
+
this.transformation = transformation;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
Line.TransformLinesDto = TransformLinesDto;
|
|
247
|
+
})(Line || (Line = {}));
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Base } from "./base-inputs";
|
|
2
|
+
export declare namespace Mesh {
|
|
3
|
+
class SignedDistanceFromPlaneToPointDto {
|
|
4
|
+
constructor(point?: Base.Point3, plane?: Base.TrianglePlane3);
|
|
5
|
+
/**
|
|
6
|
+
* Point from which to find the distance
|
|
7
|
+
* @default undefined
|
|
8
|
+
*/
|
|
9
|
+
point?: Base.Point3;
|
|
10
|
+
/**
|
|
11
|
+
* Triangle plane to which the distance is calculated
|
|
12
|
+
* @default undefined
|
|
13
|
+
*/
|
|
14
|
+
plane?: Base.TrianglePlane3;
|
|
15
|
+
}
|
|
16
|
+
class TriangleDto {
|
|
17
|
+
constructor(triangle?: Base.Triangle3);
|
|
18
|
+
/**
|
|
19
|
+
* Triangle to be used
|
|
20
|
+
* @default undefined
|
|
21
|
+
*/
|
|
22
|
+
triangle?: Base.Triangle3;
|
|
23
|
+
}
|
|
24
|
+
class TriangleToleranceDto {
|
|
25
|
+
constructor(triangle?: Base.Triangle3);
|
|
26
|
+
/**
|
|
27
|
+
* Triangle to be used
|
|
28
|
+
* @default undefined
|
|
29
|
+
*/
|
|
30
|
+
triangle?: Base.Triangle3;
|
|
31
|
+
/**
|
|
32
|
+
* Tolerance for the calculation
|
|
33
|
+
* @default 1e-7
|
|
34
|
+
* @minimum -Infinity
|
|
35
|
+
* @maximum Infinity
|
|
36
|
+
* @step 1e-7
|
|
37
|
+
*/
|
|
38
|
+
tolerance?: number;
|
|
39
|
+
}
|
|
40
|
+
class TriangleTriangleToleranceDto {
|
|
41
|
+
constructor(triangle1?: Base.Triangle3, triangle2?: Base.Triangle3, tolerance?: number);
|
|
42
|
+
/**
|
|
43
|
+
* First triangle
|
|
44
|
+
* @default undefined
|
|
45
|
+
*/
|
|
46
|
+
triangle1?: Base.Triangle3;
|
|
47
|
+
/**
|
|
48
|
+
* Second triangle
|
|
49
|
+
* @default undefined
|
|
50
|
+
*/
|
|
51
|
+
triangle2?: Base.Triangle3;
|
|
52
|
+
/**
|
|
53
|
+
* Tolerance for the calculation
|
|
54
|
+
* @default 1e-7
|
|
55
|
+
* @minimum -Infinity
|
|
56
|
+
* @maximum Infinity
|
|
57
|
+
* @step 1e-7
|
|
58
|
+
*/
|
|
59
|
+
tolerance?: number;
|
|
60
|
+
}
|
|
61
|
+
class MeshMeshToleranceDto {
|
|
62
|
+
constructor(mesh1?: Base.Mesh3, mesh2?: Base.Mesh3, tolerance?: number);
|
|
63
|
+
/**
|
|
64
|
+
* First mesh
|
|
65
|
+
* @default undefined
|
|
66
|
+
*/
|
|
67
|
+
mesh1?: Base.Mesh3;
|
|
68
|
+
/**
|
|
69
|
+
* Second mesh
|
|
70
|
+
* @default undefined
|
|
71
|
+
*/
|
|
72
|
+
mesh2?: Base.Mesh3;
|
|
73
|
+
/**
|
|
74
|
+
* Tolerance for the calculation
|
|
75
|
+
* @default 1e-7
|
|
76
|
+
* @minimum -Infinity
|
|
77
|
+
* @maximum Infinity
|
|
78
|
+
* @step 1e-7
|
|
79
|
+
*/
|
|
80
|
+
tolerance?: number;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// tslint:disable-next-line: no-namespace
|
|
2
|
+
export var Mesh;
|
|
3
|
+
(function (Mesh) {
|
|
4
|
+
class SignedDistanceFromPlaneToPointDto {
|
|
5
|
+
constructor(point, plane) {
|
|
6
|
+
if (point !== undefined) {
|
|
7
|
+
this.point = point;
|
|
8
|
+
}
|
|
9
|
+
if (plane !== undefined) {
|
|
10
|
+
this.plane = plane;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
Mesh.SignedDistanceFromPlaneToPointDto = SignedDistanceFromPlaneToPointDto;
|
|
15
|
+
class TriangleDto {
|
|
16
|
+
constructor(triangle) {
|
|
17
|
+
if (triangle !== undefined) {
|
|
18
|
+
this.triangle = triangle;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
Mesh.TriangleDto = TriangleDto;
|
|
23
|
+
class TriangleToleranceDto {
|
|
24
|
+
constructor(triangle) {
|
|
25
|
+
/**
|
|
26
|
+
* Tolerance for the calculation
|
|
27
|
+
* @default 1e-7
|
|
28
|
+
* @minimum -Infinity
|
|
29
|
+
* @maximum Infinity
|
|
30
|
+
* @step 1e-7
|
|
31
|
+
*/
|
|
32
|
+
this.tolerance = 1e-7;
|
|
33
|
+
if (triangle !== undefined) {
|
|
34
|
+
this.triangle = triangle;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
Mesh.TriangleToleranceDto = TriangleToleranceDto;
|
|
39
|
+
class TriangleTriangleToleranceDto {
|
|
40
|
+
constructor(triangle1, triangle2, tolerance) {
|
|
41
|
+
/**
|
|
42
|
+
* Tolerance for the calculation
|
|
43
|
+
* @default 1e-7
|
|
44
|
+
* @minimum -Infinity
|
|
45
|
+
* @maximum Infinity
|
|
46
|
+
* @step 1e-7
|
|
47
|
+
*/
|
|
48
|
+
this.tolerance = 1e-7;
|
|
49
|
+
if (triangle1 !== undefined) {
|
|
50
|
+
this.triangle1 = triangle1;
|
|
51
|
+
}
|
|
52
|
+
if (triangle2 !== undefined) {
|
|
53
|
+
this.triangle2 = triangle2;
|
|
54
|
+
}
|
|
55
|
+
if (tolerance !== undefined) {
|
|
56
|
+
this.tolerance = tolerance;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
Mesh.TriangleTriangleToleranceDto = TriangleTriangleToleranceDto;
|
|
61
|
+
class MeshMeshToleranceDto {
|
|
62
|
+
constructor(mesh1, mesh2, tolerance) {
|
|
63
|
+
/**
|
|
64
|
+
* Tolerance for the calculation
|
|
65
|
+
* @default 1e-7
|
|
66
|
+
* @minimum -Infinity
|
|
67
|
+
* @maximum Infinity
|
|
68
|
+
* @step 1e-7
|
|
69
|
+
*/
|
|
70
|
+
this.tolerance = 1e-7;
|
|
71
|
+
if (mesh1 !== undefined) {
|
|
72
|
+
this.mesh1 = mesh1;
|
|
73
|
+
}
|
|
74
|
+
if (mesh2 !== undefined) {
|
|
75
|
+
this.mesh2 = mesh2;
|
|
76
|
+
}
|
|
77
|
+
if (tolerance !== undefined) {
|
|
78
|
+
this.tolerance = tolerance;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
Mesh.MeshMeshToleranceDto = MeshMeshToleranceDto;
|
|
83
|
+
})(Mesh || (Mesh = {}));
|