Thanks @clement , I think I’ve got it working using `Intersection.MeshRay`

and rendermeshes

```
import rhinoscriptsyntax as rs
import Rhino
import scriptcontext as sc
def visibleRenderMesh():
all = rs.AllObjects()
all = rs.ObjectsByType(8 | 16 | 32)
objects = []
for item in all:
if rs.IsVisibleInView(item):
objects.append(rs.coercerhinoobject(item))
objRef = Rhino.DocObjects.RhinoObject.GetRenderMeshes(objects, False, True)
meshes = []
for item in objRef:
mesh = item.Mesh()
meshes.append(mesh)
#sc.doc.Objects.AddMesh(mesh)
return meshes
def isVisible(point, object, renderMeshes):
projection = rs.ViewProjection()
if projection == 1: #Parallel
viewCPlane = rs.ViewCPlane()
bounds = rs.BoundingBox(object, viewCPlane)
rs.AddLine(bounds[0], bounds[4])
depth = rs.Distance(bounds[0], bounds[4])
direction = rs.VectorScale(viewCPlane[3], depth*1.2)
viewpoint = rs.PointAdd(point, direction)
ray = Rhino.Geometry.Ray3d(point, direction)
elif projection == 2: #Perspective
viewpoint = rs.ViewCameraPlane()[0]
direction = -rs.VectorCreate(viewpoint, point)
ray = Rhino.Geometry.Ray3d(viewpoint, direction)
else: return False
occluded = False
for mesh in renderMeshes:
intersection = Rhino.Geometry.Intersect.Intersection.MeshRay(mesh, ray)
if 0.99 >= intersection > 0.01:
occluded = True
print "Vertex is Occluded"
break
if occluded == False:
return point
def visibleEditPoints():
object = rs.GetObject(preselect=True, select=True)
if not object: return
brep_obj = rs.coercebrep(object)
vertices = brep_obj.Vertices
rs.EnableRedraw(False)
meshes = visibleRenderMesh()
for i in range (0,vertices.Count):
point = isVisible(vertices[i].Location, object, meshes)
if point: rs.AddPoint(point)
rs.EnableRedraw(True)
visibleEditPoints()
```

I’m trying to make it work in orthographic views too, which might need a different approach, since meshray returns points that are obscured by geometry in the same plane. I could try a regular intersection.