1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0025194: It is necessary to orthogonalize transformation matrix in gp_Trsf and gp_Trsf2d classes

1. Method "SetValues()" for gp_Trsf2d class is added.
2. Method Orthogonalize for gp_Trsf2d and gp_Trsf classes was added.
3. Unused arguments from "SetValues()" method for gp_Trsf was deleted.
4. Output of AppParCurves_MultiPoint Dump  was corrected.
5. Method of right projected point choosing was corrected in ProjLib package.
6. Some test cases were changed according to their new behavior.
This commit is contained in:
nbv
2014-09-10 11:28:19 +04:00
committed by bugmaster
parent b89b1e0816
commit 7a8c6a36e6
22 changed files with 241 additions and 148 deletions

View File

@@ -1106,6 +1106,38 @@ Handle(Adaptor2d_HCurve2d)
V1 = V0 + vsens*vperiod;
Pts2d(i).SetCoord(U1,V1);
myProjIsDone = Standard_True;
if((i == 2) && (!IsEqual(uperiod, 0.0) || !IsEqual(vperiod, 0.0)))
{//Make 1st point more precise for periodic surfaces
const Standard_Integer aSize = 3;
const gp_Pnt2d aP(Pts2d(2));
Standard_Real aUpar[aSize], aVpar[aSize];
Pts2d(1).Coord(aUpar[1], aVpar[1]);
aUpar[0] = aUpar[1] - uperiod;
aUpar[2] = aUpar[1] + uperiod;
aVpar[0] = aVpar[1] - vperiod;
aVpar[2] = aVpar[1] + vperiod;
Standard_Real aSQdistMin = RealLast();
Standard_Integer aBestUInd = 1, aBestVInd = 1;
const Standard_Integer aSizeU = IsEqual(uperiod, 0.0) ? 1 : aSize,
aSizeV = IsEqual(vperiod, 0.0) ? 1 : aSize;
for(Standard_Integer uInd = 0; uInd < aSizeU; uInd++)
{
for(Standard_Integer vInd = 0; vInd < aSizeV; vInd++)
{
Standard_Real aSQdist = aP.SquareDistance(gp_Pnt2d(aUpar[uInd], aVpar[vInd]));
if(aSQdist < aSQdistMin)
{
aSQdistMin = aSQdist;
aBestUInd = uInd;
aBestVInd = vInd;
}
}
}
Pts2d(1).SetCoord(aUpar[aBestUInd], aVpar[aBestVInd]);
}//if(i == 2) condition
}
}
}