- 积分
- 584
- 明经币
- 个
- 注册时间
- 2005-4-14
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
楼主 |
发表于 2005-5-28 18:20:00
|
显示全部楼层
armylee发表于2005-5-28 1:20:00dim thisdrawing as acaddocument
set thisdrawing =acadApp.Activedocument
Dim arcObj As AcadArc '''''''''''''''''''''''''''''''''''''''''弧 Dim centerPoint(0 To 2) As Double Dim radius As Double Dim startAngleInDegree As Double 'Sqr(nj ^ 2 - (b / 2) ^ 2) + ybjl Dim endAngleInDegree As Double
Dim thisdrawing As AcadDocument
Set thisdrawing = acadapp.ActiveDocument
'Dim ppp As Double ppp = (b / 2) / Sqr(nj ^ 2 - (b / 2) ^ 2) qqq = Atn(ppp)
' Define the circle centerPoint(0) = ybjl#: centerPoint(1) = zxxsp#: centerPoint(2) = 0# radius = nj# startAngleInDegree = ppp endAngleInDegree = -qqq ' Convert the angles in degrees to angles in radians Dim startAngleInRadian As Double Dim endAngleInRadian As Double startAngleInRadian = startAngleInDegree * 3.141592 / 180# endAngleInRadian = endAngleInDegree * 3.141592 / 180# ' Create the arc object in model space Set arcObj = thisdrawing.ModelSpace.AddArc(centerPoint, radius, startAngleInRadian, endAngleInRadian) ZoomAll
完整程序如上,其中我要定义这俩个角才可以画出弧,假如我直接给角附值,那可以轻松画出弧.但是假如我给他附一个变量,怎么就画不出来啊...???
startAngleInDegree = ppp endAngleInDegree = -qqq
ppp可以,但是经过反正切Atn(ppp)得到qqq之后,就画不出来了,是不是不能用反正切函数啊???
ppp = (b / 2) / Sqr(nj ^ 2 - (b / 2) ^ 2) qqq = Atn(ppp) |
|