1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-07-31 20:50:15 +02:00

Simplified drawing of filament.

This commit is contained in:
Martin Budden
2020-02-16 23:06:07 +00:00
parent 728b7adf38
commit dc4e24b63a

View File

@@ -20,6 +20,7 @@
//! Filament spool models //! Filament spool models
include <../core.scad> include <../core.scad>
include <../utils/tube.scad>
function spool_diameter(type) = type[1]; //! Outside diameter function spool_diameter(type) = type[1]; //! Outside diameter
function spool_width(type) = type[2]; //! Internal width function spool_width(type) = type[2]; //! Internal width
@@ -58,12 +59,7 @@ module spool(type, filament_depth = 0, filament_color = "white") { //! Draw spec
[r2, h], [r2, h],
]); ]);
if (filament_depth) { if(filament_depth)
color(filament_color) translate_z(-h / 2 + spool_rim_thickness(type)) linear_extrude(spool_width(type)) { color(filament_color)
difference() { tube(r5 + filament_depth, r5, spool_width(type));
circle(d = (r5 + filament_depth) * 2);
circle(d = r5 * 2);
}
}
}
} }