summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schwarz <michi.schwarz@gmail.com>2015-08-28 02:05:21 +0200
committerMichael Schwarz <michi.schwarz@gmail.com>2015-09-16 01:50:15 +0200
commite595de1b874fb8154f2040c9578a765a6f86fa22 (patch)
tree9d854360b7beb712fd4b7c723fb9add1dcd5dade
parent365d639ae4991fbd672abc0410f13c3754c61588 (diff)
downloadpogojig-e595de1b874fb8154f2040c9578a765a6f86fa22.tar.gz
pogojig-e595de1b874fb8154f2040c9578a765a6f86fa22.tar.bz2
pogojig-e595de1b874fb8154f2040c9578a765a6f86fa22.zip
Convert all SVG file to DXF and Asymptote.
Currently, the user has to configure which SVG files are exported to DXF and which to Asymptote, without a possibility to do both. With this change, all SVG files are exported to both file formats, if necessary.
-rw-r--r--Makefile5
-rw-r--r--readme.md10
2 files changed, 3 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 20f9fa9..58f1473 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,6 @@ ASYMPTOTE := asy
# Settings affecting the compiled results. You can overwrite these in a file called settings.mk in the same directory as this makefile. See readme.creole.
DXF_FLATNESS := 0.1
FLAT_SCAD_FILES :=
-ASYMPTOTE_EXPORTED_SVG_FILES :=
# Non-file goals.
.PHONY: all clean generated dxf stl asy pdf
@@ -47,10 +46,10 @@ SCAD_STL_FILES := $(call filter_compiled,.scad,.stl,$(filter-out $(FLAT_SCAD_FIL
SCAD_DXF_FILES := $(call filter_compiled,.scad,.dxf,$(filter $(FLAT_SCAD_FILES),$(SRC_FILES)))
# DXF files produced from SVG files. This excludes SVG files that are exported to Asymptote Files. Also, ignores an SVG file, if the same DXF file can also be produced from an OpenSCAD file. This is just to get reproducable builds without aborting it.
-SVG_DXF_FILES := $(filter-out $(SCAD_DXF_FILES),$(call filter_compiled,.svg,.dxf,$(filter-out $(ASYMPTOTE_EXPORTED_SVG_FILES),$(SRC_FILES))))
+SVG_DXF_FILES := $(filter-out $(SCAD_DXF_FILES),$(call filter_compiled,.svg,.dxf,$(SRC_FILES)))
# Asymptote files produced from SVG files.
-SVG_ASY_FILES := $(call filter_compiled,.svg,.asy,$(filter $(ASYMPTOTE_EXPORTED_SVG_FILES),$(SRC_FILES)))
+SVG_ASY_FILES := $(call filter_compiled,.svg,.asy,$(SRC_FILES))
# PDF files which can be generated from Asymptote files. We exclude SVG_ASY_FILES because they don't contain any drawing primitives and thus won't produce a PDF.
ASY_PDF_FILES := $(call filter_compiled,.asy,.pdf,$(filter-out $(SVG_ASY_FILES),$(SRC_FILES)))
diff --git a/readme.md b/readme.md
index 9dd4374..a8d388c 100644
--- a/readme.md
+++ b/readme.md
@@ -70,15 +70,7 @@ DXF and OpenSCAD both use a right-handed coordinate system (the Y axis runs up w
### Using SVG files from Asymptote
-SVG files may instead be used from Asymptote files. To do this, the makefile must be instructed to convert an SVG to Asymptote paths and write them to a `.asy` file instead of a DXF file. This can be done by setting the variable ASYMPTOTE_EXPORTED_SVG_FILES in a file called `settings.mk` in the same directory as the makefile. The variable should be set to the names of the SVG files that should be converted to Asymptote files in instead of DXF files:
-
- ASYMPTOTE_EXPORTED_SVG_FILES := src/example.svg
-
-If you want to have all SVG files converted to Asymptote, you can use this shortcut instead:
-
- ASYMPTOTE_EXPORTED_SVG_FILES := $(info $(shell find src -name '*.svg'))
-
-For each specified SVG file, an Asymptote file of the same name is generated. These files can be imported as modules from other Asymptote files. These modules will contain a member of type `path[]` for each layer in the original SVG file:
+SVG files may instead be used from Asymptote files. For each SVG file, an Asymptote file of the same name is generated. These files can be imported as modules from other Asymptote files. These modules will contain a member of type `path[]` for each layer in the original SVG file:
import test;