nofrd

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 1.0, Creation date: 2010-11-13, Last change: 2025-09-14

returns the minimum number of edges to guarante a slot distance between a peg and a hole

Description

For rapid prototyping it makes no sense to print a cylinder as sweeped polygon with hundreds of edges. For a peg in hole problem there must be a slot distance between peg and hole. The reduced radius of the hole by the direct line between to edges of the polygon is Rh(1-cos(pi/n). The radius of the peg is never increased only decreased. To guarantee a slot distance the correct formula is n>m/acos(1-slot/Rh). To make sure that only half of the slot is used, we recommend to use it with slot distance/2. Always the larger Radius, i.e. the hole radius has to be used in this formula.
Currently the minimum slot size should be known as 0.3 for an RP machine. The minimum resolution is 0.1, Therefor with d=0.05 the number of polygons is perfect for the machine. The minimum particle size is 0.5, so for a resolution of one particle for the diameter, the radius requires a resolution of 0.025

See Also: dofn , sofrd , phiofsr , circ2poly

Example Illustration

 missing image of nofrd(r,d,w)

Syntax

n=nofrd(r,[d,w])

Input Parameter

r: radius of a circle, cylinder etc.
d: slot size or maximum roughness; default is 0.025
w: optional angle; default is 2*pi

Output Parameter

n: minimum number of edges for a given radius; returns d for r<0

Examples

Generating a Cylinder with a maximum error of 0.01 between thereal radius and the smallest radius between the polygons
[NVL,NFL]=VLFLcylinder (Z, R, nofrd(R, 0.01 ), 1);




Copyright 2010-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Last html export of this page out of FM database by TL: 2025-09-21