Ejemplo de cómo hacer figuras con diferentes terminaciones en las aristas. Según cómo combinemos los objetos con hull, conseguimos aristas en 90 grados, en chaflán o redondeadas.
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 |
use <rcylinder.scad> X = 0; Y = 1; Z = 2; //-- Parametros del cubo size = [20, 20, 10]; r = 2; //-- Calcular las coordenadas de la esquina del cuadrante 1 xc = size[X]/2 - r; yc = size[Y]/2 - r; zc = size[Z]/2; //-- Tamaño de las columnas cuadradas col_size = [2 * r, 2 * r, size[Z]]; //-- Posiciones de las columnas vertex = [ [xc, yc, 0], [-xc, yc, 0], [-xc, -yc, 0], [xc, -yc, 0], ]; //-- Ejemplo 1: Modificacion de las aristas verticales module example1() { hull() { for (v = [0:1]) translate(vertex[v]) cube(col_size, center = true); //cylinder(r = r, h = size[Z], center = true, $fn = 4); translate(vertex[2]) cylinder(r = r, h = size[Z], center = true, $fn = 50); translate(vertex[3]) cylinder(r = r, h = size[Z], center = true, $fn = 4); } } //-- Ejemplo 2: Modificacion de las aristas horizontales y verticales module example2() { hull() { for (v = [0:3]) translate(vertex[v]) //cylinder(r = r, h = size[Z], center = true, $fn = 50); rcylinder(r = r, h = size[Z], both = false, center = true, $fn = 40); //rcylinder(r = r, h = size[Z], both = true, center = true, $fn = 40); } } //-- Ejemplos para probar example1(); //example2(); |
Este contenido ha sido publicado por ObiJuan en su página web bajo licencia Creative Commons Attribution-ShareAlike 2.5 Spain License.