dxcad-sdk 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,5 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ # Copyright 2026 Designmatix Ltd
3
+ """DX-CAD's package, as far as the SDK types it: the model language, in dxcad.model."""
4
+
5
+ __version__: str
dxcad-stubs/model.pyi ADDED
@@ -0,0 +1,644 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ # Copyright 2026 Designmatix Ltd
3
+ """Every name a DX-CAD model.py starts with: dxcad.model's own functions and classes.
4
+
5
+ Generated by `python -m dxcad.docsgen sdk` from DX-CAD's signatures; do not
6
+ edit. OCCT's own names, which the namespace also hands a model, are typed by
7
+ OCCT's stubs and are not here.
8
+ """
9
+
10
+ from typing import Any
11
+
12
+ #: An OCCT shape (TopoDS_Shape and its kinds).
13
+ Shape = Any
14
+ Vec2 = tuple[float, float]
15
+ Vec3 = tuple[float, float, float]
16
+
17
+ BOOLEAN_FUZZY_VALUE: float
18
+ DEFAULT_LINETYPE: str
19
+ EDGE_PARALLEL_TOLERANCE: float
20
+ FULL_TURN: float
21
+ LINETYPES: tuple
22
+ LOOP_AREA_TOLERANCE: float
23
+ MINIMUM_SEGMENTS: int
24
+ OVERHANG_BED_TOLERANCE: float
25
+ OVERHANG_SAMPLES: int
26
+ PLANE_PARALLEL_TOLERANCE: float
27
+ PLANE_TOLERANCE: float
28
+ TEXT_ALIGNS: tuple
29
+ WALL_RAY_START: float
30
+
31
+ class Bend:
32
+ """One bend as it lies on the flat: where it starts and ends, and how it goes."""
33
+ lines: Any
34
+ angle: float
35
+ direction: str
36
+ radius: float
37
+ def __init__(self, lines: Any, angle: float, direction: str, radius: float) -> None: ...
38
+
39
+ class BooleanError(RuntimeError):
40
+ """A boolean operation did not produce one valid solid."""
41
+
42
+ class Coincident:
43
+ """Points a and b at the same place."""
44
+ a: str
45
+ b: str
46
+ def __init__(self, a: str, b: str) -> None: ...
47
+
48
+ class Concentric:
49
+ """Two circles, of centres a and b, share their centre."""
50
+ a: str
51
+ b: str
52
+ def __init__(self, a: str, b: str) -> None: ...
53
+
54
+ class Diameter:
55
+ """A circle of centre a through rim point b is `value` across. Radius, doubled."""
56
+ a: str
57
+ b: str
58
+ value: float
59
+ def __init__(self, a: str, b: str, value: float) -> None: ...
60
+
61
+ class Distance:
62
+ """Points a and b `value` apart. A negative value raises ValueError."""
63
+ a: str
64
+ b: str
65
+ value: float
66
+ def __init__(self, a: str, b: str, value: float) -> None: ...
67
+
68
+ class DraftError(RuntimeError):
69
+ """A draft did not produce one valid solid."""
70
+
71
+ class Equal:
72
+ """Points a and b as far apart as c and d: two sides, or two circles' radii."""
73
+ a: str
74
+ b: str
75
+ c: str
76
+ d: str
77
+ def __init__(self, a: str, b: str, c: str, d: str) -> None: ...
78
+
79
+ class FilletError(RuntimeError):
80
+ """A fillet or chamfer did not produce one valid solid."""
81
+
82
+ class FlatPattern:
83
+ """A sheet part unfolded: the cut outline and the bends, on the base's plane."""
84
+ outline: tuple[Vec2, ...]
85
+ bends: tuple[Bend, ...]
86
+ spec: SheetSpec
87
+ holes: Any
88
+ cutouts: Any
89
+ leg_cutouts: tuple[tuple[Vec2, Vec2, Vec2, Vec2], ...]
90
+ notes: tuple[tuple[float, float, str] | tuple[float, float, str, float], ...]
91
+ cuts: tuple[tuple[Vec2, ...], ...]
92
+ openings: tuple[tuple[Vec2, ...], ...]
93
+ arcs: Any
94
+ def __init__(self, outline: tuple[Vec2, ...], bends: tuple[Bend, ...], spec: SheetSpec, holes: Any = ..., cutouts: Any = ..., leg_cutouts: tuple[tuple[Vec2, Vec2, Vec2, Vec2], ...] = ..., notes: tuple[tuple[float, float, str] | tuple[float, float, str, float], ...] = ..., cuts: tuple[tuple[Vec2, ...], ...] = ..., openings: tuple[tuple[Vec2, ...], ...] = ..., arcs: Any = ...) -> None: ...
95
+ def bounds(self) -> tuple[Vec2, Vec2]:
96
+ """The outline's lowest and highest (x, y), an arc's own reach counted (item 837)."""
97
+ ...
98
+
99
+ class HollowError(RuntimeError):
100
+ """A shelling operation did not produce one valid solid."""
101
+
102
+ class Horizontal:
103
+ """Points a and b at the same y."""
104
+ a: str
105
+ b: str
106
+ def __init__(self, a: str, b: str) -> None: ...
107
+
108
+ class LoftError(RuntimeError):
109
+ """A loft did not produce one valid solid."""
110
+
111
+ class Plane:
112
+ """A 2D coordinate system living somewhere in 3D, on top of gp_Ax3."""
113
+ def __init__(self, origin: Vec3, normal: Vec3, x_dir: Vec3) -> None: ...
114
+ @classmethod
115
+ def from_face(cls, face: Shape) -> Plane:
116
+ """The plane of a planar face, so a sketch can sit on an existing part."""
117
+ ...
118
+ def from_world(self, point: Vec3) -> Vec2:
119
+ """Drop a model point back into the plane's (x, y)."""
120
+ ...
121
+ def intersect_ray(self, origin: Vec3, direction: Vec3) -> PlaneHit | None:
122
+ """Where the ray (origin, direction) meets this plane, or None."""
123
+ ...
124
+ @property
125
+ def normal(self) -> Vec3: ...
126
+ def offset(self, distance: float) -> Plane:
127
+ """A new Plane `distance` along the normal, parallel to this one."""
128
+ ...
129
+ @property
130
+ def origin(self) -> Vec3: ...
131
+ def to_world(self, point: Vec2) -> Vec3:
132
+ """Lift an in-plane (x, y) into model space."""
133
+ ...
134
+ @property
135
+ def x_dir(self) -> Vec3: ...
136
+ @property
137
+ def y_dir(self) -> Vec3: ...
138
+
139
+ class PlaneHit(tuple):
140
+ """Where a ray met a plane: the world point, its (x, y) and how far along."""
141
+
142
+ class Radius:
143
+ """A circle of centre a through rim point b has radius `value`."""
144
+ a: str
145
+ b: str
146
+ value: float
147
+ def __init__(self, a: str, b: str, value: float) -> None: ...
148
+
149
+ class SheetPart:
150
+ """A sheet part: its solid and the record it was built from."""
151
+ solid: Shape
152
+ spec: SheetSpec
153
+ profile: tuple[Vec2, ...]
154
+ plane: Plane
155
+ flanges: Any
156
+ holes: Any
157
+ flange_holes: Any
158
+ cutouts: Any
159
+ flange_cutouts: Any
160
+ return_holes: Any
161
+ return_cutouts: Any
162
+ corner_trims: tuple[tuple[int, tuple[Vec2, ...]], ...]
163
+ corner_cuts: Any
164
+ corner_tabs: Any
165
+ return_turns: Any
166
+ corner_treatment: str | None
167
+ corner_gap: float | None
168
+ notes: tuple[str, ...]
169
+ arcs: Any
170
+ kind: str | None
171
+ record: object
172
+ def __init__(self, solid: Shape, spec: SheetSpec, profile: tuple[Vec2, ...], plane: Plane, flanges: Any = ..., holes: Any = ..., flange_holes: Any = ..., cutouts: Any = ..., flange_cutouts: Any = ..., return_holes: Any = ..., return_cutouts: Any = ..., corner_trims: tuple[tuple[int, tuple[Vec2, ...]], ...] = ..., corner_cuts: Any = ..., corner_tabs: Any = ..., return_turns: Any = ..., corner_treatment: str | None = ..., corner_gap: float | None = ..., notes: tuple[str, ...] = ..., arcs: Any = ..., kind: str | None = ..., record: object = ...) -> None: ...
173
+
174
+ class SheetSpec:
175
+ """The sheet a part is cut and bent from."""
176
+ thickness: float
177
+ bend_radius: float
178
+ k_factor: float
179
+ material: str
180
+ def __init__(self, thickness: float, bend_radius: float, k_factor: float, material: str = ...) -> None: ...
181
+ @classmethod
182
+ def from_gauge(cls, material: str, thickness: float) -> SheetSpec:
183
+ """The sheet a stocked gauge makes (item 608): its thickness, radius and K-factor."""
184
+ ...
185
+
186
+ class Sketch:
187
+ """A profile being drawn on a plane."""
188
+ def __init__(self, plane: Plane = ...) -> None: ...
189
+ def arc_to(self, point: Vec2, radius: float, *, long: bool = ...) -> Sketch:
190
+ """Draw the arc of `radius` from the current point to `point`."""
191
+ ...
192
+ def arc_via(self, via: Vec2, point: Vec2) -> Sketch:
193
+ """Draw the arc from the current point through `via` to `point`."""
194
+ ...
195
+ def bounds(self) -> tuple[Vec3, Vec3]:
196
+ """The extents of the finished loops, in kernel.bounding_box's form."""
197
+ ...
198
+ def circle(self, centre: Vec2, radius: float, *, linetype: str | None = ...) -> Sketch:
199
+ """Draw a whole circle as four quarter arcs, counter-clockwise."""
200
+ ...
201
+ def close(self, *, linetype: str | None = ...) -> Sketch:
202
+ """Join the last point back to the first and finish the current loop."""
203
+ ...
204
+ def ellipse(self, centre: Vec2, major: float, minor: float, angle: float = ..., *, linetype: str | None = ...) -> Sketch:
205
+ """Draw a whole ellipse about `centre`, a loop of its own."""
206
+ ...
207
+ def ellipse_arc(self, centre: Vec2, major: float, minor: float, angle: float, start: Vec2, end: Vec2, *, linetype: str | None = ...) -> Sketch:
208
+ """Draw the piece of an ellipse from `start` anticlockwise to `end` (item 437)."""
209
+ ...
210
+ def end(self, *, linetype: str | None = ...) -> Sketch:
211
+ """Finish the loop being drawn where it is, leaving it open (item 422)."""
212
+ ...
213
+ def ended(self) -> tuple[int, ...]:
214
+ """Which of loops() end() finished open, by index (item 422)."""
215
+ ...
216
+ def extrude(self, height: float) -> Shape:
217
+ """Sweep the capped profile off its own plane by `height`."""
218
+ ...
219
+ def face(self) -> Shape:
220
+ """Cap the profile with a planar face on the sketch plane."""
221
+ ...
222
+ def faces(self) -> list[Shape]:
223
+ """Every face the closed loops bound, each loop inside another a hole in it."""
224
+ ...
225
+ @property
226
+ def is_closed(self) -> bool: ...
227
+ def line_to(self, point: Vec2) -> Sketch:
228
+ """Draw a straight segment from the current point to `point`."""
229
+ ...
230
+ def linetypes(self) -> tuple[str, ...]:
231
+ """Each loop's linetype, aligned with loops(), continuous unless given (item 573)."""
232
+ ...
233
+ @property
234
+ def loop_count(self) -> int: ...
235
+ def loops(self) -> tuple[tuple[tuple[str, ...], ...], ...]:
236
+ """Every loop drawn so far: the finished ones, then the one being drawn."""
237
+ ...
238
+ def meets_x_axis(self, samples: int = ...) -> tuple[list[Vec2], list[tuple[Vec2, Vec2]]]:
239
+ """Where the closed loops meet the plane's own x axis (item 835)."""
240
+ ...
241
+ def move_to(self, point: Vec2) -> Sketch:
242
+ """Put the pen down at `point`, starting the loop it belongs to."""
243
+ ...
244
+ def path(self) -> Shape:
245
+ """Everything drawn, as one open wire: the path a sweep follows."""
246
+ ...
247
+ @property
248
+ def plane(self) -> Plane: ...
249
+ def polygon(self, centre: Vec2, radius: float, sides: int, *, linetype: str | None = ...) -> Sketch:
250
+ """Draw a regular n-gon on the circle of `radius` about `centre`."""
251
+ ...
252
+ def rectangle(self, corner: Vec2, opposite: Vec2, *, linetype: str | None = ...) -> Sketch:
253
+ """Draw a whole axis-aligned rectangle between two opposite corners."""
254
+ ...
255
+ def revolve(self, point: Vec3, direction: Vec3, angle: float = ...) -> Shape:
256
+ """Sweep the capped profile about an axis, via kernel.revolve."""
257
+ ...
258
+ def rounded_rectangle(self, corner: Vec2, opposite: Vec2, radius: float, *, linetype: str | None = ...) -> Sketch:
259
+ """Draw a rectangle with its four corners rounded to `radius`."""
260
+ ...
261
+ def set_linetype(self, loop: int, linetype: str) -> Sketch:
262
+ """Draw finished loop `loop` in `linetype`, one of LINETYPES (item 573)."""
263
+ ...
264
+ def slot(self, start: Vec2, end: Vec2, width: float, *, linetype: str | None = ...) -> Sketch:
265
+ """Draw a rounded slot of `width` centred on the line start to end."""
266
+ ...
267
+ def spline(self, points: list[Vec2]) -> Sketch:
268
+ """Draw a smooth curve from the current point through each of `points`."""
269
+ ...
270
+ def spline_piece(self, points: list[Vec2], start: Vec2, end: Vec2, *, linetype: str | None = ...) -> Sketch:
271
+ """Draw the piece of the spline through `points` from `start` to `end` (item 437)."""
272
+ ...
273
+ def wire(self) -> Shape:
274
+ """The closed wire of the outline. Raises SketchError if it is open."""
275
+ ...
276
+
277
+ class SketchError(RuntimeError):
278
+ """A sketch is not a usable profile: open, too short, or crossing itself."""
279
+
280
+ class SweepError(RuntimeError):
281
+ """A sweep along a path did not produce one valid solid."""
282
+
283
+ class Tangent:
284
+ """The line through a and b touches the circle of centre c through rim point d."""
285
+ a: str
286
+ b: str
287
+ c: str
288
+ d: str
289
+ def __init__(self, a: str, b: str, c: str, d: str) -> None: ...
290
+
291
+ class Touch:
292
+ """The circle of centre a through b touches the circle of centre c through d."""
293
+ a: str
294
+ b: str
295
+ c: str
296
+ d: str
297
+ inside: bool
298
+ def __init__(self, a: str, b: str, c: str, d: str, inside: bool = ...) -> None: ...
299
+
300
+ class Vertical:
301
+ """Points a and b at the same x."""
302
+ a: str
303
+ b: str
304
+ def __init__(self, a: str, b: str) -> None: ...
305
+
306
+ def angle_between(a: Shape, b: Shape) -> float:
307
+ """The angle in degrees between the normals of two planar faces, 0 to 180."""
308
+ ...
309
+
310
+ def base_flange(points: Any, spec: SheetSpec, plane: Plane = ..., holes: Any = ..., cutouts: Any = ..., corner_treatment: str | None = ..., corner_gap: float | None = ...) -> SheetPart:
311
+ """A base flange: the closed profile on `plane`, `spec.thickness` thick."""
312
+ ...
313
+
314
+ def blendable_edges(shape: Shape) -> list[Shape]:
315
+ """The edges of a shape a fillet or a chamfer could act on."""
316
+ ...
317
+
318
+ def bounding_box(shape: Shape) -> tuple[Vec3, Vec3]:
319
+ """Axis-aligned extents of a shape as ((xmin, ymin, zmin), (xmax, ymax, zmax))."""
320
+ ...
321
+
322
+ def centre_of_mass(shape: Shape) -> Vec3:
323
+ """Where a shape balances: the centroid of its volume, area or length."""
324
+ ...
325
+
326
+ def chamfer(solid: Shape, distance: float, edges: Any = ...) -> Shape:
327
+ """Cut a symmetric flat across the given edges of a solid."""
328
+ ...
329
+
330
+ def chamfer_all(solid: Shape, distance: float) -> Shape:
331
+ """Cut a flat across every edge of a solid at once, as fillet_all rounds them."""
332
+ ...
333
+
334
+ def checked_linetype(linetype: object) -> str:
335
+ """`linetype` as one of LINETYPES, any case; ValueError naming them otherwise."""
336
+ ...
337
+
338
+ def circular_pattern(shape: Shape, point: Vec3, direction: Vec3, count: int, angle: float = ...) -> list[Shape]:
339
+ """`count` copies of a shape, spread about the axis (point, direction)."""
340
+ ...
341
+
342
+ def closest_points(a: Shape, b: Shape) -> tuple[Vec3, Vec3]:
343
+ """Where the gap between two shapes is measured: the point on each."""
344
+ ...
345
+
346
+ def common(a: Shape, b: Shape) -> Shape:
347
+ """The overlap of a and b."""
348
+ ...
349
+
350
+ def compound(shapes: Any) -> Shape:
351
+ """One shape holding every shape given, so a pattern can be carried as a unit."""
352
+ ...
353
+
354
+ def constrained(plane: Plane, points: list[Vec2], constraints: list[Horizontal | Vertical | Coincident | Distance | Radius | Diameter | Tangent | Touch | Concentric | Equal], circles: list[tuple[Vec2, Vec2]] = ..., arcs: dict[int, Vec2] | None = ...) -> Sketch:
355
+ """A closed polyline through `points`, moved until `constraints` all hold."""
356
+ ...
357
+
358
+ def copy(shape: Shape) -> Shape:
359
+ """An independent copy of a shape, sharing no geometry with it."""
360
+ ...
361
+
362
+ def counterbore(solid: Shape, face: Shape, centre: Vec2 | None, radius: float, head_radius: float, head_depth: float, depth: float | None = ..., *, world: Vec3 | None = ...) -> Shape:
363
+ """Drill a hole with the flat-bottomed bore a socket head sits in above it."""
364
+ ...
365
+
366
+ def countersink(solid: Shape, face: Shape, centre: Vec2 | None, radius: float, head_radius: float, depth: float | None = ..., *, world: Vec3 | None = ...) -> Shape:
367
+ """Drill a hole with the cone a countersunk screw head sits in above it."""
368
+ ...
369
+
370
+ def cross_section(shape: Shape, plane: Plane) -> list[Shape]:
371
+ """The planar faces where `plane` meets `shape`, in explorer order."""
372
+ ...
373
+
374
+ def cut(a: Shape, b: Shape) -> Shape:
375
+ """a with b removed from it."""
376
+ ...
377
+
378
+ def cut_all(base: Shape, tools: Any) -> Shape:
379
+ """`base` with every tool cut out of it, in the order given."""
380
+ ...
381
+
382
+ def din_k_factor(bend_radius: float, thickness: float) -> float:
383
+ """The K-factor DIN 6935 gives a bend of this inside radius in this sheet (item 545)."""
384
+ ...
385
+
386
+ def distance(a: Shape, b: Shape) -> float:
387
+ """The shortest gap between two shapes, in model units."""
388
+ ...
389
+
390
+ def draft(solid: Shape, faces: Any, angle: float, neutral_plane: Plane) -> Shape:
391
+ """Tilt each named face by `angle` degrees about where it meets a plane."""
392
+ ...
393
+
394
+ def drill_centre(plane: Plane, centre: Vec2 | None, world: Vec3 | None, what: str = ...) -> Vec2:
395
+ """Where a drill goes in the face's own coordinates, from whichever centre was given."""
396
+ ...
397
+
398
+ def edges(shape: Shape) -> list[Shape]:
399
+ """Every distinct edge of a shape, in explorer order."""
400
+ ...
401
+
402
+ def edges_parallel_to(shape: Shape, direction: Vec3, tol: float = ...) -> list[Shape]:
403
+ """The straight edges of a shape whose line runs parallel to `direction`."""
404
+ ...
405
+
406
+ def explode(shapes: Any, factor: float) -> list[Shape]:
407
+ """Copies of `shapes` moved apart for an exploded view, as explode_offsets says."""
408
+ ...
409
+
410
+ def explode_offsets(shapes: Any, factor: float) -> list[Vec3]:
411
+ """How far explode moves each of `shapes`, in order, as (x, y, z)."""
412
+ ...
413
+
414
+ def extrude(face: Shape, height: float, direction: Vec3 = ...) -> Shape:
415
+ """Sweep a face by `height` along `direction` and return the solid."""
416
+ ...
417
+
418
+ def face_count(shape: Shape) -> int:
419
+ """Number of faces in a shape."""
420
+ ...
421
+
422
+ def face_plane(face: Shape) -> tuple[Vec3, Vec3]:
423
+ """The (point, normal) of a planar face, with the normal pointing outwards."""
424
+ ...
425
+
426
+ def faces(shape: Shape) -> list[Shape]:
427
+ """Every distinct face of a shape, in explorer order."""
428
+ ...
429
+
430
+ def faces_parallel_to(shape: Shape, direction: Vec3, tolerance: float = ...) -> list[Shape]:
431
+ """The planar faces of a shape whose outward normal points along `direction`."""
432
+ ...
433
+
434
+ def fillet(solid: Shape, radius: float, edges: Any = ...) -> Shape:
435
+ """Round the given edges of a solid with a constant radius."""
436
+ ...
437
+
438
+ def fillet_all(solid: Shape, radius: float) -> Shape:
439
+ """Round every edge of a solid at once, which is what a cast part wants."""
440
+ ...
441
+
442
+ def flange(part: SheetPart, edge: int | tuple[int, str], length: float, angle: float = ..., direction: str = ..., start_inset: float = ..., end_inset: float = ..., relief: bool = ..., bend_radius: float | None = ..., holes: Any = ..., return_length: float = ..., cutouts: Any = ..., length_from: str = ..., corner_treatment: str | dict | None = ..., corner_gap: float | None = ..., return_angle: float = ..., return_direction: str = ..., hem: str | None = ..., teardrop_radius: float | None = ...) -> SheetPart:
443
+ """A new SheetPart with a flange bent `angle` degrees on `edge`: a profile edge or a flange's."""
444
+ ...
445
+
446
+ def flat_pattern(part: SheetPart) -> FlatPattern:
447
+ """The flat pattern of a sheet part, worked out from its record, not its geometry."""
448
+ ...
449
+
450
+ def flat_solid(pattern: FlatPattern) -> Shape:
451
+ """The flat pattern as a solid, for a CAM program that wants one (item 524)."""
452
+ ...
453
+
454
+ def fuse(a: Shape, b: Shape) -> Shape:
455
+ """The union of a and b, with touching coplanar faces merged into one face."""
456
+ ...
457
+
458
+ def fuse_all(shapes: Any) -> Shape:
459
+ """The union of every shape given, fused left to right."""
460
+ ...
461
+
462
+ def hole(solid: Shape, face: Shape, centre: Vec2 | None, radius: float, depth: float | None = ..., *, world: Vec3 | None = ...) -> Shape:
463
+ """Drill a round hole into `solid` through one of its planar faces."""
464
+ ...
465
+
466
+ def hollow(solid: Shape, thickness: float, faces: Any) -> Shape:
467
+ """Shell a solid to a constant wall thickness, leaving `faces` open."""
468
+ ...
469
+
470
+ def hollow_facing(solid: Shape, thickness: float, directions: Any) -> Shape:
471
+ """hollow, the faces left open named by the way each faces (item 578)."""
472
+ ...
473
+
474
+ def identity(name: str, part_number: str | None = ..., revision: str | None = ..., properties: dict[str, str] | None = ...) -> None:
475
+ """Give part `name` its part number, revision and properties (item 697)."""
476
+ ...
477
+
478
+ def import_brep(path: Any) -> Shape:
479
+ """Read a BREP file back into one shape."""
480
+ ...
481
+
482
+ def import_step(path: Any) -> Shape:
483
+ """Read a STEP file back into one shape."""
484
+ ...
485
+
486
+ def inertia(shape: Shape) -> tuple[float, float, float]:
487
+ """The three principal moments of inertia, about the shape's centre of mass."""
488
+ ...
489
+
490
+ def is_valid(shape: Shape) -> bool:
491
+ """Whether OCCT calls a shape sound, from BRepCheck_Analyzer."""
492
+ ...
493
+
494
+ def linear_pattern(shape: Shape, step: Vec3, count: int) -> list[Shape]:
495
+ """`count` copies of a shape, each one `step` further along than the last."""
496
+ ...
497
+
498
+ def loft(profiles: Any) -> Shape:
499
+ """Build one ruled solid through a sequence of closed profiles, in order."""
500
+ ...
501
+
502
+ def make_box(dx: float, dy: float, dz: float, origin: tuple[float, float, float] = ...) -> Shape:
503
+ """Axis-aligned box of size dx * dy * dz with its min corner at origin."""
504
+ ...
505
+
506
+ def make_cone(bottom_radius: float, top_radius: float, height: float, origin: tuple[float, float, float] = ...) -> Shape:
507
+ """Cone or frustum of the given radii and height, along +Z."""
508
+ ...
509
+
510
+ def make_cylinder(radius: float, height: float, origin: tuple[float, float, float] = ...) -> Shape:
511
+ """Cylinder of the given radius and height, extruded along +Z."""
512
+ ...
513
+
514
+ def make_sphere(radius: float, origin: tuple[float, float, float] = ...) -> Shape:
515
+ """Sphere of the given radius, centred on origin."""
516
+ ...
517
+
518
+ def make_torus(major_radius: float, minor_radius: float, origin: tuple[float, float, float] = ...) -> Shape:
519
+ """Torus of the given radii, its ring centred on origin and its axis +Z."""
520
+ ...
521
+
522
+ def make_wire(edges: Any) -> Shape:
523
+ """One wire built from a sequence of edges, whatever order they are given in."""
524
+ ...
525
+
526
+ def mate(part: str, ref: str, to: str, to_ref: str, kind: str, value: Any = ...) -> Shape:
527
+ """Place part `part` against part `to` by one mate (item 575), and give it back placed."""
528
+ ...
529
+
530
+ def min_wall_thickness(shape: Shape, samples: int = ...) -> tuple[float, Vec3]:
531
+ """The thinnest wall of a solid and the point on its surface it was measured from."""
532
+ ...
533
+
534
+ def mirror(shape: Shape, point: Vec3, normal: Vec3) -> Shape:
535
+ """A copy of shape reflected in the plane through `point` with `normal`."""
536
+ ...
537
+
538
+ def outermost_face(shape: Shape, direction: Vec3) -> Shape:
539
+ """The planar face of a shape facing `direction` that lies furthest along it."""
540
+ ...
541
+
542
+ def outline(shape: Shape, plane: Plane) -> list[Shape]:
543
+ """The section of `shape` at `plane`, as wires rather than loose edges."""
544
+ ...
545
+
546
+ def overhang_faces(shape: Shape, angle: float = ..., up: Vec3 = ...) -> list[Shape]:
547
+ """The faces a printer would have to bridge or support, printing along `up`."""
548
+ ...
549
+
550
+ def part(name: str, shape: Shape, color: str | None = ..., part_number: str | None = ..., revision: str | None = ..., properties: dict[str, str] | None = ...) -> Shape:
551
+ """Register `shape` as the project entry `name` and give it back."""
552
+ ...
553
+
554
+ def place(name: str, source: Any, at: Any = ..., rotate: Any = ..., part: Any = ...) -> Shape:
555
+ """Put `source` in as the part `name`, turned by `rotate` and moved to `at` (item 453)."""
556
+ ...
557
+
558
+ def polygon_face(points: Any, plane: Plane = ...) -> Shape:
559
+ """Planar face on `plane` bounded by the polygon through `points`."""
560
+ ...
561
+
562
+ def rename(old: str, new: str) -> None:
563
+ """Give part `old`, registered already, the name `new` (item 711)."""
564
+ ...
565
+
566
+ def revolve(face: Shape, point: Vec3, direction: Vec3, angle: float = ...) -> Shape:
567
+ """Sweep a face `angle` degrees about the axis (point, direction)."""
568
+ ...
569
+
570
+ def rotate(shape: Shape, point: Vec3, direction: Vec3, angle: float) -> Shape:
571
+ """A copy of shape turned `angle` degrees about the axis (point, direction)."""
572
+ ...
573
+
574
+ def scale(shape: Shape, factor: float, origin: Vec3 = ...) -> Shape:
575
+ """A copy of shape enlarged about `origin` by `factor`. The input is left alone."""
576
+ ...
577
+
578
+ def section(shape: Shape, plane: Plane) -> list[Shape]:
579
+ """The edges where `plane` cuts `shape`, in explorer order."""
580
+ ...
581
+
582
+ def sheet_part(kind: str, *args: object, **kwargs: object) -> SheetPart:
583
+ """A plugin's kind of sheet part (item 604): `kind` is "PLUGIN.NAME"."""
584
+ ...
585
+
586
+ def size(shape: Shape) -> float:
587
+ """How big a shape is in the one measure its kind has."""
588
+ ...
589
+
590
+ def slices(shape: Shape, plane: Plane, step: float) -> list[tuple[float, list[Shape]]]:
591
+ """The cross-sections at `plane` and at every `step` along its normal."""
592
+ ...
593
+
594
+ def solid_count(shape: Shape) -> int:
595
+ """Number of solids in a shape."""
596
+ ...
597
+
598
+ def solids(shape: Shape) -> list[Shape]:
599
+ """Every distinct solid of a shape, in explorer order."""
600
+ ...
601
+
602
+ def split(shape: Shape, plane: Plane) -> list[Shape]:
603
+ """Cut `shape` with `plane` and return the pieces."""
604
+ ...
605
+
606
+ def stock_box(shape: Shape, margin: float = ...) -> Shape:
607
+ """The blank `shape` is cut from: its bounding box grown by `margin`, as a solid."""
608
+ ...
609
+
610
+ def surface_area(shape: Shape) -> float:
611
+ """Total area of every face of a shape, in model units squared."""
612
+ ...
613
+
614
+ def sweep(profile: Shape, path: Shape) -> Shape:
615
+ """Sweep a face along a wire and return the one solid it encloses."""
616
+ ...
617
+
618
+ def text3d(text: str, size: float, depth: float, font: str | None = ..., plane: Plane = ..., at: Vec2 = ..., angle: float = ..., align: str = ...) -> Shape:
619
+ """The letters of `text` as a solid: `size` high at the capitals, `depth` deep."""
620
+ ...
621
+
622
+ def translate(shape: Shape, vector: Vec3) -> Shape:
623
+ """A copy of shape moved by vector. The input is left alone."""
624
+ ...
625
+
626
+ def use(path: Any, part: str | None = ..., as_group: bool = ...) -> Any:
627
+ """The parts another part or assembly file's model builds, by name, or the one named (item 576)."""
628
+ ...
629
+
630
+ def vertices(shape: Shape) -> list[Shape]:
631
+ """Every distinct vertex of a shape, in explorer order."""
632
+ ...
633
+
634
+ def volume(shape: Shape) -> float:
635
+ """Enclosed volume of a solid, in model units cubed."""
636
+ ...
637
+
638
+ def wires(shape: Shape) -> list[Shape]:
639
+ """Every distinct wire of a shape, in explorer order."""
640
+ ...
641
+
642
+ def write_flat(flat: FlatPattern, path: Any) -> Any:
643
+ """Write a FlatPattern to `path`, a .dxf or a .svg, as `dxcad flat` writes one (item 762)."""
644
+ ...
dxcad-stubs/py.typed ADDED
@@ -0,0 +1 @@
1
+ partial