I have an Array (facepoints) with various Vertex positions of a face. I would like to check which points from the checkpoints Array correspond to a Vertex position of the face.
facepoints = [Point3d(109.803, 0, 0), Point3d(0, 0, 0), Point3d(10, 9.25197, 0), Point3d(119.803, 9.25197, 0)]
checkpoints = [Point3d(109.803, 0, 0), Point3d(10, 0, 0)]
In situations like this I often use the AND operator to see which values match between both Arrays.
facepoints = [1, 2, 3, 4]
checkpoints = [2, 5]
samepoint = facepoints & checkpoints
# samepoint = [2]
But when I apply this for the Point3d arrays I get the following error in SketchUp.
Error: #<NoMethodError: undefined method `Point3d' for main:Object>
How would you compare these two arrays?