SketchUp visually 'smooths' surfaces extruded from an Arc, so a modest segmentation number - like the default of 24 for a Circle - will usually look fine for most objects, and this level does not adversely affect modeling or rendering performance.
However, when 3d-printing the faceted appearance of a 'real' surface with only this level of segmentation might be unacceptable.
The more segments there are in the Arc, the smaller the 'Versine' distance and the smoother the surface appears, both visually to the touch.
So a 'Versine of ~1/1000" [0.001] is generally acceptable.
This also happens to be SketchUp's built-in tolerance for any line's start/end points to be deemed coincident, so smaller values are not a good idea.
Anything smaller 'Versine' is unlikely to be detectable in most forms.
This dimension can in turn be used to calculate the number of segments needed in a given Arc to achieve this level.
The smaller the Arc's radius, the lower the segment count needs to be for a given 'Versine'.
The code below can be copy+pasted into the Ruby Console + <enter>.
In the dialog it asks for the Rad[ius], Tol.[aka 'Versine'] and [Swept-]Ang[le]°.
It does some trig...
It prints out those entered values, and the minimum Number of Segments need to achieve the given 'Versine', it also shows the '%4' value - i.e. the minimum Number of segments rounded up to be divisible by 4 - e.g. 70 >> 72 - this is because often it's easier to move/rotate and generally work with circles etc that have a segmentation which is divisible by 4 - it also reports the length of a segment, and if it is >=1/1000" - as any smaller sizes would fail to make facets etc when extruded.
Obviously a Circle sweeps 360°, but it works of Arcs proportionately to the Swept Angle entered otherwise.
The smallest Arcs you are likely to want to 3d-print are not going to get as small as tiny fractions of an inch [Num~=8], or more than say 12" radius [Num~=244].
But using this tool allows you to make educated assumptions about Arc/Circle segmentation based on their radii.
Remember that you must set any Circle or Arc's segmentation when it is still a 2d object.
Once it is extruded into a surface making a 3d form you cannot change it [unless you use a 3rd-party 'SubD' tool - but then you'll have less control over the underlying geometry etc]
I have made two versions of the one-liner code.
This first one uses inches:
- Code: Select all
r=1.0;v=0.001;a=360.0;res=inputbox(["Rad.","Tol,","Ang.° "],[r,v,a],"Versine");if res;r,v,a=res;n=(0.5*a.degrees/Math.acos(r/(r+v))).round;m=n;m+=1 until m%4==0;b=0.5*a/m;s=2.0*r*Math.sin(b.degrees);puts"Rad.=#{r}, Tol.=#{v}, Ang.=#{a}°, Num.Segs=#{n}, %4=#{m}, Seg.Len.=#{s}>=0.001\"=#{s>=0.001}";end;
This second one uses mm:
- Code: Select all
r=25.0;v=0.0254;a=360.0;res=inputbox(["Rad.","Tol,","Ang.° "],[r,v,a],"Versine[mm]");if res;r,v,a=res;n=(0.5*a.degrees/Math.acos(r.mm/(r.mm+v.mm))).round;m=n;m+=1 until m%4==0;b=0.5*a/m;s=2.0*r*Math.sin(b.degrees);puts"Rad.=#{r}mm, Tol.=#{v}mm, Ang.=#{a}°, Num.Segs=#{n}, %4=#{m}, Seg.Len.=#{s}mm>=0.001\"=#{s.mm>=0.001}";end;
If there is sufficient interest it's easy enough to make it into a standalone plugin...