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:
parent
63cdf48ec1
commit
ae276302f6
@ -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
|
||||
|
24
tests/bugs/modalg_7/bug29968
Normal file
24
tests/bugs/modalg_7/bug29968
Normal 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
|
Loading…
x
Reference in New Issue
Block a user