fn CALCO7 X1 Y1 X2 Y2 &Dxx Sg &X4 &Y4 &X5 &Y5 = ( local Value,X3,Y3,ValX,ValY Dxx=Dxx*Sg Dx=X2.Re-X1.Re; Dy=Y2.Re-Y1.Re; Value=Dxx/Sqrt (Sqr (Dx)+Sqr (Dy)) X3=Complex 0. 0. Y3=Complex 0. 0. X4=Complex 0. 0. Y4=Complex 0. 0. X5=Complex 0. 0. Y5=Complex 0. 0. X3.Re=X1.Re+Dy*Value Y3.Re=Y1.Re-Dx*Value Val=200./Sqrt (Sqr (Dx)+Sqr (Dy)) ValX=Val*Dx; ValY=Val*Dy; X4.Re=X3.Re-ValX Y4.Re=Y3.Re-ValY X5.Re=X3.Re+ValX Y5.Re=Y3.Re+ValY X4.Im=0. Y4.Im=0. X5.Im=0. Y5.Im=0. return true ) --CALCO7 fn EExecO7 &OOO X Y Att Sg1 Sg2 FM = ( if (X==undefined) or (Y==undefined) then return false local X1 = Complex 0. 0. local Y1 = Complex 0. 0. local X2 = Complex 0. 0. local Y2 = Complex 0. 0. local X3 = Complex 0. 0. local Y3 = Complex 0. 0. local X4 = Complex 0. 0. local Y4 = Complex 0. 0. local Sg Success=false if (X.OB=="O") and (IsSobstv X) and (IsReal X) and (not IsNull X) and ((Y.OB=="C") or (Y.OB=="D")) then ( X1=X.X1; Y1=X.Y1; X2=X.X2; Y2=X.Y2; if (Y.OB=="C") then Dx=Y.C.Re; if (Y.OB=="D") then Dx=Y.R.Re; CALCO7 X1 Y1 X2 Y2 &Dx (Sg1*Sg2) &X4 &Y4 &X5 &Y5 TOLine_Create &OOO X4 Y4 1 X5 Y5 1 brn_unlimited Sobstv Att CalcPF X1 Y1 OOO &AX &AY CalcPF X2 Y2 OOO &BX &BYY -- if Att.LV=8 then Att.LV:=X.OAtt.LV; if Sg1==1 then 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 ) else if (X.OB=="D") and ((Y.OB=="C") or (Y.OB=="D")) then ( RR=X.R.Re; if Y.OB=="C" then Dx=Y.C.Re; if Y.OB=="D" then Dx=Y.R.Re; if X.FAtt.Lv==2 then RR=-RR; RR=RR+Dx*Sg2; RR=RR*Sg2; -- if Att.LV=8 then Att.LV:=X.OAtt.LV; RX=(X.X1-X.Xc.Re)/Sqrt (Sqr (X.X1-X.Xc.Re)+Sqr (X.Y1-X.Yc.Re)); RY=(X.Y1-X.Yc.Re)/Sqrt (Sqr (X.X1-X.Xc.Re)+Sqr (X.Y1-X.Yc.Re)); AX=CompSum (Complex X.X1 0) (CompMul Y.C (Complex (Rx*Sign RR) 0)); AY=CompSum (Complex X.Y1 0) (CompMul Y.C (Complex (Ry*Sign RR) 0)); RX=(X.X2-X.Xc.Re)/Sqrt (Sqr (X.X2-X.Xc.Re)+Sqr (X.Y2-X.Yc.Re)); RY=(X.Y2-X.Yc.Re)/Sqrt (Sqr (X.X2-X.Xc.Re)+Sqr (X.Y2-X.Yc.Re)); BX=CompSum (Complex X.X2 0) (CompMul Y.C (Complex (Rx*Sign RR) 0)); BYY=CompSum (Complex X.Y2 0) (CompMul Y.C (Complex (Ry*Sign RR) 0)); if (X.FAtt.Lv != 2) then TODuga_Create &OOO X.Xc X.Yc (Complex (RR*Sg2) 0) Ax.Re Ay.Re Bx.Re Byy.Re Att else TODuga_Create &OOO X.Xc X.Yc (Complex (RR*Sg2) 0) Ax.Re Ay.Re Bx.Re Byy.Re Att ) else if (X.OB=="P") and (Y.OB=="C") then ( RR=Y.C.Re; TODuga_Create &OOO X.X X.Y (Complex (RR*(Sgn Sg1)) 0) (X.X.Re+RR) X.Y.Re (X.X.Re+RR) X.Y.Re Att5 ) else if (Att.Chk==1) then TOEmpty_Create &OOO Att; return true ) -- EExecO7