@@ -31,10 +31,10 @@ class Frame(Geometry):
3131 ----------
3232 point : [float, float, float] | :class:`~compas.geometry.Point`
3333 The origin of the frame.
34- xaxis : [float, float, float] | :class:`~compas.geometry.Vector`
35- The x-axis of the frame.
36- yaxis : [float, float, float] | :class:`~compas.geometry.Vector`
37- The y-axis of the frame.
34+ xaxis : [float, float, float] | :class:`~compas.geometry.Vector`, optional
35+ The x-axis of the frame. Defaults to the unit X vector.
36+ yaxis : [float, float, float] | :class:`~compas.geometry.Vector`, optional
37+ The y-axis of the frame. Defaults to the unit Y vector.
3838
3939 Attributes
4040 ----------
@@ -77,15 +77,15 @@ class Frame(Geometry):
7777 "required" : ["point" , "xaxis" , "yaxis" ],
7878 }
7979
80- def __init__ (self , point , xaxis , yaxis , ** kwargs ):
80+ def __init__ (self , point , xaxis = None , yaxis = None , ** kwargs ):
8181 super (Frame , self ).__init__ (** kwargs )
8282 self ._point = None
8383 self ._xaxis = None
8484 self ._yaxis = None
8585 self ._zaxis = None
8686 self .point = point
87- self .xaxis = xaxis
88- self .yaxis = yaxis
87+ self .xaxis = xaxis or Vector ( 1 , 0 , 0 )
88+ self .yaxis = yaxis or Vector ( 0 , 1 , 0 )
8989
9090 def __repr__ (self ):
9191 return "{0}(point={1!r}, xaxis={2!r}, yaxis={3!r})" .format (
0 commit comments