Selecting all coplanar vertices from another mesh Let's say you have this cube here, with points A, B, C, and D, which are all on the same plane.

Then, let's say you have a plane that is perfectly co-planar with points A, B, C and D. It is a separate object that can be joined with the original object. Here is a visualization.

What I need to do, in Python ideally (but for the purpose of this question any solution would be good) is to select points A, B, C and D as they rest on the same plane as the second object. It should be possible, because they are perfectly co-planar.
There is also a previous question on here that asks how to select all vertices inside of a 3D object. It is similar to this one.
How do I select all vertices within a specific 3D area?

Also, even better, is if you could do the same for an object that is not a plane, but also has no volume, like this:
Select all co-planar verts in other edit meshes based on 3 selected verts of active mesh.


3 selected verts form a plane. The coordinate of one and the cross product of vectors formed by two &quot;edges&quot; is the normal.

For all other meshes select their verts based on there distance from plane defined in step above.

mathutils.geometry.distance_point_to_plane is a utility function that returns the distance of a point to a plane.

The vert coordinates of other meshes are converted to the local space of active object to perform the test. Could instead use global coordinates. To make a local normal global see Python: vertex normal according to World


Test script. Select objects of interest and enter edit mode (2.8+). Select 3 verts of same object and run script. Any verts in the same plane (within tolerance) are selected in other meshes.
import bpy
import bmesh

from mathutils.geometry import distance_point_to_plane as dp2p

TOL = 1e-4

context = bpy.context

ob = context.edit_object
mw = ob.matrix_world
mwi = mw.inverted()
obs = [o for o in context.selected_objects if o.type == 'MESH']
obs.remove(ob)

bm = bmesh.from_edit_mesh(ob.data)

# using face normal
'''
f = bm.faces.active
plane_no = f.normal
plane_co = f.calc_center_median()
'''
# using 3 verts from select history
v1, v2, v3 = bm.select_history[-3:]
plane_co = v1.co
plane_no = (v1.co - v2.co).cross(v3.co - v2.co).normalized()
# should assert all verts and not inline.
for o in obs:
    bm = bmesh.from_edit_mesh(o.data)
    M = mwi @ o.matrix_world
    for v in bm.verts:
        v.select_set(
                abs(dp2p(M @ v.co, plane_co, plane_no)) &lt;= TOL              )
    bmesh.update_edit_mesh(o.data)