aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2024-01-17 16:28:52 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2024-01-17 16:28:52 +0100
commit91e5bc87dbb2477af081e9db0aac0c4f7295165d (patch)
tree1d4eee433158177a674a352a7dc8c5e6daee2410
parentee6c602f3072b4ab12d0a7ce6f150d74b55d1a02 (diff)
downloadoscad_gridfinity-91e5bc87dbb2477af081e9db0aac0c4f7295165d.tar.gz
Makefile, simpleboxes
-rw-r--r--.gitignore1
-rw-r--r--Makefile16
-rw-r--r--simplebox.scad10
3 files changed, 27 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index bc35029..2deeaa0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
*.gcode
+*.3mf
stlout/
pngout/
diff --git a/Makefile b/Makefile
index d98cc5f..3e670d3 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,11 @@ PNG = $(addprefix $(PNGDIR)/,$(SRC:.scad=.png))
BITSTORAGE_SIZES = $(STLDIR)/bitstorage_1x1x6.35.stl $(STLDIR)/bitstorage_1x2x6.35.stl $(STLDIR)/bitstorage_2x2x6.35.stl \
$(STLDIR)/bitstorage_1x1x4.stl $(STLDIR)/bitstorage_1x2x4.stl $(STLDIR)/bitstorage_2x2x4.stl
+SIMPLEBOX_SIZES = $(STLDIR)/simplebox_1x1x4.stl $(STLDIR)/simplebox_2x1x4.stl $(STLDIR)/simplebox_2x1x3.stl \
+ $(STLDIR)/simplebox_3x1x4.stl $(STLDIR)/simplebox_3x1x3.stl $(STLDIR)/simplebox_2x2x4.stl \
+ $(STLDIR)/simplebox_2x2x4.stl
+
+
.PHONY: _default
_default: stl
@@ -34,9 +39,20 @@ $(STLDIR)/bitstorage_%.stl: bitstorage.scad
-D wrench_size=$(word 3,$(subst x, ,$*))\
-o $@ $<
+
$(STLDIR)/bitstorage.stl: $(BITSTORAGE_SIZES)
@echo
+$(STLDIR)/simplebox_%.stl: simplebox.scad
+ @echo [ STL ] $< $*
+ @$(SCAD) $(STLOPTS) \
+ -D ux=$(firstword $(subst x, ,$*)) -D uy=$(word 2,$(subst x, ,$*)) \
+ -D uz=$(word 3,$(subst x, ,$*))\
+ -o $@ $<
+
+$(STLDIR)/simplebox.stl: $(SIMPLEBOX_SIZES)
+ @echo
+
$(STLDIR)/%.stl: %.scad
@echo [ STL ] $<
@$(SCAD) $(STLOPTS) -o $@ $<
diff --git a/simplebox.scad b/simplebox.scad
new file mode 100644
index 0000000..a3b3786
--- /dev/null
+++ b/simplebox.scad
@@ -0,0 +1,10 @@
+use <gridfinity.scad>
+
+ux = 2;
+uy = 1;
+uz = 3;
+
+magnets = false;
+lip = true;
+
+gridfinity(ux, uy, uz, lip=lip, magnets=magnets, fill = false, bottom_height = 0);