Please visit http://OpenSCAD.DIY3DTech.com for more information on this and many other projects! As in this episode we will be coding an OD (Outer Diameter) to ID (Inner Diameter) adapter for dust collection hood. However this is a good working example of anytime you need to flip OD for ID in a build.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
/* Open SCAD Name.:Dust Adapter * Copyright (c)..: 2016 www.DIY3DTech.com * * Creation Date..:04/15/2016 * Discription....: 4 inch to 1.5 inch adapter for cust collector * * Rev 1: Develop Model * Rev 2: Modifed for adjustments * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ /*------------------Customizer View-------------------*/ // preview[view:north, tilt:top] /*---------------------Parameters---------------------*/ // base_dia_ID = Base Inside Diameter in mm // base_h = Base Hieght in mm // wall = Thickness of wall in mm // cone_h = Hieght of cone section in mm // tail_dia_OD = Tail Outside Diameter in mm // tail_h = Hight of Tail stock // center = True or False /*-----------------------Execute----------------------*/ DownAdapter(101,24,2,30,48.5,24,true); /*-----------------------Modules----------------------*/ module DownAdapter(base_dia_ID,base_h,wall,cone_h,tail_dia_OD,tail_h,center){ difference() { union() { //create base structure //create base translate ([0,0,(base_h/2)]) {cylinder(base_h,(base_dia_ID/2)+wall,(base_dia_ID/2)+wall,$fn=60, center); } //create cone translate ([0,0,base_h+(cone_h/2)]){cylinder(cone_h,(base_dia_ID/2)+wall,(tail_dia_OD/2),$fn=60, center); } //create tail translate ([0,0,(base_h+cone_h)+(tail_h/2)]){cylinder(tail_h,(tail_dia_OD/2),(tail_dia_OD/2),$fn=60, center); } } //end union //start subtraction of differance //create struture to differance //remove base translate ([0,0,(base_h/2)-0.5]) {cylinder(base_h+1,base_dia_ID/2,base_dia_ID/2,$fn=60, center); } //remove cone translate ([0,0,(base_h+(cone_h/2))+0.25]){cylinder(cone_h+1,(base_dia_ID/2),(tail_dia_OD/2)-wall,$fn=60, center); } //remove tail //note we flip from ID in the base to OD in cone meaning we have to subtract wall translate ([0,0,((base_h+cone_h)+(tail_h/2))+0.5]){cylinder(tail_h+1,(tail_dia_OD/2)-wall,(tail_dia_OD/2)-wall,$fn=60, center); } } //end differance }//end module /*----------------------End Code----------------------*/ |
If your looking for looking 3D Printer, Laser Cutter and CNC Swag (T-Shirts, Hats, Mugs, etc), please support the channel by visiting our online shop at: http://swag.DIY3DTech.com
Also subscribe to our parent YouTube Channel DIY3DTech.com YouTube Channel for 3D Printing, Laser Manufacturing and CNC Machining: http://YouTube.DIY3DTech.com
More Ideas!
OpenSCAD – Designing a Compression Cover!
OpenSCAD – Designing a Pressure Fit Endcap!
Open SCAD – Complex Flange Designer!