resolution cylinder

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

resolution cylinder

trumpetto
On Sat, Jan 16, 2010 at 11:07 PM, trumpetto <[hidden email]> wrote:
> When I use something like:
> ?? ?cylinder(h = 10, r=25);
> I always get 32 facets. No matter what radius I use.
> It seems to stop after r=10 ...
> What do I do wrong?
> Or is this by design?
> I sometimes only need part of the curve and then the resolutions is a bit
> low at 32 facets for the whole shape.

the sections about Special variables should answer this question:
http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_Language_Features


I think I understand the section about special variables but I can't get any resolution above this:

cylinder(h = 10, r = 20, center = true);


No $fs helps to get me more than 30 faces around my cylinder. 

The same goes for the sphere...


Thanks, Trumpetto



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: resolution cylinder

Philipp Tiefenbacher
>> the sections about Special variables should answer this question:
>> http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_Language_Features
>>
>
> I think I understand the section about special variables but I can't get any
> resolution above this:

you can either set the number of faces directly by doing this:

$fn=100;
cylinder(h = 10, r = 20, center = true);

or more elegant:
cylinder(h = 10, r = 20, center = true, $fn=100);

or you can use the combination of $fs and $fa ($fs is in mm and $fa in degrees):

$fs=0.5;
$fa=5;
cylinder(h = 10, r = 20, center = true);

greetings
Philipp

--
:: Philipp Tiefenbacher
:: custom electronics/magic
:: http://www.wizards23.net

Any sufficiently advanced technology is indistinguishable from magic
--Arthur C. Clarke

Loading...