[OpenSCAD] Stumped on a shape

whosawhatsis whosawhatsis at gmail.com
Fri Jun 29 00:06:33 CEST 2012


The "correct" way to do it is with minkowski. The following should work, but minkowski takes a long time to render with all but the simplest of shapes, and I didn't have the patience (or the pain threshold with a hot MBP on my lap) to properly test it.


big = 10;


big_l = 20;


small = 5;


small_l = 10;


r = 2;












difference() {


cube([big + r * 2 + 1, big_l, big + small_l * 2], center = true);


minkowski() {


difference() {


cube([big + r * 2 + 1, big_l, big + small_l * 2], center = true);


rotate([90, 0, 0]) cylinder(r = big/2 + r, h = big_l + 1, center = true);


cylinder(r = small/2 + r, h = small_l + big/2 + 1);


}


sphere(r);


}


}




On Thursday, June 28, 2012 at 1:46 PM, Peter Falke wrote:

> Hi all
>  
> Ok, here is the code for a beveled joint of two different size pipes. All is parametric.
>  
> This is a brute force approach, so the render times will be quiet long.
>  
> There are 3 parameter that set the resolution:
>  
> fn :number of faces of the pipes
> fnbit: number of faces of the 'bit'. The 'bit' is the 'tool' that cuts away pieces of the joint.
> fnbevel: number of times that the 'bit' cuts into the joint, as it rotates around the second pipe
>  
> I used these parameter
> fn=30;  
>  
> fnbit=10;
>  
>  
> fnbevel=40;
>  
> to make this picture:
>  
> The joint looks OK, but quiet choppy.
>  
> I tried a higher resolution (100/30/120) but OpenSCAD is stuck at 10% for a while, now
> (On a Acer Aspire One 522, 2*1Ghz AMD C-50 , 2GB, running on one leg, only)
>  
> Enjoy,
>  
> TakeItAndRun
>  
>  
> P.S.: I'm using OpenSCAD 2012.04.01 (git c869c6e).
>  
>  
> 2012/6/28 H P Ladds <householdwords at gmail.com (mailto:householdwords at gmail.com)>
> > Wow, that certainly seems to do the trick. Ouch! was the code lost when you "crushed OpenSCAD?"  
> >  
> >  
> >  
> >  
> > _______________________________________________
> > OpenSCAD mailing list
> > OpenSCAD at rocklinux.org (mailto:OpenSCAD at rocklinux.org)
> > http://rocklinux.net/mailman/listinfo/openscad
> >  
>  
>  
>  
> --  
> stempeldergeschichte at googlemail.com (mailto:karsten at rohrbach.de)
>  
> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
> Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
> Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.
>  
> P.S. In case my e-mail is shorter than you enjoy:
> I am currently trying short replies instead of no replies at all.
> Please let me know, if you like to read more.
>  
> Enjoy!
>  
> _______________________________________________
> OpenSCAD mailing list
> OpenSCAD at rocklinux.org (mailto:OpenSCAD at rocklinux.org)
> http://rocklinux.net/mailman/listinfo/openscad
>  
>  
>  
>  
> Attachments:  
> - Beveled Pipe Joint.scad
>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rocklinux.net/pipermail/openscad/attachments/20120629/be00ef47/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Beveled Pipe Joint Cutview 45degree i.png
Type: image/png
Size: 13867 bytes
Desc: not available
Url : http://rocklinux.net/pipermail/openscad/attachments/20120629/be00ef47/BeveledPipeJointCutview45degreei-0001.png


More information about the OpenSCAD mailing list