Render project. Add meta file. Add make file. Project builds and generates image
This commit is contained in:
parent
f0562de65a
commit
41122db3a0
|
@ -0,0 +1,19 @@
|
||||||
|
Copyright (c) 2024 M McWilliams
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
|
@ -0,0 +1,18 @@
|
||||||
|
|
||||||
|
SRC=scad/bolex_base_plate.scad
|
||||||
|
IM=convert
|
||||||
|
OPENSCAD=openscad
|
||||||
|
OPENSCAD_OPTIONS=-D VERBOSE=false --export-format=asciistl
|
||||||
|
THEME=DeepOcean
|
||||||
|
OPENSCAD_IMAGE=--viewall --render --imgsize=512,512 --colorscheme=$(THEME)
|
||||||
|
ORDER_STL=python3 scad/common/c14n_stl.py
|
||||||
|
|
||||||
|
all: bolex_base_plate
|
||||||
|
|
||||||
|
bolex_base_plate : $(SRC)
|
||||||
|
echo "Generating $@.stl from $(SRC)..."
|
||||||
|
$(OPENSCAD) $(OPENSCAD_OPTIONS) -o stl/$@.stl -D PART=\"$@\" $(SRC)
|
||||||
|
$(ORDER_STL) stl/$@.stl
|
||||||
|
$(OPENSCAD) $(OPENSCAD_IMAGE) -o img/$@.png -D PART=\"$@\" $(SRC)
|
||||||
|
$(IM) img/$@.png img/$@.jpg
|
||||||
|
rm img/$@.png
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"objects" : [
|
||||||
|
{
|
||||||
|
"name" : "bolex_base_plate",
|
||||||
|
"material" : "black_plastic"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"src" : [
|
||||||
|
"LICENSE",
|
||||||
|
"Makefile",
|
||||||
|
"scad/bolex_base_plate.scad",
|
||||||
|
"scad/common/common.scad"
|
||||||
|
]
|
||||||
|
}
|
|
@ -6,9 +6,9 @@ PLATE_Y = 25;
|
||||||
|
|
||||||
module bolex_debug (pad = 0) {
|
module bolex_debug (pad = 0) {
|
||||||
cylinder(r = R(29) + pad, h = 10, center = true, $fn = 80);
|
cylinder(r = R(29) + pad, h = 10, center = true, $fn = 80);
|
||||||
translate([0, 0, 8]) cylinder(r = R(29) + pad, h = 10, center = true, $fn = 80);
|
translate([0, 0, 8]) cylinder(r = R(29) + pad, h = 15, center = true, $fn = 80);
|
||||||
translate([3 + 18.5, 17, 50 - 4]) rotate([0, 90, 0]) cylinder(r = R(100), h = 36,center = true, $fn = 180);
|
translate([3 + 18.5, 17 + 1.5, 50 - 4]) rotate([0, 90, 0]) cylinder(r = R(100), h = 36, center = true, $fn = 180);
|
||||||
translate([5.55, 0, 37]) rotate([0, 90, 0]) rounded_cube([50, 135, 67.9], d = 20, center = true, $fn = 50);
|
translate([5.55, 0 + 3, 38]) rotate([0, 90, 0]) rounded_cube([50, 135, 67.9], d = 20, center = true, $fn = 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
module debug () {
|
module debug () {
|
||||||
|
@ -41,9 +41,9 @@ module bolt_voids () {
|
||||||
module base_plate (pos = [0, 0, 0], rot = [0, 0, 0]) {
|
module base_plate (pos = [0, 0, 0], rot = [0, 0, 0]) {
|
||||||
translate(pos) rotate(rot) {
|
translate(pos) rotate(rot) {
|
||||||
difference () {
|
difference () {
|
||||||
rotate([0, 90, 0]) rounded_cube([30, 90.5, 55.3], d = 4, center = true, $fn = 40);
|
rotate([0, 90, 0]) rounded_cube([31, 90.5, 55.3], d = 4, center = true, $fn = 40);
|
||||||
translate([PLATE_X, PLATE_Y, -3]) {
|
translate([PLATE_X, PLATE_Y, -3]) {
|
||||||
bolex_debug(0.5);
|
bolex_debug(0.7);
|
||||||
cylinder(r = R(10), h = 60, center = true, $fn = 40);
|
cylinder(r = R(10), h = 60, center = true, $fn = 40);
|
||||||
translate([0, 0, -37]) cylinder(r = R(17), h = 60, center = true, $fn = 40);
|
translate([0, 0, -37]) cylinder(r = R(17), h = 60, center = true, $fn = 40);
|
||||||
bolt_voids();
|
bolt_voids();
|
||||||
|
@ -58,9 +58,9 @@ module base_plate (pos = [0, 0, 0], rot = [0, 0, 0]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PART = "";
|
PART = "bolex_base_plate";
|
||||||
|
|
||||||
if (PART == "") {
|
if (PART == "bolex_base_plate") {
|
||||||
base_plate();
|
base_plate();
|
||||||
} else {
|
} else {
|
||||||
debug();
|
debug();
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue