New paste Repaste Download
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.
Filename: None. Size: 824b. View raw, , hex, or download this file.

This paste expires on 2025-02-27 23:32:08.308168. Pasted through web.