mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +03:00
Fix for regressions for case infinite box ( case 46)
This commit is contained in:
@@ -74,6 +74,7 @@ is
|
|||||||
class CheckerSI;
|
class CheckerSI;
|
||||||
class ArgumentAnalyzer;
|
class ArgumentAnalyzer;
|
||||||
class CheckResult;
|
class CheckResult;
|
||||||
|
class ShellSplitter;
|
||||||
--
|
--
|
||||||
-- pointers
|
-- pointers
|
||||||
--
|
--
|
||||||
|
@@ -57,6 +57,8 @@
|
|||||||
#include <BOPCol_DataMapOfShapeShape.hxx>
|
#include <BOPCol_DataMapOfShapeShape.hxx>
|
||||||
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
|
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
|
||||||
#include <BOPCol_MapOfShape.hxx>
|
#include <BOPCol_MapOfShape.hxx>
|
||||||
|
#include <BRepBndLib.hxx>
|
||||||
|
#include <Bnd_Box.hxx>
|
||||||
|
|
||||||
|
|
||||||
static
|
static
|
||||||
@@ -444,6 +446,7 @@ TopAbs_Orientation BOPAlgo_BuilderFace::Orientation()const
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
// 2. Find outer growth shell that is most close to each hole shell
|
// 2. Find outer growth shell that is most close to each hole shell
|
||||||
|
BOPCol_ListOfShape anUnUsedHoles;
|
||||||
aIt2.Initialize(aHoleWires);
|
aIt2.Initialize(aHoleWires);
|
||||||
for (; aIt2.More(); aIt2.Next()) {
|
for (; aIt2.More(); aIt2.Next()) {
|
||||||
const TopoDS_Shape& aHole = aIt2.Value();
|
const TopoDS_Shape& aHole = aIt2.Value();
|
||||||
@@ -481,8 +484,26 @@ TopAbs_Orientation BOPAlgo_BuilderFace::Orientation()const
|
|||||||
aMSH.Bind(aF, aLH);
|
aMSH.Bind(aF, aLH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
anUnUsedHoles.Append(aHole);
|
||||||
|
}
|
||||||
}// for (; aIt2.More(); aIt2.Next())
|
}// for (; aIt2.More(); aIt2.Next())
|
||||||
//
|
//
|
||||||
|
if (anUnUsedHoles.Extent()) {
|
||||||
|
// add the infinite face to new faces
|
||||||
|
Bnd_Box aBox;
|
||||||
|
BRepBndLib::Add(myFace, aBox);
|
||||||
|
if (aBox.IsOpenXmin() || aBox.IsOpenXmax() ||
|
||||||
|
aBox.IsOpenYmin() || aBox.IsOpenYmax() ||
|
||||||
|
aBox.IsOpenZmin() || aBox.IsOpenZmax()) {
|
||||||
|
TopoDS_Face aFace;
|
||||||
|
aBB.MakeFace(aFace, aS, aLoc, aTol);
|
||||||
|
//
|
||||||
|
aNewFaces.Append(aFace);
|
||||||
|
aMSH.Bind(aFace, anUnUsedHoles);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
// 3. Add aHoles to Faces
|
// 3. Add aHoles to Faces
|
||||||
aItMSH.Initialize(aMSH);
|
aItMSH.Initialize(aMSH);
|
||||||
for (; aItMSH.More(); aItMSH.Next()) {
|
for (; aItMSH.More(); aItMSH.Next()) {
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -65,8 +65,8 @@ GeomAbs_SurfaceType IntCurvesFace_Intersector::SurfaceType() const
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
IntCurvesFace_Intersector::IntCurvesFace_Intersector(const TopoDS_Face& Face,
|
IntCurvesFace_Intersector::IntCurvesFace_Intersector(const TopoDS_Face& Face,
|
||||||
const Standard_Real aTol)
|
const Standard_Real aTol)
|
||||||
:
|
:
|
||||||
Tol(aTol),
|
Tol(aTol),
|
||||||
done(Standard_False),
|
done(Standard_False),
|
||||||
nbpnt(0),
|
nbpnt(0),
|
||||||
@@ -95,7 +95,7 @@ IntCurvesFace_Intersector::IntCurvesFace_Intersector(const TopoDS_Face& Face,
|
|||||||
Standard_Boolean bFlag;
|
Standard_Boolean bFlag;
|
||||||
//
|
//
|
||||||
{
|
{
|
||||||
Standard_Real dU, dV, dA, dB, aR, aTresh;
|
Standard_Real dU, dV, dA, dB, aTresh;
|
||||||
bFlag=Standard_True;
|
bFlag=Standard_True;
|
||||||
//
|
//
|
||||||
aTresh=100.;
|
aTresh=100.;
|
||||||
@@ -104,18 +104,12 @@ IntCurvesFace_Intersector::IntCurvesFace_Intersector(const TopoDS_Face& Face,
|
|||||||
dA=dU;
|
dA=dU;
|
||||||
dB=dV;
|
dB=dV;
|
||||||
if (dV>dU) {
|
if (dV>dU) {
|
||||||
dA=dV;
|
dA=dV;
|
||||||
dB=dU;
|
dB=dU;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
aR=dA/dB;
|
if (dB < Precision::PConfusion() || dA > dB * aTresh) {
|
||||||
if (dB<Precision::PConfusion()) {
|
bFlag=!bFlag;
|
||||||
bFlag=!bFlag;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (aR>aTresh) {
|
|
||||||
bFlag=!bFlag;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@@ -125,7 +119,7 @@ IntCurvesFace_Intersector::IntCurvesFace_Intersector(const TopoDS_Face& Face,
|
|||||||
if(nbsu>40) nbsu = 40;
|
if(nbsu>40) nbsu = 40;
|
||||||
if(nbsv>40) nbsv = 40;
|
if(nbsv>40) nbsv = 40;
|
||||||
PtrOnPolyhedron = (IntCurveSurface_ThePolyhedronOfHInter *)
|
PtrOnPolyhedron = (IntCurveSurface_ThePolyhedronOfHInter *)
|
||||||
new IntCurveSurface_ThePolyhedronOfHInter(Hsurface,nbsu,nbsv,U0,V0,U1,V1);
|
new IntCurveSurface_ThePolyhedronOfHInter(Hsurface,nbsu,nbsv,U0,V0,U1,V1);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user