Hi
Hi, I want to get solid difference of the unit within its minimum bounding box using rhinoscriptsyntax. Is there any solution?
Thanks in advance.
Hi
Hi, I want to get solid difference of the unit within its minimum bounding box using rhinoscriptsyntax. Is there any solution?
Thanks in advance.
Hi, this part of the sentence makes no sense. I guess if you want help, you should better describe your problem. A small sketch usually helps in motivating others to help.
I dont think you can do a Boolean Difference when one object is completely inside of another. So you would probably have to divide the bounding box, something like this:
import rhinoscriptsyntax as rs
sph = rs.AddSphere([0,0,0],1)
bb = rs.BoundingBox(sph)
lpnts = bb[0:4]
upnts = bb[4:8]
mpnts = [(i+j)/2 for i,j in zip(lpnts,upnts)]
lbox = rs.AddBox(lpnts+mpnts)
ubox = rs.AddBox(mpnts+upnts)
boxs = [lbox,ubox]
a = [rs.BooleanDifference(i,sph,False)[0] for i in boxs]
Of course you can (but is tricky: remember R is a Surface modeller). Use this Method:
So for this case the outer is the MinBBox (as Brep) - the white above - and the inner the brep - the black above. (Red is a “slice” for viz purposes).
As an entry level intro into the freaky stuff see attached:
Brep_hollow_ops_Intro_V1.gh (121.9 KB)
This is not what he wrote. A shape inside a minimal bounding box is not equal to a shape inside another shape. It can be outside the initial shape and still be inside the minimal bounding box. But still it’s unclear what is meant by “unit” here.
Well … if we replace “unit” with “a given brep” … I guess that he wants to apply the freaky Merge Method using the min Box and the (obviously enclosed) solid Brep.
But the big thing is: what could be the fastest way to cut the mustard on that min Box (by Volume I guess) puzzle? A bounce solver? Some heuristic? Something else? Karma?
That said Radovan did some similar stuff some time ago (I found it a bit slow, mind),
Radovan_MinimumBB.gh (31.5 KB)
There are an infinite amount of shapes possible where a not fully enclosed solid Brep is inside still inside the minimum bounding box. This means it’s not obvious at all. Just imagine having a short sausage inside a hot-dog roll. That meat is fully enclosed by the bounding box of the roll, but is still not baked into.
(BTW, the unit here would be “kcal”)
Uno momento prego:
Given N GeometryBase things we can get a sum Box out of them, right? Now … if we want to find the Plane of the min (by Volume up to some rational tolerance) Box (out of a myriad ones) … by what means is this ambiguous? (or … find ALL the Boxes if “equal” ones are around … or … find the ordered first 666 etc etc).
BTW: a classic:
an_bounding_box_fall.pdf (1.7 MB)
BTW: the best (by the best):
1M Q: if we replace the sausage with a plastic is fantastic Bic Mac (and/or french fries) … does this help?
BTW, the unit here would be “MCAL(s)”
…but that Big Mac inside that paper box is not water tight, and as such doesn’t qualify for solid intersections! Anyway, I go and grab some lunch.