Skip to content

Commit

Permalink
fixes curves!
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhathcock committed Jun 20, 2024
1 parent b6a191d commit 449b396
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ IRhinoBoxFactory rhinoBoxFactory
public SOG.Curve Convert(IRhinoNurbsCurve target)
{
target.ToPolyline(0, 1, 0, 0, 0, 0.1, 0, 0, true).TryGetPolyline(out var poly);
if (target.IsClosed)
{
poly.Add(poly[0]);
}

SOG.Polyline displayValue = _polylineConverter.Convert(poly);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public SOG.Polyline Convert(IRhinoPolyline target)
var box = _boxConverter.Convert(_rhinoBoxFactory.CreateBox(target.BoundingBox));
var points = target.Select(pt => _pointConverter.Convert(pt)).ToList();

if (target.IsClosed)
if (points[0] == points[^1] && target.IsClosed)
{
points.RemoveAt(points.Count - 1);
}
Expand Down

0 comments on commit 449b396

Please sign in to comment.