Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
KatKatKateryna committed Jun 28, 2024
1 parent 3a77152 commit 0bf9e9f
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public SOG.Polyline Convert(ACG.ReadOnlySegmentCollection target)
foreach (var segment in target)
{
len += segment.Length;

if (segment.SegmentType != ACG.SegmentType.Line)
{
// densify the segments with curves using precision value of the Map's Spatial Reference
Expand All @@ -35,7 +35,7 @@ public SOG.Polyline Convert(ACG.ReadOnlySegmentCollection target)
ACG.AttributeFlags.HasZ,
_contextStack.Current.Document.Map.SpatialReference
).ToGeometry();

double tolerance = _contextStack.Current.Document.Map.SpatialReference.XYTolerance;
double conversionFactorToMeter = _contextStack.Current.Document.Map.SpatialReference.Unit.ConversionFactor;
var densifiedPolyline = ACG.GeometryEngine.Instance.DensifyByDeviation(
Expand All @@ -46,7 +46,7 @@ public SOG.Polyline Convert(ACG.ReadOnlySegmentCollection target)
{
throw new ArgumentException("Segment densification failed");
}

ACG.Polyline polylineToConvert = (ACG.Polyline)densifiedPolyline;
// add points from each segment of the densified original segment
ACG.ReadOnlyPartCollection subParts = polylineToConvert.Parts;
Expand All @@ -58,7 +58,8 @@ public SOG.Polyline Convert(ACG.ReadOnlySegmentCollection target)
points,
new List<SOG.Point>()
{
_pointConverter.Convert(subSegment.StartPoint), _pointConverter.Convert(subSegment.EndPoint)
_pointConverter.Convert(subSegment.StartPoint),
_pointConverter.Convert(subSegment.EndPoint)
}
);
}
Expand All @@ -70,7 +71,8 @@ public SOG.Polyline Convert(ACG.ReadOnlySegmentCollection target)
points,
new List<SOG.Point>()
{
_pointConverter.Convert(segment.StartPoint), _pointConverter.Convert(segment.EndPoint)
_pointConverter.Convert(segment.StartPoint),
_pointConverter.Convert(segment.EndPoint)
}
);
}
Expand Down

0 comments on commit 0bf9e9f

Please sign in to comment.