Вы должны для ориентации лица использовать viewportLayout.FindClosestTriangle
.
Это даст вам один из треугольников, из которых сделано лицо (обычно ближе к мыши).
Затем оттуда создайте плоскость, определяющую 3 вершины этого треугольника, у которых будет нормальное направление, совпадающее с нормалью треугольника.
Вот полный рабочий код:
// create a basic cube solid
var cube = Solid.CreateBox(10, 10, 10);
// add to the viewport (vp is the ViewportLayout control)
vp.Entities.Add(cube);
// in the vp (ViewportLayout control) mouse click
private void vp_MouseClick(object sender, MouseEventArgs e)
{
// get the index of the entity under the cursor
var index = vp.GetEntityUnderMouseCursor(e.Location);
// get that item from the entity list as a IFace (since it's a solid)
var item = vp.Entities[index] as IFace;
// find the closest triangles
var triangles = vp.FindClosestTriangle(item, e.Location);
// get the meshes of that IFace
var meshes = item.GetPolygonMeshes();
// in meshes you have all vertex and triangles you need to create a plane
}