![]() |
如何构造一个与其它特征相切的圆
如何构造一个与其它特征相切的圆
如果我在一个工作面上测了三个不相交的圆,我想构造一个圆与这三个圆外切或内切该怎么做? 目前好象只能构造一个过三个圆圆心的圆。 我想这是个数学问题。解方程就可以了。 设定: 圆1(x1,y1,0) r1 圆2(x2,y2,0) r2 圆3(x3,y3,0) r3 被求圆的坐标 (x4,y4,0) r4 就会有方程 (r1+r4)^2=(x4-x1)^2+(y4-y1)^2 (r2+r4)^2=(x4-x2)^2+(y4-y2)^2 (r3+r4)^2=(x4-x3)^2+(y4-y3)^2 解开这个方程式就可以得到内切圆的坐标和半径。 x4,y4,r4 1,通过3圆心(cir1,2,3)做cir4; 2,分别作从cir4到cir1,2,3的连线lin1,2,3; 3,作lin1,2,3分别到cir1,2,3的交叉点int1,2,3; 4,作cir5过int1,2,3; (重复2-4) 5,分别作从cir5到cir1,2,3的连线lin4,5,6; 6,作lin4,5,6分别到cir1,2,3的交叉点int4,5,6; 7,作cir6过int4,5,6; cir6就是所求内切圆. 非常报歉我还不能从几何上证明出来,但我cad中用arametric sketching 试了很多不同大小和位置的圆,发现第二次"迭代"后的结果已准确到小数点后3位. 希望有几何高手帮我一起证明.另一方法就是在c-dmis中写个loo加条件语句来进行迭代(等我有时间试出后公布,也请各位高手一起试). 补充一点.虽然我无法从几何上正明,但从迭代原理来讲这种作法是完全站得住脚的.因为迭代的结束条件是上一次结果和这次结果吻合或差别小到可忽略,所以3个交叉点会不断靠近内切点,最终合并,这时cirn就和cirn+1一样了. 以下是我的程序,只用了5次循环没有用条件判断,从结果看应该够了: art name : tan_cir rev number : ser number : stats count : 1 startu =alignment/start,recall:, list= yes alignment/end mode/manual loadrobe/s600 ti/t1a0b0, shankijk=0, 0, 1, angle=0 mode/dcc cir1 =auto/circle, showallarams=yes, showhits=no theo/5,10,0,0,0,1,18 actl/5,10,0,0,0,1,18 targ/5,10,0,0,0,1 theo_thickness = 0, rect, in, straight, least_sqr, onerror = no ,$ auto move = no, distance = 0, rmeas = none, read os = no, find hole = no, remeasure = no ,$ numhits = 4, init = 0, erm = 0, sacer = 0, itch = 0 ,$ start ang = 0, end ang = 360, deth = 0 ,$ angle vec = 1,0,0 cir2 =auto/circle, showallarams=yes, showhits=no theo/28,8,0,0,0,1,12 actl/28,8,0,0,0,1,12 targ/28,8,0,0,0,1 theo_thickness = 0, rect, in, straight, least_sqr, onerror = no ,$ auto move = no, distance = 0, rmeas = none, read os = no, find hole = no, remeasure = no ,$ numhits = 4, init = 0, erm = 0, sacer = 0, itch = 0 ,$ start ang = 0, end ang = 360, deth = 0 ,$ angle vec = 1,0,0 cir3 =auto/circle, showallarams=yes, showhits=no theo/20,34,0,0,0,1,10 actl/20,34,0,0,0,1,10 targ/20,34,0,0,0,1 theo_thickness = 0, rect, in, straight, least_sqr, onerror = no ,$ auto move = no, distance = 0, rmeas = none, read os = no, find hole = no, remeasure = no ,$ numhits = 4, init = 0, erm = 0, sacer = 0, itch = 0 ,$ start ang = 0, end ang = 360, deth = 0 ,$ angle vec = 1,0,0 cir4 =feat/circle,rect,out,least_sqr theo/17.366,18.959,0,0,0,1,30.54 actl/17.366,18.959,0,0,0,1,30.54 constr/circle,bf,cir1,cir2,cir3,, format/text,otions,headings, , ;meas, , , , , , dislayrecision/5 comment/doc,***** assign initial value ***** assign/x = cir4.x assign/y = cir4.y assign/z = cir4.z assign/d = cir4.d comment/doc,***** loo starts here ***** , , v1 =loo/start, id = yes, number = 5, start = 1, ski = , offset: xaxis = 0, yaxis = 0, zaxis = 0, angle = 0 cen_old =generic/circle,deendent,rect,out,$ nom/xyz,x,y,z,$ meas/xyz,x,y,z,$ nom/ijk,0,0,1,$ meas/ijk,0,0,1,$ diameter/d,d lin1 =feat/line,rect,unbnd theo/17.366,18.959,0,-0.809808,-0.586695,0 actl/19.601,20.197,0,-0.8198566,-0.5725689,0 constr/line,bf,2d,cen_old,cir1,, art number=tan_cir date=12/23/2004 time=5:26:15 m age#=2 lin2 =feat/line,rect,unbnd theo/17.366,18.959,0,0.6963851,-0.7176683,0 actl/19.601,20.197,0,0.5671505,-0.8236141,0 constr/line,bf,2d,cen_old,cir2,, lin3 =feat/line,rect,unbnd theo/17.366,18.959,0,0.1724963,0.9850102,0 actl/19.601,20.197,0,0.0288947,0.9995825,0 constr/line,bf,2d,cen_old,cir3,, int1 =feat/oint,rect theo/12.28827,15.28025,0,-0.809808,-0.586695,0 actl/12.37871,15.15312,0,-0.8198566,-0.5725689,0 constr/oint,ierce,lin1,cir1 int2 =feat/oint,rect theo/23.82169,12.30601,0,0.6963851,-0.7176683,0 actl/24.5971,12.94168,0,0.5671505,-0.8236141,0 constr/oint,ierce,lin2,cir2 int3 =feat/oint,rect theo/19.13752,29.07495,0,0.1724963,0.9850102,0 actl/19.85553,29.00209,0,0.0288947,0.9995825,0 constr/oint,ierce,lin3,cir3 cen_new =feat/circle,rect,out,least_sqr theo/19.7059,20.19502,0,0,0,1,17.7962 actl/19.60089,20.19677,0,0,0,1,17.61799 constr/circle,bf,int1,int2,int3,, assign/x = cen_new.x assign/y = cen_new.y assign/z = cen_new.z assign/d = cen_new.d loo/end comment/doc,***** loo ends here ***** , comment/doc,***** loo #1 ***** , dim loc5= location of circle cen_old[1] units=mm ,$ grah=off text=off mult=1.00 outut=both ax meas x 17.36600 y 18.95900 d 30.54000 end of dimension loc5 dim loc6= location of circle cen_new[1] units=mm ,$ grah=off text=off mult=1.00 outut=both ax meas x 19.70590 y 20.19502 d 17.79620 end of dimension loc6 comment/doc,***** loo #2 ***** , dim loc5= location of circle cen_old[2] units=mm ,$ grah=off text=off mult=1.00 outut=both ax meas x 19.70600 y 20.19500 d 17.79600 end of dimension loc5 dim loc6= location of circle cen_new[2] units=mm ,$ grah=off text=off mult=1.00 outut=both ax meas x 19.60095 y 20.19682 d 17.61835 end of dimension loc6 comment/doc,***** loo #3 ***** , art number=tan_cir date=12/23/2004 time=5:26:15 m age#=3 dim loc5= location of circle cen_old[3] units=mm ,$ grah=off text=off mult=1.00 outut=both ax meas x 19.60100 y 20.19700 d 17.61800 end of dimension loc5 dim loc6= location of circle cen_new[3] units=mm ,$ grah=off text=off mult=1.00 outut=both ax meas x 19.60089 y 20.19677 d 17.61799 end of dimension loc6 comment/doc,***** loo #4 ***** , dim loc5= location of circle cen_old[4] units=mm ,$ grah=off text=off mult=1.00 outut=both ax meas x 19.60100 y 20.19700 d 17.61800 end of dimension loc5 dim loc6= location of circle cen_new[4] units=mm ,$ grah=off text=off mult=1.00 outut=both ax meas x 19.60089 y 20.19677 d 17.61799 end of dimension loc6 comment/doc,***** loo #5 ***** , dim loc5= location of circle cen_old[5] units=mm ,$ grah=off text=off mult=1.00 outut=both ax meas x 19.60100 y 20.19700 d 17.61800 end of dimension loc5 dim loc6= location of circle cen_new[5] units=mm ,$ grah=off text=off mult=1.00 outut=both ax meas x 19.60089 y 20.19677 d 17.61799 楼上的方法很好,通过我的公式进行了验证。完全可以一般在4次的时候精度可以达到0.0001 也要感谢ddc提出这样的问题,因为我在实践中还从来没遇到过,不知ddc是在怎样的测量要求下才要这样做的? 不过从c-dmis的应用来讲,这真是个开发思路的好例子. 1,通过3圆心(cir1,2,3)做cir4; 2,分别作从cir4到cir1,2,3的连线lin1,2,3; 3,作lin1,2,3分别到cir1,2,3的交叉点int1,2,3; 4,作cir5过int1,2,3; (重复2-4) 5,分别作从cir5到cir1,2,3的连线lin4,5,6; 6,作lin4,5,6分别到cir1,2,3的交叉点int4,5,6; 7,作cir6过int4,5,6; cir6就是所求内切圆. 非常报歉我还不能从几何上证明出来,但我cad中用arametric sketching 试了很多不同大小和位置的圆,发现第二次"迭代"后的结果已准确到小数点后3位. 希望有几何高手帮我一起证明.另一方法就是在c-dmis中写个loo加条件语句来进行迭代(等我有时间试出后公布,也请各位高手一起试). ">请问高手!cir5不就是所求内切圆吗另外上述步骤中(重复2-4)是自动再走一遍的意思吗? fff"> |
所有的时间均为北京时间。 现在的时间是 03:09 PM. |