mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-27 17:21:34 -05:00
refactor: CutOff uses Dictionary<Part, Entity> instead of index-based list
Replace CutOff.BuildPerimeterCache (List<Shape>) with Plate.BuildPerimeterCache (Dictionary<Part, Entity>) throughout. Consolidate two Regenerate overloads into a single method with optional cache parameter. Fix Shape intersection bug where non-intersecting entities added spurious Vector.Zero points to results. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
a735884ee9
commit
4287c5fa46
4 files changed
+133
-80
No files matched your search
@@ -249,9 +249,8 @@ namespace OpenNest.Geometry
|
||||
|
||||
foreach (var geo in shape.Entities)
|
||||
{
|
||||
List<Vector> pts3;
|
||||
geo.Intersects(line, out pts3);
|
||||
pts.AddRange(pts3);
|
||||
if (geo.Intersects(line, out var pts3))
|
||||
pts.AddRange(pts3);
|
||||
}
|
||||
|
||||
return pts.Count > 0;
|
||||
|
||||
Reference in new issue
Block a user