mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0022846: Following from issue 0022804 (regression on test case)
This commit is contained in:
parent
d1ad9a8ddd
commit
dc161d81d3
@ -278,7 +278,8 @@ static Standard_Integer sewing (Draw_Interpretor& theDi,
|
|||||||
Standard_Boolean aSameParameterMode = Standard_True;
|
Standard_Boolean aSameParameterMode = Standard_True;
|
||||||
Standard_Boolean aFloatingEdgesMode = Standard_False;
|
Standard_Boolean aFloatingEdgesMode = Standard_False;
|
||||||
Standard_Boolean aFaceMode = Standard_True;
|
Standard_Boolean aFaceMode = Standard_True;
|
||||||
Standard_Real aMinTol = aTol*1e-4;
|
Standard_Boolean aSetMinTol = Standard_False;
|
||||||
|
Standard_Real aMinTol = 0.;
|
||||||
Standard_Real aMaxTol = Precision::Infinite();
|
Standard_Real aMaxTol = Precision::Infinite();
|
||||||
|
|
||||||
for (Standard_Integer i = 2; i < theArgc; i++)
|
for (Standard_Integer i = 2; i < theArgc; i++)
|
||||||
@ -293,7 +294,10 @@ static Standard_Integer sewing (Draw_Interpretor& theDi,
|
|||||||
if (tolower(theArgv[i][2]) == 'i' && i+1 < theArgc)
|
if (tolower(theArgv[i][2]) == 'i' && i+1 < theArgc)
|
||||||
{
|
{
|
||||||
if (atof (theArgv[i+1]))
|
if (atof (theArgv[i+1]))
|
||||||
aMinTol = atof (theArgv[i+1]);
|
{
|
||||||
|
aMinTol = atof (theArgv[++i]);
|
||||||
|
aSetMinTol = Standard_True;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
theDi << "Error! min tolerance can't possess the null value" << "\n";
|
theDi << "Error! min tolerance can't possess the null value" << "\n";
|
||||||
@ -303,7 +307,7 @@ static Standard_Integer sewing (Draw_Interpretor& theDi,
|
|||||||
if (tolower(theArgv[i][2]) == 'a' && i+1 < theArgc)
|
if (tolower(theArgv[i][2]) == 'a' && i+1 < theArgc)
|
||||||
{
|
{
|
||||||
if (atof (theArgv[i+1]))
|
if (atof (theArgv[i+1]))
|
||||||
aMaxTol = atof (theArgv[i+1]);
|
aMaxTol = atof (theArgv[++i]);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
theDi << "Error! max tolerance can't possess the null value" << "\n";
|
theDi << "Error! max tolerance can't possess the null value" << "\n";
|
||||||
@ -323,16 +327,17 @@ static Standard_Integer sewing (Draw_Interpretor& theDi,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (atof (theArgv[i]))
|
TopoDS_Shape aShape = DBRep::Get (theArgv[i]);
|
||||||
aTol = atof (theArgv[i]);
|
if (!aShape.IsNull())
|
||||||
else
|
|
||||||
{
|
{
|
||||||
TopoDS_Shape aShape = DBRep::Get (theArgv[i]);
|
|
||||||
if (aShape.IsNull())
|
|
||||||
continue;
|
|
||||||
aSeq.Append (aShape);
|
aSeq.Append (aShape);
|
||||||
aPar++;
|
aPar++;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (atof (theArgv[i]))
|
||||||
|
aTol = atof (theArgv[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -357,6 +362,8 @@ static Standard_Integer sewing (Draw_Interpretor& theDi,
|
|||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!aSetMinTol)
|
||||||
|
aMinTol = aTol*1e-4;
|
||||||
if (aTol < Precision::Confusion())
|
if (aTol < Precision::Confusion())
|
||||||
aTol = Precision::Confusion();
|
aTol = Precision::Confusion();
|
||||||
if (aMinTol < Precision::Confusion())
|
if (aMinTol < Precision::Confusion())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user