Unjoin Brep Edges in Grasshopper

I know there were several threads on the Grasshopper forum related to this, but none seemed to work for me. Is there a way to unjoin certain Brep edges in grasshopper? I started using python for this, but I’m not well versed and quickly got stuck.

Any help would be much appreciated.

Well … I have a variety of C# things that analyze Brep Lists with any imaginable way (and do conditional outputs of vertices, edges, faces, 9 connectivity trees, cats, dogs) but the bad news are that are C# instead of P.

Try to do it via native GH components and if you arrive into some dead-end and you want a demo (you must provide the selection criteria, mind) drop a word…

Hi Peter,

Thanks for your reply. After searching through various native GH components, I am still unable to unjoin specific edges on a Brep (I hope I was clear in my first post that I’m trying to unjoin SPECIFIC edges of a Brep).

After trying to replicate my python script in C#, I’m still unable to get something to work. I’ve attached the sample files I’m using.

Perhaps you can help me with a demo?

Thanks,

brep edge unjoin.gh (7.7 KB)
object to unjoin edge.3dm (57.3 KB)

BTW: BY unjoin a Curve named crv you mean the Curve[] segments = crv.DuplicateSegments () Method ?? (see R SDK).

BTW: Are you 110% capable to manage connectivity trees via code? (Breps are like meshes: vertices, edges, faces etc etc).

Anyway I’ll prepare a demo soon. In the mean time (since code opens an enormous appetite for stuff and since you are not in the C# bandwagon) can you list a bit more clearly your criteria?

For instance: if this edge is not planar and has length < something and the adjacent vertices have valence < something … blah blah.

Mention as well what sort of “expansion” in the queries could/may happen in the future.

Thanks for clarifying that command. I am quite new to C# and python in general, so I’m learning as I go. I am definitely not 110% capable of managing connectivity trees… at this point everything I’m doing is pretty much guesswork. I will dig into the SDK documentation.

The criteria as of now would be: if any brep edge matches a specified length (within a tolerance), and is between two surfaces, to unjoin them.

Regarding future expansion of this criteria, is there a way to input a curve into the C# definition that corresponds with the brep edges to be unjoined? The reason for this request is that it would be ideal to determine the selection criteria outside of a C# definition and send in curves. Perhaps there is a way to do a search within C# where the brep edges to be unjoined are selected based on proximity to the inputted curves? (I hope this was clear enough of a description).

Thanks again for your help, its much appreciated!

It’s a pretty peculiar command. May I ask what you want to unjoin edges for?

Er … well… let’s hope for the better in the future, he he.

In the mean time get this attached that sheds some light on Brep analysis matters (but does only 3 out of 9 possible connectivity trees). I’ll modify it soon to match your criteria (and introduce some others as well) and/or answer to your questions.
.

Load R file first.

decompose_brepList_V2.gh (136.3 KB)
decompose_brepList_V1.3dm (1.5 MB)

I am trying to program the UnrollSrf command for Breps, and need more control on which edges are unjoined beforehand to ensure the correct unrolled geometry.

Thanks! I will explore the GH file and try to get a better grasp on connectivity trees.

BTW: Connectivity (where applicable) is critical for no apparent reason as well … just Imagine that you do some other quite computational intensive stuff. Instead of waiting any C# to finish … it’s a common coding practice to “restrict” output and inspect results (and or check/correct things, bugs, shortcomings or just change mind and exploit some other way etc etc).

On big/complex real-life things and especially if you work under pressure this approach makes a big difference.

This may be a bit johnny come lately, but the method you’ll need to invoke is Brep.UnjoinEdges (reference).

It takes a collection of edge indices to unjoin, so you’ll also have to figure out those.

This file contains a C# script which figures out the edge indices and unjoins them: unjoinedge.gh (11.4 KB)

4 Likes

nice, but doesn’t work

Means you don’t have the latest Rhino. Unless David wrote that in Rhino 6. If it is in Rhino 5 the latest is SR14.

1 Like

You can use the good old long way home:

Welp, looks like you need to update to the newest version. It could be this method was added in Rhino6. I have never seen it before, but then I have never needed it either.

1 Like

Thanks lord, good data analyses but how about a Brep as an output, and verify the naked edges like David.

thanks, I’m using the latest release, is there another method for rhino 5?

Doesn’t work for 5 SR14 so I think yes it is for R6