Clarification on mesh.GetOutlines() for Arbitrary Orientations/Views

Hi,

the problem is the following: I want to create the outline of a mesh, which works for the regular world planes, but i cannot get the get random orientation / viewport to work.

  1. How do i get the viewport to work?
  2. How can i set specified views?

mwe_mesh_outline.gh (21.7 KB)

Best
Dan

Hello
you can get camera orientation like that. You could then find a plane.

Up = doc.Views.ActiveView.ActiveViewport.CameraUp
Target = doc.Views.ActiveView.ActiveViewport.CameraDirection
X = doc.Views.ActiveView.ActiveViewport.CameraX

There is also this option
https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.mesh/getoutlines

You will have to refresh that if needed

private void RunScript(Mesh mesh, object y, ref object A)
  {

    A = mesh.GetOutlines(doc.Views.ActiveView.ActiveViewport);
  }
1 Like