1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-16 10:54:53 +03:00

0029968: Modeling Algorithms - BRepAlgoAPI_Cut produces an empty result with half-space

IntTools_Context::IsInfiniteFace() - Make the conclusion about infinity of the face basing on its bounding box only. No need to check NaturalRestriction flag.
This commit is contained in:
emv 2018-07-18 15:31:52 +03:00 committed by bugmaster
parent 63cdf48ec1
commit ae276302f6
2 changed files with 31 additions and 19 deletions

View File

@ -230,25 +230,13 @@ Bnd_Box& IntTools_Context::BndBox(const TopoDS_Shape& aS)
Standard_Boolean IntTools_Context::IsInfiniteFace
(const TopoDS_Face& aFace)
{
Standard_Boolean bRet;
Standard_Integer i;
Standard_Real aX[6];
//
bRet=Standard_False;
//
if (!BRep_Tool::NaturalRestriction(aFace)) {
return bRet;
}
//
Bnd_Box& aBox=BndBox(aFace);
//
aBox.Get(aX[0], aX[1], aX[2], aX[3], aX[4], aX[5]);
//
for (i=0; (i<6) && (!bRet); ++i) {
bRet=Precision::IsInfinite(aX[i]);
}
//
return bRet;
const Bnd_Box& aBox = BndBox(aFace);
return aBox.IsOpenXmax() ||
aBox.IsOpenXmin() ||
aBox.IsOpenYmax() ||
aBox.IsOpenYmin() ||
aBox.IsOpenZmax() ||
aBox.IsOpenZmin();
}
//=======================================================================
//function : FClass2d

View File

@ -0,0 +1,24 @@
puts "========"
puts "0029968: Modeling Algorithms - BRepAlgoAPI_Cut produces an empty result with half-space"
puts "========"
puts ""
restore [locate_data_file bug29968_h.brep] h
restore [locate_data_file bug29968_s.brep] s
bop s h
bopcommon rcom
checkshape rcom
checknbshapes rcom -wire 1 -face 1
checkprops rcom -s 12348
bopcut rcut
checkshape rcut
checknbshapes rcut -wire 1 -face 1
checkprops rcut -s 12348
bopsection rsec
checkshape rsec
checknbshapes rsec -vertex 2 -edge 1
checkprops rsec -l 117.6