function EExecO1(OOO,X,Dx,Att,Sg1,Sg2) { if ((X.OB==undefined) || (Dx.OB==undefined)) return false; var AX={Re:undefined, Im:undefined} var AY={Re:undefined, Im:undefined} var BX={Re:undefined, Im:undefined} var BY={Re:undefined, Im:undefined} var CX={Re:undefined, Im:undefined} var CY={Re:undefined, Im:undefined} var EX={Re:undefined, Im:undefined} var EY={Re:undefined, Im:undefined} if ((Dx.OB=="C") && (X.OB=="P") && IsSobstv(X)) { Df=Dx.C.Re*Math.PI/180*Sg2; AX.Im=0; AY.Im=0; BX.Im=0; BY.Im=0; AX.Re=X.X.Re+100; AY.Re=X.Y.Re; AX.Im=X.X.Im; AY.Im=X.Y.Im; Def= !((Math.abs(X.X.Im)>Eps) || (Math.abs(X.Y.Im)>Eps)); Def=true; BX.Re=X.X.Re; BY.Re=X.Y.Re; BX.Im=X.X.Im; BY.Im=X.Y.Im; CX=CompSub(AX,BX); CY=CompSub(AY,BY); EX=CompSub(CompMul(CX,MCompl(Math.cos(Df),0)),CompMul(CY,MCompl(Math.sin(Df),0))); EY=CompSum(CompMul(CX,MCompl(Math.sin(Df),0)),CompMul(CY,MCompl(Math.cos(Df),0))); AX=CompSum(BX,EX); AY=CompSum(BY,EY); if (Def) { TOLine_Create(OOO,BX,BY,1,AX,AY,1,brn_UnLimited,"sobstv",Att) AddInc(OOO,X); } else if (Att.Chk==1) TOEmpty_Create(OOO,Att); } else if ((Dx.OB=="C") && (X.OB=="P") && !(IsSobstv(X)) && IsReal(X)) { BX.Re=0; BX.Im=0; BY.Re=0; BY.Im=0; Dl=Math.sqrt(Sqr(X.X.Re)+Sqr(X.Y.Re)); if (Dl>0) { S1=X.Y.Re/Dl; C1=X.X.Re/Dl; } Df=Fi(0,1,S1,C1); if (Df<0) Df=2*Math.PI+Df; AX.Re=100*Math.cos(Df); AY.Re=100*Math.sin(Df); TOLine_Create(OOO,MCompl(0,0),MCompl(1,0),0,MCompl(1,0),MCompl(0,0),0,brn_UnLimited,"nesobstv",Att5); AddInc(OOO,X); Result=true; } else if (Att.Chk==1) TOEmpty_Create(OOO,Att); Result=true; return Result; } // EExecO1