Last active
April 1, 2020 20:11
-
-
Save patmandenver/847a0bf508b523487a3708c39c799950 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fn=100; | |
headband_file="empty_test.stl"; | |
num=2; | |
heigth=5; | |
bump=0.25; | |
cylinder_size=0.5; | |
extend_for_testing=0; //Set to 10 to see cylinders | |
//Supports on just one side | |
support_locs=[ | |
[12.5,31], | |
[12.5,17.8], | |
[48.3,4.6], | |
[50,20.5], | |
[54.3,12], | |
[62,1.5], | |
[69.5,-1], | |
[76.5,-13], | |
[76, -38.2], | |
[71.5, -45], | |
[62.7,-80], | |
[47.2,-110], | |
[26.3,-135], | |
[29, -147.1], | |
[37.8, -146], | |
[38.3, -134.5], | |
[73,-28], | |
[68.5,-62], | |
[56,-95], | |
[35.8,-125] | |
]; | |
rotate(180){ | |
for(x=[0:num-1]){ | |
translate([0,0,x*(heigth+bump)]){ | |
import(headband_file, convexity=3); | |
} | |
} | |
mirror_copy() | |
cylinder_supports(); | |
} | |
module cylinder_supports() { | |
for(y = [0:len(support_locs)-1]){ | |
translate(support_locs[y]){ | |
color("#FF0000"){ | |
cylinder(num*heigth+(num-1)*bump+extend_for_testing, | |
cylinder_size, cylinder_size); | |
} | |
} | |
} | |
} | |
//See https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Tips_and_Tricks#Create_a_mirrored_object_while_retaining_the_original | |
module mirror_copy(v = [1, 0, 0]) { | |
children(); | |
mirror(v) children(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment