# Filleting again... Classic List Threaded 7 messages Open this post in threaded view
|

## Filleting again...

 This post was updated on . Bonjour ! Filleting 3D parts is still an enigma for me. I'd like to obtain this (uses minkowsky) The minkowsky transformation takes ages to render and screws up dimensions. How can I obtain the filleted part above without using minkowsky ? Here is the code : //offset_3d() {     difference() {         cube([50, 50, 35], center = true);         union() {             translate([31,0,0])                 cube([75, 65, 29.8], center = true);             translate([-35, 0, 0])                 cylinder(h= 60, r1= 25, r2=25, center = true, \$fn=20);             translate([-14,-26,0])                 cylinder (h=30, d=12, center= true, \$fn=100);             translate([-14,26,0])                 cylinder (h=30, d=12, center= true, \$fn=50);        }     } //} module offset_3d(r=1.5) {   for(k=[0:\$children-1]) minkowski() {         children(k);         sphere(r=r,\$fn=8);   } } //* * * * * * * * * * * * * * Thanks in advance for any input. Dan
Open this post in threaded view
|

## Re: Fileting again...

Open this post in threaded view
|

## Re: Filleting again...

 In reply to this post by stressless If I understood correctly, what it is, you want this should do the trick: module offset_3d(r=1.5, size=60) {     difference()     {         children();         difference()         {             children();             minkowski()             {                 difference()                 {                     cube(size,center=true);                     children();                 }                 sphere(r,\$fn=8);             }         }     } }
Open this post in threaded view
|

## Re: Filleting again...

 It works but the following is simpler and faster: module negative_offset_3d(r=1, size=1000){     difference()     {         cube(size-1,center=true);         minkowski()         {             difference()             {                 cube(size,center=true);                 children();             }             sphere(r,\$fn=8);         }     } } If you don't know the diameter of the model (size), you will need a second minkowski, though.
Open this post in threaded view
|

## Re: Filleting again...

 Ronaldo and Noil,Thanks for your input but I cannot make it work. I get no filleting on my part at all using your solutions.As an example, could you please integrate these modules into my original code so that I can understand ? (blushing Newbie)Here it is again :\$fn=20;offset_3d() {    difference() {        cube([50, 50, 35], center = true);        union() {            translate([31,0,0])                cube([75, 65, 31.8], center = true);            translate([-35, 0, 0])                 cylinder(h= 60, r1= 25, r2=25, center = true);            translate([-14,-26,0])                cylinder (h=30, d=12, center= true, \$fn=20);            translate([-14,26,0])                cylinder (h=30, d=12, center= true, \$fn=20);       }    }}module offset_3d(r=1.0) {  for(k=[0:\$children-1]) minkowski() {    children(k);    sphere(r=r,\$fn=8);  }}Thanks a bunch.DanOn Tue, Feb 28, 2017 at 4:20 PM, Ronaldo [via OpenSCAD] wrote: It works but the following is simpler and faster: module negative_offset_3d(r=1, size=1000){     difference()     {         cube(size-1,center=true);         minkowski()         {             difference()             {                 cube(size,center=true);                 children();             }             sphere(r,\$fn=8);         }     } } If you don't know the diameter of the model (size), you will need a second minkowski, though. If you reply to this email, your message will be added to the discussion below: http://forum.openscad.org/Filleting-again-tp20610p20650.html To unsubscribe from Filleting again..., click here. NAML -- * * * * * * * * * * * * * * * * * * * *- Composants électroniques pour votre Hobby =>
 In the following code, it is used a general offset_3d module that accepts both positive and negative offsets.To apply the filleting we proceed like in the 2D case: first offset the model by -r then offset it by r so that the object general dimensions are preserved. Note that I have chosen r=0.7 instead of r=1 in your example; the thickness of the two horizontal flaps is (35-31.8)/2 = 1.6 so the maximum offset radius should be 0.8 otherwise some parts of your object will vanish with the negative offset. Try it to see.render()//offset_3d(-0.7) //offset_3d(0.7)offset_3d(0.7) offset_3d(-0.7) stressless_model()module stressless_model()    difference() {        cube([50, 50, 35], center = true);        union() {            translate([31,0,0])                cube([75, 65, 31.8], center = true);            translate([-35, 0, 0])                cylinder(h= 60, r1= 25, r2=25, center = true);            translate([-14,-26,0])                cylinder (h=30, d=12, center= true, \$fn=20);            translate([-14,26,0])                cylinder (h=30, d=12, center= true, \$fn=20);       }    }module offset_3d(r=1, size=1e12) {    n = \$fn==undef ? 12: \$fn;    if(r==0) children();    else         if( r>0 )            minkowski(){                children();                sphere(r, \$fn=n);            }    else {        size2 = size*[1,1,1];        size1 = size2*0.99;        difference(){            cube(size2, center=true);            minkowski(){                difference(){                    cube(size1, center=true);                    children();                }                sphere(-r, \$fn=n);;            }        }    }} ​This filleting is applied only on "convex edges" (the edges whose outer dihedral angle is greater than 180 degrees). To fillet the other edges the offset operation order should be inverted. To fillet all edges 4 offset_3d() operations should be applied in sequence (uncomment the two commented lines to see it - be very patient).Each offset_3d() operation involves a minkowski and increases the number of vertices of the model. So, the next offset_3d() will take even longer time. My rather old notebook spent more than 7 min to render the code above. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org