Conditional Fillet
Standard fillet components apply a single radius to an entire curve, which fails if any segment is too short. This "smart" solver evaluates and fillets a curve corner by corner.
Overview
Standard fillet components apply a single radius to an entire curve, which fails if any segment is too short. This "smart" solver evaluates and fillets a curve corner by corner.
Inputs (5)
- curves (Curve): Input geometry (Polylines, Curves, Arcs)
- radius (Number): The ideal fillet size you want.
- threshold_pct (Number): Max % of a segment the fillet can consume.
- skip (Boolean): True to skip tight corners; False to clamp.
- round_dec (Integer): [Optional] Decimals to round down to.
Outputs (2)
- out_curves (Curve): The final filleted geometry. (Preserves empty branches)
- radii (Number): The exact radius applied to each specific corner.
Method, assumptions and simplifications
The same notes appear in the component's Info output.
Method
- Each curve is split into its segments; at each corner the turning angle θ between the incoming and outgoing tangents is measured. Corners with θ < 0.05 rad (about 3°) and the two ends of open curves get radius 0.
- The allowed tangent length is L = threshold_pct × the shorter adjacent segment length (threshold_pct is a fraction, capped at 0.49). The radius limit is min(L, L / tan(θ/2)).
- If radius exceeds the limit, the corner is skipped (skip True, radius 0) or the radius is clamped to the limit (skip False). With round_dec the radius is rounded down to that many decimals.
- Fillet arcs are made with Rhino CreateFilletCurves (tolerance 0.001), the segments are trimmed at the arc ends and everything is joined (join tolerance 0.01). If a fillet cannot be created at a corner, the corner stays sharp and its radius is reported as 0 with a warning; if the parts cannot be joined into one continuous curve, the input curve is returned unchanged with a warning and all its radii are 0.
- radii lists the radius chosen for every corner, one branch per input curve.
Assumptions
- threshold_pct is a fraction of the segment (0.25 = 25 %), not a percentage.
- Curves are made of segments (polylines, polycurves); a single smooth curve has no corners and is returned unchanged.
Simplifications and limits
- The radius is also capped at L itself, which is more conservative than the geometric limit for corners turning less than 90°.
- Fixed absolute tolerances (0.001 and 0.01) are used regardless of model units.