Grasshopper

algorithmic modeling for Rhino

Hi at all,

I want to try a offset from a mesh in Grasshopper.
I have try this with Wb but the mesh does not look good.
Is it possible to get the rhino function offsetmesh via VB or C#?
Or there are other ways to get an offset with grasshopper?

Oh and the mesh is not planar!!

Regards

Henne

Views: 6585

Replies to This Discussion

Maybe post the mesh in question to show what 'does not look good' means ?

Looks like WB and MeshOffset give the same result on my test-case. Can you show us what's wrong with the WeaverBird mesh?

The Rhino offset function is available in the SDK, so you could call it from within a VB/C# script component. Do this:

  • Create a VB script component.
  • Rename the first input to M
  • Rename the second input to d
  • Open the menu for the first input and set the type hint to Mesh
  • Open the menu for the second input and set the type hint to Double
  • Double click the component and type the following code:
    A = M.Offset(d)

--

David Rutten

david@mcneel.com

Seattle, WA

Thanks David,

It works perfect.

Is it now possible to close the offset?

regards

henning

How could it be integrated to make the resulting mesh as a solid?

Once more thanks for the great quick and efficient solutions. I can say i created my first VB component!

Thanks

The Mesh.Offset method has an optional solidify input.

Hello Andres, thanks for the reference.
Since i'm not familiar with scripting, I wouldn't know which lines to add to include solidify option.

Any help?
Thanks

You add the second optional argument (a boolean in this case) when calling the method, like so (using GHPython):

offsetMesh = nameOfMesh.Offset(42.00,True)



Amazing, thank you!

Last question.
How can i save the newly created pythonscript component (to which i added an S input bool for solidity) as a GHA user object? I might not be using this mesh transformation for weeks now, so it could be useful having it as a custom object.

Attachments:

Select the GHPython component and go: File > Create User Object


again, thanks!

No worries :)

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service