@bitbybit-dev/base 1.2.0-rc.2 → 1.3.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/GlobalCDNProvider.js +1 -1
- package/lib/api/inputs/base-inputs.d.ts +13 -12
- package/lib/api/inputs/color-inputs.d.ts +97 -48
- package/lib/api/inputs/color-inputs.js +95 -46
- package/lib/api/inputs/dates-inputs.d.ts +67 -26
- package/lib/api/inputs/dates-inputs.js +57 -16
- package/lib/api/inputs/io-inputs.d.ts +13 -15
- package/lib/api/inputs/io-inputs.js +7 -8
- package/lib/api/inputs/line-inputs.d.ts +88 -33
- package/lib/api/inputs/line-inputs.js +61 -11
- package/lib/api/inputs/lists-inputs.d.ts +207 -96
- package/lib/api/inputs/lists-inputs.js +153 -45
- package/lib/api/inputs/logic-inputs.d.ts +52 -22
- package/lib/api/inputs/logic-inputs.js +41 -12
- package/lib/api/inputs/math-inputs.d.ts +113 -52
- package/lib/api/inputs/math-inputs.js +112 -51
- package/lib/api/inputs/mesh-inputs.d.ts +30 -11
- package/lib/api/inputs/mesh-inputs.js +21 -3
- package/lib/api/inputs/point-inputs.d.ts +240 -107
- package/lib/api/inputs/point-inputs.js +199 -73
- package/lib/api/inputs/polyline-inputs.d.ts +68 -28
- package/lib/api/inputs/polyline-inputs.js +48 -13
- package/lib/api/inputs/text-inputs.d.ts +117 -46
- package/lib/api/inputs/text-inputs.js +111 -41
- package/lib/api/inputs/transforms-inputs.d.ts +65 -23
- package/lib/api/inputs/transforms-inputs.js +64 -22
- package/lib/api/inputs/vector-inputs.d.ts +154 -76
- package/lib/api/inputs/vector-inputs.js +132 -57
- package/lib/api/models/point/hex-grid-data.d.ts +1 -1
- package/lib/api/models/point/hex-grid-data.js +1 -1
- package/lib/api/services/color.d.ts +149 -70
- package/lib/api/services/color.js +149 -70
- package/lib/api/services/dates.d.ts +313 -150
- package/lib/api/services/dates.js +313 -150
- package/lib/api/services/line.d.ts +138 -68
- package/lib/api/services/line.js +138 -68
- package/lib/api/services/lists.d.ts +357 -177
- package/lib/api/services/lists.js +357 -177
- package/lib/api/services/logic.d.ts +98 -45
- package/lib/api/services/logic.js +98 -45
- package/lib/api/services/math.d.ts +363 -211
- package/lib/api/services/math.js +363 -211
- package/lib/api/services/mesh.d.ts +73 -31
- package/lib/api/services/mesh.js +73 -31
- package/lib/api/services/point.d.ts +367 -147
- package/lib/api/services/point.js +367 -147
- package/lib/api/services/polyline.d.ts +146 -71
- package/lib/api/services/polyline.js +146 -71
- package/lib/api/services/text.d.ts +320 -165
- package/lib/api/services/text.js +320 -165
- package/lib/api/services/transforms.d.ts +145 -58
- package/lib/api/services/transforms.js +145 -58
- package/lib/api/services/vector.d.ts +381 -156
- package/lib/api/services/vector.js +381 -156
- package/package.json +1 -1
|
@@ -6,18 +6,24 @@ import { Base } from "./base-inputs";
|
|
|
6
6
|
* sets are where most parametric models begin.
|
|
7
7
|
*/
|
|
8
8
|
export declare namespace Point {
|
|
9
|
+
/**
|
|
10
|
+
* One point for `point.getX`, `point.getY` and `point.getZ`.
|
|
11
|
+
*/
|
|
9
12
|
class PointDto {
|
|
10
13
|
constructor(point?: Base.Point3);
|
|
11
14
|
/**
|
|
12
|
-
*
|
|
15
|
+
* The point as `[x, y, z]`.
|
|
13
16
|
* @default undefined
|
|
14
17
|
*/
|
|
15
18
|
point: Base.Point3;
|
|
16
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* The three values `point.pointXYZ` puts together into `[x, y, z]`.
|
|
22
|
+
*/
|
|
17
23
|
class PointXYZDto {
|
|
18
24
|
constructor(x?: number, y?: number, z?: number);
|
|
19
25
|
/**
|
|
20
|
-
*
|
|
26
|
+
* The X value, the first entry.
|
|
21
27
|
* @default 0
|
|
22
28
|
* @minimum -Infinity
|
|
23
29
|
* @maximum Infinity
|
|
@@ -25,7 +31,7 @@ export declare namespace Point {
|
|
|
25
31
|
*/
|
|
26
32
|
x: number;
|
|
27
33
|
/**
|
|
28
|
-
*
|
|
34
|
+
* The Y value, the second entry; Y is up.
|
|
29
35
|
* @default 0
|
|
30
36
|
* @minimum -Infinity
|
|
31
37
|
* @maximum Infinity
|
|
@@ -33,18 +39,21 @@ export declare namespace Point {
|
|
|
33
39
|
*/
|
|
34
40
|
y: number;
|
|
35
41
|
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
* The Z value, the third entry.
|
|
43
|
+
* @default 0
|
|
44
|
+
* @minimum -Infinity
|
|
45
|
+
* @maximum Infinity
|
|
46
|
+
* @step 0.1
|
|
47
|
+
*/
|
|
42
48
|
z: number;
|
|
43
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* The two values `point.pointXY` puts together into `[x, y]`.
|
|
52
|
+
*/
|
|
44
53
|
class PointXYDto {
|
|
45
54
|
constructor(x?: number, y?: number);
|
|
46
55
|
/**
|
|
47
|
-
*
|
|
56
|
+
* The X value, the first entry.
|
|
48
57
|
* @default 0
|
|
49
58
|
* @minimum -Infinity
|
|
50
59
|
* @maximum Infinity
|
|
@@ -52,7 +61,7 @@ export declare namespace Point {
|
|
|
52
61
|
*/
|
|
53
62
|
x: number;
|
|
54
63
|
/**
|
|
55
|
-
*
|
|
64
|
+
* The Y value, the second entry.
|
|
56
65
|
* @default 0
|
|
57
66
|
* @minimum -Infinity
|
|
58
67
|
* @maximum Infinity
|
|
@@ -60,39 +69,50 @@ export declare namespace Point {
|
|
|
60
69
|
*/
|
|
61
70
|
y: number;
|
|
62
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* A list of points for the methods that read them together: `point.boundingBoxOfPoints`,
|
|
74
|
+
* `point.averagePoint` and `point.sortPoints`.
|
|
75
|
+
*/
|
|
63
76
|
class PointsDto {
|
|
64
77
|
constructor(points?: Base.Point3[]);
|
|
65
78
|
/**
|
|
66
|
-
*
|
|
79
|
+
* The points, each `[x, y, z]`.
|
|
67
80
|
* @default undefined
|
|
68
81
|
*/
|
|
69
82
|
points: Base.Point3[];
|
|
70
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Two points, for methods that relate one point to another.
|
|
86
|
+
*/
|
|
71
87
|
class TwoPointsDto {
|
|
72
88
|
constructor(point1?: Base.Point3, point2?: Base.Point3);
|
|
73
89
|
/**
|
|
74
|
-
*
|
|
90
|
+
* The first point.
|
|
75
91
|
* @default undefined
|
|
76
92
|
*/
|
|
77
93
|
point1: Base.Point3;
|
|
78
94
|
/**
|
|
79
|
-
*
|
|
95
|
+
* The second point.
|
|
80
96
|
* @default undefined
|
|
81
97
|
*/
|
|
82
98
|
point2: Base.Point3;
|
|
83
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* One point and how to draw it: its size, color and opacity, and whether the drawn mesh will
|
|
102
|
+
* be updated later.
|
|
103
|
+
*/
|
|
84
104
|
class DrawPointDto<T> {
|
|
85
105
|
/**
|
|
86
106
|
* Provide options without default values
|
|
87
107
|
*/
|
|
88
108
|
constructor(point?: Base.Point3, opacity?: number, size?: number, colours?: string | string[], updatable?: boolean, pointMesh?: T);
|
|
89
109
|
/**
|
|
90
|
-
*
|
|
110
|
+
* The point to draw, as `[x, y, z]`.
|
|
91
111
|
* @default undefined
|
|
92
112
|
*/
|
|
93
113
|
point: Base.Point3;
|
|
94
114
|
/**
|
|
95
|
-
*
|
|
115
|
+
* How opaque the point is, from 0 (invisible) to 1 (solid).
|
|
96
116
|
* @default 1
|
|
97
117
|
* @minimum 0
|
|
98
118
|
* @maximum 1
|
|
@@ -100,7 +120,7 @@ export declare namespace Point {
|
|
|
100
120
|
*/
|
|
101
121
|
opacity: number;
|
|
102
122
|
/**
|
|
103
|
-
* Size of the point
|
|
123
|
+
* Size of the drawn point, in model units.
|
|
104
124
|
* @default 3
|
|
105
125
|
* @minimum 0
|
|
106
126
|
* @maximum Infinity
|
|
@@ -108,33 +128,41 @@ export declare namespace Point {
|
|
|
108
128
|
*/
|
|
109
129
|
size: number;
|
|
110
130
|
/**
|
|
111
|
-
*
|
|
131
|
+
* Color of the point as a hex string such as `#ff0000`; a list of strings is also
|
|
132
|
+
* accepted.
|
|
112
133
|
* @default #444444
|
|
113
134
|
*/
|
|
114
135
|
colours: string | string[];
|
|
115
136
|
/**
|
|
116
|
-
*
|
|
137
|
+
* When true, the drawn mesh is built so its position can be changed later without
|
|
138
|
+
* redrawing.
|
|
117
139
|
* @default false
|
|
118
140
|
*/
|
|
119
141
|
updatable: boolean;
|
|
120
142
|
/**
|
|
121
|
-
*
|
|
143
|
+
* A mesh drawn earlier for this point; when given it is updated in place instead of a new
|
|
144
|
+
* one being made.
|
|
122
145
|
* @default undefined
|
|
146
|
+
* @optional true
|
|
123
147
|
*/
|
|
124
148
|
pointMesh?: T | undefined;
|
|
125
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* A list of points and how to draw them: their size, colors and opacity, and whether the drawn
|
|
152
|
+
* mesh will be updated later.
|
|
153
|
+
*/
|
|
126
154
|
class DrawPointsDto<T> {
|
|
127
155
|
/**
|
|
128
156
|
* Provide options without default values
|
|
129
157
|
*/
|
|
130
158
|
constructor(points?: Base.Point3[], opacity?: number, size?: number, colours?: string | string[], updatable?: boolean, pointsMesh?: T);
|
|
131
159
|
/**
|
|
132
|
-
*
|
|
160
|
+
* The points to draw, each `[x, y, z]`.
|
|
133
161
|
* @default undefined
|
|
134
162
|
*/
|
|
135
163
|
points: Base.Point3[];
|
|
136
164
|
/**
|
|
137
|
-
*
|
|
165
|
+
* How opaque the points are, from 0 (invisible) to 1 (solid).
|
|
138
166
|
* @default 1
|
|
139
167
|
* @minimum 0
|
|
140
168
|
* @maximum 1
|
|
@@ -142,7 +170,7 @@ export declare namespace Point {
|
|
|
142
170
|
*/
|
|
143
171
|
opacity: number;
|
|
144
172
|
/**
|
|
145
|
-
* Size of
|
|
173
|
+
* Size of each drawn point, in model units.
|
|
146
174
|
* @default 0.1
|
|
147
175
|
* @minimum 0
|
|
148
176
|
* @maximum Infinity
|
|
@@ -150,133 +178,161 @@ export declare namespace Point {
|
|
|
150
178
|
*/
|
|
151
179
|
size: number;
|
|
152
180
|
/**
|
|
153
|
-
*
|
|
181
|
+
* One hex color string for all points, or one string per point.
|
|
154
182
|
* @default #444444
|
|
155
183
|
*/
|
|
156
184
|
colours: string | string[];
|
|
157
185
|
/**
|
|
158
|
-
*
|
|
186
|
+
* When true, the drawn mesh is built so the positions can be changed later without
|
|
187
|
+
* redrawing.
|
|
159
188
|
* @default false
|
|
160
189
|
*/
|
|
161
190
|
updatable: boolean;
|
|
162
191
|
/**
|
|
163
|
-
*
|
|
192
|
+
* A mesh drawn earlier for these points; when given it is updated in place instead of a new
|
|
193
|
+
* one being made.
|
|
164
194
|
* @default undefined
|
|
195
|
+
* @optional true
|
|
165
196
|
*/
|
|
166
197
|
pointsMesh?: T | undefined;
|
|
167
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* One point and the transformation `point.transformPoint` applies to it.
|
|
201
|
+
*/
|
|
168
202
|
class TransformPointDto {
|
|
169
203
|
constructor(point?: Base.Point3, transformation?: Base.TransformMatrixes);
|
|
170
204
|
/**
|
|
171
|
-
*
|
|
205
|
+
* The point to transform; it is not changed, a new point is returned.
|
|
172
206
|
* @default undefined
|
|
173
207
|
*/
|
|
174
208
|
point: Base.Point3;
|
|
175
209
|
/**
|
|
176
|
-
*
|
|
210
|
+
* A transformation matrix, or a list of them applied in order.
|
|
177
211
|
* @default undefined
|
|
178
212
|
*/
|
|
179
213
|
transformation: Base.TransformMatrixes;
|
|
180
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Points and the one transformation `point.transformPoints` applies to all of them.
|
|
217
|
+
*/
|
|
181
218
|
class TransformPointsDto {
|
|
182
219
|
constructor(points?: Base.Point3[], transformation?: Base.TransformMatrixes);
|
|
183
220
|
/**
|
|
184
|
-
*
|
|
221
|
+
* The points to transform; they are not changed and the result keeps their order.
|
|
185
222
|
* @default undefined
|
|
186
223
|
*/
|
|
187
224
|
points: Base.Point3[];
|
|
188
225
|
/**
|
|
189
|
-
*
|
|
226
|
+
* A transformation matrix, or a list of them applied in order, used for every point.
|
|
190
227
|
* @default undefined
|
|
191
228
|
*/
|
|
192
229
|
transformation: Base.TransformMatrixes;
|
|
193
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Points and one vector per point for `point.translatePointsWithVectors`; the two lists must
|
|
233
|
+
* have the same length.
|
|
234
|
+
*/
|
|
194
235
|
class TranslatePointsWithVectorsDto {
|
|
195
236
|
constructor(points?: Base.Point3[], translations?: Base.Vector3[]);
|
|
196
237
|
/**
|
|
197
|
-
*
|
|
238
|
+
* The points to move.
|
|
198
239
|
* @default undefined
|
|
199
240
|
*/
|
|
200
241
|
points: Base.Point3[];
|
|
201
242
|
/**
|
|
202
|
-
*
|
|
243
|
+
* One vector per point, in the same order; the first point moves by the first vector.
|
|
203
244
|
* @default undefined
|
|
204
245
|
*/
|
|
205
246
|
translations: Base.Vector3[];
|
|
206
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* Points and the one vector `point.translatePoints` moves them all by.
|
|
250
|
+
*/
|
|
207
251
|
class TranslatePointsDto {
|
|
208
252
|
constructor(points?: Base.Point3[], translation?: Base.Vector3);
|
|
209
253
|
/**
|
|
210
|
-
*
|
|
254
|
+
* The points to move.
|
|
211
255
|
* @default undefined
|
|
212
256
|
*/
|
|
213
257
|
points: Base.Point3[];
|
|
214
258
|
/**
|
|
215
|
-
*
|
|
259
|
+
* The vector every point moves by, as `[x, y, z]`.
|
|
216
260
|
* @default undefined
|
|
217
261
|
*/
|
|
218
262
|
translation: Base.Vector3;
|
|
219
263
|
}
|
|
264
|
+
/**
|
|
265
|
+
* Points and the distance along each axis that `point.translateXYZPoints` moves them.
|
|
266
|
+
*/
|
|
220
267
|
class TranslateXYZPointsDto {
|
|
221
268
|
constructor(points?: Base.Point3[], x?: number, y?: number, z?: number);
|
|
222
269
|
/**
|
|
223
|
-
*
|
|
270
|
+
* The points to move.
|
|
224
271
|
* @default undefined
|
|
225
272
|
*/
|
|
226
273
|
points: Base.Point3[];
|
|
227
274
|
/**
|
|
228
|
-
* X
|
|
275
|
+
* Distance to move along X, in model units.
|
|
229
276
|
* @default 0
|
|
230
277
|
*/
|
|
231
278
|
x: number;
|
|
232
279
|
/**
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
280
|
+
* Distance to move along Y, which is up, in model units.
|
|
281
|
+
* @default 1
|
|
282
|
+
*/
|
|
236
283
|
y: number;
|
|
237
284
|
/**
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
285
|
+
* Distance to move along Z, in model units.
|
|
286
|
+
* @default 0
|
|
287
|
+
*/
|
|
241
288
|
z: number;
|
|
242
289
|
}
|
|
290
|
+
/**
|
|
291
|
+
* Points, a center and a factor per axis for `point.scalePointsCenterXYZ`.
|
|
292
|
+
*/
|
|
243
293
|
class ScalePointsCenterXYZDto {
|
|
244
294
|
constructor(points?: Base.Point3[], center?: Base.Point3, scaleXyz?: Base.Vector3);
|
|
245
295
|
/**
|
|
246
|
-
*
|
|
296
|
+
* The points to scale; they are not changed and the result keeps their order.
|
|
247
297
|
* @default undefined
|
|
248
298
|
*/
|
|
249
299
|
points: Base.Point3[];
|
|
250
300
|
/**
|
|
251
|
-
* The
|
|
301
|
+
* The point that stays in place while the others move away from it or toward it.
|
|
252
302
|
* @default [0, 0, 0]
|
|
253
303
|
*/
|
|
254
304
|
center: Base.Point3;
|
|
255
305
|
/**
|
|
256
|
-
*
|
|
306
|
+
* The factor for each axis as `[x, y, z]`: `[1, 2, 1]` doubles distances along Y and leaves
|
|
307
|
+
* X and Z as they are.
|
|
257
308
|
* @default [1, 1, 1]
|
|
258
309
|
*/
|
|
259
310
|
scaleXyz: Base.Vector3;
|
|
260
311
|
}
|
|
312
|
+
/**
|
|
313
|
+
* Points, a center, a direction and a factor for `point.stretchPointsDirFromCenter`, which
|
|
314
|
+
* scales only along that direction.
|
|
315
|
+
*/
|
|
261
316
|
class StretchPointsDirFromCenterDto {
|
|
262
317
|
constructor(points?: Base.Point3[], center?: Base.Point3, direction?: Base.Vector3, scale?: number);
|
|
263
318
|
/**
|
|
264
|
-
*
|
|
319
|
+
* The points to stretch; they are not changed and the result keeps their order.
|
|
265
320
|
* @default undefined
|
|
266
321
|
*/
|
|
267
322
|
points: Base.Point3[];
|
|
268
323
|
/**
|
|
269
|
-
* The
|
|
324
|
+
* The point that stays in place; distances are measured from it.
|
|
270
325
|
* @default [0, 0, 0]
|
|
271
326
|
*/
|
|
272
327
|
center?: Base.Point3 | undefined;
|
|
273
328
|
/**
|
|
274
|
-
*
|
|
329
|
+
* The direction to stretch along; distances across it do not change.
|
|
275
330
|
* @default [0, 0, 1]
|
|
276
331
|
*/
|
|
277
332
|
direction?: Base.Vector3 | undefined;
|
|
278
333
|
/**
|
|
279
|
-
* The
|
|
334
|
+
* The factor applied along the direction; 1 leaves the points as they are, 2 doubles their
|
|
335
|
+
* distance from the center along it.
|
|
280
336
|
* @default 2
|
|
281
337
|
* @minimum -Infinity
|
|
282
338
|
* @maximum Infinity
|
|
@@ -284,15 +340,19 @@ export declare namespace Point {
|
|
|
284
340
|
*/
|
|
285
341
|
scale?: number | undefined;
|
|
286
342
|
}
|
|
343
|
+
/**
|
|
344
|
+
* Points, an axis, a center and an angle for `point.rotatePointsCenterAxis`.
|
|
345
|
+
*/
|
|
287
346
|
class RotatePointsCenterAxisDto {
|
|
288
347
|
constructor(points?: Base.Point3[], angle?: number, axis?: Base.Vector3, center?: Base.Point3);
|
|
289
348
|
/**
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
349
|
+
* The points to rotate; they are not changed and the result keeps their order.
|
|
350
|
+
* @default undefined
|
|
351
|
+
*/
|
|
293
352
|
points: Base.Point3[];
|
|
294
353
|
/**
|
|
295
|
-
*
|
|
354
|
+
* How far to turn, in degrees; positive is counter-clockwise when the axis points toward
|
|
355
|
+
* you.
|
|
296
356
|
* @default 90
|
|
297
357
|
* @minimum -Infinity
|
|
298
358
|
* @maximum Infinity
|
|
@@ -300,71 +360,86 @@ export declare namespace Point {
|
|
|
300
360
|
*/
|
|
301
361
|
angle: number;
|
|
302
362
|
/**
|
|
303
|
-
*
|
|
363
|
+
* The direction of the axis to turn around.
|
|
304
364
|
* @default [0, 1, 0]
|
|
305
365
|
*/
|
|
306
366
|
axis: Base.Vector3;
|
|
307
367
|
/**
|
|
308
|
-
*
|
|
368
|
+
* A point the axis passes through.
|
|
309
369
|
* @default [0, 0, 0]
|
|
310
370
|
*/
|
|
311
371
|
center: Base.Point3;
|
|
312
372
|
}
|
|
373
|
+
/**
|
|
374
|
+
* Points and one transformation per point for `point.transformsForPoints`; the two lists must
|
|
375
|
+
* have the same length.
|
|
376
|
+
*/
|
|
313
377
|
class TransformsForPointsDto {
|
|
314
378
|
constructor(points?: Base.Point3[], transformation?: Base.TransformMatrixes[]);
|
|
315
379
|
/**
|
|
316
|
-
*
|
|
380
|
+
* The points to transform, as many as there are transformations; the result keeps their
|
|
381
|
+
* order.
|
|
317
382
|
* @default undefined
|
|
318
383
|
*/
|
|
319
384
|
points: Base.Point3[];
|
|
320
385
|
/**
|
|
321
|
-
*
|
|
386
|
+
* One transformation per point, in the same order; each may be a matrix or a list of
|
|
387
|
+
* matrices applied in order.
|
|
322
388
|
* @default undefined
|
|
323
389
|
*/
|
|
324
390
|
transformation: Base.TransformMatrixes[];
|
|
325
391
|
}
|
|
392
|
+
/**
|
|
393
|
+
* Three points that define a plane, for `point.normalFromThreePoints`.
|
|
394
|
+
*/
|
|
326
395
|
class ThreePointsNormalDto {
|
|
327
396
|
constructor(point1?: Base.Point3, point2?: Base.Point3, point3?: Base.Point3, reverseNormal?: boolean);
|
|
328
397
|
/**
|
|
329
|
-
*
|
|
398
|
+
* The first point; the normal is measured from here.
|
|
330
399
|
* @default undefined
|
|
331
400
|
*/
|
|
332
401
|
point1: Base.Point3;
|
|
333
402
|
/**
|
|
334
|
-
*
|
|
403
|
+
* The second point.
|
|
335
404
|
* @default undefined
|
|
336
405
|
*/
|
|
337
406
|
point2: Base.Point3;
|
|
338
407
|
/**
|
|
339
|
-
*
|
|
408
|
+
* The third point; going from the first to the second to the third counter-clockwise puts
|
|
409
|
+
* the normal toward you.
|
|
340
410
|
* @default undefined
|
|
341
411
|
*/
|
|
342
412
|
point3: Base.Point3;
|
|
343
413
|
/**
|
|
344
|
-
*
|
|
414
|
+
* When true, the normal is flipped to point the other way.
|
|
345
415
|
* @default false
|
|
346
416
|
*/
|
|
347
417
|
reverseNormal: boolean;
|
|
348
418
|
}
|
|
419
|
+
/**
|
|
420
|
+
* A corner for `point.maxFilletRadius` and `point.maxFilletRadiusHalfLine`: the corner point is
|
|
421
|
+
* `end`, and `start` and `center` are the far ends of the two segments that meet there.
|
|
422
|
+
*/
|
|
349
423
|
class ThreePointsToleranceDto {
|
|
350
424
|
constructor(start?: Base.Point3, center?: Base.Point3, end?: Base.Point3, tolerance?: number);
|
|
351
425
|
/**
|
|
352
|
-
*
|
|
426
|
+
* The far end of the first segment.
|
|
353
427
|
* @default undefined
|
|
354
428
|
*/
|
|
355
429
|
start: Base.Point3;
|
|
356
430
|
/**
|
|
357
|
-
*
|
|
431
|
+
* The far end of the second segment, not the corner.
|
|
358
432
|
* @default undefined
|
|
359
433
|
*/
|
|
360
434
|
center: Base.Point3;
|
|
361
435
|
/**
|
|
362
|
-
*
|
|
436
|
+
* The corner where the two segments meet.
|
|
363
437
|
* @default undefined
|
|
364
438
|
*/
|
|
365
439
|
end: Base.Point3;
|
|
366
440
|
/**
|
|
367
|
-
*
|
|
441
|
+
* A segment shorter than this, or an angle within it of straight or folded back, gives a
|
|
442
|
+
* radius of 0.
|
|
368
443
|
* @default 1e-7
|
|
369
444
|
* @minimum -Infinity
|
|
370
445
|
* @maximum Infinity
|
|
@@ -372,20 +447,26 @@ export declare namespace Point {
|
|
|
372
447
|
*/
|
|
373
448
|
tolerance: number;
|
|
374
449
|
}
|
|
450
|
+
/**
|
|
451
|
+
* A polyline's points for `point.maxFilletsHalfLine` and `point.safestPointsMaxFilletHalfLine`,
|
|
452
|
+
* and whether it closes back on itself.
|
|
453
|
+
*/
|
|
375
454
|
class PointsMaxFilletsHalfLineDto {
|
|
376
455
|
constructor(points?: Base.Point3[], checkLastWithFirst?: boolean, tolerance?: number);
|
|
377
456
|
/**
|
|
378
|
-
*
|
|
457
|
+
* The points of the polyline, in order; at least three make a corner.
|
|
379
458
|
* @default undefined
|
|
380
459
|
*/
|
|
381
460
|
points: Base.Point3[];
|
|
382
461
|
/**
|
|
383
|
-
*
|
|
462
|
+
* When true, the polyline is closed and the corners at its first and last points are
|
|
463
|
+
* included.
|
|
384
464
|
* @default false
|
|
385
465
|
*/
|
|
386
466
|
checkLastWithFirst?: boolean | undefined;
|
|
387
467
|
/**
|
|
388
|
-
*
|
|
468
|
+
* A segment shorter than this, or an angle within it of straight or folded back, gives a
|
|
469
|
+
* radius of 0.
|
|
389
470
|
* @default 1e-7
|
|
390
471
|
* @minimum -Infinity
|
|
391
472
|
* @maximum Infinity
|
|
@@ -393,15 +474,19 @@ export declare namespace Point {
|
|
|
393
474
|
*/
|
|
394
475
|
tolerance?: number | undefined;
|
|
395
476
|
}
|
|
477
|
+
/**
|
|
478
|
+
* Points to filter with `point.removeConsecutiveDuplicates`, and how close two points must be
|
|
479
|
+
* to count as the same.
|
|
480
|
+
*/
|
|
396
481
|
class RemoveConsecutiveDuplicatesDto {
|
|
397
482
|
constructor(points?: Base.Point3[], tolerance?: number, checkFirstAndLast?: boolean);
|
|
398
483
|
/**
|
|
399
|
-
*
|
|
484
|
+
* The points to filter; their order is kept.
|
|
400
485
|
* @default undefined
|
|
401
486
|
*/
|
|
402
487
|
points: Base.Point3[];
|
|
403
488
|
/**
|
|
404
|
-
*
|
|
489
|
+
* Two points count as the same when every coordinate differs by less than this.
|
|
405
490
|
* @default 1e-7
|
|
406
491
|
* @minimum 0
|
|
407
492
|
* @maximum Infinity
|
|
@@ -409,23 +494,31 @@ export declare namespace Point {
|
|
|
409
494
|
*/
|
|
410
495
|
tolerance?: number | undefined;
|
|
411
496
|
/**
|
|
412
|
-
*
|
|
497
|
+
* When true, a last point that repeats the first is dropped as well, which closes a loop
|
|
498
|
+
* cleanly.
|
|
413
499
|
*/
|
|
414
500
|
checkFirstAndLast: boolean;
|
|
415
501
|
}
|
|
502
|
+
/**
|
|
503
|
+
* A point and a list to search for `point.closestPointFromPoints`,
|
|
504
|
+
* `point.closestPointFromPointsDistance` and `point.closestPointFromPointsIndex`.
|
|
505
|
+
*/
|
|
416
506
|
class ClosestPointFromPointsDto {
|
|
417
507
|
constructor(points?: Base.Point3[], point?: Base.Point3);
|
|
418
508
|
/**
|
|
419
|
-
* Points to
|
|
509
|
+
* Points to search through
|
|
420
510
|
* @default undefined
|
|
421
511
|
*/
|
|
422
512
|
points: Base.Point3[];
|
|
423
513
|
/**
|
|
424
|
-
*
|
|
514
|
+
* The point to measure from; the closest of `points` to it is the result
|
|
425
515
|
* @default undefined
|
|
426
516
|
*/
|
|
427
517
|
point: Base.Point3;
|
|
428
518
|
}
|
|
519
|
+
/**
|
|
520
|
+
* Two points and a tolerance for `point.twoPointsAlmostEqual`.
|
|
521
|
+
*/
|
|
429
522
|
class TwoPointsToleranceDto {
|
|
430
523
|
constructor(point1?: Base.Point3, point2?: Base.Point3, tolerance?: number);
|
|
431
524
|
/**
|
|
@@ -439,7 +532,7 @@ export declare namespace Point {
|
|
|
439
532
|
*/
|
|
440
533
|
point2: Base.Point3;
|
|
441
534
|
/**
|
|
442
|
-
*
|
|
535
|
+
* The points count as equal when the distance between them is below this.
|
|
443
536
|
* @default 1e-7
|
|
444
537
|
* @minimum -Infinity
|
|
445
538
|
* @maximum Infinity
|
|
@@ -447,49 +540,63 @@ export declare namespace Point {
|
|
|
447
540
|
*/
|
|
448
541
|
tolerance?: number | undefined;
|
|
449
542
|
}
|
|
543
|
+
/**
|
|
544
|
+
* Two points for `point.distance`: where a measurement starts and where it ends.
|
|
545
|
+
*/
|
|
450
546
|
class StartEndPointsDto {
|
|
451
547
|
constructor(startPoint?: Base.Point3, endPoint?: Base.Point3);
|
|
452
548
|
/**
|
|
453
|
-
*
|
|
549
|
+
* The point the measurement starts from.
|
|
454
550
|
* @default undefined
|
|
455
551
|
*/
|
|
456
552
|
startPoint: Base.Point3;
|
|
457
553
|
/**
|
|
458
|
-
*
|
|
554
|
+
* The point the measurement ends at.
|
|
459
555
|
* @default undefined
|
|
460
556
|
*/
|
|
461
557
|
endPoint: Base.Point3;
|
|
462
558
|
}
|
|
559
|
+
/**
|
|
560
|
+
* One start point and many end points for `point.distancesToPoints`.
|
|
561
|
+
*/
|
|
463
562
|
class StartEndPointsListDto {
|
|
464
563
|
constructor(startPoint?: Base.Point3, endPoints?: Base.Point3[]);
|
|
465
564
|
/**
|
|
466
|
-
*
|
|
565
|
+
* The point every distance is measured from.
|
|
467
566
|
* @default undefined
|
|
468
567
|
*/
|
|
469
568
|
startPoint: Base.Point3;
|
|
470
569
|
/**
|
|
471
|
-
*
|
|
570
|
+
* The points to measure to; the result keeps their order.
|
|
472
571
|
* @default undefined
|
|
473
572
|
*/
|
|
474
573
|
endPoints: Base.Point3[];
|
|
475
574
|
}
|
|
575
|
+
/**
|
|
576
|
+
* One point and a count for `point.multiplyPoint`, which repeats it.
|
|
577
|
+
*/
|
|
476
578
|
class MultiplyPointDto {
|
|
477
579
|
constructor(point?: Base.Point3, amountOfPoints?: number);
|
|
478
580
|
/**
|
|
479
|
-
*
|
|
581
|
+
* The point to repeat.
|
|
480
582
|
* @default undefined
|
|
481
583
|
*/
|
|
482
584
|
point: Base.Point3;
|
|
483
585
|
/**
|
|
484
|
-
*
|
|
586
|
+
* How many copies to make.
|
|
485
587
|
* @default undefined
|
|
486
588
|
*/
|
|
487
589
|
amountOfPoints: number;
|
|
488
590
|
}
|
|
591
|
+
/**
|
|
592
|
+
* The shape of the logarithmic spiral `point.spiral` lays out: how many points, how far it
|
|
593
|
+
* reaches and how quickly it opens.
|
|
594
|
+
*/
|
|
489
595
|
class SpiralDto {
|
|
490
596
|
constructor(radius?: number, numberPoints?: number, widening?: number, factor?: number, phi?: number);
|
|
491
597
|
/**
|
|
492
|
-
*
|
|
598
|
+
* Growth ratio of the spiral; values near 1 make a tight spiral, larger values open it
|
|
599
|
+
* faster.
|
|
493
600
|
* @default 0.9
|
|
494
601
|
* @minimum 0
|
|
495
602
|
* @maximum Infinity
|
|
@@ -497,7 +604,7 @@ export declare namespace Point {
|
|
|
497
604
|
*/
|
|
498
605
|
phi: number;
|
|
499
606
|
/**
|
|
500
|
-
*
|
|
607
|
+
* How many points to place along the spiral.
|
|
501
608
|
* @default 200
|
|
502
609
|
* @minimum 0
|
|
503
610
|
* @maximum Infinity
|
|
@@ -505,7 +612,7 @@ export declare namespace Point {
|
|
|
505
612
|
*/
|
|
506
613
|
numberPoints: number;
|
|
507
614
|
/**
|
|
508
|
-
*
|
|
615
|
+
* How much the spiral widens per turn; larger values spread the turns further apart.
|
|
509
616
|
* @default 3
|
|
510
617
|
* @minimum 0
|
|
511
618
|
* @maximum Infinity
|
|
@@ -513,7 +620,7 @@ export declare namespace Point {
|
|
|
513
620
|
*/
|
|
514
621
|
widening: number;
|
|
515
622
|
/**
|
|
516
|
-
*
|
|
623
|
+
* The distance from the origin the last point reaches, in model units.
|
|
517
624
|
* @default 6
|
|
518
625
|
* @minimum 0
|
|
519
626
|
* @maximum Infinity
|
|
@@ -521,7 +628,8 @@ export declare namespace Point {
|
|
|
521
628
|
*/
|
|
522
629
|
radius: number;
|
|
523
630
|
/**
|
|
524
|
-
*
|
|
631
|
+
* Scales the distance before the angle is computed, which turns the whole spiral; 1 leaves
|
|
632
|
+
* it as it is.
|
|
525
633
|
* @default 1
|
|
526
634
|
* @minimum 0
|
|
527
635
|
* @maximum Infinity
|
|
@@ -529,69 +637,94 @@ export declare namespace Point {
|
|
|
529
637
|
*/
|
|
530
638
|
factor: number;
|
|
531
639
|
}
|
|
640
|
+
/**
|
|
641
|
+
* The area, counts and orientation for `point.hexGridScaledToFit`, which sizes hexagons so the
|
|
642
|
+
* given number of them fills the width and height.
|
|
643
|
+
*/
|
|
532
644
|
class HexGridScaledToFitDto {
|
|
533
|
-
constructor(
|
|
534
|
-
/**
|
|
645
|
+
constructor(width?: number, height?: number, nrHexagonsInHeight?: number, nrHexagonsInWidth?: number, centerGrid?: boolean, pointsOnGround?: boolean);
|
|
646
|
+
/**
|
|
647
|
+
* The total width to fill, in model units; the hexagon size follows from it and
|
|
648
|
+
* `nrHexagonsInWidth`.
|
|
535
649
|
* @default 10
|
|
536
650
|
* @minimum 0
|
|
537
651
|
* @maximum Infinity
|
|
538
652
|
* @step 0.1
|
|
539
653
|
*/
|
|
540
654
|
width?: number | undefined;
|
|
541
|
-
/**
|
|
655
|
+
/**
|
|
656
|
+
* The total height to fill, in model units. Regular hexagons may not tile it exactly, so
|
|
657
|
+
* the real height can differ slightly.
|
|
542
658
|
* @default 10
|
|
543
659
|
* @minimum 0
|
|
544
660
|
* @maximum Infinity
|
|
545
661
|
* @step 0.1
|
|
546
|
-
|
|
662
|
+
*/
|
|
547
663
|
height?: number | undefined;
|
|
548
|
-
/**
|
|
664
|
+
/**
|
|
665
|
+
* How many hexagons across.
|
|
549
666
|
* @default 10
|
|
550
667
|
* @minimum 0
|
|
551
668
|
* @maximum Infinity
|
|
552
669
|
* @step 1
|
|
553
670
|
*/
|
|
554
671
|
nrHexagonsInWidth?: number | undefined;
|
|
555
|
-
/**
|
|
672
|
+
/**
|
|
673
|
+
* How many hexagons from top to bottom.
|
|
556
674
|
* @default 10
|
|
557
675
|
* @minimum 0
|
|
558
676
|
* @maximum Infinity
|
|
559
677
|
* @step 1
|
|
560
678
|
*/
|
|
561
679
|
nrHexagonsInHeight?: number | undefined;
|
|
562
|
-
/**
|
|
680
|
+
/**
|
|
681
|
+
* When true, the hexagons have a flat edge at the top and bottom; when false a corner
|
|
682
|
+
* points up.
|
|
563
683
|
* @default false
|
|
564
684
|
*/
|
|
565
685
|
flatTop?: boolean | undefined;
|
|
566
|
-
/**
|
|
686
|
+
/**
|
|
687
|
+
* When true, the grid is stretched so its top row reaches past the top edge, filling the rectangle
|
|
688
|
+
* without a jagged border there.
|
|
567
689
|
* @default false
|
|
568
|
-
|
|
690
|
+
*/
|
|
569
691
|
extendTop?: boolean | undefined;
|
|
570
|
-
/**
|
|
692
|
+
/**
|
|
693
|
+
* When true, the grid is stretched so its bottom row reaches past the bottom edge, filling the
|
|
694
|
+
* rectangle without a jagged border there.
|
|
571
695
|
* @default false
|
|
572
|
-
|
|
696
|
+
*/
|
|
573
697
|
extendBottom?: boolean | undefined;
|
|
574
|
-
/**
|
|
698
|
+
/**
|
|
699
|
+
* When true, the grid is stretched so its left column reaches past the left edge, filling the
|
|
700
|
+
* rectangle without a jagged border there.
|
|
575
701
|
* @default false
|
|
576
|
-
|
|
702
|
+
*/
|
|
577
703
|
extendLeft?: boolean | undefined;
|
|
578
|
-
/**
|
|
704
|
+
/**
|
|
705
|
+
* When true, the grid is stretched so its right column reaches past the right edge, filling the
|
|
706
|
+
* rectangle without a jagged border there.
|
|
579
707
|
* @default false
|
|
580
|
-
|
|
708
|
+
*/
|
|
581
709
|
extendRight?: boolean | undefined;
|
|
582
|
-
/**
|
|
710
|
+
/**
|
|
711
|
+
* When true, the middle of the grid sits at the origin instead of its corner.
|
|
583
712
|
* @default false
|
|
584
713
|
*/
|
|
585
714
|
centerGrid?: boolean | undefined;
|
|
586
|
-
/**
|
|
715
|
+
/**
|
|
716
|
+
* When true, the grid lies on the XZ ground plane (Y becomes 0) instead of the XY plane.
|
|
587
717
|
* @default false
|
|
588
718
|
*/
|
|
589
719
|
pointsOnGround?: boolean | undefined;
|
|
590
720
|
}
|
|
721
|
+
/**
|
|
722
|
+
* The hexagon size, the column and row counts and the placement for `point.hexGrid`.
|
|
723
|
+
*/
|
|
591
724
|
class HexGridCentersDto {
|
|
592
725
|
constructor(nrHexagonsX?: number, nrHexagonsY?: number, radiusHexagon?: number, orientOnCenter?: boolean, pointsOnGround?: boolean);
|
|
593
726
|
/**
|
|
594
|
-
*
|
|
727
|
+
* How many rows of hexagons along Y.
|
|
595
728
|
* @default 21
|
|
596
729
|
* @minimum 0
|
|
597
730
|
* @maximum Infinity
|
|
@@ -599,7 +732,7 @@ export declare namespace Point {
|
|
|
599
732
|
*/
|
|
600
733
|
nrHexagonsY: number;
|
|
601
734
|
/**
|
|
602
|
-
*
|
|
735
|
+
* How many columns of hexagons along X.
|
|
603
736
|
* @default 21
|
|
604
737
|
* @minimum 0
|
|
605
738
|
* @maximum Infinity
|
|
@@ -607,7 +740,7 @@ export declare namespace Point {
|
|
|
607
740
|
*/
|
|
608
741
|
nrHexagonsX: number;
|
|
609
742
|
/**
|
|
610
|
-
*
|
|
743
|
+
* Distance from a hexagon's center to one of its corners, in model units.
|
|
611
744
|
* @default 0.2
|
|
612
745
|
* @minimum 0
|
|
613
746
|
* @maximum Infinity
|
|
@@ -615,12 +748,12 @@ export declare namespace Point {
|
|
|
615
748
|
*/
|
|
616
749
|
radiusHexagon: number;
|
|
617
750
|
/**
|
|
618
|
-
*
|
|
751
|
+
* When true, the middle of the grid sits at the origin instead of its corner.
|
|
619
752
|
* @default false
|
|
620
753
|
*/
|
|
621
754
|
orientOnCenter: boolean;
|
|
622
755
|
/**
|
|
623
|
-
*
|
|
756
|
+
* When true, the grid lies on the XZ ground plane (Y becomes 0) instead of the XY plane.
|
|
624
757
|
* @default false
|
|
625
758
|
*/
|
|
626
759
|
pointsOnGround: boolean;
|