使用下面程序,用getBugle就是少获得两个凸度数据。- Sub pl()
- Dim pll As AcadLWPolyline, ent As AcadEntity
- Dim bulgeCollection As New Collection
- Dim aa() As Double
- Debug.Print
- Set pll = ThisDrawing.ModelSpace.Item(ThisDrawing.ModelSpace.Count - 1)
-
- 'Debug.Print ent.ObjectName
- Debug.Print UBound(pll.Coordinates)
- ReDim aa(0 To (UBound(pll.Coordinates) + 1) / 3) As Double
- For i = 0 To (UBound(pll.Coordinates) + 1) / 3 + 0
- Debug.Print i, pll.GetBulge(i)
- aa(i) = pll.GetBulge(i)
- Next i
- Dim Coord As Variant
- Coord = pll.Coordinates
- Debug.Print "--------------------"
- For ii = 0 To bulgeCollection.Count - 1
- Debug.Print bulgeCollection.Item(ii + 1)
- Next ii
- Set pll = ThisDrawing.ModelSpace.AddLightWeightPolyline(Coord)
- pll.Closed = True
-
- pll.color = acMagenta
- For ii = 0 To (UBound(pll.Coordinates) + 1) / 3 + 0
- 'pll.SetBulge ii, bulgeCollection.Item(ii)
- pll.SetBulge ii, aa(ii)
- Next ii
-
-
- End Sub
|