mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-21 23:47:40 -05:00
Merge branch 'claude/shared-post-contours'
Master added head-raise markers, common-line shared cuts and remainders to the CI Fiber's own contour extractor, which this branch replaced with Core's shared PostContours. Those now live in the shared model: PostContour carries Raised, IsCommonLine and RemainderWinding, and Classify gives remainders the perimeter macro on their perimeter's side and shared cuts no kerf side. ContourWinding uses PortableMath for trig, as master's Core guard requires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
5a627e5cc3
19 files changed
+1063
-508
No files matched your search
@@ -42,6 +42,7 @@ public sealed class CincinnatiPartSubprogramWriter
|
||||
/// <summary>
|
||||
/// Writes a complete part sub-program for the given normalized program.
|
||||
/// The program must be in absolute mode with coordinates normalized to origin (0,0).
|
||||
/// With <paramref name="holes"/> every contour is a hole, as in a hole sub-program.
|
||||
/// </summary>
|
||||
public void Write(
|
||||
TextWriter w,
|
||||
@@ -50,7 +51,8 @@ public sealed class CincinnatiPartSubprogramWriter
|
||||
int subNumber,
|
||||
string cutLibrary,
|
||||
string etchLibrary,
|
||||
double sheetDiagonal
|
||||
double sheetDiagonal,
|
||||
bool holes = false
|
||||
)
|
||||
{
|
||||
var allFeatures = FeatureUtils.SplitByRapids(normalizedProgram.Codes);
|
||||
@@ -60,6 +62,7 @@ public sealed class CincinnatiPartSubprogramWriter
|
||||
// Classify and order: etch features first, then cut features
|
||||
var ordered = FeatureUtils.ClassifyAndOrder(allFeatures);
|
||||
var exterior = FeatureUtils.FindExterior(ordered);
|
||||
var kerf = FeatureUtils.KerfSides(ordered, holes);
|
||||
|
||||
w.WriteLine("(*****************************************************)");
|
||||
w.WriteLine($":{subNumber}");
|
||||
@@ -90,6 +93,7 @@ public sealed class CincinnatiPartSubprogramWriter
|
||||
IsFirstFeatureOfPart = false,
|
||||
IsLastFeatureOnSheet = isLastFeature,
|
||||
IsExteriorFeature = exterior[i],
|
||||
Kerf = kerf[i],
|
||||
IsEtch = isEtch,
|
||||
LibraryFile = isEtch ? etchLibrary : cutLibrary,
|
||||
CutDistance = cutDistance,
|
||||
|
||||
Reference in new issue
Block a user