From 55e8ad8493ee3761094c5121981ecc3e61af3ae2 Mon Sep 17 00:00:00 2001 From: oguzhankoral Date: Thu, 12 Sep 2024 19:22:56 +0300 Subject: [PATCH] Evaluate mid point with angle --- .../Raw/CircularArc3dToSpeckleRawConverter.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Converters/Autocad/Speckle.Converters.AutocadShared/ToSpeckle/Raw/CircularArc3dToSpeckleRawConverter.cs b/Converters/Autocad/Speckle.Converters.AutocadShared/ToSpeckle/Raw/CircularArc3dToSpeckleRawConverter.cs index e927194a5..379980deb 100644 --- a/Converters/Autocad/Speckle.Converters.AutocadShared/ToSpeckle/Raw/CircularArc3dToSpeckleRawConverter.cs +++ b/Converters/Autocad/Speckle.Converters.AutocadShared/ToSpeckle/Raw/CircularArc3dToSpeckleRawConverter.cs @@ -27,16 +27,7 @@ public SOG.Arc Convert(AG.CircularArc3d target) SOG.Point end = _pointConverter.Convert(target.EndPoint); double startParam = target.GetParameterOf(target.StartPoint); double endParam = target.GetParameterOf(target.EndPoint); - AG.Point3d midPoint = target.EvaluatePoint(endParam - startParam / 2.0); - - // some circular arcs will **not** return a correct value from `EvaluatePoint` using the indicated parameter at the midpoint. - // so far, this has happened with some arc segments in the polyline method. They will have an end param > 1, and evaluatePoint returns the endpoint - // this is why we are checking for midpoint == endpoint, and using a [0,1] parameterization if this is the case. - if (midPoint.IsEqualTo(target.EndPoint)) - { - midPoint = target.EvaluatePoint(0.5); - } - + AG.Point3d midPoint = target.EvaluatePoint(target.StartAngle + (target.EndAngle - target.StartAngle) / 2); SOG.Point mid = _pointConverter.Convert(midPoint); SOG.Arc arc =