Created
January 3, 2016 22:10
-
-
Save jaydlawrence/788a3581697ed9795a74 to your computer and use it in GitHub Desktop.
OpenSCAD functions to customise ZMR250 frame spacer for Naze32 rev6 board
This file contains hidden or 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; | |
//source for original frame http://www.thingiverse.com/download:1477363 | |
//shorten the height to 12mm | |
module shortened() { | |
difference() { | |
translate([0,0,12]){ | |
difference() { | |
rotate([-90,0,0]) { | |
import("/home/jayd/3D\ prints/Spacer_V1.0_no_cuts.STL", convexity=3); | |
} | |
translate([0,0,-22]) { | |
cube([200,200,10]); | |
} | |
} | |
} | |
} | |
} | |
//quarter the model | |
module quarter() { | |
difference(){ | |
shortened(); | |
translate([0,95,0]){ | |
cube(150,150,20); | |
} | |
translate([34,0,0]){ | |
cube(150,150,20); | |
} | |
} | |
} | |
//cut back arm mount block to save internal space | |
module cut_out() { | |
difference() { | |
quarter(); | |
translate([23,35,0]) { | |
rotate([0,0,20]){ | |
cube([22,22,12]); | |
} | |
} | |
} | |
} | |
//create channel for wires | |
module wire_channel() { | |
difference() { | |
cut_out(); | |
translate([15,30,0]){ | |
rotate([-90,0,12]) { | |
cylinder(r=2, h=28); | |
} | |
} | |
translate([30,73.2,0]){ | |
rotate([-90,0,130]) { | |
cylinder(r=2, h=28); | |
} | |
} | |
} | |
} | |
//build model up to half | |
module half() { | |
wire_channel(); | |
translate([0,185,0]){ | |
mirror([0,1,0]) { | |
wire_channel(); | |
} | |
} | |
} | |
//build model back up to full frame | |
module new_frame() { | |
half(); | |
translate([68,0,0]){ | |
mirror([1,0,0]) { | |
half(); | |
} | |
} | |
} | |
//cut out USB for Naze32 rev6 USB access | |
module frame_cut() { | |
difference() { | |
new_frame(); | |
translate([52,79,4]) { | |
cube([10,12,9]); | |
} | |
} | |
} | |
//render final model | |
frame_cut(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment