Skip to content

Commit

Permalink
Update geometry.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jdegenstein authored Oct 10, 2023
1 parent 4319a7e commit fe28d42
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/build123d/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1223,16 +1223,16 @@ class Rotation(Location):
about_a (float): first rotation in degrees (by default about X axis)
about_b (float): second rotation in degrees (by default about Y axis)
about_c (float): third rotation in degrees (by default about Z axis)
intrinsic (Intrinsic, optional): order of rotations in Intrinsic mode, defaults to Intrinsic.XYZ
extrinsic (Extrinsic, optional): order of rotations in Extrinsic enum, defaults to None
intrinsic (Intrinsic, optional): order of rotations in Intrinsic rotation mode, defaults to Intrinsic.XYZ
extrinsic (Extrinsic, optional): order of rotations in Extrinsic rotation mode, defaults to None
"""

def __init__(
self,
about_a: float = 0,
about_b: float = 0,
about_c: float = 0,
intrinsic: Intrinsic = Intrinsic.XYZ,
intrinsic: Intrinsic = None,
extrinsic: Extrinsic = None,
):
self.about_a = about_a
Expand All @@ -1244,7 +1244,9 @@ def __init__(
if intrinsic is not None and extrinsic is not None:
raise ValueError("Only intrinsic or extrinsic can be specified")
elif intrinsic is None and extrinsic is None:
raise ValueError("Either intrinsic or extrinsic must be specified")
intrinsic = Intrinsic.XYZ #actually set default
self.intrinsic = intrinsic
ordering = intrinsic
elif extrinsic is not None:
ordering = extrinsic
elif intrinsic is not None:
Expand Down

0 comments on commit fe28d42

Please sign in to comment.