Grasshopper

algorithmic modeling for Rhino

How can I call Rhino MeshOutline functionality inside a VB.net(RhinoCommon) component?

And also, how can I specify the name of the viewport for this command? Thanks in advance!

Views: 2829

Replies to This Discussion

Try Mesh.GetOutlines()

There's two overloads, one that takes a viewport and allows for a perspective based outline, the other takes a plane.

--
David Rutten
david@mcneel.com
Poprad, Slovakia

Sorry but I cant get it... should I convert the list of breps into meshes first?

should it look like this? GetOutlines is a member of OnMesh? Is it RhUtil? (sorry for my ignorance)

 

Private Sub RunScript(ByVal geo As List(Of OnMesh), ByVal viewport As String, ByRef MeshOutline As Object)

    MeshOutline = geo.GetOutlines()

 

GetOutlines is a member of the Rhino.Geometry.Mesh class. If you're using the new RhinoCommon SDK then you'll have access to it. If you have classes that start with "On" or "MRhino" then you are still using the old SDK. I don't know how and if MeshOutlines is available in the old SDK.

 

See attached.

 

--
David Rutten
david@mcneel.com
Poprad, Slovakia

Attachments:

So "old" and still so useful. So will this not make it into GH for good? I use the mesh outline function a lot in rhino. 

But than again, this still works fine :) Made my day!

Hello again David,

so I have been making use of your meshoutlines module a LOT (to create laser cutter paths). But now that it is getting more advanced I am noticing something.

It appears to be only using the outlines of the "low quality" mesh. Now I have really bad looking rounded corners. If I switch to high quality I can see the geometry is smooth, but the mesh outline is still bad. (see attached images)

Is there a way to have an option of high quality ouput?

Thank you!

Attachments:

It will use whatever mesh you plug in to it. You have to make sure that mesh is high quality. If you're providing Breps, then you rely on the automatic conversion from Brep to Mesh, which is always a low quality operation. Instead, you should perform the meshing using the appropriate components, and using appropriate meshing settings.

Ah, right. OK, that makes sense. Will have a try now and report back :)

Thanks for a super quick reply!

Ok, so I am trying the Mesh Brep component with the high quality settings, but the resulting Mesh still seems too low quality. Using the settings (custom) I never seem to be able to get smoother corners, no matter what settings I tweak.

Any other suggestions?

Attachments:

Can you upload the brep you're trying to mesh as a 3dm file and the sort of accuracy you're looking for?

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service