Please visit http://OpenSCAD.DIY3DTech.com for more information on this and many other projects! As in this episode we will be looking at the “offset” command in Open-SCAD when working with 2D objects that we want to extrude to 3D.
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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
/* Open SCAD Name.: rocket_silhouette_v2.scad * Copyright (c)..: 2016 www.DIY3DTech.com * * Creation Date..: 12/12/2016 * Description....: silhouette of 2d rocket extruded * * Rev 1: Develop Model * Rev 2: * * 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---------------------*/ thickness = 2.8; //in mm hole_dia = 3; //in mm silhouette =-5; //in mm x_size = 100; //in mm y_size = 170; //in mm /*-----------------------Execute----------------------*/ main_module(); /*-----------------------Modules----------------------*/ module main_module(){ //create module difference() { union() {//start union //create base object and resize result as needed translate ([0,0,0]) resize([x_size,y_size,thickness])body_module(); } //end union //start subtraction of difference //start create holes-------------------------------: //create top holes translate ([0,(y_size/2)+abs(silhouette),0]) cylinder( 15,hole_dia/2,hole_dia/2,$fn=60, center=true); //create center holes translate ([-25,25,0]) cylinder( 15,hole_dia/2,hole_dia/2,$fn=60, center=true); translate ([25,25,0]) cylinder( 15,hole_dia/2,hole_dia/2,$fn=60, center=true); //create fin holes translate ([-43,-35,0]) cylinder( 15,hole_dia/2,hole_dia/2,$fn=60, center=true); translate ([-43,-63,0]) cylinder( 15,hole_dia/2,hole_dia/2,$fn=60, center=true); translate ([43,-35,0]) cylinder( 15,hole_dia/2,hole_dia/2,$fn=60, center=true); translate ([43,-63,0]) cylinder( 15,hole_dia/2,hole_dia/2,$fn=60, center=true); //end create holes-------------------------------: } //end difference }//end module module body_module(){ //create module difference() { union() {//start union //extrude 2d model into a 3d object from polgon embeded data translate ([0,0,0]) linear_extrude(height = thickness, twist = 0, slices = 0)rocket_module(); } //end union //start subtraction of difference //differance out inside of silhouette translate ([0,0,-1]) linear_extrude(height = thickness+2, twist = 0, slices = 0)offset(delta = silhouette) rocket_module(); //make bottom even and flat translate ([0,-40,0]) cube([50,10,thickness+3],center=true); } //end difference }//end module module rocket_module(){ //create module //start polygon data for rocket model polygon(points=[[0.7933492,48.87441],[2.116109,48.00195],[3.512045,46.24014],[5.712893,42.15929],[8.690516,35.40476],[10.39603,30.33887],[11.69628,24.56938],[12.45616,18.65917],[12.75449,13.45256],[12.65317,7.260911],[11.84262,-0.1972089],[11.52178,-2.589434],[11.84262,-3.996628],[12.86144,-5.685259],[19.83549,-15.53561],[20.42088,-17.22424],[20.49405,-35.51775],[20.40962,-37.31895],[20.12255,-37.58913],[19.42458,-37.31895],[8.020688,-25.65051],[7.058168,-25.15517],[6.568468,-25.25649],[6.140681,-26.08955],[5.701638,-26.98452],[4.958639,-27.41231],[1.074789,-27.49675],[-5.364529,-27.44045],[-6.15255,-27.0577],[-6.625372,-26.20213],[-7.030642,-25.31278],[-7.486573,-25.14392],[-8.409689,-25.54918],[-11.64623,-28.79699],[-19.94867,-37.31895],[-20.64664,-37.58913],[-20.96185,-37.23452],[-20.96748,-17.36495],[-20.42711,-15.67633],[-17.72531,-11.73619],[-12.06276,-3.715192],[-11.62935,-2.307997],[-11.69126,-0.9008061],[-12.50744,5.712998],[-12.7157,12.18609],[-12.423,19.08133],[-11.53366,25.55442],[-10.31221,30.76103],[-8.691129,35.54549],[-5.814826,42.01857],[-3.675897,45.95871],[-2.201157,47.88375],[-1.03037,48.74495],[-0.05096616,49.03202],[0.652631,48.92508]],paths=[[0,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]]); //end polygon data for rocket model }//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!