mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0025456: BOPAlgo_CheckerSI reports an error on the given shape
Changes: 1. class IntTools_FaceFace method: void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, const Handle(Adaptor3d_TopolTool)& dom1, const Handle(Adaptor3d_TopolTool)& dom2) The value of testing parameter has been changed for the cases of infinite curves Test case for issue CR25456
This commit is contained in:
parent
4590b5516c
commit
0da4579283
@ -1243,10 +1243,9 @@ static Standard_Boolean isTreatAnalityc(const TopoDS_Face& theF1,
|
||||
return;
|
||||
}
|
||||
}
|
||||
//
|
||||
// Do the Curve
|
||||
|
||||
|
||||
typl=L->ArcType();
|
||||
//
|
||||
switch (typl) {
|
||||
//########################################
|
||||
// Line, Parabola, Hyperbola
|
||||
@ -1276,10 +1275,14 @@ static Standard_Boolean isTreatAnalityc(const TopoDS_Face& theF1,
|
||||
//
|
||||
aNbParts=myLConstruct.NbParts();
|
||||
for (i=1; i<=aNbParts; i++) {
|
||||
Standard_Boolean bFNIt, bLPIt;
|
||||
//
|
||||
myLConstruct.Part(i, fprm, lprm);
|
||||
|
||||
if (!Precision::IsNegativeInfinite(fprm) &&
|
||||
!Precision::IsPositiveInfinite(lprm)) {
|
||||
//
|
||||
bFNIt=Precision::IsNegativeInfinite(fprm);
|
||||
bLPIt=Precision::IsPositiveInfinite(lprm);
|
||||
//
|
||||
if (!bFNIt && !bLPIt) {
|
||||
//
|
||||
IntTools_Curve aCurve;
|
||||
//
|
||||
@ -1309,7 +1312,7 @@ static Standard_Boolean isTreatAnalityc(const TopoDS_Face& theF1,
|
||||
//
|
||||
aCurve.SetFirstCurve2d(H1);
|
||||
}
|
||||
|
||||
//
|
||||
if(myApprox2) {
|
||||
Handle (Geom2d_Curve) C2d;
|
||||
BuildPCurves(fprm,lprm,Tolpc,myHS2->ChangeSurface().Surface(),newc,C2d);
|
||||
@ -1325,25 +1328,24 @@ static Standard_Boolean isTreatAnalityc(const TopoDS_Face& theF1,
|
||||
aCurve.SetSecondCurve2d(H1);
|
||||
}
|
||||
mySeqOfCurve.Append(aCurve);
|
||||
} // end of if (!Precision::IsNegativeInfinite(fprm) && !Precision::IsPositiveInfinite(lprm))
|
||||
} //if (!bFNIt && !bLPIt) {
|
||||
else {
|
||||
// on regarde si on garde
|
||||
//
|
||||
Standard_Boolean bFNIt, bLPIt;
|
||||
Standard_Real aTestPrm, dT=100.;
|
||||
|
||||
bFNIt=Precision::IsNegativeInfinite(fprm);
|
||||
bLPIt=Precision::IsPositiveInfinite(lprm);
|
||||
|
||||
//
|
||||
aTestPrm=0.;
|
||||
|
||||
if (bFNIt && !bLPIt) {
|
||||
aTestPrm=lprm-dT;
|
||||
}
|
||||
else if (!bFNIt && bLPIt) {
|
||||
aTestPrm=fprm+dT;
|
||||
}
|
||||
|
||||
else {
|
||||
// i.e, if (bFNIt && bLPIt)
|
||||
aTestPrm=IntTools_Tools::IntermediatePoint(-dT, dT);
|
||||
}
|
||||
//
|
||||
gp_Pnt ptref(newc->Value(aTestPrm));
|
||||
//
|
||||
GeomAbs_SurfaceType typS1 = myHS1->GetType();
|
||||
@ -1353,8 +1355,7 @@ static Standard_Boolean isTreatAnalityc(const TopoDS_Face& theF1,
|
||||
typS1 == GeomAbs_SurfaceOfRevolution ||
|
||||
typS2 == GeomAbs_SurfaceOfExtrusion ||
|
||||
typS2 == GeomAbs_OffsetSurface ||
|
||||
typS2 == GeomAbs_SurfaceOfRevolution)
|
||||
{
|
||||
typS2 == GeomAbs_SurfaceOfRevolution) {
|
||||
Handle(Geom2d_BSplineCurve) H1;
|
||||
mySeqOfCurve.Append(IntTools_Curve(newc, H1, H1));
|
||||
continue;
|
||||
@ -1373,7 +1374,7 @@ static Standard_Boolean isTreatAnalityc(const TopoDS_Face& theF1,
|
||||
mySeqOfCurve.Append(IntTools_Curve(newc, H1, H1));
|
||||
}
|
||||
}
|
||||
}// end of for (i=1; i<=myLConstruct.NbParts(); i++)
|
||||
}// for (i=1; i<=aNbParts; i++) {
|
||||
}// case IntPatch_Lin: case IntPatch_Parabola: case IntPatch_Hyperbola:
|
||||
break;
|
||||
|
||||
|
17
tests/bugs/modalg_5/bug25456
Executable file
17
tests/bugs/modalg_5/bug25456
Executable file
@ -0,0 +1,17 @@
|
||||
puts "============"
|
||||
puts "OCC25456"
|
||||
puts "============"
|
||||
puts ""
|
||||
###############################
|
||||
## BOPAlgo_CheckerSI reports an error on the given shape
|
||||
###############################
|
||||
|
||||
restore [locate_data_file bug25456_shape.brep] a
|
||||
|
||||
set info [bopcheck a]
|
||||
|
||||
if {[string compare ${info} " This shape seems to be OK.\n"] == 0} {
|
||||
puts "OK: BOPAlgo_CheckerSI report is good"
|
||||
} else {
|
||||
puts "Error : BOPAlgo_CheckerSI report is wrong"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user