[OpenSCAD] spout

Parkinbot rudolf at digitaldocument.de
Fri Sep 14 10:53:16 EDT 2018


the "idea" is as simple as this (and follows the usual rules for part
design): 
1. model the vat
2. model some "nose" e.g. by playing around with cone shapes
3. difference the vat from the nose

e.g. see this code 

// vat
height = 50; 
width = 200; 
length = 300; 
rounded = 10; 


spout(); 
#vat(); 

module spout()
{
  difference()
  {
    nose(); 
    vat(); 
  }
}


module vat()
{
  translate([length/2, width/2, -height]) 
  linear_extrude(height)
    offset(rounded) 
      square([length-2*rounded, width-2*rounded], center = true); 
}

module nose()
{
  r = rounded+5; 
  h = height; 
  difference() 
  {
    halfcone(r, r-2, h); 
    rotate([0, 60, 45]) 
      translate([-h/2, 0, -h/4]) 
        cube(h, center = true);  
  }
}

module halfcone(r1=12, r2=11, h=40)
{
  rotate([90, 0, -45]) 
  difference()
  {
    cylinder(h=h-1, r1=r1, r2=.3*r1, center = true);   
    cylinder(h=h, r1=r2, r2=.3*r2, center = true);   
    translate([0, h/2, 0]) cube([h,h,h], center = true); 
  }
}




--
Sent from: http://forum.openscad.org/



More information about the Discuss mailing list