|
function EExecP2(var X,Y: TOLine; var PNT: TOPoint; Sg1,Sg2: integer): boolean;
var Def,Prizn: boolean;
XX,YY: complex;
ZZ: complex;
var X1,Y1:real;
begin
Result:=TRUE;
{if (X is TOLine) and (Y is TOLine) then}
BEGIN
{XX:=Cmpn;YY:=Cmpn;}
{if (TOLine(X).IsSobstv) and (TOLine(Y).IsSobstv) then}
begin
LinLinComp(X.X1,X.Y1,X.X2,X.Y2,Y.X1,Y.Y1,Y.X2,Y.Y2,Xx,Yy,ZZ,Prizn);
{
Def:=TRUE;
if ZZ.Re=1 then if X.PointBelongs(XX.Re,YY.Re) and Y.PointBelongs(XX.Re,YY.Re) then Def:=TRUE else Def:=FALSE;
if not Def then
begin
if Att.Chk=1 then PNT:=TOEmpty.Create([X,Y],OW);
Exit;
end;
}
if (ZZ.Re=1) then
begin
{ PNT:=TOPoint.Create(XX,YY,ZZ.Re,0.5 ,tp_fixed,Att,OW);}
PNT.X:=XX;
PNT.Y:=YY;
PNT.W:=ZZ.Re;
Result:=TRUE;
begin
{AddInc(PNT,X);
AddInc(PNT,Y);}
{DezargInc(Pnt);}
end;
Exit;
end;
{
if (ZZ.Re=0) and
((TOLine(X).draw_ASborned in [brn_unlimited,brn_halflimited]) or
(TOLine(X).OAtt.Lv in[drw_UnLimited, drw_Incidented, drw_ShortIncidented, drw_Plus,drw_Minus,drw_Opposite])) and
((TOLine(Y).draw_ASborned in [brn_unlimited,brn_halflimited]) or
(TOLine(Y).OAtt.Lv in[drw_UnLimited, drw_Incidented, drw_ShortIncidented, drw_Plus,drw_Minus,drw_Opposite])) then
begin
PNT:=TOPoint.Create(XX,YY,ZZ.Re,0.5 ,tp_fixed,Att,OW);
Result:=TRUE;
AddInc(X,PNT);
AddInc(Y,PNT);
Exit;
end else
begin
if Att.Chk=1 then PNT:=TOEmpty.Create([X,Y],OW);
Exit;
end;}
end;
{
if (not TOLine(X).IsSobstv) and (TOLine(Y).IsSobstv) then
if (TOLine(X).IsReal) and (TOLine(Y).IsReal) then
begin
XX.Re:=TOLine(Y).X2.Re-TOLine(Y).X1.Re; XX.Im:=0;
YY.Re:=TOLine(Y).Y2.Re-TOLine(Y).Y1.Re; YY.Im:=0;
PNT:=TOPoint.Create(XX,YY,0,0,tp_fixed,Att,OW);
AddInc(X,PNT);
AddInc(Y,PNT);
Exit;
end;}
{
if (not TOLine(Y).IsSobstv) and (TOLine(X).IsSobstv) then
if (TOLine(X).IsReal) and (TOLine(Y).IsReal) then
begin
XX.Re:=TOLine(X).X2.Re-TOLine(X).X1.Re; XX.Im:=0;
YY.Re:=TOLine(X).Y2.Re-TOLine(X).Y1.Re; YY.Im:=0;
PNT:=TOPoint.Create(XX,YY,0,0,tp_fixed,Att,OW);
AddInc(X,PNT);
AddInc(Y,PNT);
Exit;
end;}
{
if (TOLine(X).Vid=NeSobstv) and (TOLine(Y).Vid=NeSobstv) then
begin
if Att.Chk=1 then PNT:=TOEmpty.Create([X,Y],OW);
Exit;
end;}
END;
{ if Att.Chk=1 then PNT:=TOEmpty.Create([X,Y],OW); }
end; // EExecP2 |