Skip to content

Commit 8ddad3b

Browse files
authored
Merge pull request #1177 from sethfischer/typing-add-fixed-to-constraint-kinds
Add "Fixed" to ConstraintKinds type definition
2 parents 3e2f806 + 14cbdc4 commit 8ddad3b

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

cadquery/assembly.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from .occ_impl.geom import Location
1010
from .occ_impl.assembly import Color
1111
from .occ_impl.solver import (
12+
ConstraintKind,
1213
ConstraintSolver,
1314
ConstraintSpec as Constraint,
1415
UnaryConstraintKind,
@@ -26,7 +27,6 @@
2627

2728
# type definitions
2829
AssemblyObjects = Union[Shape, Workplane, None]
29-
ConstraintKinds = Literal["Plane", "Point", "Axis", "PointInPlane"]
3030
ExportLiterals = Literal["STEP", "XML", "GLTF", "VTKJS", "VRML"]
3131

3232
PATH_DELIM = "/"
@@ -278,14 +278,12 @@ def _subloc(self, name: str) -> Tuple[Location, str]:
278278

279279
@overload
280280
def constrain(
281-
self, q1: str, q2: str, kind: ConstraintKinds, param: Any = None
281+
self, q1: str, q2: str, kind: ConstraintKind, param: Any = None
282282
) -> "Assembly":
283283
...
284284

285285
@overload
286-
def constrain(
287-
self, q1: str, kind: ConstraintKinds, param: Any = None
288-
) -> "Assembly":
286+
def constrain(self, q1: str, kind: ConstraintKind, param: Any = None) -> "Assembly":
289287
...
290288

291289
@overload
@@ -295,14 +293,14 @@ def constrain(
295293
s1: Shape,
296294
id2: str,
297295
s2: Shape,
298-
kind: ConstraintKinds,
296+
kind: ConstraintKind,
299297
param: Any = None,
300298
) -> "Assembly":
301299
...
302300

303301
@overload
304302
def constrain(
305-
self, id1: str, s1: Shape, kind: ConstraintKinds, param: Any = None,
303+
self, id1: str, s1: Shape, kind: ConstraintKind, param: Any = None,
306304
) -> "Assembly":
307305
...
308306

0 commit comments

Comments
 (0)