fix: improve CadConverter sidebar layout and bend line visibility

Replace sidebar Panel+Splitter with SplitContainer for resizable file
list / filter panel. Sort file list alphabetically on insert. Widen bend
line dash spacing and draw ETCH layer entities on top of bend lines so
etch marks are visible.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
aj
2026-03-24 23:51:21 -04:00
co-authored by Claude Opus 4.6
parent 1ffe904892
commit f208569e72
3 changed files with 193 additions and 131 deletions
+13 -2
View File
@@ -48,12 +48,20 @@ namespace OpenNest.Controls
foreach (var entity in Entities)
{
if (IsEtchLayer(entity.Layer)) continue;
var pen = GetEntityPen(entity.Color);
DrawEntity(e.Graphics, entity, pen);
}
DrawBendLines(e.Graphics);
foreach (var entity in Entities)
{
if (!IsEtchLayer(entity.Layer)) continue;
var pen = GetEntityPen(entity.Color);
DrawEntity(e.Graphics, entity, pen);
}
#if DRAW_OFFSET
var offsetShape = new Shape();
@@ -138,6 +146,9 @@ namespace OpenNest.Controls
penCache.Clear();
}
private static bool IsEtchLayer(Layer layer) =>
string.Equals(layer?.Name, "ETCH", System.StringComparison.OrdinalIgnoreCase);
private void DrawBendLines(Graphics g)
{
if (Bends == null || Bends.Count == 0)
@@ -145,11 +156,11 @@ namespace OpenNest.Controls
using var bendPen = new Pen(Color.Yellow, 1.5f)
{
DashStyle = DashStyle.Dash
DashPattern = new float[] { 8, 6 }
};
using var selectedPen = new Pen(Color.Cyan, 2.5f)
{
DashStyle = DashStyle.Dash
DashPattern = new float[] { 8, 6 }
};
for (var i = 0; i < Bends.Count; i++)