Files
OpenNest/OpenNest.Core/Bending/BendMath.cs
T
ajandClaude Opus 5.5 587613ff89 feat(shapes): add angle, channel and rolled plate to the Shape Library
Each makes the flat blank of a part bent or rolled along its length,
sized with the bend allowance at the K-factor. Angle and channel bends
are saved on the drawing as 90 degree up bends and etched as an
imported DXF's up bends are. The preview draws each part's section
beside the blank, dimensioned with the formed sizes; a long part's
section is enlarged so it stays readable. K-factor is a plain number,
not a length, in the form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 17:28:58 -05:00

14 lines
507 B
C#

namespace OpenNest.Bending
{
public static class BendMath
{
/// <summary>
/// The length of the neutral axis through a bend: the arc at the inside radius plus
/// <paramref name="kFactor"/> of the thickness.
/// </summary>
/// <param name="angle">The bend angle in radians.</param>
public static double Allowance(double angle, double insideRadius, double thickness, double kFactor) =>
angle * (insideRadius + kFactor * thickness);
}
}