Skip to content

Instantly share code, notes, and snippets.

@patmandenver
Created April 1, 2020 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patmandenver/a325983271666391f29e02be26709272 to your computer and use it in GitHub Desktop.
Save patmandenver/a325983271666391f29e02be26709272 to your computer and use it in GitHub Desktop.
//This code is to attempt to update
//the 3dverkstan design to help it
//print stacked better
$fn=100;
headband_file="Visor_Frame_NORTH_AMERICA_LETTER_v3_Thicc.stl";
difference(){
import(headband_file, convexity=3);
translate([0,0,-1]){
mirror_copy()
deleter();
}
}
mirror_copy()
adder();
module deleter(){
color("#FF0000"){
linear_extrude(10){
polygon([
[0,19],
[0,26],
[10,25.5],
[15,25.4],
[20,24.9],
[25,24.2],
[30,23.4],
[35,22.5],
[40,21.4],
[45,20],
[48.1,19.1],
[49.8,15],
[49,5.5],
[47,5.2],
[45,6],
[44,7],
[40,8.8],
[35,11.8],
[30,13.7],
[25,15.2],
[15,17.7],
[10,18]
]
);
}
}
}
module adder(){
color("#FF0000"){
linear_extrude(10){
polygon([
[0,19],
[0,26],
[10,25.5],
[15,25.4],
[20,24.9],
[25,24.2],
[30,23.4],
[35,22.5],
[40,21.4],
[45,20],
[48.1,19.1],
[49.8,15],
[49,5.5],
[47,5.2],
[45,6],
[44,7],
[40,8.8],
[35,11.8],
[30,13.7],
[25,15.2],
[15,17.7],
[10,18]
]
);
}
}
}
//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