Grasshopper

algorithmic modeling for Rhino

Hi,

 

Is there any way of doing mesh splitting (between meshes) or mesh trim in GH.

 

I have search in rhino commons and it seems to be that there is no options for this.

 

I have just started in how rhino scripting works, but I think there is a way of doing it (but I have no level to make it), it's like the meshfrompoints component.

 

That way is making an script that bake in two lists, the meshes, then select them in order, make the rhino command meshsplit (or meshtrim), then select the result and take it to GH, and delete all.

 

Is it possible? has anyone something similar to this?

 

thank you in advance.

 

 

Views: 22076

Replies to This Discussion

It seems there is support for Mesh Splitting in the Rhino SDK, the component that splits meshes with planes actually uses a Mesh/Mesh split behind the scenes. I'll see if I can code up some components that use this.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Just added Meshsplit functions to RhinoCommon and as components. Seems to work fine. I didn't do MeshTrimming yet, which might also be useful. But in order to Trim you'll need to use closed meshes otherwise there's no obvious inside/outside metric.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

hello,

 

thank you again for your help david. I have being looking in Rhino commons, and the only thing I found is this: 

 

 
Split a mesh by an infinite plane

Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll) Version: 5.0.15006.0 (5.0.20693.0)

Collapse imageSyntax

C#
public Mesh[] Split(   Plane plane )


Visual Basic
Public Function Split ( _   plane As Plane _ ) As Mesh()

Parameters

plane
Type: Rhino.Geometry..::..Plane

[Missing <param name="plane"/> documentation for "M:Rhino.Geometry.Mesh.Split(Rhino.Geometry.Plane)"]

Return Value

[Missing <returns> documentation for "M:Rhino.Geometry.Mesh.Split(Rhino.Geometry.Plane)"]

Collapse imageSee Also

 Last updated 3 June 2011 - Robert McNeel and Associates

 

Finally I have done it. Vicente said me a little tip to fix the problem a few weeks ago, and now I have used It.

 

First of all, I have done the boolean split:

a = rhino.Geometry.Mesh.CreateBooleanSplit(x, y)

 

and after it I explode the mesh at unwelded edges:

a = m.ExplodeAtUnweldedEdges

 

then I sort the meshes, by their areas, and take the biggest, the result:

 

Couldn't you use mesh normals to dictate "inside" vs. "outside" in a mesh trim condition?  Right now the mesh split looks as if if outputs all possible solutions of splitting the mesh.  For example:  I split one major mesh with two different meshes.  The mesh split returns 3 shapes:  1st is the shape that is "outside" of both split meshes.  2nd is the shape left "inside" of split mesh 1.  3rd is the shape left "inside" split mesh 2.  The issue is that the order that these shapes spit out of the split command is not the same at least in my experience.  I'm sure there are issues I'm missing (overlapping split meshes?) but couldn't we simply determine which mesh we want to use based on mesh normals?

Hi jose,

Please join a definition for split mesh.

 

I'm not sure copy to post not works.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service