AnsweredAssumed Answered

  Offset Polyline(original as drawn)  problem in Arcgis pro sdk

Question asked by tkoka3 on Dec 12, 2017
Latest reply on May 14, 2018 by ALocke-esristaff

Hi,

 

We have a offset polyline problem I can not offset polyline as you draw (original as drawn) . How can we solve this important problem ? Or are there any alternative solution? We are using all Offset Types (Mitter ,Bevel , Round , Square) but polyline shape changes,  we don not want the line to be different shape  .We can offset same polyline in  ArcObjects but we can not wit ArcgisPro SDK.

 

Here is in code and pictures in ArcgisPro SDK below :

 

Mitter left and  right offset in the middle green polyline is original polyline

 

 

if (result.RightSide)
offsetGeometry = GeometryEngine.Instance.Offset(feature.GetShape(), distance, OffsetType.Miter, 5) as Polyline;
else
offsetGeometry = GeometryEngine.Instance.Offset(feature.GetShape(), -distance, OffsetType.Miter, 5) as Polyline;

 

 

 

 

Miter Ofset

Round left and right offset in the middle green polyline is original polyline

 

if (result.RightSide)
offsetGeometry = GeometryEngine.Instance.Offset(feature.GetShape(), distance, OffsetType.Round, 0) as Polyline;
else
offsetGeometry = GeometryEngine.Instance.Offset(feature.GetShape(), -distance, OffsetType.Round, 0) as Polyline;

 

 

Round offset

 

Here is below what we want correct left and right offset code and pictures in ArcObjects :

 

Left and  right offset in the middle green polyline is original polyline.

 

IConstructCurve constructCurve = new PolylineClass();

constructCurve.ConstructOffset(polycurve, Offset, ref esriConstructOffsetEnum, ref bevelRatio);

 

ArcObjects Offset

 

Thanks for Helping 

Outcomes