mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-23 12:27:41 -05:00
perf: optimize fill hot path — bbox pre-check and geometry inner loop
- Add bounding box rejection in HasOverlaps to skip expensive Part.Intersects (CNC→geometry conversion) for non-adjacent parts. Eliminates ~35% CPU in IsBetterValidFill for grid layouts. - Optimize RayEdgeDistance: access Line fields directly instead of property getters (avoids Vector struct copies), inline IsEqualTo with direct range comparison (avoids Math.Abs), and precompute deltas for reuse in interpolation. - Cache line endpoints in DirectionalDistance outer loop to avoid repeated struct copies in the inner loop. - Add fill timer to ActionClone.Fill, displayed in PlateView status bar as "Fill: N parts in M ms". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
35d7248da0
commit
91908c1732
5 files changed
+50
-23
No files matched your search
@@ -6,8 +6,8 @@ namespace OpenNest.Geometry
|
||||
{
|
||||
public class Line : Entity
|
||||
{
|
||||
private Vector pt1;
|
||||
private Vector pt2;
|
||||
internal Vector pt1;
|
||||
internal Vector pt2;
|
||||
|
||||
public Line()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user