algorithmic modeling for Rhino
hi
i have a problem, i want to make a substraction between two breps, one is included into the other.
i tried using "solid difference" but it doesnt work since the brep that i want to substract is completley included into the other brep. ( just like in rhino-boolean diffrence ).
in the picture, i want to substract the red brep from the green brep
any help?
Tags:
You can not do it with polysurfaces in grasshopper.
There's an old trick given by Chuck Welsh from McNeel, on how this can be done with polysurfaces in Rhino, with baked shapes from your grasshopper definition:
It would be easier to help, if you could attach your grasshopper files files along with your questions, for any future issues.
Hi djordje and Nik
Just spotted that one. In fact you can do it (inside GH) rather easily by flipping the "engulfed" breps and perform a merge. I guess that djordjie would translate that to Python.
Have fun - load R file first - with the attached demo (far more complex cases also available, V1 woks without Lists and not actually asking the right questions: blame boredom, he he).
happy NY (i.e. money and Ducatis, what else?), Peter
Thanks for sharing it Peter.
This is really useful solution!
Happy New Year too!
When translate C to P don't forget to automate the flip part of the equation (if this brep is "engulfed" [i.e. box contains box] then flip it if not don't).
best, Peter
Wow, so some sort of merge for NURBs is equivalent to joining a mesh with Join into a formally single unit after flipping the inner surfaces?
But your script has a black box C# script.
I would indeed prefer much simpler Python.
How do I do this manually in Rhino, as a lesson? The MergeAllFaces does not work after I bake your script's Merge output that I run into a Brep component, then explode the solid and try to recreate the unified object.
This reinforces my impression that I was doing this with a kludge of Boolean joining solids in a way that created a unified object that contained a cavity.
Er ... the Merge used is this ... er ... not recommended merge not some other merge. Not sure if this exists as component in GH (maybe it does).
BTW: Not aware of some Rhino command that does this.
BTW: Black box ... well ... what could be the difference if this (+ a lot of code more to prevent any oops moment(s)) was some sort of add-on thingy? Additionally the fact that is open instead of a compiled sealed thing ...means that anyone can do any mod desirable.
But since you speak Python .. do the C > P translation (I'm sure that djordie has this in the pipeline).
Wow, so some sort of merge for NURBs is equivalent to joining a mesh with Join into a formally single unit after flipping the inner surfaces?
I say: wow too! It works (separate breps can be merged) even without flipping.
This is great find Peter!
I wonder if it acts in the same way "Join" of meshes does (saves up the memory when a couple of different meshes are joined into a single mesh).
To my knowledge also, there is no grasshopper component (at least not default one) which uses Brep.MergeBreps method.
The attached python component below follows Peters explanation on Flipping and Merging breps. It still does not check whether or not the inner brep is inside some outer one (and therefor needs to be flipped), which is what can be checked with Intersection.BrepBrep method.
For Rhino replication of this NonmanifoldMerge and CreateRegions commands need to be called, as per upper link.
It comes with "expert user" warnings:
http://docs.mcneel.com/rhino/5/help/en-us/commands/nonmanifoldmerge...
Yes, this is what the author of mentioned commands order (Chuck Welsh) basically said:
"You can do this in Rhino with polysurfaces. It is generally not recommended, since the result may not behave as expected in other Rhino operations, but should be fine for your purposes."
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by