function EExecP1A &Out_Prm V V1 X Y Z Att Sg1 Sg2 Sg3 Sg4 Sg5 FM = ( local Result,A,B,X1,Y1,X2,Y2,X3,Y3,X4,Y4,D1,D2,D,ZZ local X1=Complex 0. 0. local X2=Complex 0. 0. local Y1=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 D1,D2 if (X==undefined) or (Y==undefined) or (Z==undefined) or (V==undefined) or (V1==undefined) then return false if (X.OB=="P") and (Y.OB=="C") and (Z.OB=="C") and (V.OB=="O") and (V1.OB=="O") then ( if Y.OB =="C" then A=CompSg Y.C Sg4 if Z.OB =="C" then B=CompSg Z.C Sg5 X1=V.X1 Y1=V.Y1 X2=V.X2 Y2=V.Y2 X3=V1.X1 Y3=V1.Y1 X4=V1.X2 Y4=V1.Y2 A=CompSum A (Complex X.X.Re X.X.Im) B=CompSum B (Complex X.Y.Re X.Y.Im) D1=(Diskr X1.Re Y1.Re 1 X2.Re Y2.Re 1 A.Re B.Re 1)*Sg1; D2=(Diskr X3.Re Y3.Re 1 X4.Re Y4.Re 1 A.Re B.Re 1)*Sg2; if (D1<=0) and (D2<=0) then (TOPoint_Create &Out_Prm A B 1 Att) else ( if (D1>0) and (D2<=0) then ( CalcPF A B V &AA &BB D=(Diskr X3.Re Y3.Re 1 X4.Re Y4.Re 1 AA.Re BB.Re 1)*Sg2; if D>0 then ( LinLin X1 Y1 X2 Y2 X3 Y3 X4 Y4 &AA.Re &BB.Re &ZZ TOPoint_Create &Out_Prm AA BB 1 Att ) TOPoint_Create &Out_Prm AA BB 1 Att ) else if (D1<=0) and (D2>0) then ( CalcPF A B V1 &AA &BB D=(Diskr X1.Re Y1.Re 1 X2.Re Y2.Re 1 AA.Re BB.Re 1)*Sg1; if D>0 then ( LinLin X1 Y1 X2 Y2 X3 Y3 X4 Y4 &AA.Re &BB.Re &ZZ TOPoint_Create &Out_Prm AA BB 1 Att ) TOPoint_Create &Out_Prm AA BB 1 Att ) else ( LinLin X1 Y1 X2 Y2 X3 Y3 X4 Y4 &AA.Re &BB.Re &ZZ TOPoint_Create &Out_Prm AA BB 1 Att ) ) ) else if (Att.Chk==1) then TOEmpty_Create &Out_Prm Att return true ) -- EExecP1A