Elena 'valhalla' Grandi: A Makefile for OpenSCAD projects
A Makefile for OpenSCAD projects
When working with OpenSCAD to generate models for 3D printing, I find it convenient to be able to build .stl and .gcode files from the command line, expecially in batch, so I've started writing a Makefile, improving it and making it more generic in subsequent iterations; I've added a page on my website http://www.trueelena.org/computers/howto/makefile_for_openscad_projects.html to hosts my current version.
Most of my projects use the following directory structure.
Running make will generate stl files for all of the models; make gcode adds .gcode files using slic3r; make build/object1.stl and make build/object1.gcode also work, when just one model is needed.
This Makefile is released under the WTFPL:
When working with OpenSCAD to generate models for 3D printing, I find it convenient to be able to build .stl and .gcode files from the command line, expecially in batch, so I've started writing a Makefile, improving it and making it more generic in subsequent iterations; I've added a page on my website http://www.trueelena.org/computers/howto/makefile_for_openscad_projects.html to hosts my current version.
Most of my projects use the following directory structure.
- my_project/conf/basic.ini
slic3r configuration files - my_project/src/object1.scad, my_project/src/object2.scad
models that will be exported - my_projects/src/lib/library1.scad, my_projects/src/lib/library2.scad
OpenSCAD files that don't correnspond to a single object, included / used in the files above. - my_project/Makefile
the http://www.trueelena.org/computers/howto/makefile_for_openscad_projects/Makefile shown below.
Running make will generate stl files for all of the models; make gcode adds .gcode files using slic3r; make build/object1.stl and make build/object1.gcode also work, when just one model is needed.
# Copyright 2015 Elena Grandi
# This work is free. You can redistribute it and/or modify it under the
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
BUILDDIR = build
CONFDIR = conf
SRCDIR = src
SLIC3R = slic3r
VPATH = $(SRCDIR):$(BUILDDIR)
STL_TARGETS = $(patsubst $(SRCDIR)/%.scad,$(BUILDDIR)/%.stl,$(wildcard $(SRCDIR)/*.scad))
GCODE_TARGETS = $(patsubst $(SRCDIR)/%.scad,$(BUILDDIR)/%.gcode,$(wildcard $(SRCDIR)/*.scad))
.PHONY: all gcode clean
all: $(STL_TARGETS)
gcode: $(GCODE_TARGETS)
$(BUILDDIR)/%.stl: %.scad $(SRCDIR)/lib/*
mkdir -p $ BUILDDIR
openscad -o $@ $<
$(BUILDDIR)/%.gcode: %.stl $ CONFDIR /basic.ini
$ SLIC3R --load $ CONFDIR /basic.ini $<
clean:
rm -f $ BUILDDIR /*.stl $ BUILDDIR /*.gcodeThis Makefile is released under the WTFPL:
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
Full wireless microphone kits with microphone, transmitter and receiver are usually $US500 or more.
The
Some time ago, pabs
Sony RX100-III
after the release is before the release. or: long time no RC bug
report.
after the
Mostly a mental note as I've reinvented this the second time
now. If you just quickly want to share some org-mode notes with some
non-Emacs-users the built-in HTML export comes handy. However it has
one Problem: All source syntax highlighting is derived from your
current theme. Which of course is a bad idea if your editor has a dark
background (say Emacs.reverseVideo: on). The same if your terminal's
background color is dark.
Running Emacs in batch mode and still getting colorful
code formatting seems to be an unsolved problem. All that can be found
on the Internet suggests adding a dark background to your HTML export
(at least to the code blocks). Or maybe use an external
style-sheet. Both not exactly the thing if you just want to scp
snippets of HTML somewhere to share. However there's a working
hack:
(In order to avoid any ambiguity here, this is a personal opinion. The Free Software Foundation's opinion on this matter is
Yesterday,
In
I've used Reddit for many years. I used it for many years without an
account, but eventually I made one. The site has always had its share
of unpleasantness, people who're more interested in tearing down than
in building. In recent years, it's gotten worse, and getting out of
hand.
During the fairly short reign of Ellen Pao as CEO, I found things to
be getting better. The site was starting to make it clear that
harrassment, for example, was unacceptable. Unsurprisingly, this made
some of the nastier people quite upset.
Pao has now resigned, and a new CEO has started. He had an "Ask Me
Anything" session yesterday, and made it clear that he's changing
things. From my point of view, it's changing to the worse. He made it
clear that as long as Reddit itself does not get into legal trouble,
and harrassment isn't too overt or particularly public, it's OK now.
I've closed my Reddit account.
The Independent reports that David Cameron
Here's an odd thing about the