ArcGIS Pro 3.3
ArcGIS Pro SDK 3.3.0.52636
I use this in various tools and all are failing when applying a negative value to the offset distance.
The error for the left side is "GeometryException: An internal error has occurred in the geometry system."
double righttest = 25;
double lefttest = -25;
// This works
Polyline right = GeometryEngine.Instance.Offset(existgeom, righttest, OffsetType.Round, 0) as Polyline;
// This fails when using a negative value
Polyline left = GeometryEngine.Instance.Offset(existgeom, lefttest, OffsetType.Round, 0.5) as Polyline;
Worked at 3.2 with out issue.
Solved! Go to Solution.
For anyone that comes across this here is solution.
double righttest = 25;
double lefttest = -25;
// This works
Polyline right = GeometryEngine.Instance.Offset(existgeom, righttest, OffsetType.Round, 0) as Polyline;
// This works when using a negative value
Polyline left = GeometryEngine.Instance.Offset(existgeom, lefttest, OffsetType.Miter, 0.5) as Polyline;
Hopefully, it will not change with the next version.
Hi,
I see you use bevelRatio parameter not equal 0 (0.5). That parameter is used only when offsetType is miter. Your offsetType is round. Try reset bevelRatio. Maybe it is a side effect?
Thanks for your response.
I originally had the bevelratio set to 0. Just confirmed by setting back to 0. Still getting the same error. Checked using multiple polylines. Some with curves some with just lines. It only happens on negative distance values.
For anyone that comes across this here is solution.
double righttest = 25;
double lefttest = -25;
// This works
Polyline right = GeometryEngine.Instance.Offset(existgeom, righttest, OffsetType.Round, 0) as Polyline;
// This works when using a negative value
Polyline left = GeometryEngine.Instance.Offset(existgeom, lefttest, OffsetType.Miter, 0.5) as Polyline;
Hopefully, it will not change with the next version.