Skip to content

Commit

Permalink
fixed bug of open polyline that was surfacing at the moment of baking
Browse files Browse the repository at this point in the history
  • Loading branch information
piac committed Jul 20, 2013
1 parent 90ef560 commit 91eda98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion TurtleGh/RhinoMeshSupport.cs
Expand Up @@ -57,13 +57,15 @@ public static Polyline[] ExportRhinoPolylines(ITurtleMesh ngons)
for (int i = 0; i < ngons.FaceCount; i++)
{
var f = ngons.FaceAt(i);
Polyline p = new Polyline(f.EdgesVerticesCount);
Polyline p = new Polyline(f.EdgesVerticesCount + 1);

for (int j = 0; j < f.EdgesVerticesCount; j++)
{
var v = ngons.VertexAt(f[j]);
p.Add(v.X, v.Y, v.Z);
}
var closure = ngons.VertexAt(f[0]);
p.Add(closure.X, closure.Y, closure.Z);

polylines[i] = p;
}
Expand Down

0 comments on commit 91eda98

Please sign in to comment.