Teigha绘制“月亮”形状
using (Polyline2d pline = new Polyline2d())
{
btr.AppendEntity(pline);
//(10, 10,0) (0, 20,0) (10, 30,0)
using (Vertex2d vertex = new Vertex2d())
{
vertex.Position = new Point3d(10, 0, 0);
vertex.EndWidth = 4;
vertex.StartWidth = 0;
pline.AppendVertex(vertex);
}
using (Vertex2d vertex = new Vertex2d())
{
//vertex.Position = new Point3d(0, 10, 0);
vertex.Position = new Point3d(2, 15, 0);
vertex.EndWidth = 0.1;
vertex.StartWidth = 4;
pline.AppendVertex(vertex);
}
using (Vertex2d vertex = new Vertex2d())
{
vertex.Position = new Point3d(10 + 7.07, 10 + 7.07, 0);
pline.AppendVertex(vertex);
vertex.EndWidth = 0;
vertex.StartWidth = 4;
}
pline.CurveFit();
//pline.SplineFit(Poly2dType.QuadSplinePoly, 20);
//pline.SplineFit(Poly2dType.CubicSplinePoly, 20);
}
最后的结果