Grasshopper

algorithmic modeling for Rhino

Hello,

I am trying to convert a geometry input of Breps or surfaces into Meshes in a custom component. The Brep conversion goes fine:

If (TypeOf in_geo(j) Is Brep) Then
Dim msh_geo() As Mesh = Rhino.Geometry.Mesh.CreateFromBrep(in_geo(j))
End If

But the Surface conversion loses the trim information if I first convert to Brep then to mesh:

If (TypeOf in_geo(j) Is NurbsSurface) Then
Dim SrfBrp As Brep = Rhino.Geometry.Brep.TryConvertBrep(in_geo(j))
Dim msh_geo() As Mesh = Rhino.Geometry.Mesh.CreateFromBrep(SrfBrp)

End if

It looks like the surface is handled as a brep with its trim information intact automatically in the VB script component, but is handled differently in the custom component.

How do retain the trim information when converting any surface to a mesh inside a custom component?

Jeff

Views: 459

Replies to This Discussion

Hi Jeff,

you can't, Surfaces in Rhino do not support trims. You'll always need to use Breps, and in case of surfaces just use breps with a single face.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service