From 214cc948162254cadd3c445ea15c3e95422bdbe1 Mon Sep 17 00:00:00 2001 From: AJ Date: Thu, 8 May 2025 07:31:19 -0400 Subject: [PATCH] Culture-safe parsing --- EtchBendLines/BendLineExtractor.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/EtchBendLines/BendLineExtractor.cs b/EtchBendLines/BendLineExtractor.cs index 7872ea3..216d2ed 100644 --- a/EtchBendLines/BendLineExtractor.cs +++ b/EtchBendLines/BendLineExtractor.cs @@ -1,6 +1,7 @@ using netDxf; using netDxf.Entities; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Text.RegularExpressions; @@ -124,8 +125,10 @@ namespace EtchBendLines if (match.Success) { - bendline.Radius = double.Parse(match.Groups["radius"].Value); - bendline.Angle = double.Parse(match.Groups["angle"].Value); + var radius = match.Groups["radius"].Value; + var angle = match.Groups["angle"].Value; + bendline.Radius = double.Parse(radius, CultureInfo.InvariantCulture); + bendline.Angle = double.Parse(angle, CultureInfo.InvariantCulture); } } }