为何运行结果不是直线与圆弧相切
过三点 cp1 、cp2、 cp3作曲线,其中cp1 、cp2段为直线,cp2 、cp3段为圆弧,且圆弧与直线相切,有以下程序段:sub test()
Dim cp1(1), cp2(1), cp3(1) As Double<BR> Dim ang1 As Double, ang2 As Double, ang As Double<BR> Dim cp(5) As Double<BR> <BR> cp1(0) = pnts1(0): cp1(1) = pnts1(1)<BR> cp2(0) = pnts(0): cp2(1) = pnts(1)<BR> cp3(0) = mc(0) + d / 2 + m + r: cp3(1) = mc(1) + r * (1 - Cos(r0))<BR> <BR> cp(0) = cp1(0): cp(1) = cp1(1)<BR> cp(2) = cp2(0): cp(3) = cp2(1)<BR> cp(4) = cp3(0): cp(5) = cp3(1)<BR> <BR> ang1 = ThisDrawing.Utility.AngleFromXAxis(cp1, cp2)<BR>ang2 = ThisDrawing.Utility.AngleFromXAxis(cp2, cp3)<BR>ang = ang2 - ang1
Dim pl As AcadLWPolyline<BR>Set pl = ThisDrawing.ModelSpace.AddLightWeightPolyline(cp)
pl.SetBulge 1, Tan(ang / 2)<BR>
end sub
程序段中, mc(0) 、 d 、m 、r、 mc(1) 、r0、pnts1(0)、pnts1(1)<BR>pnts(0)、pnts(1)值已给出。为何运行结果不是直线与圆弧相切,而仅是直线段?
请大家帮忙看看!! 凸度的概念有错吧,它是弓高与半弦长的比值。 <A href="http://bbs.mjtd.com/forum.php?mod=viewthread&tid=22290" target="_blank" >http://bbs.mjtd.com/forum.php?mod=viewthread&tid=22290</A> 伊凡老师,凸度没错阿!我检查过了,可就是结果不正确,到底怎末回事呀?? 你看看3楼的链接
页:
[1]