diff --git a/_data/assets.yml b/_data/assets.yml index 91f0e45..4298782 100644 --- a/_data/assets.yml +++ b/_data/assets.yml @@ -8,4 +8,5 @@ scad: main.scad flags: -Dsize=[1,4,9] stl: gen/monolith.stl - images: ['gen/monolith.png'] + images: ['gen/monolith.png', 'HAL_2001_monolith.jpg'] + downloads: ['monolith.txt'] diff --git a/_layouts/base.html b/_layouts/base.html index bcb629f..8a9aa5b 100644 --- a/_layouts/base.html +++ b/_layouts/base.html @@ -24,7 +24,7 @@
@@ -40,7 +40,7 @@

- This 3D printable project is offered under an open source license. The site is built with software under various open source licenses. + This 3D printable project is offered under an open source license. The site is built with software under various open source licenses. Create your own MySTL site with cookiecutter-mystl (coming soon!).

Back to top diff --git a/readfile.scad b/_li similarity index 100% rename from readfile.scad rename to _li diff --git a/_lib/readfile.scad b/_lib/readfile.scad new file mode 100644 index 0000000..a0e67c1 --- /dev/null +++ b/_lib/readfile.scad @@ -0,0 +1,2 @@ +CONVEXITY=4; +import(input, convexity=CONVEXITY); diff --git a/_lib/rules.py b/_lib/rules.py index c4e3406..7be7e92 100755 --- a/_lib/rules.py +++ b/_lib/rules.py @@ -44,7 +44,7 @@ MAKE_STL_PNG = """ {target}: {src} \t$(ECHO) $target \t$(Q)mkdir -p $(dir {target}) -\t$(Q)openscad --imgsize=2048,2048 -o {target}.tmp.png -d {target}.d $(SCAD_FLAGS) {flags} -Dinput=\\\"{src}\\\" readfile.scad +\t$(Q)openscad --imgsize=2048,2048 -o {target}.tmp.png -d {target}.d $(SCAD_FLAGS) {flags} -Dinput=\\\"{src}\\\" _lib/readfile.scad \t$(Q)convert -geometry 25% {target}.tmp.png {target} \t$(Q)rm -f {target}.tmp.png default:: {target} diff --git a/index.md b/index.md index e1b5175..faa091a 100644 --- a/index.md +++ b/index.md @@ -1,13 +1,16 @@ --- layout: base -title: MySTL +title: MySTL Demonstration page --- {% for asset in site.data.assets %} + {% assign stlbasename = asset.stl | split: "/" | last | split: "." | first %} +### {{ asset.name }} {% for image in asset.images %} - {% if asset.stl %} + {% assign basename = image | split: "/" | last | split: "." | first %} + {% if basename == stlbasename %} {% else %} @@ -17,32 +20,38 @@ title: MySTL {% comment %} Sections to consider adding: -# How I made this -# Print Settings -# Remixed from +## How I made this +## Print Settings +## Remixed from {% endcomment %} ## Downloads {% for asset in site.data.assets %} - - {{ asset.name }}: +### {{ asset.name }}: - {{ asset.notes }} - {% if asset.scad %} - {% assign basename = asset.scad | split: "/" | last %} - - [{{ basename }}](resources/{{ asset.scad }}) +{{ asset.notes }} + +{% if asset.flags %} +STL generated with `{{ asset.flags }}` +{% endif %} + +{% if asset.scad %} +{% assign basename = asset.scad | split: "/" | last %} + - [{{ basename }}](resources/{{ asset.scad }}) +{% endif %} +{% if asset.stl %} + {% assign basename = asset.stl | split: "/" | last %} + - [{{ basename }}](resources/{{ asset.stl }}) {% endif %} - {% if asset.stl %} - {% assign basename = asset.stl | split: "/" | last %} - - [{{ basename }}](resources/{{ asset.stl }}) - {% endif %} - {% if asset.svg %} - {% assign basename = asset.svg | split: "/" | last %} - - [{{ asset.name }} - {{ basename }}](resources/{{ asset.svg }}) - {% endif %} - {% if asset.flags %} - Generated with `{{ asset.flags }}` +{% if asset.svg %} + {% assign basename = asset.svg | split: "/" | last %} + - [{{ basename }}](resources/{{ asset.svg }}) {% endif %} +{% for download in asset.downloads %} + {% assign basename = download | split: "/" | last %} + - [{{ basename }}](resources/{{ download }}) +{% endfor %} {% endfor %} diff --git a/resources/HAL_2001_monolith.jpg b/resources/HAL_2001_monolith.jpg new file mode 100644 index 0000000..ce63c8a Binary files /dev/null and b/resources/HAL_2001_monolith.jpg differ diff --git a/resources/monolith.txt b/resources/monolith.txt new file mode 100644 index 0000000..666dc0e --- /dev/null +++ b/resources/monolith.txt @@ -0,0 +1,9 @@ +The next time you see the full moon high in the south, look carefully at its +right-hand edge and let your eye travel upward along the curve of the disk. +Round about two o'clock you will notice a small, dark oval: anyone with normal +eyesight can find it quite easily. It is the great walled plain, one of the +finest on the Moon, known as the Mare Crisium---the Sea of Crises. Three hundred +miles in diameter, and almost completely surrounded by a ring of magnificent +mountains, it had never been explored until we entered it in the late summer of +1996. +[extract from SENTINEL OF ETERNITY (1951) by Arthur C. Clarke]