From 8a56340d0aade8a0e90f9af548a7967023d4ed96 Mon Sep 17 00:00:00 2001 From: Jochen Vothknecht <jochen3120@gmail.com> Date: Mon, 27 Sep 2021 08:31:33 +0200 Subject: [PATCH] Begin writing infills for printing --- scad/Infill.scad | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 scad/Infill.scad diff --git a/scad/Infill.scad b/scad/Infill.scad new file mode 100644 index 0000000..9bd3153 --- /dev/null +++ b/scad/Infill.scad @@ -0,0 +1,31 @@ + + +defaultSize = 3; +defaultDensity = 0.2; +defaultStrength = 1; + + +// TODO: write proper documentation about this!!! +// +// densitiy = 0…1 +// strength = material thickness +// size = size of the generated infill volume +// -> size is calculated as 10^size for each axis +// -> therefore the generated volume includes at least the cube [10^size, 10^size, 10^size] + + + +// generates concentric vertival cylinders around the origin +module concentricInfill(density=defaultDensity, strength=defaultStrength, size=defaultSize) { + + module ring(d, _str) { // TODO: use d as outer diameter or as mean diameter…? + difference() { + circle(d=d + _str); + circle(d=d - _str); + } + } + + ring(11-2, 1); +} + +concentricInfill($fn=100); -- GitLab