array1_from_points1
- compas_occ.conversions.array1_from_points1(points)
Construct a one-dimensional point array from a list of points.
- Parameters:
- pointslist[
Point
]
- pointslist[
- Returns:
- TColgp_Array1OfPnt
Examples
>>> from compas.geometry import Point >>> from compas_occ.conversions import array1_from_points1
>>> points1 = [Point(0, 0, 0), Point(1, 0, 0), Point(2, 0, 0)] >>> array1 = array1_from_points1(points1) >>> array1 <OCC.Core.TColgp.TColgp_Array1OfPnt; ... >
>>> for item in array1: ... print(item) <class 'gp_Pnt'> <class 'gp_Pnt'> <class 'gp_Pnt'>
>>> for item in array1: ... print(item.X(), item.Y(), item.Z()) 0.0 0.0 0.0 1.0 0.0 0.0 2.0 0.0 0.0