Extract IsBendLine helper to clean up BendLineExtractor
This commit is contained in:
@@ -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<MText> GetBendNotes()
|
||||
{
|
||||
return DxfDocument.MTexts
|
||||
|
||||
Reference in New Issue
Block a user