Get highlighted face which mouse in when using GetPoint

Using GetPoint to get a point, a face will be highlighted when mouse hover on. Is it possible to get this face?

I want to implement a function drawing rectangle similar with SU

  1. Move mouse on screen, and get point and face
  2. Draw a rectangle to show which plane will be used to draw rectangle.

Currently, I use a class derived from GetPoint, and get object using PickContext in method MouseMove, and then parse object’s geometry to get nearest intersected face. It is inconvenient to parse geometry of different objects.

Otherwise, It will be nice if there is method/class similar to GetObject that can get faces/objects by inputed screen point not by mouse click.

Can you point me to a Rhino command that does this?


– Dale

1 Like

This is code

        public Result RunCommand(RhinoDoc doc, RunMode mode)
            GetPoint gp = new GetPoint();
            return Result.Success;

and when move mouse on a object, it will be highlighted

It is not important that whether GetPoint can do this?
It is key to know how to implement something similar with SU.

I implement finding face with my way, support curve/extrusion/brep/instance, because not find any api directly support this. below is a demo