Conversions
- discopygal.geometry_utils.conversions.FT_to_float(f)
Convert CGAL Field Type (FT) to python float
- Parameters:
f (
FT
) – float to convert- Returns:
python float
- Return type:
float
- discopygal.geometry_utils.conversions.Point_2_list_to_Point_d(point_2_list)
Convert a list of Point_2’s to a high-dimensional Point_d
- discopygal.geometry_utils.conversions.Point_2_to_xy(point)
Convert CGAL Point_2 to (x,y) values
- Parameters:
point (
Point_2
) – point to convert- Returns:
x, y values of point
- Return type:
(
float
,float
)
- discopygal.geometry_utils.conversions.Point_d_to_Point_2_list(point_d)
- Convert a high-dimensional Point_d to a list of Point_2’s(We assume that d%2==0)
- discopygal.geometry_utils.conversions.Polygon_2_to_array_of_points(poly)
Convert a CGAL Polygon_2 to list of points
- Parameters:
poly (
Polygon_2
) – polygon to convert- Returns:
list of tuples of (x,y) points
- Return type:
list<(
float
,float
)>
- discopygal.geometry_utils.conversions.array_of_points_to_Polygon_2(poly)
Convert a list of points to a CGAL Polygon_2
- Parameters:
poly (list<(
float, :class:`float
)>) – list of points to convert- Returns:
CGAL polygon
- Return type:
:class:~discopygal.bindings.Polygon_2`
- discopygal.geometry_utils.conversions.float_to_FT(f)
Convert python float value to CGAL Field Type (FT)
- Parameters:
f (
float
) – float to convert- Returns:
CGAL FT
- Return type: