From e5daf748c6512208aef666cc661c704b483d2e94 Mon Sep 17 00:00:00 2001 From: AJ Date: Thu, 8 May 2025 08:24:31 -0400 Subject: [PATCH] Extract IsBendLine helper to clean up BendLineExtractor --- EtchBendLines/BendLineExtractor.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/EtchBendLines/BendLineExtractor.cs b/EtchBendLines/BendLineExtractor.cs index 797f648..fc62ee3 100644 --- a/EtchBendLines/BendLineExtractor.cs +++ b/EtchBendLines/BendLineExtractor.cs @@ -49,7 +49,7 @@ namespace EtchBendLines foreach (var line in DxfDocument.Lines) { - if (line.Linetype.Name != "CENTERX2" && line.Layer.Name != "BEND") + if (!IsBendLine(line)) continue; var bend = new Bend @@ -66,6 +66,11 @@ namespace EtchBendLines return bends.Where(b => b.Radius <= MaxBendRadius).ToList(); } + private bool IsBendLine(Line line) + { + return line.Linetype.Name == "CENTERX2" && line.Layer.Name == "BEND"; + } + private List GetBendNotes() { return DxfDocument.MTexts