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.
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…
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.
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).
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.
.
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.
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.
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.