|
|
Le 2019-12-03 à 06:00, Kima a écrit :
> Consider an object as
>
> #declare obj = union {
> cylinder{ <-1,-1,-1>,<1,1,1>,.1
> cylinder{ <-1.5,-1.5,-1.5>,<1,1,1>,.1
> }
>
> I can center the object by its bounding box using max_extent and min_extent.
> Evidently, the bounding box is centered not the visible object.
>
> In this case, the right side is empty because there's nothing in the bounding
> (the cylinder side is at z=1, the farthest point).
>
>
That's a badly defined object. It must be :
#declare obj = union {
cylinder{ <-1,-1,-1>,<1,1,1>,.1}
cylinder{ <-1.5,-1.5,-1.5>,<1,1,1>,.1}
}
It's obvious that the lower right part is empty because the bounding
box's faces are always parallel to the reference planes.
This don't change the fact that the bounding box for that object is as
small as it can be.
What you seems to want is a bounding box that is rotated to match the
length of that object. That would reduce the efficiency of the bounding
mechanism.
Post a reply to this message
|
|