@@ -404,25 +404,33 @@ def _default_position(self) -> Point:
404404 return Point (0 , 0 , 0 )
405405
406406 #: A tuple or list of the (u, v, w) normal vector of this shape. This is
407- #: coerced into a Vector setting the orentation of the shape.
407+ #: coerced into a Vector setting the orientation of the shape.
408408 #: This is effectively the working plane.
409409 direction = d_ (Coerced (Direction , coercer = coerce_direction ))
410410
411411 def _default_direction (self ) -> Direction :
412412 return Direction (0 , 0 , 1 )
413413
414+ #: Sets the x-direction of the shape's axis. If None (default) it is calculated using
415+ #: an axis perpendicular to the normal.
416+ x_direction = d_ (
417+ Coerced (
418+ (type (None ), Direction ),
419+ coercer = lambda v : None if v is None else coerce_direction (v ),
420+ )
421+ )
422+
414423 #: Rotation about the normal vector in radians
415424 rotation = d_ (Coerced (float , coercer = coerce_rotation ))
416425
417426 def _get_axis (self ):
418- return (self .position , self .direction , self .rotation )
427+ return (self .position , self .direction , self .x_direction , self . rotation )
419428
420429 def _set_axis (self , axis ):
421- self .position , self .direction , self .rotation = axis
430+ self .position , self .direction , self .x_direction , self . rotation = axis
422431
423- #: A tuple or list of the (u, v, w) axis of this shape. This is
424- #: coerced into a Vector that defines the x, y, and z orientation of
425- #: this shape.
432+ #: A tuple of (position, normal direction, x-direction (optional), rotation) defining the
433+ #: axis or "workplane" where this shape located.
426434 axis = d_ (Property (_get_axis , _set_axis ))
427435
428436 def _get_topology (self ):
0 commit comments