Point3d to Vector2d conversion

is there any way to convert an array of point3d (same plane) to vector2d objects?

array.map { |pt| Geom::Vector2d.new(*pt.to_a[0..1]) } is the best I can come up with.

2 Likes

By ‘plane’ do you mean specifically the XY, YZ or ZX planes? Or any plane defined by its normal? If so, you would also need another vector besides the ‘normal’ to define the basis for one of the two components onto which you are mapping the points.

Final question, if the 3d points are not themselves co-planar, are you looking for their projections onto your specified ‘plane’?