Yeatsliu 发表于 2006-3-7 12:27:00

急!问一个多段线的问题!

<P>一个多段线的问题,把三角形和四边形转为多段线就会出面的问题(如下图)</P>
<P></P>
<P>问如何实现下图(不管线宽为多少)</P>

Yeatsliu 发表于 2006-3-7 13:20:00

<P>问如何实现下图(不管线宽为多少)</P><BR>

mycad 发表于 2006-3-7 20:05:00

会"出面"的问题是什么问题?

Yeatsliu 发表于 2006-3-8 10:27:00

不好意思,是出现的问题,打错字了

雪山飞狐_lzh 发表于 2006-3-9 14:28:00

<P>去掉一个顶点,闭合重生成</P>
<P>Sub tt1()<BR>Dim ent1 As AcadLWPolyline, ent2 As AcadLWPolyline, pnt, p<BR>Dim s As Double, e As Double<BR>ThisDrawing.Utility.GetEntity ent1, pnt<BR>p = ent1.Coordinates<BR>ReDim Preserve p(UBound(p) - 2)<BR>Set ent2 = ThisDrawing.ModelSpace.AddLightWeightPolyline(p)<BR>ent2.Closed = True<BR>For i = 0 To (UBound(ent1.Coordinates) - 1) / 2 - 1<BR>ent1.GetWidth i, s, e<BR>ent2.SetWidth i, s, e<BR>ent2.SetBulge i, ent1.GetBulge(i)<BR>Next<BR>ent2.Layer = ent1.Layer<BR>ent1.Delete<BR>End Sub<BR></P>
页: [1]
查看完整版本: 急!问一个多段线的问题!