Grasshopper

algorithmic modeling for Rhino

This is a Brep, i want to Unjoin Edge in order to Unroll Brep like this.

If i do not Unjoin Edge, it will be Unroll Brep like this:

I don't cut by CNC because it doesn't save material.

Views: 1622

Replies to This Discussion

I do not know what unjoin edge means. Is that a mesh or a Brep? Do you want to unweld edges? Do you want to extract edges as curves?

I suspect that he means "extract edges" when working on some sort of Brep (or given the opportunity: extract anything else: Faces, Vertices, Planes etc etc).

If so, this "tutorial" could help.

Attachments:

This is a Brep, i want to Unjoin Edge in order to Unroll Brep like this.

If i do not Unjoin Edge, it will be Unroll Brep like this:

I don't cut by CNC because it doesn't save material.

Thank David Rutten.

It's the unjoinedge command from rhino, which duplicates one edge in a brep into two naked edges at the same location.

Use cases can be:

- Seperate a brep at specific edges

- Modify the face adjecency information so unrolling goes slightly more as planned.

May I ask why you need to unweld/unjoin the edges using Python, VB or C#?

This works differently for meshes and breps. (Rememeber a mesh is composed of flat faces)

The object you showed in the picture looks like a mesh to me. Apparently the Mesh class in RhinoCommon has no method to unweld edges. So you will have to implement it yourself. Of course you need to have a basic understanding of how data (vertices, edges, faces) are stored and structured in a mesh if you want to do this.

Assuming that the edge you want to unweld is shared by 2 faces, I can imagine the algorithm will look like something like this

1. Determine the 2 vertices A and B at the two end of the edge (by using the TopologyEdge property of the Mesh class)

2. Duplicate these 2 vertices to get 2 new vertices, called A' and B'

3. Choose one of the two faces that share the edge (again, use the TopolgyEdge property)

4. The chosen face will have four vertices A, B, C and D.

5. Create a new face from A', B', C and D.

6. Remove the old face (otherwise we would have two overlapping faces)

Have a look at the Mesh class in RhinoCommon

http://4.rhino3d.com/5/rhinocommon/html/AllMembers_T_Rhino_Geometry...

... and MeshTopologyEdgeList class

the http://4.rhino3d.com/5/rhinocommon/html/AllMembers_T_Rhino_Geometry...

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service