From bcb7e9900631d0fd785b8ccfa0dca5f48d5ee0d5 Mon Sep 17 00:00:00 2001 From: KatKatKateryna Date: Mon, 1 Jul 2024 17:26:26 +0100 Subject: [PATCH] precision points --- .../ToHost/TopLevel/PolycurveToHostConverter.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/DUI3-DX/Converters/ArcGIS/Speckle.Converters.ArcGIS3/ToHost/TopLevel/PolycurveToHostConverter.cs b/DUI3-DX/Converters/ArcGIS/Speckle.Converters.ArcGIS3/ToHost/TopLevel/PolycurveToHostConverter.cs index f6912aee8f..ba57e347f6 100644 --- a/DUI3-DX/Converters/ArcGIS/Speckle.Converters.ArcGIS3/ToHost/TopLevel/PolycurveToHostConverter.cs +++ b/DUI3-DX/Converters/ArcGIS/Speckle.Converters.ArcGIS3/ToHost/TopLevel/PolycurveToHostConverter.cs @@ -34,7 +34,15 @@ public ACG.Polyline Convert(SOG.Polycurve target) ACG.Polyline converted = (ACG.Polyline)_converter.Convert((Base)segment); //CurveConverter.NotNull().Convert(segment); List segmentPts = converted.Points.ToList(); - if (lastConvertedPt != null && segmentPts.Count > 0 && lastConvertedPt != segmentPts[0]) + if ( + lastConvertedPt != null + && segmentPts.Count > 0 + && ( + Math.Round(lastConvertedPt.X, 6) != Math.Round(segmentPts[0].X, 6) + || Math.Round(lastConvertedPt.Y, 6) != Math.Round(segmentPts[0].Y, 6) + || Math.Round(lastConvertedPt.Z, 6) != Math.Round(segmentPts[0].Z, 6) + ) + ) { throw new SpeckleConversionException("Polycurve segments are not in a correct sequence/orientation"); }