Environment.FindClosestVertex (Point, Double, Type, out HitVertex) Method
Parameters
- mousePos
- Point
Mouse position (zero on top)
- maxDistance
- double
Limit the search to points at this distance in pixels from mouse cursor position
- entType
- Type
The type of entities to process
- closestVertex
- HitVertex
The closest vertex, with the full information to retrieve the vertex from a Brep or Solid
Return Value
intThe entity index if the closest vertex is nearer than maxDistance and the entity type is entType, -1 otherwise.
The closestVertex point is in the coordinate space of the CurrentBlockReference so, if there is a current BlockReference, to get the 3D world coordinates
of the closestVertex point you need to transform it by the CurrentTransformation.