22 lines
480 B
Microcad
22 lines
480 B
Microcad
use std::ops::*;
|
|
use std::math::*;
|
|
use std::geo3d::*;
|
|
use gridfinity::*;
|
|
|
|
mod gridfinity;
|
|
|
|
fn getOffset(units: Integer) -> Length {
|
|
if units > 1 {
|
|
return 5.1mm;
|
|
} else {
|
|
return 3.2mm;
|
|
}
|
|
}
|
|
|
|
part Holder(diameter: Length) {
|
|
units = int(diameter / BasicUnitXY) + 1;
|
|
Box(gridsX = units, gridsY = units, gridsZ = 4, magents = true) - Cylinder(radius = diameter / 2, height = 100mm, offset = getOffset(units));
|
|
}
|
|
|
|
#[resolution = 200%]
|
|
Holder(60.5mm);
|