大哥,是不是在画之前,先转换坐标,再画弧,我程序如下,可画出来的圆弧还是和XY平面平行的,能帮我看看哪里错了吗
Sub example_Arc() ThisDrawing.SendCommand "UCS" & vbCr & "N" & vbCr & "X" & vbCr & "90" & vbCr Dim arcObj As AcadArc Dim centerPoint(0 To 2) As Double Dim radius As Double Dim startAngleInDegree As Double Dim endAngleInDegree As Double centerPoint(0) = 50 centerPoint(1) = 0 centerPoint(2) = 50 radius = 50 startAngleInDegree = 90# endAngleInDegree = 180# Dim startAngleInRadian As Double Dim endAngleInRadian As Double startAngleInRadian = startAngleInDegree * 3.141592 / 180# endAngleInRadian = endAngleInDegree * 3.141592 / 180#
Set arcObj = ThisDrawing.ModelSpace.AddArc(centerPoint, radius, startAngleInRadian, endAngleInRadian)
End Sub
|