harray1_from_points1

compas_occ.conversions.harray1_from_points1(points)

Construct a horizontal one-dimensional point array from a list of points.

Parameters:
pointslist[Point]
Returns:
TColgp_HArray1OfPnt

Examples

>>> from compas.geometry import Point
>>> from compas_occ.conversions import harray1_from_points1
>>> points1 = [Point(0, 0, 0), Point(1, 0, 0), Point(2, 0, 0)]
>>> harray1 = harray1_from_points1(points1)
>>> harray1  
<OCC.Core.TColgp.TColgp_HArray1OfPnt; ... >
>>> for item in harray1:
...     print(item)
<class 'gp_Pnt'>
<class 'gp_Pnt'>
<class 'gp_Pnt'>
>>> for item in harray1:
...     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