-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
private HatchBoundaryPath ReadEdgePolylineBoundaryPath()
{
HatchBoundaryPath.Polyline poly = new HatchBoundaryPath.Polyline();
this.chunk.Next();
bool hasBulge = this.chunk.ReadShort() != 0; // code 72
this.chunk.Next();
// is polyline closed
// poly.IsClosed = this.chunk.ReadShort() != 0; // code 73, this value must always be true
this.chunk.Next();
int numVertexes = this.chunk.ReadInt(); // code 93
poly.Vertexes = new Vector3[numVertexes];
this.chunk.Next();
for (int i = 0; i < numVertexes; i++)
{
double bulge = 0.0;
double x = this.chunk.ReadDouble(); // code 10
this.chunk.Next();
double y = this.chunk.ReadDouble(); // code 20
this.chunk.Next();
if (hasBulge)
{
bulge = this.chunk.ReadDouble(); // code 42
this.chunk.Next();
}
poly.Vertexes[i] = new Vector3(x, y, bulge);
}
poly.IsClosed = true;//kai???? <---- add this line
HatchBoundaryPath path = new HatchBoundaryPath(new List<HatchBoundaryPath.Edge> {poly});
// read all referenced entities
Debug.Assert(this.chunk.Code == 97, "The reference count code 97 was expected.");
int numBoundaryObjects = this.chunk.ReadInt();
this.hatchContours.Add(path, new List<string>(numBoundaryObjects));
this.chunk.Next();
for (int i = 0; i < numBoundaryObjects; i++)
{
Debug.Assert(this.chunk.Code == 330, "The reference handle code 330 was expected.");
this.hatchContours[path].Add(this.chunk.ReadString());
this.chunk.Next();
}
return path;
}
Metadata
Metadata
Assignees
Labels
No labels