1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-09-09 22:51:16 +02:00

Restored explode lines to yellow.

Now keeps track of STL bounds and uses them to force a large assembly view when large.
This commit is contained in:
Chris Palmer
2019-06-11 12:38:00 +01:00
parent 00c6914e23
commit 85e1985f1a
17 changed files with 70 additions and 31 deletions

View File

@@ -45,20 +45,18 @@ module nut(type, nyloc = false, brass = false, nylon = false) { //! Draw specifi
vitamin(str("nut(", type[0], arg(nyloc, false, "nyloc"), arg(brass, false, "brass"), arg(nylon, false, "nylon"),
"): Nut M", nut_size(type), " ", desc));
if(exploded() && nyloc)
cylinder(r = 0.2, h = 10);
explode(nyloc ? 10 : 0)
color(brass ? brass_colour : nylon ? grey30: grey70) {
linear_extrude(height = thickness)
difference() {
circle(outer_rad, $fn = 6);
color(brass ? brass_colour : nylon ? grey30: grey70) translate_z((exploded() && nyloc) ? 10 : 0) {
linear_extrude(height = thickness)
difference() {
circle(outer_rad, $fn = 6);
circle(hole_rad);
}
if(nyloc)
translate_z(-eps)
rounded_cylinder(r = outer_rad * cos(30) , h = nyloc_thickness, r2 = (nyloc_thickness - thickness) / 2, ir = hole_rad);
}
circle(hole_rad);
}
if(nyloc)
translate_z(-eps)
rounded_cylinder(r = outer_rad * cos(30) , h = nyloc_thickness, r2 = (nyloc_thickness - thickness) / 2, ir = hole_rad);
}
if($children)
translate_z(thickness)
children();