summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/_settings.scad2
-rw-r--r--src/example.scad17
-rw-r--r--src/example_1.scad6
-rw-r--r--src/example_2.scad14
4 files changed, 22 insertions, 17 deletions
diff --git a/src/_settings.scad b/src/_settings.scad
new file mode 100644
index 0000000..1f84b17
--- /dev/null
+++ b/src/_settings.scad
@@ -0,0 +1,2 @@
+plate_height = 2;
+struts_height = 1;
diff --git a/src/example.scad b/src/example.scad
deleted file mode 100644
index e4e5022..0000000
--- a/src/example.scad
+++ /dev/null
@@ -1,17 +0,0 @@
-module extrude_layer(layer, height) {
- linear_extrude(height = height)
- import("example.dxf", layer = layer);
-}
-
-render(convexity = 10) {
- union() {
- difference() {
- extrude_layer("base", 2);
-
- translate([0, 0, -1e6])
- extrude_layer("text", 2e6);
- }
-
- extrude_layer("struts", 1);
- }
-}
diff --git a/src/example_1.scad b/src/example_1.scad
new file mode 100644
index 0000000..b6e8931
--- /dev/null
+++ b/src/example_1.scad
@@ -0,0 +1,6 @@
+include <_settings.scad>
+
+render(convexity = 10) {
+ linear_extrude(plate_height)
+ import("example.dxf", layer = "text");
+}
diff --git a/src/example_2.scad b/src/example_2.scad
new file mode 100644
index 0000000..2dd57e6
--- /dev/null
+++ b/src/example_2.scad
@@ -0,0 +1,14 @@
+include <_settings.scad>
+
+render(convexity = 10) {
+ union() {
+ linear_extrude(plate_height)
+ difference() {
+ import("example.dxf", layer = "base");
+ import("example.dxf", layer = "text");
+ }
+
+ linear_extrude(struts_height)
+ import("example.dxf", layer = "struts");
+ }
+}