Skip to content

Commit

Permalink
writer
Browse files Browse the repository at this point in the history
  • Loading branch information
DomCR committed Mar 8, 2024
1 parent eaf182e commit 3f4ff82
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ private void writeBoundaryPath(Hatch.BoundaryPath path)
this.writeHatchBoundaryPathEdge(edge);
}

//TODO: Check how this entities are handled
this._writer.Write(97, path.Entities.Count);
foreach (Entity entity in path.Entities)
{
Expand Down Expand Up @@ -352,11 +351,16 @@ private void writeHatchBoundaryPathEdge(Hatch.BoundaryPath.Edge edge)
this._writer.Write(11, line.End);
break;
case Hatch.BoundaryPath.Polyline poly:
this._writer.Write(72, poly.HasBulge ? (short)1 : (short)0);
this._writer.Write(73, poly.IsClosed ? (short)1 : (short)0);
this._writer.Write(93, poly.Vertices.Count);
foreach (var vertex in poly.Vertices)
for (int i = 0; i < poly.Vertices.Count; i++)
{
this._writer.Write(10, vertex);
this._writer.Write(10, poly.Vertices[i]);
if (poly.HasBulge)
{
this._writer.Write(42, poly.Bulges.ElementAtOrDefault(i));
}
}
break;
case Hatch.BoundaryPath.Spline spline:
Expand Down

0 comments on commit 3f4ff82

Please sign in to comment.