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
--- /dev/null
+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