| use <object.scad>
|
|
|
|
|
| module Xextent(maxsize) {
|
| rotate([-90, 0, 0])
|
| linear_extrude(height=maxsize, center=true) projection()
|
| rotate([90, 0, 0])
|
| linear_extrude(height=maxsize, center=true) projection()
|
| children();
|
| }
|
|
|
| module Yextent(maxsize) {
|
| rotate([0, 0, 90]) Xextent(maxsize) rotate([0, 0, -90]) children();
|
| }
|
|
|
| module Zextent(maxsize) {
|
| rotate([0, 90, 0]) Xextent(maxsize) rotate([0, -90, 0]) children();
|
| }
|
|
|
|
|
| module aabb(maxsize=1000) {
|
| intersection() {
|
| Xextent(maxsize) children();
|
| Yextent(maxsize) children();
|
| Zextent(maxsize) children();
|
| }
|
| }
|
|
|
|
|
| ExampleObject();
|
| color("red", alpha=0.2) aabb() ExampleObject();
|
| // problem: object must fit within cube(maxsize, center=true)
|
| // otherwise the three dimensional extents will not meet.
|