mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-18 08:17:40 -05:00
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>
14 lines
507 B
C#
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);
|
|
}
|
|
}
|