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__(
53
53
self ,
54
54
geom : shapely .geometry .Polygon ,
55
55
material : pre .Material = pre .DEFAULT_MATERIAL ,
56
- control_points : Optional [List [float , float ]] = None ,
56
+ control_points : Optional [Union [ Point , List [float , float ] ]] = None ,
57
57
tol = 12 ,
58
58
):
59
59
"""Inits the Geometry class."""
@@ -64,7 +64,9 @@ def __init__(
64
64
f"Argument is not a valid shapely.geometry.Polygon object: { repr (geom )} "
65
65
)
66
66
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
+ ):
68
70
self .assigned_control_point = Point (control_points )
69
71
self .tol = (
70
72
tol # Represents num of decimal places of precision for point locations
You can’t perform that action at this time.
0 commit comments