mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-27 06:01:06 -04:00
feat(engine): fixed-lead violations warn instead of refusing
D1a (user, 2026-10-14): one locked cutout must not refuse the whole layout. With confirmed parameters a locked program is now a fixed emission, accepted as given. The replay checker and the lead validator take a per-motion owner: a violation inside the fixed emission (a lead meeting another part's or its own material, a rapid inside the locked program crossing a cut contour, an uncertifiable tab gap or a partial/reversed/retraced cut) is recorded apart instead of failing the candidate. The search never rejects or learns an order rule from them, so fixed emissions never steer it; the planner's rapid into the locked program and every regenerated lead keep every strict check. Replay turns those violations into typed FixedLead findings that name the part, contour and the part hit. A plate whose only findings are these is BestEffort with IndependentlyReplayed set: never Ready, applicable only with the per-proposal acceptance, and CuttingPlanService.Apply still rejects it. Overlap, unreadable programs, stale input and cancellation still block, and unlocked programs a caller left ineligible and the no-parameter route keep refusing as before. Pre-post review now re-checks locked leads against every part's clean material, so the same violations reappear before posting. Existing tests that encoded the old locked refusal now assert the warning; two batch tests that used a locked crossing as their hard block use an overlap instead. The 5.1 digests are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
36ba3c2d6b
commit
d56f67a99a
19 files changed
+690
-120
No files matched your search
+44
-11
@@ -328,7 +328,8 @@ produce a separate `BestEffort` proposal as described below; it never labels it
|
||||
sets `IndependentlyReplayed`.
|
||||
|
||||
- `ConstraintConflict`: fixed programs or explored fixed routing violate the
|
||||
modeled constraints. Locked internal crossings cannot be repaired by regeneration.
|
||||
modeled constraints. Locked internal crossings cannot be repaired by regeneration;
|
||||
with confirmed parameters they warn instead (see [fixed emissions](#fixed-emissions-warn)).
|
||||
- `UnsupportedGeometry`: unsupported motion/material semantics or an incomplete
|
||||
check. Open nominal outlines, ambiguous release states or containment, cutoffs
|
||||
in a detached part list and scribe-only source drawings are not silently accepted.
|
||||
@@ -341,13 +342,41 @@ sets `IndependentlyReplayed`.
|
||||
Malformed original executed graphs are refused, not salvaged. Valid but incomplete
|
||||
old programs can regenerate from clean geometry. Regenerated programs retain genuine
|
||||
configured tab gaps; stale tab settings do not establish retention. In confirmed-
|
||||
parameters mode, locked/ineligible programs must cover the complete directed clean
|
||||
boundary: an open fixed program has no certified selected tab metadata and is refused,
|
||||
not repaired, even if it may have been intentionally tabbed. The no-parameter route
|
||||
retains its narrower compatibility contract. A lead-out that may bridge a tab, or
|
||||
a malformed emitted arc, is refused, not automatically repaired. Tabbed lead-outs
|
||||
leave from the trimmed cut end, but a lead-out after an open contour still needs
|
||||
manual review of its retention gap, so confirmed-parameters planning refuses it.
|
||||
parameters mode, an unlocked program a caller left ineligible must cover the complete
|
||||
directed clean boundary: an open one has no certified selected tab metadata and is
|
||||
refused, not repaired. A locked program that does not (a tab gap, a partial, reversed
|
||||
or retraced cut) is kept as given with a fixed-lead warning instead; see below. The
|
||||
no-parameter route retains its narrower compatibility contract and still refuses
|
||||
fixed-program violations. A planned lead-out that may bridge a tab, or a malformed
|
||||
emitted arc, is refused, not automatically repaired. Tabbed lead-outs leave from the
|
||||
trimmed cut end, but a lead-out after an open contour still needs manual review of
|
||||
its retention gap, so confirmed-parameters planning refuses it in a planned contour.
|
||||
|
||||
### Fixed emissions warn
|
||||
|
||||
With confirmed parameters, a locked program (Place Lead-in locks, PEP-imported locked
|
||||
parts) is a fixed emission: everything it does after the planner's rapid into it is
|
||||
accepted as given (user decision D1a, 2026-10-14). Its violations are not refusals:
|
||||
|
||||
- Its lead-ins and lead-outs meeting another part's material or its own, a rapid inside
|
||||
it crossing a completed contour, a lead-out after its own open contour, and coverage
|
||||
that cannot be certified (a tab gap, a partial, reversed or retraced cut) each become a
|
||||
`PostVerificationKind.FixedLead` finding naming the part, the cutting contour where
|
||||
known and the other part hit (`CuttingPlanFinding.FixedLead`).
|
||||
- Fixed emissions never constrain the search: they neither reject a candidate nor teach
|
||||
an order rule. Independent replay reports them. Every planner-chosen motion keeps
|
||||
every strict check, including the rapid into the locked program and every
|
||||
regenerated lead.
|
||||
- A plate whose only findings are these warnings yields `BestEffort` with
|
||||
`IndependentlyReplayed` set (`CuttingPlanPlateResult.HasOnlyFixedLeadWarnings`): never
|
||||
`Ready`, so `IsReady`/`CanApply` stay false and `CanApplyWithWarnings` with the
|
||||
per-proposal acceptance checkbox is the only way to Apply. `CuttingPlanService.Apply`
|
||||
still rejects it. The locked program is never replaced.
|
||||
- Known part-to-part material overlap, unreadable or unsupported programs, stale input
|
||||
and cancellation still block. Unlocked programs a caller left ineligible keep the
|
||||
strict rule above.
|
||||
- The [pre-post review](post-verification.md) checks locked leads again before posting;
|
||||
accepting the plan is not posting consent.
|
||||
|
||||
## Apply
|
||||
|
||||
@@ -419,8 +448,9 @@ panel is wired in the editor. Non-editor callers still use the shared analyzer.
|
||||
- The panel starts from the plate's cutting settings (or the last-used settings) and plans
|
||||
at once. `Cutting Settings...` edits them and `Keep the current part order` fixes the
|
||||
whole-part order; either change replans. The settings are confirmed parameters: every
|
||||
unlocked part's lead-ins are regenerated. Locked parts keep their exact programs;
|
||||
the strict route checks them, while any best-effort warnings require explicit review below.
|
||||
unlocked part's lead-ins are regenerated. Locked parts keep their exact programs; their
|
||||
own violations are fixed-lead warnings on an UNVERIFIED plate (see
|
||||
[fixed emissions](#fixed-emissions-warn)), and any warnings require explicit review below.
|
||||
- When a plate in scope already carries applied lead-ins or cut-offs, a red banner
|
||||
above the settings says how many (and how many lead-ins are locked), and that the
|
||||
plan keeps locked lead-ins and existing cut-offs unchanged. `Clear Lead-ins &
|
||||
@@ -557,7 +587,10 @@ dotnet test OpenNest.Tests/OpenNest.Tests.csproj -c Release --filter 'FullyQuali
|
||||
```
|
||||
|
||||
Synthetic fixtures exercise whole-part routing and internal-hole crossing repair,
|
||||
locked/ineligible refusal, actual native lead paths, shared subprograms, ownership,
|
||||
ineligible refusal and locked fixed-lead warnings, actual native lead paths, shared subprograms, ownership,
|
||||
entry/whole-part backtracking, deterministic budgets, cancellation and fresh replay
|
||||
rejection. Retained emission characterizations cover styles, winding, corner rules,
|
||||
circle rounding/clamping and tabs; unsupported cases remain explicit refusals.
|
||||
`PlanningCharacterizationTests` freeze the batch output (proposals, expansions, emitted
|
||||
motions) for the six synthetic nests and focused fixtures; a change that is meant to
|
||||
leave plates without fixed-lead warnings untouched must keep those digests.
|
||||
@@ -54,7 +54,7 @@ shared `PostVerificationAnalyzer` without an editor UI dependency.
|
||||
|
||||
The desktop's **Nest > Post > (post processor)** workflow checks every plate after
|
||||
post settings are accepted and before asking where to save CNC output. The review
|
||||
shows all three check categories, even when there are no findings:
|
||||
shows the first three check categories, even when there are no findings:
|
||||
|
||||
- **Overlapping parts and clamps:** shared material between placed parts, including containment,
|
||||
and physical material overlapping an active clamp. Holes are subtracted; placing a part inside
|
||||
@@ -80,6 +80,12 @@ shows all three check categories, even when there are no findings:
|
||||
A clamp whose footprint covers the program start point warns on every posting
|
||||
attempt by design; there is no exemption for the first rapid and no persisted
|
||||
bypass (settled decision D10).
|
||||
- **Fixed leads:** on a plate with a locked part, every lead-in and lead-out of each
|
||||
locked program is checked against the clean material of every part on the plate,
|
||||
its own included. Plan Cutting accepts these fixed emissions as given and only warns
|
||||
(see [cutting planner](cutting-planner.md#fixed-emissions-warn)), so posting reports
|
||||
them again. A part whose clean material cannot be captured makes the check incomplete
|
||||
for leads near it. This line appears in the summary only when there is such a finding.
|
||||
|
||||
Findings identify the plate and part's position in the cutting sequence. Read the
|
||||
scrollable report, cancel to fix the nest, then post again to rerun verification.
|
||||
|
||||
Reference in new issue
Block a user