@bitbybit-dev/jscad 1.2.0 → 1.3.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/jscad-generated.js +10 -27484
- package/lib/api/inputs/jscad-inputs.d.ts +562 -263
- package/lib/api/inputs/jscad-inputs.js +483 -213
- package/lib/api/jscad-service.d.ts +94 -19
- package/lib/api/jscad-service.js +94 -19
- package/lib/api/services/jscad-booleans.d.ts +81 -23
- package/lib/api/services/jscad-booleans.js +84 -24
- package/lib/api/services/jscad-colors.d.ts +14 -5
- package/lib/api/services/jscad-colors.js +14 -5
- package/lib/api/services/jscad-expansions.d.ts +29 -8
- package/lib/api/services/jscad-expansions.js +33 -16
- package/lib/api/services/jscad-extrusions.d.ts +50 -14
- package/lib/api/services/jscad-extrusions.js +50 -14
- package/lib/api/services/jscad-hulls.d.ts +42 -10
- package/lib/api/services/jscad-hulls.js +45 -11
- package/lib/api/services/jscad-path.d.ts +85 -25
- package/lib/api/services/jscad-path.js +85 -25
- package/lib/api/services/jscad-polygon.d.ts +105 -35
- package/lib/api/services/jscad-polygon.js +105 -35
- package/lib/api/services/jscad-shapes.d.ts +190 -62
- package/lib/api/services/jscad-shapes.js +193 -64
- package/lib/api/services/jscad-text.d.ts +38 -11
- package/lib/api/services/jscad-text.js +38 -11
- package/package.json +7 -7
|
@@ -35,7 +35,7 @@ export declare namespace JSCAD {
|
|
|
35
35
|
];
|
|
36
36
|
/** A plane, `[normalX, normalY, normalZ, distanceFromOrigin]`. */
|
|
37
37
|
type JSCADPlane = [number, number, number, number];
|
|
38
|
-
/** A
|
|
38
|
+
/** A color, either `[r, g, b]` or `[r, g, b, a]`, each channel from 0 to 1. */
|
|
39
39
|
type JSCADColor = [number, number, number] | [number, number, number, number];
|
|
40
40
|
/** A convex polygon in 3D - the face of a solid. */
|
|
41
41
|
type JSCADPoly3 = {
|
|
@@ -79,21 +79,30 @@ export declare namespace JSCAD {
|
|
|
79
79
|
indices: number[];
|
|
80
80
|
transforms: JSCADMat4;
|
|
81
81
|
};
|
|
82
|
+
/**
|
|
83
|
+
* A polyline as a plain list of points, the form `polygon.createFromPolyline`,
|
|
84
|
+
* `path.createFromPolyline` and `path.appendPolyline` read; only X and Y of each point are used by
|
|
85
|
+
* them.
|
|
86
|
+
*/
|
|
82
87
|
class PolylinePropertiesDto {
|
|
83
88
|
/**
|
|
84
89
|
* Provide options without default values
|
|
85
90
|
*/
|
|
86
91
|
constructor(points?: Base.Point3[], isClosed?: boolean);
|
|
87
92
|
/**
|
|
88
|
-
*
|
|
93
|
+
* The corner points in order, given in 3D; JSCAD methods use only X and Y
|
|
89
94
|
*/
|
|
90
95
|
points: Base.Point3[];
|
|
91
96
|
/**
|
|
92
|
-
*
|
|
97
|
+
* Whether the last point joins back to the first; the JSCAD methods decide closure on their own
|
|
98
|
+
* and ignore this flag
|
|
99
|
+
* @optional true
|
|
93
100
|
*/
|
|
94
101
|
isClosed?: boolean | undefined;
|
|
95
102
|
/**
|
|
96
|
-
*
|
|
103
|
+
* A color carried along with the polyline for drawing, as a hex string or an RGB list; the
|
|
104
|
+
* JSCAD methods ignore it
|
|
105
|
+
* @optional true
|
|
97
106
|
*/
|
|
98
107
|
color?: string | number[] | undefined;
|
|
99
108
|
}
|
|
@@ -131,31 +140,43 @@ export declare namespace JSCAD {
|
|
|
131
140
|
*/
|
|
132
141
|
right = "right"
|
|
133
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* Feeds `toPolygonPoints` and `shapeToMesh` on the JSCAD service with the one entity to turn into
|
|
145
|
+
* triangles or mesh data; a 2D shape is given a tiny thickness on the way.
|
|
146
|
+
*/
|
|
134
147
|
class MeshDto {
|
|
135
148
|
constructor(mesh?: JSCADEntity);
|
|
136
149
|
/**
|
|
137
|
-
|
|
138
|
-
|
|
150
|
+
* The solid to convert; a flat 2D shape works too and is given a tiny thickness first
|
|
151
|
+
*/
|
|
139
152
|
mesh: JSCADEntity;
|
|
140
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Feeds `shapesToMeshes` on the JSCAD service with the entities to turn into mesh data, one result
|
|
156
|
+
* per entry in the same order.
|
|
157
|
+
*/
|
|
141
158
|
class MeshesDto {
|
|
142
159
|
constructor(meshes?: JSCADEntity[]);
|
|
143
160
|
/**
|
|
144
|
-
|
|
145
|
-
|
|
161
|
+
* The solids to convert, in the order the results should come back; flat 2D shapes work too
|
|
162
|
+
*/
|
|
146
163
|
meshes: JSCADEntity[];
|
|
147
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* The options `draw.drawAnyAsync` passes on when the entity is one JSCAD solid or 2D shape: color,
|
|
167
|
+
* opacity, visibility, the two-sided rendering and the mesh to reuse when redrawing.
|
|
168
|
+
*/
|
|
148
169
|
class DrawSolidMeshDto<T> {
|
|
149
170
|
/**
|
|
150
171
|
* Provide options without default values
|
|
151
172
|
*/
|
|
152
173
|
constructor(mesh?: JSCADEntity, opacity?: number, colours?: string | string[], updatable?: boolean, hidden?: boolean, jscadMesh?: T, drawTwoSided?: boolean, backFaceColour?: string, backFaceOpacity?: number);
|
|
153
174
|
/**
|
|
154
|
-
*
|
|
175
|
+
* The solid or flat 2D shape to draw; it is converted to mesh data on the way
|
|
155
176
|
*/
|
|
156
177
|
mesh: JSCADEntity;
|
|
157
178
|
/**
|
|
158
|
-
*
|
|
179
|
+
* How opaque the faces are, from 0 for invisible to 1 for solid
|
|
159
180
|
* @default 1
|
|
160
181
|
* @minimum 0
|
|
161
182
|
* @maximum 1
|
|
@@ -163,39 +184,44 @@ export declare namespace JSCAD {
|
|
|
163
184
|
*/
|
|
164
185
|
opacity: number;
|
|
165
186
|
/**
|
|
166
|
-
* Hex
|
|
187
|
+
* Hex color of the faces; a list uses its first entry. An entity colored with `colors.colorize`
|
|
188
|
+
* keeps its own color instead
|
|
167
189
|
* @default #444444
|
|
168
190
|
*/
|
|
169
191
|
colours: string | string[];
|
|
170
192
|
/**
|
|
171
|
-
*
|
|
193
|
+
* When true, the drawn mesh can be refreshed in place on later draws by passing it back as
|
|
194
|
+
* `jscadMesh`
|
|
172
195
|
* @default false
|
|
173
196
|
*/
|
|
174
197
|
updatable: boolean;
|
|
175
198
|
/**
|
|
176
|
-
*
|
|
199
|
+
* When true, the mesh is created but not shown until it is made visible
|
|
177
200
|
* @default false
|
|
178
201
|
*/
|
|
179
202
|
hidden: boolean;
|
|
180
203
|
/**
|
|
181
|
-
*
|
|
204
|
+
* A mesh from an earlier draw to refresh instead of creating a new one; used only when
|
|
205
|
+
* `updatable` is true
|
|
182
206
|
* @default undefined
|
|
183
207
|
* @optional true
|
|
184
208
|
* @ignore true
|
|
185
209
|
*/
|
|
186
210
|
jscadMesh?: T | undefined;
|
|
187
211
|
/**
|
|
188
|
-
*
|
|
212
|
+
* When true, the back of every face is drawn as well, in `backFaceColour`, which helps to see
|
|
213
|
+
* face orientation
|
|
189
214
|
* @default true
|
|
190
215
|
*/
|
|
191
216
|
drawTwoSided: boolean;
|
|
192
217
|
/**
|
|
193
|
-
* Hex
|
|
218
|
+
* Hex color of the back faces, the side the face normal points away from; used only when
|
|
219
|
+
* `drawTwoSided` is true
|
|
194
220
|
* @default #0000ff
|
|
195
221
|
*/
|
|
196
222
|
backFaceColour: string;
|
|
197
223
|
/**
|
|
198
|
-
*
|
|
224
|
+
* How opaque the back faces are, from 0 to 1; used only when `drawTwoSided` is true
|
|
199
225
|
* @default 1
|
|
200
226
|
* @minimum 0
|
|
201
227
|
* @maximum 1
|
|
@@ -203,19 +229,23 @@ export declare namespace JSCAD {
|
|
|
203
229
|
*/
|
|
204
230
|
backFaceOpacity: number;
|
|
205
231
|
}
|
|
232
|
+
/**
|
|
233
|
+
* The options `draw.drawAnyAsync` passes on when the entity is a list of JSCAD solids or 2D shapes:
|
|
234
|
+
* colors, opacity, visibility, the two-sided rendering and the parent mesh to reuse when redrawing.
|
|
235
|
+
*/
|
|
206
236
|
class DrawSolidMeshesDto<T> {
|
|
207
237
|
/**
|
|
208
238
|
* Provide options without default values
|
|
209
239
|
*/
|
|
210
240
|
constructor(meshes?: JSCADEntity[], opacity?: number, colours?: string | string[], updatable?: boolean, hidden?: boolean, jscadMesh?: T, drawTwoSided?: boolean, backFaceColour?: string, backFaceOpacity?: number);
|
|
211
241
|
/**
|
|
212
|
-
*
|
|
242
|
+
* The solids or flat 2D shapes to draw, each becoming a child of one parent mesh
|
|
213
243
|
* @default undefined
|
|
214
244
|
* @optional true
|
|
215
245
|
*/
|
|
216
|
-
meshes
|
|
246
|
+
meshes?: JSCADEntity[] | undefined;
|
|
217
247
|
/**
|
|
218
|
-
*
|
|
248
|
+
* How opaque the faces are, from 0 for invisible to 1 for solid
|
|
219
249
|
* @default 1
|
|
220
250
|
* @minimum 0
|
|
221
251
|
* @maximum 1
|
|
@@ -223,39 +253,44 @@ export declare namespace JSCAD {
|
|
|
223
253
|
*/
|
|
224
254
|
opacity: number;
|
|
225
255
|
/**
|
|
226
|
-
* Hex
|
|
256
|
+
* Hex color of the faces; a list with one entry per entity colors each in turn, any other list
|
|
257
|
+
* uses its first entry. Colorized entities keep their own color
|
|
227
258
|
* @default #444444
|
|
228
259
|
*/
|
|
229
260
|
colours: string | string[];
|
|
230
261
|
/**
|
|
231
|
-
*
|
|
262
|
+
* When true, the drawn meshes can be refreshed in place on later draws by passing the parent
|
|
263
|
+
* back as `jscadMesh`
|
|
232
264
|
* @default false
|
|
233
265
|
*/
|
|
234
266
|
updatable: boolean;
|
|
235
267
|
/**
|
|
236
|
-
*
|
|
268
|
+
* When true, the meshes are created but not shown until they are made visible
|
|
237
269
|
* @default false
|
|
238
270
|
*/
|
|
239
271
|
hidden: boolean;
|
|
240
272
|
/**
|
|
241
|
-
*
|
|
273
|
+
* The parent mesh from an earlier draw to refresh instead of creating a new one; used only when
|
|
274
|
+
* `updatable` is true
|
|
242
275
|
* @default undefined
|
|
243
276
|
* @optional true
|
|
244
277
|
* @ignore true
|
|
245
278
|
*/
|
|
246
279
|
jscadMesh?: T | undefined;
|
|
247
280
|
/**
|
|
248
|
-
*
|
|
281
|
+
* When true, the back of every face is drawn as well, in `backFaceColour`, which helps to see
|
|
282
|
+
* face orientation
|
|
249
283
|
* @default true
|
|
250
284
|
*/
|
|
251
285
|
drawTwoSided: boolean;
|
|
252
286
|
/**
|
|
253
|
-
* Hex
|
|
287
|
+
* Hex color of the back faces, the side the face normal points away from; used only when
|
|
288
|
+
* `drawTwoSided` is true
|
|
254
289
|
* @default #0000ff
|
|
255
290
|
*/
|
|
256
291
|
backFaceColour: string;
|
|
257
292
|
/**
|
|
258
|
-
*
|
|
293
|
+
* How opaque the back faces are, from 0 to 1; used only when `drawTwoSided` is true
|
|
259
294
|
* @default 1
|
|
260
295
|
* @minimum 0
|
|
261
296
|
* @maximum 1
|
|
@@ -263,23 +298,27 @@ export declare namespace JSCAD {
|
|
|
263
298
|
*/
|
|
264
299
|
backFaceOpacity: number;
|
|
265
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* The options `draw.drawAnyAsync` passes on when the entity is a JSCAD 2D path, drawn as a line
|
|
303
|
+
* through its points: color, opacity, line width and the line to reuse when redrawing.
|
|
304
|
+
*/
|
|
266
305
|
class DrawPathDto<T> {
|
|
267
306
|
/**
|
|
268
307
|
* Provide options without default values
|
|
269
308
|
*/
|
|
270
309
|
constructor(path?: JSCADEntity, colour?: string, opacity?: number, width?: number, updatable?: boolean, pathMesh?: T);
|
|
271
310
|
/**
|
|
272
|
-
* 2D
|
|
311
|
+
* The 2D path to draw as a line; a closed path is drawn back to its first point
|
|
273
312
|
* @default undefined
|
|
274
313
|
*/
|
|
275
314
|
path: JSCADEntity;
|
|
276
315
|
/**
|
|
277
|
-
*
|
|
316
|
+
* Hex color of the line; a path colored with `colors.colorize` keeps its own color instead
|
|
278
317
|
* @default #444444
|
|
279
318
|
*/
|
|
280
319
|
colour: string;
|
|
281
320
|
/**
|
|
282
|
-
*
|
|
321
|
+
* How opaque the line is, from 0 for invisible to 1 for solid
|
|
283
322
|
* @default 1
|
|
284
323
|
* @minimum 0
|
|
285
324
|
* @maximum 1
|
|
@@ -287,7 +326,7 @@ export declare namespace JSCAD {
|
|
|
287
326
|
*/
|
|
288
327
|
opacity: number;
|
|
289
328
|
/**
|
|
290
|
-
*
|
|
329
|
+
* Thickness of the drawn line
|
|
291
330
|
* @default 10
|
|
292
331
|
* @minimum 0
|
|
293
332
|
* @maximum Infinity
|
|
@@ -295,174 +334,208 @@ export declare namespace JSCAD {
|
|
|
295
334
|
*/
|
|
296
335
|
width: number;
|
|
297
336
|
/**
|
|
298
|
-
*
|
|
337
|
+
* When true, the drawn line can be refreshed in place on later draws by passing it back as
|
|
338
|
+
* `pathMesh`
|
|
299
339
|
* @default false
|
|
300
340
|
*/
|
|
301
341
|
updatable: boolean;
|
|
302
342
|
/**
|
|
303
|
-
*
|
|
343
|
+
* A line from an earlier draw to refresh instead of creating a new one; used only when
|
|
344
|
+
* `updatable` is true
|
|
304
345
|
* @default undefined
|
|
305
346
|
* @optional true
|
|
306
347
|
* @ignore true
|
|
307
348
|
*/
|
|
308
349
|
pathMesh?: T | undefined;
|
|
309
350
|
}
|
|
351
|
+
/**
|
|
352
|
+
* Feeds `transformSolids` on the JSCAD service: the solids to move and the matrix, or matrices,
|
|
353
|
+
* applied to each of them.
|
|
354
|
+
*/
|
|
310
355
|
class TransformSolidsDto {
|
|
311
356
|
constructor(meshes?: JSCADEntity[], transformation?: Base.TransformMatrixes);
|
|
312
357
|
/**
|
|
313
|
-
*
|
|
358
|
+
* The solids to transform; they stay as they are and transformed copies come back in the same
|
|
359
|
+
* order
|
|
314
360
|
* @default undefined
|
|
315
361
|
*/
|
|
316
362
|
meshes: JSCADEntity[];
|
|
317
363
|
/**
|
|
318
|
-
*
|
|
364
|
+
* One 4x4 matrix, a list of matrices applied in order, or a list of such lists, as the
|
|
365
|
+
* `transforms` methods produce
|
|
319
366
|
* @default undefined
|
|
320
367
|
*/
|
|
321
368
|
transformation: Base.TransformMatrixes;
|
|
322
369
|
}
|
|
370
|
+
/**
|
|
371
|
+
* Feeds `transformSolid` on the JSCAD service: the solid to move and the matrix, or matrices,
|
|
372
|
+
* applied to it.
|
|
373
|
+
*/
|
|
323
374
|
class TransformSolidDto {
|
|
324
375
|
constructor(mesh?: JSCADEntity, transformation?: Base.TransformMatrixes);
|
|
325
376
|
/**
|
|
326
|
-
*
|
|
377
|
+
* The solid to transform; it stays as it is and a transformed copy comes back. A 2D shape or a
|
|
378
|
+
* path throws an error
|
|
327
379
|
* @default undefined
|
|
328
380
|
*/
|
|
329
381
|
mesh: JSCADEntity;
|
|
330
382
|
/**
|
|
331
|
-
*
|
|
383
|
+
* One 4x4 matrix, a list of matrices applied in order, or a list of such lists, as the
|
|
384
|
+
* `transforms` methods produce
|
|
332
385
|
* @default undefined
|
|
333
386
|
*/
|
|
334
387
|
transformation: Base.TransformMatrixes;
|
|
335
388
|
}
|
|
389
|
+
/**
|
|
390
|
+
* Feeds `downloadSolidSTL` on the JSCAD service: the solid to write and the name of the STL file.
|
|
391
|
+
*/
|
|
336
392
|
class DownloadSolidDto {
|
|
337
393
|
constructor(mesh?: JSCADEntity, fileName?: string);
|
|
338
394
|
/**
|
|
339
|
-
*
|
|
395
|
+
* The solid to write to the file
|
|
340
396
|
* @default undefined
|
|
341
397
|
*/
|
|
342
398
|
mesh: JSCADEntity;
|
|
343
399
|
/**
|
|
344
|
-
*
|
|
400
|
+
* Name of the downloaded file without the extension, which is added
|
|
345
401
|
* @default undefined
|
|
346
402
|
*/
|
|
347
403
|
fileName: string;
|
|
348
404
|
}
|
|
405
|
+
/**
|
|
406
|
+
* Feeds `downloadGeometryDxf` and `downloadGeometry3MF` on the JSCAD service: the geometry to
|
|
407
|
+
* write, the file name and optional options for the file writer.
|
|
408
|
+
*/
|
|
349
409
|
class DownloadGeometryDto {
|
|
350
|
-
constructor(geometry?: JSCADEntity | JSCADEntity[], fileName?: string, options?:
|
|
410
|
+
constructor(geometry?: JSCADEntity | JSCADEntity[], fileName?: string, options?: Record<string, unknown>);
|
|
351
411
|
/**
|
|
352
|
-
*
|
|
412
|
+
* A solid, a 2D shape, a path, or a list of them, all written into one file
|
|
353
413
|
* @default undefined
|
|
354
414
|
*/
|
|
355
415
|
geometry: JSCADEntity | JSCADEntity[];
|
|
356
416
|
/**
|
|
357
|
-
*
|
|
417
|
+
* Name of the downloaded file without the extension, which is added
|
|
358
418
|
* @default jscad-geometry
|
|
359
419
|
*/
|
|
360
420
|
fileName: string;
|
|
361
421
|
/**
|
|
362
|
-
* Options
|
|
422
|
+
* Options handed to the DXF or 3MF writer as they are; leave it out for the defaults
|
|
363
423
|
* @default undefined
|
|
364
424
|
* @optional true
|
|
365
425
|
*/
|
|
366
|
-
options
|
|
426
|
+
options?: Record<string, unknown> | undefined;
|
|
367
427
|
}
|
|
428
|
+
/**
|
|
429
|
+
* Feeds `downloadSolidsSTL` on the JSCAD service: the solids to write into one STL file and the
|
|
430
|
+
* file's name.
|
|
431
|
+
*/
|
|
368
432
|
class DownloadSolidsDto {
|
|
369
433
|
constructor(meshes?: JSCADEntity[], fileName?: string);
|
|
370
434
|
/**
|
|
371
|
-
*
|
|
435
|
+
* The solids to write, all into the same file
|
|
372
436
|
* @default undefined
|
|
373
437
|
*/
|
|
374
438
|
meshes: JSCADEntity[];
|
|
375
439
|
/**
|
|
376
|
-
*
|
|
440
|
+
* Name of the downloaded file without the extension, which is added
|
|
377
441
|
* @default undefined
|
|
378
442
|
*/
|
|
379
443
|
fileName: string;
|
|
380
444
|
}
|
|
445
|
+
/**
|
|
446
|
+
* Feeds `colors.colorize`: the geometry to tint, one entity or a list, and the color it is drawn in
|
|
447
|
+
* from then on.
|
|
448
|
+
*/
|
|
381
449
|
class ColorizeDto {
|
|
382
450
|
constructor(geometry?: JSCADEntity, color?: string);
|
|
383
451
|
/**
|
|
384
|
-
*
|
|
452
|
+
* A solid, a 2D shape, a path, or a list of them; colored copies come back in the same shape as
|
|
453
|
+
* the input
|
|
385
454
|
* @default undefined
|
|
386
455
|
*/
|
|
387
456
|
geometry: JSCADEntity | JSCADEntity[];
|
|
388
457
|
/**
|
|
389
|
-
* Hex color string
|
|
458
|
+
* Hex color string the geometry is always drawn in, ahead of the drawing options
|
|
390
459
|
* @default #0000ff
|
|
391
460
|
*/
|
|
392
461
|
color: string;
|
|
393
462
|
}
|
|
463
|
+
/**
|
|
464
|
+
* Feeds `booleans.union`, `booleans.intersect` and `booleans.subtract` with any number of inputs;
|
|
465
|
+
* for `subtract` the first entry is the one being cut. All entries must be of one kind, solids or
|
|
466
|
+
* 2D shapes.
|
|
467
|
+
*/
|
|
394
468
|
class BooleanObjectsDto {
|
|
395
469
|
constructor(meshes?: JSCADEntity[]);
|
|
396
470
|
/**
|
|
397
|
-
*
|
|
471
|
+
* The solids, or the 2D shapes, to combine; the inputs stay as they are and a new entity comes
|
|
472
|
+
* back
|
|
398
473
|
* @default undefined
|
|
399
474
|
*/
|
|
400
475
|
meshes: JSCADEntity[];
|
|
401
476
|
}
|
|
477
|
+
/**
|
|
478
|
+
* Feeds `booleans.unionTwo`, `booleans.intersectTwo` and `booleans.subtractTwo` with exactly two
|
|
479
|
+
* inputs of one kind, solids or 2D shapes; for `subtractTwo`, `second` is cut out of `first`.
|
|
480
|
+
*/
|
|
402
481
|
class BooleanTwoObjectsDto {
|
|
403
482
|
constructor(first?: JSCADEntity, second?: JSCADEntity);
|
|
404
483
|
/**
|
|
405
|
-
*
|
|
484
|
+
* The first solid or 2D shape, the one that is kept and cut in a subtraction
|
|
406
485
|
* @default undefined
|
|
407
486
|
*/
|
|
408
487
|
first: JSCADEntity;
|
|
409
488
|
/**
|
|
410
|
-
*
|
|
489
|
+
* The second solid or 2D shape, of the same kind as `first`
|
|
411
490
|
* @default undefined
|
|
412
491
|
*/
|
|
413
492
|
second: JSCADEntity;
|
|
414
493
|
}
|
|
494
|
+
/**
|
|
495
|
+
* Feeds `booleans.subtractFrom`: `from` is the base and every entry of `meshes` is cut out of it.
|
|
496
|
+
* All must be of one kind, solids or 2D shapes.
|
|
497
|
+
*/
|
|
415
498
|
class BooleanObjectsFromDto {
|
|
416
499
|
constructor(from?: JSCADEntity, meshes?: JSCADEntity[]);
|
|
417
500
|
/**
|
|
418
|
-
*
|
|
501
|
+
* The solid or 2D shape to cut from; it stays as it is and a cut copy comes back
|
|
419
502
|
* @default undefined
|
|
420
503
|
*/
|
|
421
504
|
from: JSCADEntity;
|
|
422
505
|
/**
|
|
423
|
-
*
|
|
506
|
+
* The solids or 2D shapes to cut out of `from`, of the same kind as it
|
|
424
507
|
* @default undefined
|
|
425
508
|
*/
|
|
426
509
|
meshes: JSCADEntity[];
|
|
427
510
|
}
|
|
428
|
-
|
|
429
|
-
|
|
511
|
+
/**
|
|
512
|
+
* Feeds `booleans.minkowskiSum` with the solids to sweep over one another; unlike the other
|
|
513
|
+
* booleans this one takes solids only, a 2D shape is refused.
|
|
514
|
+
*/
|
|
515
|
+
class MinkowskiSumDto {
|
|
516
|
+
constructor(meshes?: JSCADEntity[]);
|
|
430
517
|
/**
|
|
431
|
-
*
|
|
518
|
+
* The solids to sum, at least two; each later one is swept over the surface of the running
|
|
519
|
+
* result
|
|
432
520
|
* @default undefined
|
|
433
521
|
*/
|
|
434
|
-
|
|
435
|
-
/**
|
|
436
|
-
* Delta (+/-) of expansion
|
|
437
|
-
* @default 0.1
|
|
438
|
-
* @minimum -Infinity
|
|
439
|
-
* @maximum Infinity
|
|
440
|
-
* @step 0.1
|
|
441
|
-
*/
|
|
442
|
-
delta: number;
|
|
443
|
-
/**
|
|
444
|
-
* Type of corner to create during of expansion; edge, chamfer, round
|
|
445
|
-
* @default edge
|
|
446
|
-
*/
|
|
447
|
-
corners: solidCornerTypeEnum;
|
|
448
|
-
/**
|
|
449
|
-
* Integer number of segments when creating round corners
|
|
450
|
-
* @default 24
|
|
451
|
-
* @minimum 0
|
|
452
|
-
* @maximum Infinity
|
|
453
|
-
* @step 1
|
|
454
|
-
*/
|
|
455
|
-
segments: number;
|
|
522
|
+
meshes: JSCADEntity[];
|
|
456
523
|
}
|
|
457
|
-
|
|
524
|
+
/**
|
|
525
|
+
* Feeds `expansions.expand` and `expansions.offset`: the geometry, the signed distance to move its
|
|
526
|
+
* boundary by and how the corners are shaped on the way.
|
|
527
|
+
*/
|
|
528
|
+
class ExpansionDto {
|
|
458
529
|
constructor(geometry?: JSCADEntity, delta?: number, corners?: solidCornerTypeEnum, segments?: number);
|
|
459
530
|
/**
|
|
460
|
-
*
|
|
531
|
+
* The 2D shape, path or solid to grow; `offset` takes 2D shapes and paths only. It stays as it
|
|
532
|
+
* is and a new entity comes back
|
|
461
533
|
* @default undefined
|
|
462
534
|
*/
|
|
463
535
|
geometry: JSCADEntity;
|
|
464
536
|
/**
|
|
465
|
-
*
|
|
537
|
+
* How far the boundary moves, in model units: positive grows the geometry, negative shrinks it
|
|
538
|
+
* (a solid accepts positive only)
|
|
466
539
|
* @default 0.1
|
|
467
540
|
* @minimum -Infinity
|
|
468
541
|
* @maximum Infinity
|
|
@@ -470,12 +543,14 @@ export declare namespace JSCAD {
|
|
|
470
543
|
*/
|
|
471
544
|
delta: number;
|
|
472
545
|
/**
|
|
473
|
-
*
|
|
546
|
+
* How a convex corner is shaped: `edge` keeps it sharp, `chamfer` cuts it flat, `round` curves
|
|
547
|
+
* it; a solid accepts `round` only
|
|
474
548
|
* @default edge
|
|
475
549
|
*/
|
|
476
550
|
corners: solidCornerTypeEnum;
|
|
477
551
|
/**
|
|
478
|
-
*
|
|
552
|
+
* Number of straight pieces a `round` corner is made of over a full circle; more makes it
|
|
553
|
+
* smoother
|
|
479
554
|
* @default 24
|
|
480
555
|
* @minimum 0
|
|
481
556
|
* @maximum Infinity
|
|
@@ -483,15 +558,20 @@ export declare namespace JSCAD {
|
|
|
483
558
|
*/
|
|
484
559
|
segments: number;
|
|
485
560
|
}
|
|
561
|
+
/**
|
|
562
|
+
* Feeds `extrusions.extrudeLinear`: the flat shape, how far it rises along Z and the optional twist
|
|
563
|
+
* applied on the way up.
|
|
564
|
+
*/
|
|
486
565
|
class ExtrudeLinearDto {
|
|
487
566
|
constructor(geometry?: JSCADEntity, height?: number, twistAngle?: number, twistSteps?: number);
|
|
488
567
|
/**
|
|
489
|
-
*
|
|
568
|
+
* The flat 2D shape in the XY plane to raise into a solid; a closed path also works, an open
|
|
569
|
+
* one throws an error
|
|
490
570
|
* @default undefined
|
|
491
571
|
*/
|
|
492
572
|
geometry: JSCADEntity;
|
|
493
573
|
/**
|
|
494
|
-
*
|
|
574
|
+
* How far the shape rises along Z, in model units; negative extrudes downward
|
|
495
575
|
* @default 1
|
|
496
576
|
* @minimum -Infinity
|
|
497
577
|
* @maximum Infinity
|
|
@@ -499,7 +579,8 @@ export declare namespace JSCAD {
|
|
|
499
579
|
*/
|
|
500
580
|
height: number;
|
|
501
581
|
/**
|
|
502
|
-
*
|
|
582
|
+
* How far the top is turned relative to the bottom around Z, in degrees; 0 gives a straight
|
|
583
|
+
* extrusion
|
|
503
584
|
* @default 90
|
|
504
585
|
* @minimum -Infinity
|
|
505
586
|
* @maximum Infinity
|
|
@@ -507,7 +588,8 @@ export declare namespace JSCAD {
|
|
|
507
588
|
*/
|
|
508
589
|
twistAngle: number;
|
|
509
590
|
/**
|
|
510
|
-
* Number of twist
|
|
591
|
+
* Number of slices the twist is built from, at least 1; more makes a smoother twist and a
|
|
592
|
+
* heavier mesh
|
|
511
593
|
* @default 15
|
|
512
594
|
* @minimum 0
|
|
513
595
|
* @maximum Infinity
|
|
@@ -515,23 +597,43 @@ export declare namespace JSCAD {
|
|
|
515
597
|
*/
|
|
516
598
|
twistSteps: number;
|
|
517
599
|
}
|
|
600
|
+
/**
|
|
601
|
+
* Feeds `hulls.hull` and `hulls.hullChain` with the entities to wrap, all of one kind: solids, 2D
|
|
602
|
+
* shapes or paths. For `hullChain` the order is the order they connect in.
|
|
603
|
+
*/
|
|
518
604
|
class HullDto {
|
|
519
605
|
constructor(meshes?: JSCADEntity[]);
|
|
520
606
|
/**
|
|
521
|
-
*
|
|
607
|
+
* The solids, 2D shapes or paths to wrap, all of one kind; for a chain, in the order they
|
|
608
|
+
* connect
|
|
522
609
|
* @default undefined
|
|
523
610
|
*/
|
|
524
611
|
meshes: JSCADEntity[];
|
|
525
612
|
}
|
|
613
|
+
/**
|
|
614
|
+
* Feeds `hulls.isConvex` with the one solid to examine.
|
|
615
|
+
*/
|
|
616
|
+
class SolidDto {
|
|
617
|
+
constructor(mesh?: JSCADEntity);
|
|
618
|
+
/**
|
|
619
|
+
* The solid to examine; a 2D shape or a path is refused
|
|
620
|
+
* @default undefined
|
|
621
|
+
*/
|
|
622
|
+
mesh: JSCADEntity;
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* Feeds `extrusions.extrudeRectangular`: the outline to build a wall along, the wall's height along
|
|
626
|
+
* Z and its half thickness.
|
|
627
|
+
*/
|
|
526
628
|
class ExtrudeRectangularDto {
|
|
527
629
|
constructor(geometry?: JSCADEntity, height?: number, size?: number);
|
|
528
630
|
/**
|
|
529
|
-
*
|
|
631
|
+
* The 2D shape or path whose outline the wall follows; the inside of a shape stays empty
|
|
530
632
|
* @default undefined
|
|
531
633
|
*/
|
|
532
634
|
geometry: JSCADEntity;
|
|
533
635
|
/**
|
|
534
|
-
*
|
|
636
|
+
* How tall the wall is along Z, in model units, standing on the XY plane
|
|
535
637
|
* @default 1
|
|
536
638
|
* @minimum 0
|
|
537
639
|
* @maximum Infinity
|
|
@@ -539,7 +641,8 @@ export declare namespace JSCAD {
|
|
|
539
641
|
*/
|
|
540
642
|
height: number;
|
|
541
643
|
/**
|
|
542
|
-
*
|
|
644
|
+
* How far the wall reaches to each side of the outline, in model units, so the wall is twice
|
|
645
|
+
* this thick
|
|
543
646
|
* @default 1
|
|
544
647
|
* @minimum 0
|
|
545
648
|
* @maximum Infinity
|
|
@@ -547,15 +650,19 @@ export declare namespace JSCAD {
|
|
|
547
650
|
*/
|
|
548
651
|
size: number;
|
|
549
652
|
}
|
|
653
|
+
/**
|
|
654
|
+
* Feeds `extrusions.extrudeRectangularPoints`: the points of the line to build a wall along, the
|
|
655
|
+
* wall's height along Z and its half thickness.
|
|
656
|
+
*/
|
|
550
657
|
class ExtrudeRectangularPointsDto {
|
|
551
658
|
constructor(points?: Base.Point3[], height?: number, size?: number);
|
|
552
659
|
/**
|
|
553
|
-
*
|
|
660
|
+
* The corner points of the line the wall follows, in order; only X and Y are used
|
|
554
661
|
* @default undefined
|
|
555
662
|
*/
|
|
556
663
|
points: Base.Point3[];
|
|
557
664
|
/**
|
|
558
|
-
*
|
|
665
|
+
* How tall the wall is along Z, in model units, standing on the XY plane
|
|
559
666
|
* @default 1
|
|
560
667
|
* @minimum 0
|
|
561
668
|
* @maximum Infinity
|
|
@@ -563,7 +670,8 @@ export declare namespace JSCAD {
|
|
|
563
670
|
*/
|
|
564
671
|
height: number;
|
|
565
672
|
/**
|
|
566
|
-
*
|
|
673
|
+
* How far the wall reaches to each side of the line, in model units, so the wall is twice this
|
|
674
|
+
* thick
|
|
567
675
|
* @default 1
|
|
568
676
|
* @minimum 0
|
|
569
677
|
* @maximum Infinity
|
|
@@ -571,15 +679,20 @@ export declare namespace JSCAD {
|
|
|
571
679
|
*/
|
|
572
680
|
size: number;
|
|
573
681
|
}
|
|
682
|
+
/**
|
|
683
|
+
* Feeds `extrusions.extrudeRotate`: the flat profile to spin around the Z axis, how far and from
|
|
684
|
+
* where to spin it, and how finely the round result is faceted.
|
|
685
|
+
*/
|
|
574
686
|
class ExtrudeRotateDto {
|
|
575
687
|
constructor(polygon?: JSCADEntity, angle?: number, startAngle?: number, segments?: number);
|
|
576
688
|
/**
|
|
577
|
-
*
|
|
689
|
+
* The flat 2D shape in the XY plane to revolve around the Z axis; its X coordinates are the
|
|
690
|
+
* distances from the axis, which clips it where it crosses
|
|
578
691
|
* @default undefined
|
|
579
692
|
*/
|
|
580
693
|
polygon: JSCADEntity;
|
|
581
694
|
/**
|
|
582
|
-
*
|
|
695
|
+
* How far to revolve, in degrees: 360 makes a full ring, the default 90 a quarter
|
|
583
696
|
* @default 90
|
|
584
697
|
* @minimum -Infinity
|
|
585
698
|
* @maximum Infinity
|
|
@@ -587,7 +700,7 @@ export declare namespace JSCAD {
|
|
|
587
700
|
*/
|
|
588
701
|
angle: number;
|
|
589
702
|
/**
|
|
590
|
-
*
|
|
703
|
+
* Where the revolution starts, in degrees from the X axis
|
|
591
704
|
* @default 0
|
|
592
705
|
* @minimum -Infinity
|
|
593
706
|
* @maximum Infinity
|
|
@@ -595,7 +708,8 @@ export declare namespace JSCAD {
|
|
|
595
708
|
*/
|
|
596
709
|
startAngle: number;
|
|
597
710
|
/**
|
|
598
|
-
* Number of
|
|
711
|
+
* Number of steps in a full turn; a partial angle uses proportionally fewer. Fewer than 3
|
|
712
|
+
* throws an error
|
|
599
713
|
* @default 24
|
|
600
714
|
* @minimum 0
|
|
601
715
|
* @maximum Infinity
|
|
@@ -603,122 +717,154 @@ export declare namespace JSCAD {
|
|
|
603
717
|
*/
|
|
604
718
|
segments: number;
|
|
605
719
|
}
|
|
720
|
+
/**
|
|
721
|
+
* Feeds `polygon.createFromPolyline` with the polyline whose points become the outline of a filled
|
|
722
|
+
* 2D shape.
|
|
723
|
+
*/
|
|
606
724
|
class PolylineDto {
|
|
607
725
|
constructor(polyline?: PolylinePropertiesDto);
|
|
608
726
|
/**
|
|
609
|
-
*
|
|
727
|
+
* The polyline whose points, in order, outline the shape; only X and Y are used
|
|
610
728
|
*/
|
|
611
729
|
polyline: PolylinePropertiesDto;
|
|
612
730
|
}
|
|
731
|
+
/**
|
|
732
|
+
* Feeds `polygon.createFromCurve` with a NURBS curve, which is sampled into points to outline a
|
|
733
|
+
* filled 2D shape.
|
|
734
|
+
*/
|
|
613
735
|
class CurveDto {
|
|
614
736
|
constructor(curve?: any);
|
|
615
737
|
/**
|
|
616
|
-
*
|
|
738
|
+
* A NURBS curve that can be sampled into points; only X and Y of the samples are used
|
|
617
739
|
*/
|
|
618
740
|
curve: any;
|
|
619
741
|
}
|
|
742
|
+
/**
|
|
743
|
+
* Feeds `polygon.createFromPoints` with the outline points of a filled 2D shape, listed in order
|
|
744
|
+
* around it.
|
|
745
|
+
*/
|
|
620
746
|
class PointsDto {
|
|
621
747
|
constructor(points?: Base.Point3[]);
|
|
622
748
|
/**
|
|
623
|
-
*
|
|
749
|
+
* The outline points in order, at least three; only X and Y are used
|
|
624
750
|
*/
|
|
625
751
|
points: Base.Point3[];
|
|
626
752
|
}
|
|
753
|
+
/**
|
|
754
|
+
* Feeds `path.close` and `polygon.createFromPath` with the one 2D path to work on; a 2D shape or a
|
|
755
|
+
* solid throws an error.
|
|
756
|
+
*/
|
|
627
757
|
class PathDto {
|
|
628
758
|
constructor(path?: JSCADEntity);
|
|
629
759
|
/**
|
|
630
|
-
* 2D path
|
|
760
|
+
* The 2D path to work on; it stays as it is and a new path or shape comes back
|
|
631
761
|
* @default undefined
|
|
632
762
|
*/
|
|
633
763
|
path: JSCADEntity;
|
|
634
764
|
}
|
|
765
|
+
/**
|
|
766
|
+
* Feeds `path.createFromPoints`: the points a new 2D path runs through and whether it closes back
|
|
767
|
+
* to the first.
|
|
768
|
+
*/
|
|
635
769
|
class PathFromPointsDto {
|
|
636
770
|
constructor(points?: Base.Point2[], closed?: boolean);
|
|
637
771
|
/**
|
|
638
|
-
*
|
|
772
|
+
* The points the path runs through, in order; only X and Y are used and repeated consecutive
|
|
773
|
+
* points are dropped
|
|
639
774
|
* @default undefined
|
|
640
775
|
*/
|
|
641
776
|
points: Base.Point2[];
|
|
642
777
|
/**
|
|
643
|
-
*
|
|
778
|
+
* When true, the last point joins back to the first and the path accepts no more points
|
|
644
779
|
* @default false
|
|
645
780
|
*/
|
|
646
781
|
closed: boolean;
|
|
647
782
|
}
|
|
783
|
+
/**
|
|
784
|
+
* Feeds `path.createPathsFromPoints` with several point lists, one 2D path each; a list ending on
|
|
785
|
+
* its first point makes a closed path.
|
|
786
|
+
*/
|
|
648
787
|
class PathsFromPointsDto {
|
|
649
788
|
constructor(pointsLists?: Base.Point3[][] | Base.Point2[][]);
|
|
650
789
|
/**
|
|
651
|
-
*
|
|
790
|
+
* One list of points per path, in the order the paths should come back; a list whose last point
|
|
791
|
+
* equals its first gives a closed path
|
|
652
792
|
* @default undefined
|
|
653
793
|
*/
|
|
654
794
|
pointsLists: Base.Point3[][] | Base.Point2[][];
|
|
655
795
|
}
|
|
796
|
+
/**
|
|
797
|
+
* Feeds `path.createFromPolyline`: the polyline a new 2D path runs through and whether it closes
|
|
798
|
+
* back to the first point.
|
|
799
|
+
*/
|
|
656
800
|
class PathFromPolylineDto {
|
|
657
801
|
constructor(polyline?: PolylinePropertiesDto, closed?: boolean);
|
|
658
802
|
/**
|
|
659
|
-
*
|
|
803
|
+
* The polyline whose points the path runs through; only X and Y are used and its own closed
|
|
804
|
+
* flag is ignored
|
|
660
805
|
* @default undefined
|
|
661
806
|
*/
|
|
662
807
|
polyline: PolylinePropertiesDto;
|
|
663
808
|
/**
|
|
664
|
-
*
|
|
809
|
+
* When true, the last point joins back to the first and the path accepts no more points
|
|
665
810
|
* @default false
|
|
666
811
|
*/
|
|
667
812
|
closed: boolean;
|
|
668
813
|
}
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
* Verb Nurbs curve
|
|
673
|
-
* @default undefined
|
|
674
|
-
*/
|
|
675
|
-
curve: JSCADEntity;
|
|
676
|
-
/**
|
|
677
|
-
* Path to append the curve to
|
|
678
|
-
* @default undefined
|
|
679
|
-
*/
|
|
680
|
-
path: JSCADEntity;
|
|
681
|
-
}
|
|
814
|
+
/**
|
|
815
|
+
* Feeds `path.appendPoints`: an open 2D path and the points to add after its last point.
|
|
816
|
+
*/
|
|
682
817
|
class PathAppendPointsDto {
|
|
683
818
|
constructor(points?: Base.Point2[], path?: JSCADEntity);
|
|
684
819
|
/**
|
|
685
|
-
*
|
|
820
|
+
* The points to add after the path's last point, in order; only X and Y are used
|
|
686
821
|
* @default undefined
|
|
687
822
|
*/
|
|
688
823
|
points: Base.Point2[];
|
|
689
824
|
/**
|
|
690
|
-
*
|
|
825
|
+
* The open 2D path to extend; it stays as it is and a longer copy comes back. A closed path
|
|
826
|
+
* throws an error
|
|
691
827
|
* @default undefined
|
|
692
828
|
*/
|
|
693
829
|
path: JSCADEntity;
|
|
694
830
|
}
|
|
831
|
+
/**
|
|
832
|
+
* Feeds `path.appendPolyline`: an open 2D path and the polyline whose points are added after its
|
|
833
|
+
* last point.
|
|
834
|
+
*/
|
|
695
835
|
class PathAppendPolylineDto {
|
|
696
836
|
constructor(polyline?: PolylinePropertiesDto, path?: JSCADEntity);
|
|
697
837
|
/**
|
|
698
|
-
*
|
|
838
|
+
* The polyline whose points are added after the path's last point; only X and Y are used
|
|
699
839
|
* @default undefined
|
|
700
840
|
*/
|
|
701
841
|
polyline: PolylinePropertiesDto;
|
|
702
842
|
/**
|
|
703
|
-
*
|
|
843
|
+
* The open 2D path to extend; it stays as it is and a longer copy comes back. A closed path
|
|
844
|
+
* throws an error
|
|
704
845
|
* @default undefined
|
|
705
846
|
*/
|
|
706
847
|
path: JSCADEntity;
|
|
707
848
|
}
|
|
849
|
+
/**
|
|
850
|
+
* Feeds `path.appendArc`: an open 2D path with at least one point, the point the arc ends on, the
|
|
851
|
+
* ellipse the arc is cut from and which of the four fitting arcs to take.
|
|
852
|
+
*/
|
|
708
853
|
class PathAppendArcDto {
|
|
709
854
|
constructor(path?: JSCADEntity, endPoint?: Base.Point2, xAxisRotation?: number, clockwise?: boolean, large?: boolean, segments?: number, radiusX?: number, radiusY?: number);
|
|
710
855
|
/**
|
|
711
|
-
*
|
|
856
|
+
* The open 2D path to extend, with at least one point; the arc starts at its last point
|
|
712
857
|
* @default undefined
|
|
713
858
|
*/
|
|
714
859
|
path: JSCADEntity;
|
|
715
860
|
/**
|
|
716
|
-
*
|
|
861
|
+
* Where the arc ends, as a 2D point in the XY plane
|
|
717
862
|
* @default [1, 1]
|
|
718
863
|
*/
|
|
719
864
|
endPoint: Base.Point2;
|
|
720
865
|
/**
|
|
721
|
-
*
|
|
866
|
+
* Tilt of the ellipse the arc is cut from, in degrees from the X axis; it changes nothing for a
|
|
867
|
+
* circle
|
|
722
868
|
* @default 90
|
|
723
869
|
* @minimum -Infinity
|
|
724
870
|
* @maximum Infinity
|
|
@@ -726,17 +872,18 @@ export declare namespace JSCAD {
|
|
|
726
872
|
*/
|
|
727
873
|
xAxisRotation: number;
|
|
728
874
|
/**
|
|
729
|
-
*
|
|
875
|
+
* When true, the arc turns clockwise from the start to the end point; false turns
|
|
876
|
+
* counter-clockwise
|
|
730
877
|
* @default true
|
|
731
878
|
*/
|
|
732
879
|
clockwise: boolean;
|
|
733
880
|
/**
|
|
734
|
-
*
|
|
881
|
+
* When true, the longer of the two arcs between the points is taken, more than half the ellipse
|
|
735
882
|
* @default false
|
|
736
883
|
*/
|
|
737
884
|
large: boolean;
|
|
738
885
|
/**
|
|
739
|
-
* Number of
|
|
886
|
+
* Number of straight pieces for a full ellipse; the arc gets its proportional share
|
|
740
887
|
* @default 24
|
|
741
888
|
* @minimum 0
|
|
742
889
|
* @maximum Infinity
|
|
@@ -744,7 +891,8 @@ export declare namespace JSCAD {
|
|
|
744
891
|
*/
|
|
745
892
|
segments: number;
|
|
746
893
|
/**
|
|
747
|
-
*
|
|
894
|
+
* Half width of the ellipse along its own X axis, in model units; scaled up when too small to
|
|
895
|
+
* reach the end point
|
|
748
896
|
* @default 1
|
|
749
897
|
* @minimum -Infinity
|
|
750
898
|
* @maximum Infinity
|
|
@@ -752,7 +900,8 @@ export declare namespace JSCAD {
|
|
|
752
900
|
*/
|
|
753
901
|
radiusX: number;
|
|
754
902
|
/**
|
|
755
|
-
*
|
|
903
|
+
* Half height of the ellipse along its own Y axis, in model units; equal to `radiusX` for a
|
|
904
|
+
* circular arc
|
|
756
905
|
* @default 1
|
|
757
906
|
* @minimum -Infinity
|
|
758
907
|
* @maximum Infinity
|
|
@@ -760,15 +909,19 @@ export declare namespace JSCAD {
|
|
|
760
909
|
*/
|
|
761
910
|
radiusY: number;
|
|
762
911
|
}
|
|
912
|
+
/**
|
|
913
|
+
* Feeds `polygon.circle`: a filled circle in the XY plane, given by its 2D center, radius and the
|
|
914
|
+
* number of straight sides that approximate it.
|
|
915
|
+
*/
|
|
763
916
|
class CircleDto {
|
|
764
917
|
constructor(center?: Base.Point2, radius?: number, segments?: number);
|
|
765
918
|
/**
|
|
766
|
-
*
|
|
919
|
+
* The 2D center point, as X and Y in the plane
|
|
767
920
|
* @default [0, 0]
|
|
768
921
|
*/
|
|
769
922
|
center: Base.Point2;
|
|
770
923
|
/**
|
|
771
|
-
*
|
|
924
|
+
* Distance from the center to the rim, in model units
|
|
772
925
|
* @default 1
|
|
773
926
|
* @minimum -Infinity
|
|
774
927
|
* @maximum Infinity
|
|
@@ -776,7 +929,7 @@ export declare namespace JSCAD {
|
|
|
776
929
|
*/
|
|
777
930
|
radius: number;
|
|
778
931
|
/**
|
|
779
|
-
*
|
|
932
|
+
* Number of straight sides around the circle; more makes it rounder
|
|
780
933
|
* @default 24
|
|
781
934
|
* @minimum 0
|
|
782
935
|
* @maximum Infinity
|
|
@@ -784,20 +937,24 @@ export declare namespace JSCAD {
|
|
|
784
937
|
*/
|
|
785
938
|
segments: number;
|
|
786
939
|
}
|
|
940
|
+
/**
|
|
941
|
+
* Feeds `polygon.ellipse`: a filled ellipse in the XY plane, given by its 2D center, its two
|
|
942
|
+
* half-sizes and the number of straight sides that approximate it.
|
|
943
|
+
*/
|
|
787
944
|
class EllipseDto {
|
|
788
945
|
constructor(center?: Base.Point2, radius?: Base.Point2, segments?: number);
|
|
789
946
|
/**
|
|
790
|
-
*
|
|
947
|
+
* The 2D center point, as X and Y in the plane
|
|
791
948
|
* @default [0, 0]
|
|
792
949
|
*/
|
|
793
950
|
center: Base.Point2;
|
|
794
951
|
/**
|
|
795
|
-
*
|
|
952
|
+
* The half width along X and the half height along Y, in model units, as `[x, y]`
|
|
796
953
|
* @default [1, 2]
|
|
797
954
|
*/
|
|
798
955
|
radius: Base.Point2;
|
|
799
956
|
/**
|
|
800
|
-
*
|
|
957
|
+
* Number of straight sides around the ellipse; more makes it rounder
|
|
801
958
|
* @default 24
|
|
802
959
|
* @minimum 0
|
|
803
960
|
* @maximum Infinity
|
|
@@ -805,15 +962,19 @@ export declare namespace JSCAD {
|
|
|
805
962
|
*/
|
|
806
963
|
segments: number;
|
|
807
964
|
}
|
|
965
|
+
/**
|
|
966
|
+
* Feeds `polygon.square`: a filled square in the XY plane with sides parallel to the axes, given by
|
|
967
|
+
* its 2D center and side length.
|
|
968
|
+
*/
|
|
808
969
|
class SquareDto {
|
|
809
970
|
constructor(center?: Base.Point2, size?: number);
|
|
810
971
|
/**
|
|
811
|
-
*
|
|
972
|
+
* The 2D center point, as X and Y in the plane
|
|
812
973
|
* @default [0, 0]
|
|
813
974
|
*/
|
|
814
975
|
center: Base.Point2;
|
|
815
976
|
/**
|
|
816
|
-
*
|
|
977
|
+
* Length of each side, in model units
|
|
817
978
|
* @default 1
|
|
818
979
|
* @minimum -Infinity
|
|
819
980
|
* @maximum Infinity
|
|
@@ -821,15 +982,19 @@ export declare namespace JSCAD {
|
|
|
821
982
|
*/
|
|
822
983
|
size: number;
|
|
823
984
|
}
|
|
985
|
+
/**
|
|
986
|
+
* Feeds `polygon.rectangle`: a filled rectangle in the XY plane with sides parallel to the axes,
|
|
987
|
+
* given by its 2D center, width along X and length along Y.
|
|
988
|
+
*/
|
|
824
989
|
class RectangleDto {
|
|
825
990
|
constructor(center?: Base.Point2, width?: number, length?: number);
|
|
826
991
|
/**
|
|
827
|
-
*
|
|
992
|
+
* The 2D center point, as X and Y in the plane
|
|
828
993
|
* @default [0, 0]
|
|
829
994
|
*/
|
|
830
995
|
center: Base.Point2;
|
|
831
996
|
/**
|
|
832
|
-
*
|
|
997
|
+
* Full size along X, in model units
|
|
833
998
|
* @default 1
|
|
834
999
|
* @minimum -Infinity
|
|
835
1000
|
* @maximum Infinity
|
|
@@ -837,7 +1002,7 @@ export declare namespace JSCAD {
|
|
|
837
1002
|
*/
|
|
838
1003
|
width: number;
|
|
839
1004
|
/**
|
|
840
|
-
*
|
|
1005
|
+
* Full size along Y, in model units
|
|
841
1006
|
* @default 1
|
|
842
1007
|
* @minimum -Infinity
|
|
843
1008
|
* @maximum Infinity
|
|
@@ -845,15 +1010,21 @@ export declare namespace JSCAD {
|
|
|
845
1010
|
*/
|
|
846
1011
|
length: number;
|
|
847
1012
|
}
|
|
1013
|
+
/**
|
|
1014
|
+
* Feeds `polygon.roundedRectangle`: a filled rectangle in the XY plane whose four corners are
|
|
1015
|
+
* rounded, given by its 2D center, its sizes, the corner radius and how finely the corners are
|
|
1016
|
+
* faceted.
|
|
1017
|
+
*/
|
|
848
1018
|
class RoundedRectangleDto {
|
|
849
1019
|
constructor(center?: Base.Point2, roundRadius?: number, segments?: number, width?: number, length?: number);
|
|
850
1020
|
/**
|
|
851
|
-
*
|
|
1021
|
+
* The 2D center point, as X and Y in the plane
|
|
852
1022
|
* @default [0, 0]
|
|
853
1023
|
*/
|
|
854
1024
|
center: Base.Point2;
|
|
855
1025
|
/**
|
|
856
|
-
*
|
|
1026
|
+
* Radius of each rounded corner, in model units; it must be less than half of the smaller side
|
|
1027
|
+
* or an error is thrown
|
|
857
1028
|
* @default 0.2
|
|
858
1029
|
* @minimum -Infinity
|
|
859
1030
|
* @maximum Infinity
|
|
@@ -861,7 +1032,8 @@ export declare namespace JSCAD {
|
|
|
861
1032
|
*/
|
|
862
1033
|
roundRadius: number;
|
|
863
1034
|
/**
|
|
864
|
-
* Number of
|
|
1035
|
+
* Number of straight pieces a full circle of rounding is made of, so each corner gets a
|
|
1036
|
+
* quarter; more makes it smoother
|
|
865
1037
|
* @default 24
|
|
866
1038
|
* @minimum 0
|
|
867
1039
|
* @maximum Infinity
|
|
@@ -869,7 +1041,7 @@ export declare namespace JSCAD {
|
|
|
869
1041
|
*/
|
|
870
1042
|
segments: number;
|
|
871
1043
|
/**
|
|
872
|
-
*
|
|
1044
|
+
* Full size along X, in model units
|
|
873
1045
|
* @default 1
|
|
874
1046
|
* @minimum -Infinity
|
|
875
1047
|
* @maximum Infinity
|
|
@@ -877,7 +1049,7 @@ export declare namespace JSCAD {
|
|
|
877
1049
|
*/
|
|
878
1050
|
width: number;
|
|
879
1051
|
/**
|
|
880
|
-
*
|
|
1052
|
+
* Full size along Y, in model units
|
|
881
1053
|
* @default 1
|
|
882
1054
|
* @minimum -Infinity
|
|
883
1055
|
* @maximum Infinity
|
|
@@ -885,15 +1057,19 @@ export declare namespace JSCAD {
|
|
|
885
1057
|
*/
|
|
886
1058
|
length: number;
|
|
887
1059
|
}
|
|
1060
|
+
/**
|
|
1061
|
+
* Feeds `polygon.star`: a filled star in the XY plane, given by its 2D center, how many tips it
|
|
1062
|
+
* has, how far the tips and the notches between them reach and where the first tip points.
|
|
1063
|
+
*/
|
|
888
1064
|
class StarDto {
|
|
889
1065
|
constructor(center?: Base.Point2, vertices?: number, density?: number, outerRadius?: number, innerRadius?: number, startAngle?: number);
|
|
890
1066
|
/**
|
|
891
|
-
*
|
|
1067
|
+
* The 2D center point, as X and Y in the plane
|
|
892
1068
|
* @default [0, 0]
|
|
893
1069
|
*/
|
|
894
1070
|
center: Base.Point2;
|
|
895
1071
|
/**
|
|
896
|
-
* Number of
|
|
1072
|
+
* Number of tips; the star has as many notches between them
|
|
897
1073
|
* @default 10
|
|
898
1074
|
* @minimum 0
|
|
899
1075
|
* @maximum Infinity
|
|
@@ -901,7 +1077,8 @@ export declare namespace JSCAD {
|
|
|
901
1077
|
*/
|
|
902
1078
|
vertices: number;
|
|
903
1079
|
/**
|
|
904
|
-
*
|
|
1080
|
+
* Read only when `innerRadius` is 0: how many tips apart the edges connect, 2 for a pentagram,
|
|
1081
|
+
* from which the notch radius is derived
|
|
905
1082
|
* @default 1
|
|
906
1083
|
* @minimum 0
|
|
907
1084
|
* @maximum Infinity
|
|
@@ -909,7 +1086,7 @@ export declare namespace JSCAD {
|
|
|
909
1086
|
*/
|
|
910
1087
|
density: number;
|
|
911
1088
|
/**
|
|
912
|
-
*
|
|
1089
|
+
* Distance from the center to each tip, in model units
|
|
913
1090
|
* @default 2
|
|
914
1091
|
* @minimum 0
|
|
915
1092
|
* @maximum Infinity
|
|
@@ -917,7 +1094,7 @@ export declare namespace JSCAD {
|
|
|
917
1094
|
*/
|
|
918
1095
|
outerRadius: number;
|
|
919
1096
|
/**
|
|
920
|
-
*
|
|
1097
|
+
* Distance from the center to each notch, in model units; 0 lets `density` decide it
|
|
921
1098
|
* @default 1
|
|
922
1099
|
* @minimum 0
|
|
923
1100
|
* @maximum Infinity
|
|
@@ -925,7 +1102,7 @@ export declare namespace JSCAD {
|
|
|
925
1102
|
*/
|
|
926
1103
|
innerRadius: number;
|
|
927
1104
|
/**
|
|
928
|
-
*
|
|
1105
|
+
* Direction of the first tip, in degrees counter-clockwise from the X axis
|
|
929
1106
|
* @default 0
|
|
930
1107
|
* @minimum -Infinity
|
|
931
1108
|
* @maximum Infinity
|
|
@@ -933,15 +1110,19 @@ export declare namespace JSCAD {
|
|
|
933
1110
|
*/
|
|
934
1111
|
startAngle: number;
|
|
935
1112
|
}
|
|
1113
|
+
/**
|
|
1114
|
+
* Feeds `shapes.cube`: a cube with faces parallel to the axes, given by its center point and edge
|
|
1115
|
+
* length.
|
|
1116
|
+
*/
|
|
936
1117
|
class CubeDto {
|
|
937
1118
|
constructor(center?: Base.Point3, size?: number);
|
|
938
1119
|
/**
|
|
939
|
-
*
|
|
1120
|
+
* The point the cube is centered on, so half the edge length lies on each side of it
|
|
940
1121
|
* @default [0, 0, 0]
|
|
941
1122
|
*/
|
|
942
1123
|
center: Base.Point3;
|
|
943
1124
|
/**
|
|
944
|
-
*
|
|
1125
|
+
* Length of every edge, in model units
|
|
945
1126
|
* @default 1
|
|
946
1127
|
* @minimum -Infinity
|
|
947
1128
|
* @maximum Infinity
|
|
@@ -949,15 +1130,19 @@ export declare namespace JSCAD {
|
|
|
949
1130
|
*/
|
|
950
1131
|
size: number;
|
|
951
1132
|
}
|
|
1133
|
+
/**
|
|
1134
|
+
* Feeds `shapes.cubesOnCenterPoints`: one cube of the same edge length on every center point,
|
|
1135
|
+
* coming back in the same order.
|
|
1136
|
+
*/
|
|
952
1137
|
class CubeCentersDto {
|
|
953
1138
|
constructor(centers?: Base.Point3[], size?: number);
|
|
954
1139
|
/**
|
|
955
|
-
*
|
|
1140
|
+
* The points the cubes are centered on, one cube each, in the order the results come back
|
|
956
1141
|
* @default undefined
|
|
957
1142
|
*/
|
|
958
1143
|
centers: Base.Point3[];
|
|
959
1144
|
/**
|
|
960
|
-
*
|
|
1145
|
+
* Length of every edge of every cube, in model units
|
|
961
1146
|
* @default 1
|
|
962
1147
|
* @minimum 0
|
|
963
1148
|
* @maximum Infinity
|
|
@@ -965,15 +1150,19 @@ export declare namespace JSCAD {
|
|
|
965
1150
|
*/
|
|
966
1151
|
size: number;
|
|
967
1152
|
}
|
|
1153
|
+
/**
|
|
1154
|
+
* Feeds `shapes.cuboid`: a box with faces parallel to the axes, given by its center point and its
|
|
1155
|
+
* sizes along X, Y and Z.
|
|
1156
|
+
*/
|
|
968
1157
|
class CuboidDto {
|
|
969
1158
|
constructor(center?: Base.Point3, width?: number, length?: number, height?: number);
|
|
970
1159
|
/**
|
|
971
|
-
*
|
|
1160
|
+
* The point the box is centered on, so half of each size lies on each side of it
|
|
972
1161
|
* @default [0, 0, 0]
|
|
973
1162
|
*/
|
|
974
1163
|
center: Base.Point3;
|
|
975
1164
|
/**
|
|
976
|
-
*
|
|
1165
|
+
* Full size along X, in model units
|
|
977
1166
|
* @default 1
|
|
978
1167
|
* @minimum 0
|
|
979
1168
|
* @maximum Infinity
|
|
@@ -981,7 +1170,7 @@ export declare namespace JSCAD {
|
|
|
981
1170
|
*/
|
|
982
1171
|
width: number;
|
|
983
1172
|
/**
|
|
984
|
-
*
|
|
1173
|
+
* Full size along Z, in model units
|
|
985
1174
|
* @default 1
|
|
986
1175
|
* @minimum 0
|
|
987
1176
|
* @maximum Infinity
|
|
@@ -989,7 +1178,7 @@ export declare namespace JSCAD {
|
|
|
989
1178
|
*/
|
|
990
1179
|
length: number;
|
|
991
1180
|
/**
|
|
992
|
-
*
|
|
1181
|
+
* Full size along Y, in model units
|
|
993
1182
|
* @default 1
|
|
994
1183
|
* @minimum 0
|
|
995
1184
|
* @maximum Infinity
|
|
@@ -997,15 +1186,19 @@ export declare namespace JSCAD {
|
|
|
997
1186
|
*/
|
|
998
1187
|
height: number;
|
|
999
1188
|
}
|
|
1189
|
+
/**
|
|
1190
|
+
* Feeds `shapes.cuboidsOnCenterPoints`: one box of the same sizes on every center point, coming
|
|
1191
|
+
* back in the same order.
|
|
1192
|
+
*/
|
|
1000
1193
|
class CuboidCentersDto {
|
|
1001
1194
|
constructor(centers?: Base.Point3[], width?: number, length?: number, height?: number);
|
|
1002
1195
|
/**
|
|
1003
|
-
*
|
|
1196
|
+
* The points the boxes are centered on, one box each, in the order the results come back
|
|
1004
1197
|
* @default undefined
|
|
1005
1198
|
*/
|
|
1006
1199
|
centers: Base.Point3[];
|
|
1007
1200
|
/**
|
|
1008
|
-
*
|
|
1201
|
+
* Full size of every box along X, in model units
|
|
1009
1202
|
* @default 1
|
|
1010
1203
|
* @minimum 0
|
|
1011
1204
|
* @maximum Infinity
|
|
@@ -1013,7 +1206,7 @@ export declare namespace JSCAD {
|
|
|
1013
1206
|
*/
|
|
1014
1207
|
width: number;
|
|
1015
1208
|
/**
|
|
1016
|
-
*
|
|
1209
|
+
* Full size of every box along Z, in model units
|
|
1017
1210
|
* @default 1
|
|
1018
1211
|
* @minimum 0
|
|
1019
1212
|
* @maximum Infinity
|
|
@@ -1021,7 +1214,7 @@ export declare namespace JSCAD {
|
|
|
1021
1214
|
*/
|
|
1022
1215
|
length: number;
|
|
1023
1216
|
/**
|
|
1024
|
-
*
|
|
1217
|
+
* Full size of every box along Y, in model units
|
|
1025
1218
|
* @default 1
|
|
1026
1219
|
* @minimum 0
|
|
1027
1220
|
* @maximum Infinity
|
|
@@ -1029,15 +1222,20 @@ export declare namespace JSCAD {
|
|
|
1029
1222
|
*/
|
|
1030
1223
|
height: number;
|
|
1031
1224
|
}
|
|
1225
|
+
/**
|
|
1226
|
+
* Feeds `shapes.roundedCuboid`: a box with every edge and corner rounded, given by its center, its
|
|
1227
|
+
* sizes along X, Y and Z, the rounding radius and how finely the rounding is faceted.
|
|
1228
|
+
*/
|
|
1032
1229
|
class RoundedCuboidDto {
|
|
1033
1230
|
constructor(center?: Base.Point3, roundRadius?: number, width?: number, length?: number, height?: number, segments?: number);
|
|
1034
1231
|
/**
|
|
1035
|
-
*
|
|
1232
|
+
* The point the box is centered on, so half of each size lies on each side of it
|
|
1036
1233
|
* @default [0, 0, 0]
|
|
1037
1234
|
*/
|
|
1038
1235
|
center: Base.Point3;
|
|
1039
1236
|
/**
|
|
1040
|
-
* Radius
|
|
1237
|
+
* Radius of the rounding on every edge, in model units; it must be less than half of the
|
|
1238
|
+
* smallest side or an error is thrown
|
|
1041
1239
|
* @default 0.1
|
|
1042
1240
|
* @minimum 0
|
|
1043
1241
|
* @maximum Infinity
|
|
@@ -1045,7 +1243,7 @@ export declare namespace JSCAD {
|
|
|
1045
1243
|
*/
|
|
1046
1244
|
roundRadius: number;
|
|
1047
1245
|
/**
|
|
1048
|
-
*
|
|
1246
|
+
* Full size along X, in model units, rounding included
|
|
1049
1247
|
* @default 1
|
|
1050
1248
|
* @minimum 0
|
|
1051
1249
|
* @maximum Infinity
|
|
@@ -1053,7 +1251,7 @@ export declare namespace JSCAD {
|
|
|
1053
1251
|
*/
|
|
1054
1252
|
width: number;
|
|
1055
1253
|
/**
|
|
1056
|
-
*
|
|
1254
|
+
* Full size along Z, in model units, rounding included
|
|
1057
1255
|
* @default 1
|
|
1058
1256
|
* @minimum 0
|
|
1059
1257
|
* @maximum Infinity
|
|
@@ -1061,7 +1259,7 @@ export declare namespace JSCAD {
|
|
|
1061
1259
|
*/
|
|
1062
1260
|
length: number;
|
|
1063
1261
|
/**
|
|
1064
|
-
*
|
|
1262
|
+
* Full size along Y, in model units, rounding included
|
|
1065
1263
|
* @default 1
|
|
1066
1264
|
* @minimum 0
|
|
1067
1265
|
* @maximum Infinity
|
|
@@ -1069,7 +1267,7 @@ export declare namespace JSCAD {
|
|
|
1069
1267
|
*/
|
|
1070
1268
|
height: number;
|
|
1071
1269
|
/**
|
|
1072
|
-
*
|
|
1270
|
+
* Number of straight pieces a full circle of rounding is made of; more makes the edges smoother
|
|
1073
1271
|
* @default 24
|
|
1074
1272
|
* @minimum 0
|
|
1075
1273
|
* @maximum Infinity
|
|
@@ -1077,15 +1275,20 @@ export declare namespace JSCAD {
|
|
|
1077
1275
|
*/
|
|
1078
1276
|
segments: number;
|
|
1079
1277
|
}
|
|
1278
|
+
/**
|
|
1279
|
+
* Feeds `shapes.roundedCuboidsOnCenterPoints`: one rounded box of the same sizes and rounding on
|
|
1280
|
+
* every center point, coming back in the same order.
|
|
1281
|
+
*/
|
|
1080
1282
|
class RoundedCuboidCentersDto {
|
|
1081
1283
|
constructor(centers?: Base.Point3[], roundRadius?: number, width?: number, length?: number, height?: number, segments?: number);
|
|
1082
1284
|
/**
|
|
1083
|
-
*
|
|
1285
|
+
* The points the boxes are centered on, one box each, in the order the results come back
|
|
1084
1286
|
* @default undefined
|
|
1085
1287
|
*/
|
|
1086
1288
|
centers: Base.Point3[];
|
|
1087
1289
|
/**
|
|
1088
|
-
* Radius
|
|
1290
|
+
* Radius of the rounding on every edge, in model units; it must be less than half of the
|
|
1291
|
+
* smallest side or an error is thrown
|
|
1089
1292
|
* @default 0.1
|
|
1090
1293
|
* @minimum 0
|
|
1091
1294
|
* @maximum Infinity
|
|
@@ -1093,7 +1296,7 @@ export declare namespace JSCAD {
|
|
|
1093
1296
|
*/
|
|
1094
1297
|
roundRadius: number;
|
|
1095
1298
|
/**
|
|
1096
|
-
*
|
|
1299
|
+
* Full size of every box along X, in model units, rounding included
|
|
1097
1300
|
* @default 1
|
|
1098
1301
|
* @minimum 0
|
|
1099
1302
|
* @maximum Infinity
|
|
@@ -1101,7 +1304,7 @@ export declare namespace JSCAD {
|
|
|
1101
1304
|
*/
|
|
1102
1305
|
width: number;
|
|
1103
1306
|
/**
|
|
1104
|
-
*
|
|
1307
|
+
* Full size of every box along Z, in model units, rounding included
|
|
1105
1308
|
* @default 1
|
|
1106
1309
|
* @minimum 0
|
|
1107
1310
|
* @maximum Infinity
|
|
@@ -1109,7 +1312,7 @@ export declare namespace JSCAD {
|
|
|
1109
1312
|
*/
|
|
1110
1313
|
length: number;
|
|
1111
1314
|
/**
|
|
1112
|
-
*
|
|
1315
|
+
* Full size of every box along Y, in model units, rounding included
|
|
1113
1316
|
* @default 1
|
|
1114
1317
|
* @minimum 0
|
|
1115
1318
|
* @maximum Infinity
|
|
@@ -1117,7 +1320,7 @@ export declare namespace JSCAD {
|
|
|
1117
1320
|
*/
|
|
1118
1321
|
height: number;
|
|
1119
1322
|
/**
|
|
1120
|
-
*
|
|
1323
|
+
* Number of straight pieces a full circle of rounding is made of; more makes the edges smoother
|
|
1121
1324
|
* @default 24
|
|
1122
1325
|
* @minimum 0
|
|
1123
1326
|
* @maximum Infinity
|
|
@@ -1125,15 +1328,19 @@ export declare namespace JSCAD {
|
|
|
1125
1328
|
*/
|
|
1126
1329
|
segments: number;
|
|
1127
1330
|
}
|
|
1331
|
+
/**
|
|
1332
|
+
* Feeds `shapes.cylinderElliptic`: a cylinder standing along Z with an elliptical cross-section
|
|
1333
|
+
* that can differ between its two ends, so it also makes cones and tapers.
|
|
1334
|
+
*/
|
|
1128
1335
|
class CylidnerEllipticDto {
|
|
1129
1336
|
constructor(center?: Base.Point3, height?: number, startRadius?: Base.Point2, endRadius?: Base.Point2, segments?: number);
|
|
1130
1337
|
/**
|
|
1131
|
-
*
|
|
1338
|
+
* The point halfway up the axis; half the height lies above it along Z and half below
|
|
1132
1339
|
* @default [0, 0, 0]
|
|
1133
1340
|
*/
|
|
1134
1341
|
center: Base.Point3;
|
|
1135
1342
|
/**
|
|
1136
|
-
*
|
|
1343
|
+
* Full length along Z, in model units
|
|
1137
1344
|
* @default 1
|
|
1138
1345
|
* @minimum 0
|
|
1139
1346
|
* @maximum Infinity
|
|
@@ -1141,17 +1348,17 @@ export declare namespace JSCAD {
|
|
|
1141
1348
|
*/
|
|
1142
1349
|
height: number;
|
|
1143
1350
|
/**
|
|
1144
|
-
*
|
|
1351
|
+
* The X and Y radii of the bottom end, in model units, as `[x, y]`
|
|
1145
1352
|
* @default [1, 2]
|
|
1146
1353
|
*/
|
|
1147
1354
|
startRadius: Base.Vector2;
|
|
1148
1355
|
/**
|
|
1149
|
-
*
|
|
1356
|
+
* The X and Y radii of the top end, in model units, as `[x, y]`; `[0, 0]` closes it to a point
|
|
1150
1357
|
* @default [2, 3]
|
|
1151
1358
|
*/
|
|
1152
1359
|
endRadius: Base.Vector2;
|
|
1153
1360
|
/**
|
|
1154
|
-
*
|
|
1361
|
+
* Number of flat sides around the cylinder; more makes it rounder
|
|
1155
1362
|
* @default 24
|
|
1156
1363
|
* @minimum 0
|
|
1157
1364
|
* @maximum Infinity
|
|
@@ -1159,15 +1366,19 @@ export declare namespace JSCAD {
|
|
|
1159
1366
|
*/
|
|
1160
1367
|
segments: number;
|
|
1161
1368
|
}
|
|
1369
|
+
/**
|
|
1370
|
+
* Feeds `shapes.cylinderEllipticOnCenterPoints`: one elliptic cylinder of the same size on every
|
|
1371
|
+
* center point, coming back in the same order.
|
|
1372
|
+
*/
|
|
1162
1373
|
class CylidnerCentersEllipticDto {
|
|
1163
1374
|
constructor(centers?: Base.Point3[], height?: number, startRadius?: Base.Point2, endRadius?: Base.Point2, segments?: number);
|
|
1164
1375
|
/**
|
|
1165
|
-
*
|
|
1376
|
+
* The points halfway up each axis, one cylinder each, in the order the results come back
|
|
1166
1377
|
* @default undefined
|
|
1167
1378
|
*/
|
|
1168
1379
|
centers: Base.Point3[];
|
|
1169
1380
|
/**
|
|
1170
|
-
*
|
|
1381
|
+
* Full length of every cylinder along Z, in model units
|
|
1171
1382
|
* @default 1
|
|
1172
1383
|
* @minimum 0
|
|
1173
1384
|
* @maximum Infinity
|
|
@@ -1175,17 +1386,18 @@ export declare namespace JSCAD {
|
|
|
1175
1386
|
*/
|
|
1176
1387
|
height: number;
|
|
1177
1388
|
/**
|
|
1178
|
-
*
|
|
1389
|
+
* The X and Y radii of every bottom end, in model units, as `[x, y]`
|
|
1179
1390
|
* @default [1, 2]
|
|
1180
1391
|
*/
|
|
1181
1392
|
startRadius: Base.Point2;
|
|
1182
1393
|
/**
|
|
1183
|
-
*
|
|
1394
|
+
* The X and Y radii of every top end, in model units, as `[x, y]`; `[0, 0]` closes them to a
|
|
1395
|
+
* point
|
|
1184
1396
|
* @default [2, 3]
|
|
1185
1397
|
*/
|
|
1186
1398
|
endRadius: Base.Point2;
|
|
1187
1399
|
/**
|
|
1188
|
-
*
|
|
1400
|
+
* Number of flat sides around each cylinder; more makes them rounder
|
|
1189
1401
|
* @default 24
|
|
1190
1402
|
* @minimum 0
|
|
1191
1403
|
* @maximum Infinity
|
|
@@ -1193,15 +1405,19 @@ export declare namespace JSCAD {
|
|
|
1193
1405
|
*/
|
|
1194
1406
|
segments: number;
|
|
1195
1407
|
}
|
|
1408
|
+
/**
|
|
1409
|
+
* Feeds `shapes.cylinder`: a round cylinder standing along Z, given by the point halfway up its
|
|
1410
|
+
* axis, its height, its radius and how many flat sides approximate it.
|
|
1411
|
+
*/
|
|
1196
1412
|
class CylidnerDto {
|
|
1197
1413
|
constructor(center?: Base.Point3, height?: number, radius?: number, segments?: number);
|
|
1198
1414
|
/**
|
|
1199
|
-
*
|
|
1415
|
+
* The point halfway up the axis; half the height lies above it along Z and half below
|
|
1200
1416
|
* @default [0, 0, 0]
|
|
1201
1417
|
*/
|
|
1202
1418
|
center: Base.Point3;
|
|
1203
1419
|
/**
|
|
1204
|
-
*
|
|
1420
|
+
* Full length along Z, in model units
|
|
1205
1421
|
* @default 1
|
|
1206
1422
|
* @minimum 0
|
|
1207
1423
|
* @maximum Infinity
|
|
@@ -1209,7 +1425,7 @@ export declare namespace JSCAD {
|
|
|
1209
1425
|
*/
|
|
1210
1426
|
height: number;
|
|
1211
1427
|
/**
|
|
1212
|
-
*
|
|
1428
|
+
* Distance from the axis to the side, in model units
|
|
1213
1429
|
* @default 1
|
|
1214
1430
|
* @minimum 0
|
|
1215
1431
|
* @maximum Infinity
|
|
@@ -1217,7 +1433,7 @@ export declare namespace JSCAD {
|
|
|
1217
1433
|
*/
|
|
1218
1434
|
radius: number;
|
|
1219
1435
|
/**
|
|
1220
|
-
*
|
|
1436
|
+
* Number of flat sides around the cylinder; more makes it rounder
|
|
1221
1437
|
* @default 24
|
|
1222
1438
|
* @minimum 0
|
|
1223
1439
|
* @maximum Infinity
|
|
@@ -1225,15 +1441,21 @@ export declare namespace JSCAD {
|
|
|
1225
1441
|
*/
|
|
1226
1442
|
segments: number;
|
|
1227
1443
|
}
|
|
1444
|
+
/**
|
|
1445
|
+
* Feeds `shapes.roundedCylinder`: a cylinder standing along Z whose two rims are rounded, given by
|
|
1446
|
+
* the point halfway up its axis, the rounding radius, its height and radius and how finely it is
|
|
1447
|
+
* faceted.
|
|
1448
|
+
*/
|
|
1228
1449
|
class RoundedCylidnerDto {
|
|
1229
1450
|
constructor(center?: Base.Point3, roundRadius?: number, height?: number, radius?: number, segments?: number);
|
|
1230
1451
|
/**
|
|
1231
|
-
*
|
|
1452
|
+
* The point halfway up the axis; half the height lies above it along Z and half below
|
|
1232
1453
|
* @default [0, 0, 0]
|
|
1233
1454
|
*/
|
|
1234
1455
|
center: Base.Point3;
|
|
1235
1456
|
/**
|
|
1236
|
-
*
|
|
1457
|
+
* Radius of the rounding on both rims, in model units; the height must be more than twice it or
|
|
1458
|
+
* an error is thrown
|
|
1237
1459
|
* @default 0.1
|
|
1238
1460
|
* @minimum 0
|
|
1239
1461
|
* @maximum Infinity
|
|
@@ -1241,7 +1463,7 @@ export declare namespace JSCAD {
|
|
|
1241
1463
|
*/
|
|
1242
1464
|
roundRadius: number;
|
|
1243
1465
|
/**
|
|
1244
|
-
*
|
|
1466
|
+
* Full length along Z, in model units, rounding included
|
|
1245
1467
|
* @default 1
|
|
1246
1468
|
* @minimum 0
|
|
1247
1469
|
* @maximum Infinity
|
|
@@ -1249,7 +1471,7 @@ export declare namespace JSCAD {
|
|
|
1249
1471
|
*/
|
|
1250
1472
|
height: number;
|
|
1251
1473
|
/**
|
|
1252
|
-
*
|
|
1474
|
+
* Distance from the axis to the side, in model units
|
|
1253
1475
|
* @default 1
|
|
1254
1476
|
* @minimum 0
|
|
1255
1477
|
* @maximum Infinity
|
|
@@ -1257,7 +1479,7 @@ export declare namespace JSCAD {
|
|
|
1257
1479
|
*/
|
|
1258
1480
|
radius: number;
|
|
1259
1481
|
/**
|
|
1260
|
-
*
|
|
1482
|
+
* Number of flat sides around the cylinder and pieces in the rounding; more makes it smoother
|
|
1261
1483
|
* @default 24
|
|
1262
1484
|
* @minimum 0
|
|
1263
1485
|
* @maximum Infinity
|
|
@@ -1265,20 +1487,24 @@ export declare namespace JSCAD {
|
|
|
1265
1487
|
*/
|
|
1266
1488
|
segments: number;
|
|
1267
1489
|
}
|
|
1490
|
+
/**
|
|
1491
|
+
* Feeds `shapes.ellipsoid`: a sphere stretched separately along X, Y and Z, given by its center,
|
|
1492
|
+
* its three radii and how finely it is faceted.
|
|
1493
|
+
*/
|
|
1268
1494
|
class EllipsoidDto {
|
|
1269
1495
|
constructor(center?: Base.Point3, radius?: Base.Point3, segments?: number);
|
|
1270
1496
|
/**
|
|
1271
|
-
*
|
|
1497
|
+
* The point the ellipsoid is centered on
|
|
1272
1498
|
* @default [0, 0, 0]
|
|
1273
1499
|
*/
|
|
1274
1500
|
center: Base.Point3;
|
|
1275
1501
|
/**
|
|
1276
|
-
*
|
|
1502
|
+
* The half sizes along X, Y and Z, in model units, as `[x, y, z]`; equal values make a sphere
|
|
1277
1503
|
* @default [1, 2, 3]
|
|
1278
1504
|
*/
|
|
1279
1505
|
radius: Base.Point3;
|
|
1280
1506
|
/**
|
|
1281
|
-
*
|
|
1507
|
+
* Number of facets around the ellipsoid; more makes it smoother
|
|
1282
1508
|
* @default 24
|
|
1283
1509
|
* @minimum 0
|
|
1284
1510
|
* @maximum Infinity
|
|
@@ -1286,20 +1512,24 @@ export declare namespace JSCAD {
|
|
|
1286
1512
|
*/
|
|
1287
1513
|
segments: number;
|
|
1288
1514
|
}
|
|
1515
|
+
/**
|
|
1516
|
+
* Feeds `shapes.ellipsoidsOnCenterPoints`: one ellipsoid of the same radii on every center point,
|
|
1517
|
+
* coming back in the same order.
|
|
1518
|
+
*/
|
|
1289
1519
|
class EllipsoidCentersDto {
|
|
1290
1520
|
constructor(centers?: Base.Point3[], radius?: Base.Point3, segments?: number);
|
|
1291
1521
|
/**
|
|
1292
|
-
*
|
|
1522
|
+
* The points the ellipsoids are centered on, one each, in the order the results come back
|
|
1293
1523
|
* @default undefined
|
|
1294
1524
|
*/
|
|
1295
1525
|
centers: Base.Point3[];
|
|
1296
1526
|
/**
|
|
1297
|
-
*
|
|
1527
|
+
* The half sizes of every ellipsoid along X, Y and Z, in model units, as `[x, y, z]`
|
|
1298
1528
|
* @default [1, 2, 3]
|
|
1299
1529
|
*/
|
|
1300
1530
|
radius: Base.Point3;
|
|
1301
1531
|
/**
|
|
1302
|
-
*
|
|
1532
|
+
* Number of facets around each ellipsoid; more makes them smoother
|
|
1303
1533
|
* @default 24
|
|
1304
1534
|
* @minimum 0
|
|
1305
1535
|
* @maximum Infinity
|
|
@@ -1307,15 +1537,19 @@ export declare namespace JSCAD {
|
|
|
1307
1537
|
*/
|
|
1308
1538
|
segments: number;
|
|
1309
1539
|
}
|
|
1540
|
+
/**
|
|
1541
|
+
* Feeds `shapes.geodesicSphere`: a sphere made of evenly sized triangles, given by its center, its
|
|
1542
|
+
* radius and how finely the twenty starting faces are subdivided.
|
|
1543
|
+
*/
|
|
1310
1544
|
class GeodesicSphereDto {
|
|
1311
1545
|
constructor(center?: Base.Point3, radius?: number, frequency?: number);
|
|
1312
1546
|
/**
|
|
1313
|
-
*
|
|
1547
|
+
* The point the sphere is centered on
|
|
1314
1548
|
* @default [0, 0, 0]
|
|
1315
1549
|
*/
|
|
1316
1550
|
center: Base.Point3;
|
|
1317
1551
|
/**
|
|
1318
|
-
*
|
|
1552
|
+
* Distance from the center to the surface, in model units
|
|
1319
1553
|
* @default 1
|
|
1320
1554
|
* @minimum 0
|
|
1321
1555
|
* @maximum Infinity
|
|
@@ -1323,7 +1557,8 @@ export declare namespace JSCAD {
|
|
|
1323
1557
|
*/
|
|
1324
1558
|
radius: number;
|
|
1325
1559
|
/**
|
|
1326
|
-
*
|
|
1560
|
+
* How finely each of the twenty starting faces is subdivided; used in whole multiples of 6, at
|
|
1561
|
+
* least 6, and higher is rounder
|
|
1327
1562
|
* @default 12
|
|
1328
1563
|
* @minimum 0
|
|
1329
1564
|
* @maximum Infinity
|
|
@@ -1331,15 +1566,19 @@ export declare namespace JSCAD {
|
|
|
1331
1566
|
*/
|
|
1332
1567
|
frequency: number;
|
|
1333
1568
|
}
|
|
1569
|
+
/**
|
|
1570
|
+
* Feeds `shapes.geodesicSpheresOnCenterPoints`: one geodesic sphere of the same radius on every
|
|
1571
|
+
* center point, coming back in the same order.
|
|
1572
|
+
*/
|
|
1334
1573
|
class GeodesicSphereCentersDto {
|
|
1335
1574
|
constructor(centers?: Base.Point3[], radius?: number, frequency?: number);
|
|
1336
1575
|
/**
|
|
1337
|
-
*
|
|
1576
|
+
* The points the spheres are centered on, one each, in the order the results come back
|
|
1338
1577
|
* @default undefined
|
|
1339
1578
|
*/
|
|
1340
1579
|
centers: Base.Point3[];
|
|
1341
1580
|
/**
|
|
1342
|
-
*
|
|
1581
|
+
* Distance from each center to its surface, in model units
|
|
1343
1582
|
* @default 1
|
|
1344
1583
|
* @minimum 0
|
|
1345
1584
|
* @maximum Infinity
|
|
@@ -1347,7 +1586,8 @@ export declare namespace JSCAD {
|
|
|
1347
1586
|
*/
|
|
1348
1587
|
radius: number;
|
|
1349
1588
|
/**
|
|
1350
|
-
*
|
|
1589
|
+
* How finely each of the twenty starting faces is subdivided; used in whole multiples of 6, at
|
|
1590
|
+
* least 6, and higher is rounder
|
|
1351
1591
|
* @default 12
|
|
1352
1592
|
* @minimum 0
|
|
1353
1593
|
* @maximum Infinity
|
|
@@ -1355,15 +1595,19 @@ export declare namespace JSCAD {
|
|
|
1355
1595
|
*/
|
|
1356
1596
|
frequency: number;
|
|
1357
1597
|
}
|
|
1598
|
+
/**
|
|
1599
|
+
* Feeds `shapes.cylindersOnCenterPoints`: one round cylinder of the same size standing along Z on
|
|
1600
|
+
* every center point, coming back in the same order.
|
|
1601
|
+
*/
|
|
1358
1602
|
class CylidnerCentersDto {
|
|
1359
1603
|
constructor(centers?: Base.Point3[], height?: number, radius?: number, segments?: number);
|
|
1360
1604
|
/**
|
|
1361
|
-
*
|
|
1605
|
+
* The points halfway up each axis, one cylinder each, in the order the results come back
|
|
1362
1606
|
* @default undefined
|
|
1363
1607
|
*/
|
|
1364
1608
|
centers: Base.Point3[];
|
|
1365
1609
|
/**
|
|
1366
|
-
*
|
|
1610
|
+
* Full length of every cylinder along Z, in model units
|
|
1367
1611
|
* @default 1
|
|
1368
1612
|
* @minimum 0
|
|
1369
1613
|
* @maximum Infinity
|
|
@@ -1371,7 +1615,7 @@ export declare namespace JSCAD {
|
|
|
1371
1615
|
*/
|
|
1372
1616
|
height: number;
|
|
1373
1617
|
/**
|
|
1374
|
-
*
|
|
1618
|
+
* Distance from the axis to the side of every cylinder, in model units
|
|
1375
1619
|
* @default 1
|
|
1376
1620
|
* @minimum 0
|
|
1377
1621
|
* @maximum Infinity
|
|
@@ -1379,7 +1623,7 @@ export declare namespace JSCAD {
|
|
|
1379
1623
|
*/
|
|
1380
1624
|
radius: number;
|
|
1381
1625
|
/**
|
|
1382
|
-
*
|
|
1626
|
+
* Number of flat sides around each cylinder; more makes them rounder
|
|
1383
1627
|
* @default 24
|
|
1384
1628
|
* @minimum 0
|
|
1385
1629
|
* @maximum Infinity
|
|
@@ -1387,15 +1631,20 @@ export declare namespace JSCAD {
|
|
|
1387
1631
|
*/
|
|
1388
1632
|
segments: number;
|
|
1389
1633
|
}
|
|
1634
|
+
/**
|
|
1635
|
+
* Feeds `shapes.roundedCylindersOnCenterPoints`: one rounded cylinder of the same size on every
|
|
1636
|
+
* center point, coming back in the same order.
|
|
1637
|
+
*/
|
|
1390
1638
|
class RoundedCylidnerCentersDto {
|
|
1391
1639
|
constructor(centers?: Base.Point3[], roundRadius?: number, height?: number, radius?: number, segments?: number);
|
|
1392
1640
|
/**
|
|
1393
|
-
*
|
|
1641
|
+
* The points halfway up each axis, one cylinder each, in the order the results come back
|
|
1394
1642
|
* @default undefined
|
|
1395
1643
|
*/
|
|
1396
1644
|
centers: Base.Point3[];
|
|
1397
1645
|
/**
|
|
1398
|
-
*
|
|
1646
|
+
* Radius of the rounding on both rims of every cylinder, in model units; the height must be
|
|
1647
|
+
* more than twice it or an error is thrown
|
|
1399
1648
|
* @default 0.1
|
|
1400
1649
|
* @minimum 0
|
|
1401
1650
|
* @maximum Infinity
|
|
@@ -1403,7 +1652,7 @@ export declare namespace JSCAD {
|
|
|
1403
1652
|
*/
|
|
1404
1653
|
roundRadius: number;
|
|
1405
1654
|
/**
|
|
1406
|
-
*
|
|
1655
|
+
* Full length of every cylinder along Z, in model units, rounding included
|
|
1407
1656
|
* @default 1
|
|
1408
1657
|
* @minimum 0
|
|
1409
1658
|
* @maximum Infinity
|
|
@@ -1411,7 +1660,7 @@ export declare namespace JSCAD {
|
|
|
1411
1660
|
*/
|
|
1412
1661
|
height: number;
|
|
1413
1662
|
/**
|
|
1414
|
-
*
|
|
1663
|
+
* Distance from the axis to the side of every cylinder, in model units
|
|
1415
1664
|
* @default 1
|
|
1416
1665
|
* @minimum 0
|
|
1417
1666
|
* @maximum Infinity
|
|
@@ -1419,7 +1668,8 @@ export declare namespace JSCAD {
|
|
|
1419
1668
|
*/
|
|
1420
1669
|
radius: number;
|
|
1421
1670
|
/**
|
|
1422
|
-
*
|
|
1671
|
+
* Number of flat sides around each cylinder and pieces in the rounding; more makes them
|
|
1672
|
+
* smoother
|
|
1423
1673
|
* @default 24
|
|
1424
1674
|
* @minimum 0
|
|
1425
1675
|
* @maximum Infinity
|
|
@@ -1427,15 +1677,19 @@ export declare namespace JSCAD {
|
|
|
1427
1677
|
*/
|
|
1428
1678
|
segments: number;
|
|
1429
1679
|
}
|
|
1680
|
+
/**
|
|
1681
|
+
* Feeds `shapes.sphere`: a sphere given by its center point, its radius and how many facets
|
|
1682
|
+
* approximate it.
|
|
1683
|
+
*/
|
|
1430
1684
|
class SphereDto {
|
|
1431
1685
|
constructor(center?: Base.Point3, radius?: number, segments?: number);
|
|
1432
1686
|
/**
|
|
1433
|
-
*
|
|
1687
|
+
* The point the sphere is centered on
|
|
1434
1688
|
* @default [0, 0, 0]
|
|
1435
1689
|
*/
|
|
1436
1690
|
center: Base.Point3;
|
|
1437
1691
|
/**
|
|
1438
|
-
*
|
|
1692
|
+
* Distance from the center to the surface, in model units
|
|
1439
1693
|
* @default 1
|
|
1440
1694
|
* @minimum 0
|
|
1441
1695
|
* @maximum Infinity
|
|
@@ -1443,7 +1697,7 @@ export declare namespace JSCAD {
|
|
|
1443
1697
|
*/
|
|
1444
1698
|
radius: number;
|
|
1445
1699
|
/**
|
|
1446
|
-
*
|
|
1700
|
+
* Number of facets around the sphere; more makes it rounder
|
|
1447
1701
|
* @default 24
|
|
1448
1702
|
* @minimum 0
|
|
1449
1703
|
* @maximum Infinity
|
|
@@ -1451,15 +1705,19 @@ export declare namespace JSCAD {
|
|
|
1451
1705
|
*/
|
|
1452
1706
|
segments: number;
|
|
1453
1707
|
}
|
|
1708
|
+
/**
|
|
1709
|
+
* Feeds `shapes.spheresOnCenterPoints`: one sphere of the same radius on every center point, coming
|
|
1710
|
+
* back in the same order.
|
|
1711
|
+
*/
|
|
1454
1712
|
class SphereCentersDto {
|
|
1455
1713
|
constructor(centers?: Base.Point3[], radius?: number, segments?: number);
|
|
1456
1714
|
/**
|
|
1457
|
-
*
|
|
1715
|
+
* The points the spheres are centered on, one each, in the order the results come back
|
|
1458
1716
|
* @default undefined
|
|
1459
1717
|
*/
|
|
1460
1718
|
centers: Base.Point3[];
|
|
1461
1719
|
/**
|
|
1462
|
-
*
|
|
1720
|
+
* Distance from each center to its surface, in model units
|
|
1463
1721
|
* @default 1
|
|
1464
1722
|
* @minimum 0
|
|
1465
1723
|
* @maximum Infinity
|
|
@@ -1467,7 +1725,7 @@ export declare namespace JSCAD {
|
|
|
1467
1725
|
*/
|
|
1468
1726
|
radius: number;
|
|
1469
1727
|
/**
|
|
1470
|
-
*
|
|
1728
|
+
* Number of facets around each sphere; more makes them rounder
|
|
1471
1729
|
* @default 24
|
|
1472
1730
|
* @minimum 0
|
|
1473
1731
|
* @maximum Infinity
|
|
@@ -1475,15 +1733,20 @@ export declare namespace JSCAD {
|
|
|
1475
1733
|
*/
|
|
1476
1734
|
segments: number;
|
|
1477
1735
|
}
|
|
1736
|
+
/**
|
|
1737
|
+
* Feeds `shapes.torus`: a ring with a round cross-section lying flat in the XY plane around
|
|
1738
|
+
* `center`, given by the ring and tube radii, the facet counts of each and the angles that can
|
|
1739
|
+
* leave the ring partly open.
|
|
1740
|
+
*/
|
|
1478
1741
|
class TorusDto {
|
|
1479
1742
|
constructor(center?: Base.Point3, innerRadius?: number, outerRadius?: number, innerSegments?: number, outerSegments?: number, innerRotation?: number, outerRotation?: number, startAngle?: number);
|
|
1480
1743
|
/**
|
|
1481
|
-
*
|
|
1744
|
+
* The point the ring is centered on, in model units
|
|
1482
1745
|
* @default [0, 0, 0]
|
|
1483
1746
|
*/
|
|
1484
1747
|
center: Base.Point3;
|
|
1485
1748
|
/**
|
|
1486
|
-
*
|
|
1749
|
+
* Radius of the tube itself, in model units; it must be less than `outerRadius`
|
|
1487
1750
|
* @default 1
|
|
1488
1751
|
* @minimum 0
|
|
1489
1752
|
* @maximum Infinity
|
|
@@ -1491,7 +1754,8 @@ export declare namespace JSCAD {
|
|
|
1491
1754
|
*/
|
|
1492
1755
|
innerRadius: number;
|
|
1493
1756
|
/**
|
|
1494
|
-
*
|
|
1757
|
+
* Distance from the ring's center to the middle of the tube, in model units, so the ring spans
|
|
1758
|
+
* twice the sum of both radii
|
|
1495
1759
|
* @default 2
|
|
1496
1760
|
* @minimum 0
|
|
1497
1761
|
* @maximum Infinity
|
|
@@ -1499,7 +1763,7 @@ export declare namespace JSCAD {
|
|
|
1499
1763
|
*/
|
|
1500
1764
|
outerRadius: number;
|
|
1501
1765
|
/**
|
|
1502
|
-
* Number of
|
|
1766
|
+
* Number of flat pieces around the tube's cross-section; more makes the tube rounder
|
|
1503
1767
|
* @default 24
|
|
1504
1768
|
* @minimum 0
|
|
1505
1769
|
* @maximum Infinity
|
|
@@ -1507,7 +1771,7 @@ export declare namespace JSCAD {
|
|
|
1507
1771
|
*/
|
|
1508
1772
|
innerSegments: number;
|
|
1509
1773
|
/**
|
|
1510
|
-
* Number of
|
|
1774
|
+
* Number of flat pieces around the ring; more makes the ring rounder
|
|
1511
1775
|
* @default 24
|
|
1512
1776
|
* @minimum 0
|
|
1513
1777
|
* @maximum Infinity
|
|
@@ -1515,7 +1779,8 @@ export declare namespace JSCAD {
|
|
|
1515
1779
|
*/
|
|
1516
1780
|
outerSegments: number;
|
|
1517
1781
|
/**
|
|
1518
|
-
*
|
|
1782
|
+
* Turn of the tube's cross-section about its own center, in degrees; it shows when
|
|
1783
|
+
* `innerSegments` is low enough for the facets to be visible
|
|
1519
1784
|
* @default 0
|
|
1520
1785
|
* @minimum -Infinity
|
|
1521
1786
|
* @maximum Infinity
|
|
@@ -1523,7 +1788,8 @@ export declare namespace JSCAD {
|
|
|
1523
1788
|
*/
|
|
1524
1789
|
innerRotation: number;
|
|
1525
1790
|
/**
|
|
1526
|
-
*
|
|
1791
|
+
* How far the tube is swept around the ring, in degrees; 360 closes the ring and less leaves it
|
|
1792
|
+
* open
|
|
1527
1793
|
* @default 360
|
|
1528
1794
|
* @minimum -Infinity
|
|
1529
1795
|
* @maximum Infinity
|
|
@@ -1531,7 +1797,7 @@ export declare namespace JSCAD {
|
|
|
1531
1797
|
*/
|
|
1532
1798
|
outerRotation: number;
|
|
1533
1799
|
/**
|
|
1534
|
-
*
|
|
1800
|
+
* Where the sweep around the ring starts, in degrees from the X axis
|
|
1535
1801
|
* @default 0
|
|
1536
1802
|
* @minimum -Infinity
|
|
1537
1803
|
* @maximum Infinity
|
|
@@ -1539,15 +1805,21 @@ export declare namespace JSCAD {
|
|
|
1539
1805
|
*/
|
|
1540
1806
|
startAngle: number;
|
|
1541
1807
|
}
|
|
1808
|
+
/**
|
|
1809
|
+
* Feeds `text.createVectorText` with the text and the font options: where the text starts, how tall
|
|
1810
|
+
* a capital letter is, the spacing of lines and letters, the alignment of several lines and the
|
|
1811
|
+
* stroke compensation. `CylinderTextDto` and `SphereTextDto` reuse them.
|
|
1812
|
+
*/
|
|
1542
1813
|
class TextDto {
|
|
1543
1814
|
constructor(text?: string, segments?: number, xOffset?: number, yOffset?: number, height?: number, lineSpacing?: number, letterSpacing?: number, align?: jscadTextAlignEnum, extrudeOffset?: number);
|
|
1544
1815
|
/**
|
|
1545
|
-
*
|
|
1816
|
+
* The characters to write; a newline starts a new line and a character outside plain ASCII
|
|
1817
|
+
* becomes a question mark
|
|
1546
1818
|
* @default Hello World
|
|
1547
1819
|
*/
|
|
1548
1820
|
text: string;
|
|
1549
1821
|
/**
|
|
1550
|
-
* Number of
|
|
1822
|
+
* Number of straight pieces used for curved strokes; more makes letters rounder
|
|
1551
1823
|
* @default 24
|
|
1552
1824
|
* @minimum 0
|
|
1553
1825
|
* @maximum Infinity
|
|
@@ -1555,7 +1827,7 @@ export declare namespace JSCAD {
|
|
|
1555
1827
|
*/
|
|
1556
1828
|
segments: number;
|
|
1557
1829
|
/**
|
|
1558
|
-
* X
|
|
1830
|
+
* Where the text starts along X, in model units
|
|
1559
1831
|
* @default 0
|
|
1560
1832
|
* @minimum -Infinity
|
|
1561
1833
|
* @maximum Infinity
|
|
@@ -1563,7 +1835,7 @@ export declare namespace JSCAD {
|
|
|
1563
1835
|
*/
|
|
1564
1836
|
xOffset: number;
|
|
1565
1837
|
/**
|
|
1566
|
-
*
|
|
1838
|
+
* Where the baseline of the first line sits along Y, in model units
|
|
1567
1839
|
* @default 0
|
|
1568
1840
|
* @minimum -Infinity
|
|
1569
1841
|
* @maximum Infinity
|
|
@@ -1571,7 +1843,7 @@ export declare namespace JSCAD {
|
|
|
1571
1843
|
*/
|
|
1572
1844
|
yOffset: number;
|
|
1573
1845
|
/**
|
|
1574
|
-
* Height of the text
|
|
1846
|
+
* Height of a capital letter, in model units; the whole text scales with it
|
|
1575
1847
|
* @default 1
|
|
1576
1848
|
* @minimum 0
|
|
1577
1849
|
* @maximum Infinity
|
|
@@ -1579,7 +1851,8 @@ export declare namespace JSCAD {
|
|
|
1579
1851
|
*/
|
|
1580
1852
|
height: number;
|
|
1581
1853
|
/**
|
|
1582
|
-
*
|
|
1854
|
+
* Step from one line down to the next as a multiple of the letter height; 1.4 leaves a 40
|
|
1855
|
+
* percent gap
|
|
1583
1856
|
* @default 1.4
|
|
1584
1857
|
* @minimum -Infinity
|
|
1585
1858
|
* @maximum Infinity
|
|
@@ -1587,7 +1860,8 @@ export declare namespace JSCAD {
|
|
|
1587
1860
|
*/
|
|
1588
1861
|
lineSpacing: number;
|
|
1589
1862
|
/**
|
|
1590
|
-
*
|
|
1863
|
+
* Multiplies the step from one letter to the next; 1 is the font's own spacing and 2 spreads
|
|
1864
|
+
* letters twice as far apart
|
|
1591
1865
|
* @default 1
|
|
1592
1866
|
* @minimum -Infinity
|
|
1593
1867
|
* @maximum Infinity
|
|
@@ -1595,12 +1869,13 @@ export declare namespace JSCAD {
|
|
|
1595
1869
|
*/
|
|
1596
1870
|
letterSpacing: number;
|
|
1597
1871
|
/**
|
|
1598
|
-
*
|
|
1872
|
+
* How the lines of a multi-line text line up: to the left, the center or the right
|
|
1599
1873
|
* @default center
|
|
1600
1874
|
*/
|
|
1601
1875
|
align: jscadTextAlignEnum;
|
|
1602
1876
|
/**
|
|
1603
|
-
*
|
|
1877
|
+
* Thickness the strokes will get later, in model units; the outlines are pulled in by half of
|
|
1878
|
+
* it so letters keep their size once thick
|
|
1604
1879
|
* @default 0
|
|
1605
1880
|
* @minimum -Infinity
|
|
1606
1881
|
* @maximum Infinity
|
|
@@ -1608,15 +1883,21 @@ export declare namespace JSCAD {
|
|
|
1608
1883
|
*/
|
|
1609
1884
|
extrudeOffset: number;
|
|
1610
1885
|
}
|
|
1886
|
+
/**
|
|
1887
|
+
* Feeds `text.cylindricalText`: the text and font options of `TextDto` plus the size of the
|
|
1888
|
+
* cylinders every stroke is chained from.
|
|
1889
|
+
*/
|
|
1611
1890
|
class CylinderTextDto {
|
|
1612
1891
|
constructor(text?: string, extrusionHeight?: number, extrusionSize?: number, segments?: number, xOffset?: number, yOffset?: number, height?: number, lineSpacing?: number, letterSpacing?: number, align?: jscadTextAlignEnum, extrudeOffset?: number);
|
|
1613
1892
|
/**
|
|
1614
|
-
*
|
|
1893
|
+
* The characters to write; a newline starts a new line and a character outside plain ASCII
|
|
1894
|
+
* becomes a question mark
|
|
1615
1895
|
* @default Hello World
|
|
1616
1896
|
*/
|
|
1617
1897
|
text: string;
|
|
1618
1898
|
/**
|
|
1619
|
-
*
|
|
1899
|
+
* Length of the cylinders along Z, in model units; the strokes sit on the XY plane with half of
|
|
1900
|
+
* it on each side
|
|
1620
1901
|
* @default 0.5
|
|
1621
1902
|
* @minimum 0
|
|
1622
1903
|
* @maximum Infinity
|
|
@@ -1624,7 +1905,7 @@ export declare namespace JSCAD {
|
|
|
1624
1905
|
*/
|
|
1625
1906
|
extrusionHeight: number;
|
|
1626
1907
|
/**
|
|
1627
|
-
* Radius of the
|
|
1908
|
+
* Radius of the cylinders, in model units, which is half the thickness of the strokes
|
|
1628
1909
|
* @default 0.1
|
|
1629
1910
|
* @minimum 0
|
|
1630
1911
|
* @maximum Infinity
|
|
@@ -1632,7 +1913,8 @@ export declare namespace JSCAD {
|
|
|
1632
1913
|
*/
|
|
1633
1914
|
extrusionSize: number;
|
|
1634
1915
|
/**
|
|
1635
|
-
*
|
|
1916
|
+
* Number of flat sides around each cylinder and pieces in curved strokes; more makes the
|
|
1917
|
+
* letters rounder
|
|
1636
1918
|
* @default 24
|
|
1637
1919
|
* @minimum 0
|
|
1638
1920
|
* @maximum Infinity
|
|
@@ -1640,7 +1922,7 @@ export declare namespace JSCAD {
|
|
|
1640
1922
|
*/
|
|
1641
1923
|
segments: number;
|
|
1642
1924
|
/**
|
|
1643
|
-
* X
|
|
1925
|
+
* Where the text starts along X before it is centered, in model units
|
|
1644
1926
|
* @default 0
|
|
1645
1927
|
* @minimum -Infinity
|
|
1646
1928
|
* @maximum Infinity
|
|
@@ -1648,7 +1930,7 @@ export declare namespace JSCAD {
|
|
|
1648
1930
|
*/
|
|
1649
1931
|
xOffset: number;
|
|
1650
1932
|
/**
|
|
1651
|
-
*
|
|
1933
|
+
* Where the baseline of the first line sits along Y, in model units
|
|
1652
1934
|
* @default 0
|
|
1653
1935
|
* @minimum -Infinity
|
|
1654
1936
|
* @maximum Infinity
|
|
@@ -1656,7 +1938,7 @@ export declare namespace JSCAD {
|
|
|
1656
1938
|
*/
|
|
1657
1939
|
yOffset: number;
|
|
1658
1940
|
/**
|
|
1659
|
-
* Height of the text
|
|
1941
|
+
* Height of a capital letter, in model units; the whole text scales with it
|
|
1660
1942
|
* @default 1
|
|
1661
1943
|
* @minimum 0
|
|
1662
1944
|
* @maximum Infinity
|
|
@@ -1664,7 +1946,8 @@ export declare namespace JSCAD {
|
|
|
1664
1946
|
*/
|
|
1665
1947
|
height: number;
|
|
1666
1948
|
/**
|
|
1667
|
-
*
|
|
1949
|
+
* Step from one line down to the next as a multiple of the letter height; 1.4 leaves a 40
|
|
1950
|
+
* percent gap
|
|
1668
1951
|
* @default 1.4
|
|
1669
1952
|
* @minimum -Infinity
|
|
1670
1953
|
* @maximum Infinity
|
|
@@ -1672,7 +1955,8 @@ export declare namespace JSCAD {
|
|
|
1672
1955
|
*/
|
|
1673
1956
|
lineSpacing: number;
|
|
1674
1957
|
/**
|
|
1675
|
-
*
|
|
1958
|
+
* Multiplies the step from one letter to the next; 1 is the font's own spacing and 2 spreads
|
|
1959
|
+
* letters twice as far apart
|
|
1676
1960
|
* @default 1
|
|
1677
1961
|
* @minimum -Infinity
|
|
1678
1962
|
* @maximum Infinity
|
|
@@ -1680,12 +1964,13 @@ export declare namespace JSCAD {
|
|
|
1680
1964
|
*/
|
|
1681
1965
|
letterSpacing: number;
|
|
1682
1966
|
/**
|
|
1683
|
-
*
|
|
1967
|
+
* How the lines of a multi-line text line up: to the left, the center or the right
|
|
1684
1968
|
* @default center
|
|
1685
1969
|
*/
|
|
1686
1970
|
align: jscadTextAlignEnum;
|
|
1687
1971
|
/**
|
|
1688
|
-
*
|
|
1972
|
+
* Pulls the strokes inward by half this amount, in model units, so thick strokes keep the
|
|
1973
|
+
* intended letter size
|
|
1689
1974
|
* @default 0
|
|
1690
1975
|
* @minimum -Infinity
|
|
1691
1976
|
* @maximum Infinity
|
|
@@ -1693,15 +1978,20 @@ export declare namespace JSCAD {
|
|
|
1693
1978
|
*/
|
|
1694
1979
|
extrudeOffset: number;
|
|
1695
1980
|
}
|
|
1981
|
+
/**
|
|
1982
|
+
* Feeds `text.sphericalText`: the text and font options of `TextDto` plus the size of the spheres
|
|
1983
|
+
* every stroke is chained from.
|
|
1984
|
+
*/
|
|
1696
1985
|
class SphereTextDto {
|
|
1697
1986
|
constructor(text?: string, radius?: number, segments?: number, xOffset?: number, yOffset?: number, height?: number, lineSpacing?: number, letterSpacing?: number, align?: jscadTextAlignEnum, extrudeOffset?: number);
|
|
1698
1987
|
/**
|
|
1699
|
-
*
|
|
1988
|
+
* The characters to write; a newline starts a new line and a character outside plain ASCII
|
|
1989
|
+
* becomes a question mark
|
|
1700
1990
|
* @default Hello World
|
|
1701
1991
|
*/
|
|
1702
1992
|
text: string;
|
|
1703
1993
|
/**
|
|
1704
|
-
* Radius of the spheres
|
|
1994
|
+
* Radius of the spheres, in model units, which is half the thickness of the strokes
|
|
1705
1995
|
* @default 0.1
|
|
1706
1996
|
* @minimum 0
|
|
1707
1997
|
* @maximum Infinity
|
|
@@ -1709,7 +1999,8 @@ export declare namespace JSCAD {
|
|
|
1709
1999
|
*/
|
|
1710
2000
|
radius: number;
|
|
1711
2001
|
/**
|
|
1712
|
-
*
|
|
2002
|
+
* Number of facets around each sphere and pieces in curved strokes; more makes the letters
|
|
2003
|
+
* rounder
|
|
1713
2004
|
* @default 24
|
|
1714
2005
|
* @minimum 0
|
|
1715
2006
|
* @maximum Infinity
|
|
@@ -1717,7 +2008,7 @@ export declare namespace JSCAD {
|
|
|
1717
2008
|
*/
|
|
1718
2009
|
segments: number;
|
|
1719
2010
|
/**
|
|
1720
|
-
* X
|
|
2011
|
+
* Where the text starts along X before it is centered, in model units
|
|
1721
2012
|
* @default 0
|
|
1722
2013
|
* @minimum -Infinity
|
|
1723
2014
|
* @maximum Infinity
|
|
@@ -1725,7 +2016,7 @@ export declare namespace JSCAD {
|
|
|
1725
2016
|
*/
|
|
1726
2017
|
xOffset: number;
|
|
1727
2018
|
/**
|
|
1728
|
-
*
|
|
2019
|
+
* Where the baseline of the first line sits along Y, in model units
|
|
1729
2020
|
* @default 0
|
|
1730
2021
|
* @minimum -Infinity
|
|
1731
2022
|
* @maximum Infinity
|
|
@@ -1733,7 +2024,7 @@ export declare namespace JSCAD {
|
|
|
1733
2024
|
*/
|
|
1734
2025
|
yOffset: number;
|
|
1735
2026
|
/**
|
|
1736
|
-
* Height of the text
|
|
2027
|
+
* Height of a capital letter, in model units; the whole text scales with it
|
|
1737
2028
|
* @default 1
|
|
1738
2029
|
* @minimum 0
|
|
1739
2030
|
* @maximum Infinity
|
|
@@ -1741,7 +2032,8 @@ export declare namespace JSCAD {
|
|
|
1741
2032
|
*/
|
|
1742
2033
|
height: number;
|
|
1743
2034
|
/**
|
|
1744
|
-
*
|
|
2035
|
+
* Step from one line down to the next as a multiple of the letter height; 1.4 leaves a 40
|
|
2036
|
+
* percent gap
|
|
1745
2037
|
* @default 1.4
|
|
1746
2038
|
* @minimum -Infinity
|
|
1747
2039
|
* @maximum Infinity
|
|
@@ -1749,7 +2041,8 @@ export declare namespace JSCAD {
|
|
|
1749
2041
|
*/
|
|
1750
2042
|
lineSpacing: number;
|
|
1751
2043
|
/**
|
|
1752
|
-
*
|
|
2044
|
+
* Multiplies the step from one letter to the next; 1 is the font's own spacing and 2 spreads
|
|
2045
|
+
* letters twice as far apart
|
|
1753
2046
|
* @default 1
|
|
1754
2047
|
* @minimum -Infinity
|
|
1755
2048
|
* @maximum Infinity
|
|
@@ -1757,12 +2050,13 @@ export declare namespace JSCAD {
|
|
|
1757
2050
|
*/
|
|
1758
2051
|
letterSpacing: number;
|
|
1759
2052
|
/**
|
|
1760
|
-
*
|
|
2053
|
+
* How the lines of a multi-line text line up: to the left, the center or the right
|
|
1761
2054
|
* @default center
|
|
1762
2055
|
*/
|
|
1763
2056
|
align: jscadTextAlignEnum;
|
|
1764
2057
|
/**
|
|
1765
|
-
*
|
|
2058
|
+
* Pulls the strokes inward by half this amount, in model units, so thick strokes keep the
|
|
2059
|
+
* intended letter size
|
|
1766
2060
|
* @default 0
|
|
1767
2061
|
* @minimum -Infinity
|
|
1768
2062
|
* @maximum Infinity
|
|
@@ -1770,10 +2064,15 @@ export declare namespace JSCAD {
|
|
|
1770
2064
|
*/
|
|
1771
2065
|
extrudeOffset: number;
|
|
1772
2066
|
}
|
|
2067
|
+
/**
|
|
2068
|
+
* Feeds `shapes.fromPolygonPoints` with the faces of a solid, each as the list of points around it,
|
|
2069
|
+
* listed clockwise as seen from outside.
|
|
2070
|
+
*/
|
|
1773
2071
|
class FromPolygonPoints {
|
|
1774
2072
|
constructor(polygonPoints?: Base.Point3[][]);
|
|
1775
2073
|
/**
|
|
1776
|
-
*
|
|
2074
|
+
* One list of points per face, each going around the face clockwise as seen from outside; the
|
|
2075
|
+
* lists are read, not changed
|
|
1777
2076
|
*/
|
|
1778
2077
|
polygonPoints: Base.Point3[][];
|
|
1779
2078
|
}
|