function CALCO7(X1,Y1,X2,Y2,Dx,Sg) { var X3={Re:undefined, Im: undefined}; var Y3={Re:undefined, Im: undefined}; var X4={Re:undefined, Im: undefined}; var Y4={Re:undefined, Im: undefined}; var Y5={Re:undefined, Im: undefined}; var U={X4:{Re:undefined, Im: undefined},Y4:{Re:undefined, Im: undefined}, X5:{Re:undefined, Im: undefined},Y5:{Re:undefined, Im: undefined}} Dx=Dx*Sg; Value=Dx/Math.sqrt(Sqr(X2.Re-X1.Re)+Sqr(Y2.Re-Y1.Re)); X3.Re=X1.Re+(Y2.Re-Y1.Re)*Value; Y3.Re=Y1.Re-(X2.Re-X1.Re)*Value; Value=200/Math.sqrt(Sqr(X2.Re-X1.Re)+Sqr(Y2.Re-Y1.Re)); U.X4.Re=X3.Re-Value*(X2.Re-X1.Re); U.Y4.Re=Y3.Re-Value*(Y2.Re-Y1.Re); U.X5.Re=X3.Re+Value*(X2.Re-X1.Re); U.Y5.Re=Y3.Re+Value*(Y2.Re-Y1.Re); U.X4.Im=0; U.Y4.Im=0; U.X5.Im=0; U.Y5.Im=0; return U; } // CALCO7 function EExecO7(OOO,X,Y,Att,Sg1,Sg2) { if ((X.OB==undefined) || (Y.OB==undefined)) return false; var X1={Re:undefined, Im: undefined}; var Y1={Re:undefined, Im: undefined}; var X2={Re:undefined, Im: undefined}; var Y2={Re:undefined, Im: undefined}; var X4={Re:undefined, Im: undefined}; var Y4={Re:undefined, Im: undefined}; var X5={Re:undefined, Im: undefined}; var Y5={Re:undefined, Im: undefined}; var X1={Re:undefined, Im: undefined}; var AX={Re:undefined, Im: undefined}; var AY={Re:undefined, Im: undefined}; var BX={Re:undefined, Im: undefined}; var BYY={Re:undefined, Im: undefined}; var U={Re:undefined, Im: undefined}; /* if ((Att.PT=8) or (Att.LV=8) or (Att.LT=6)) { Att.RColor X.OAtt.RColor; Att.GColor X.OAtt.GColor; Att.BColor X.OAtt.BColor; } if Att.PT=8 then Att.PTX.OAtt.PT; if Att.LV=8 then Att.LVX.OAtt.LV; if Att.LT=6 then Att.LTX.OAtt.LT; */ if ((X.OB=="O") && IsSobstv(X) && IsReal(X) && ((Y.OB=="C") || (Y.OB=="D"))) // && !IsNull(X) { X1=X.X1; Y1=X.Y1; X2=X.X2; Y2=X.Y2; if (Y.OB=="C") Dx=Y.C.Re; if (Y.OB=="D") Dx=Y.R.Re; U=CALCO7(X1,Y1,X2,Y2,Dx,Sg1*Sg2); X4=U.X4; Y4=U.Y4; X5=U.X5; Y5=U.Y5; OBJ=new Object(); TOLine_Create(OBJ,X4,Y4,1,X5,Y5,1,brn_UnLimited,"sobstv",Att); U=CalcPF(X1,Y1,OBJ); AX=U.A; AY=U.B; U=CalcPF(X2,Y2,OBJ); BX=U.A; BYY=U.B; // OBJ.Destroy; if (Att.Lv==8) Att.Lv=X.FAtt.Lv; // alert(AX.Re+" "+AY.Re+" "+BX.Re+" "+BYY.Re); if (Sg1==1) {TOLine_Create(OOO,AX,AY,1,BX,BYY,1,X.draw_AsBorned,"sobstv",Att)} else {TOLine_Create(OOO,BX,BYY,1,AX,AY,1,X.draw_AsBorned,"sobstv",Att)} // OOO.AssignParents([X,Y]); } else if ((X.OB=="D") && ((Y.OB=="C") || (Y.OB=="D"))) { RR=X.R.Re; if (Y.OB=="C") {Dx=Y.C.Re;} if (Y.OB=="D") {Dx=Y.R.Re;} if (X.FAtt.Lv==2) {RR=-RR;} RR=RR+Dx*Sg2; RR=RR*Sg2; if (Att.Lv==8) {Att.Lv=X.FAtt.Lv;} RX=(X.X1-X.Xc.Re)/Math.sqrt(Sqr(X.X1-X.Xc.Re)+Sqr(X.Y1-X.Yc.Re)); RY=(X.Y1-X.Yc.Re)/Math.sqrt(Sqr(X.X1-X.Xc.Re)+Sqr(X.Y1-X.Yc.Re)); AX=CompSum(MCompl(X.X1,0),CompMul(Y.C,MCompl(RX*Math.sign(RR),0))); AY=CompSum(MCompl(X.Y1,0),CompMul(Y.C,MCompl(RY*Math.sign(RR),0))); RX=(X.X2-X.Xc.Re)/Math.sqrt(Sqr(X.X2-X.Xc.Re)+Sqr(X.Y2-X.Yc.Re)); RY=(X.Y2-X.Yc.Re)/Math.sqrt(Sqr(X.X2-X.Xc.Re)+Sqr(X.Y2-X.Yc.Re)); BX=CompSum(MCompl(X.X2,0),CompMul(Y.C,MCompl(RX*Math.sign(RR),0))); BY=CompSum(MCompl(X.Y2,0),CompMul(Y.C,MCompl(RY*Math.sign(RR),0))); if (!(X.FAtt.Lv==2)) {TODuga_Create(OOO,X.Xc,X.Yc,MCompl(RR*Sg2,0),AX.Re,AY.Re,BX.Re,BYY.Re,Att)} else {TODuga_Create(OOO,X.Xc,X.Yc,MCompl(RR*Sg2,0),AX.Re,AY.Re,BX.Re,BYY.Re,Att)} } else if ((X.OB=="P") && (Y.OB=="C")) { RR=Y.C.Re; // TODuga_Create(OOO,X.X,X.Y,MCompl(RR*Math.sign(Sg1),0),X.X.Re+RR,X.Y.Re,X.X.Re+RR,X.Y.Re,Att5); } else if (Att.Chk==1) {OOO.OB="$"}; return true; } // EExecO7