feat: add entity-based suppression with stable GUIDs
Entities now have a Guid Id for stable identity across edit sessions. Drawing stores the full source entity set (SourceEntities) and a set of suppressed entity IDs (SuppressedEntityIds), replacing the previous SuppressedProgram approach. Unchecked entities in the converter are suppressed rather than permanently removed, so they can be re-enabled when editing drawings again. Entities are serialized as JSON in the nest file (entities/entities-N) alongside the existing G-code programs. Backward compatible with older nest files that lack entity data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using OpenNest.Math;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
|
||||
@@ -10,10 +11,16 @@ namespace OpenNest.Geometry
|
||||
|
||||
protected Entity()
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
Layer = OpenNest.Geometry.Layer.Default;
|
||||
boundingBox = new Box();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unique identifier for this entity, stable across edit sessions.
|
||||
/// </summary>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity color (resolved from DXF ByLayer/ByBlock to actual color).
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user