File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def __init__(
5353 self ,
5454 geom : shapely .geometry .Polygon ,
5555 material : pre .Material = pre .DEFAULT_MATERIAL ,
56- control_points : Optional [List [float , float ]] = None ,
56+ control_points : Optional [Union [ Point , List [float , float ] ]] = None ,
5757 tol = 12 ,
5858 ):
5959 """Inits the Geometry class."""
@@ -64,7 +64,9 @@ def __init__(
6464 f"Argument is not a valid shapely.geometry.Polygon object: { repr (geom )} "
6565 )
6666 self .assigned_control_point = None
67- if control_points is not None and len (control_points ) == 2 :
67+ if control_points is not None and (
68+ isinstance (control_points , Point ) or len (control_points ) == 2
69+ ):
6870 self .assigned_control_point = Point (control_points )
6971 self .tol = (
7072 tol # Represents num of decimal places of precision for point locations
You can’t perform that action at this time.
0 commit comments