mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0033727: Modeling Algorithms - Add corner check in AddClose function to detect void bounding box
Added gap to void bounding box calculation Formating
This commit is contained in:
parent
a54fad2fb3
commit
89372b4a70
@ -207,22 +207,22 @@ void BRepBndLib::AddClose(const TopoDS_Shape& S, Bnd_Box& B)
|
||||
|
||||
BRepAdaptor_Curve BC;
|
||||
|
||||
for (ex.Init(S,TopAbs_EDGE); ex.More(); ex.Next()) {
|
||||
for (ex.Init (S,TopAbs_EDGE); ex.More(); ex.Next()) {
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge (ex.Current());
|
||||
if (BRep_Tool::IsGeometric (anEdge))
|
||||
{
|
||||
BC.Initialize (anEdge);
|
||||
BndLib_Add3dCurve::Add(BC,0.,B);
|
||||
BndLib_Add3dCurve::Add (BC, 0., B);
|
||||
}
|
||||
}
|
||||
|
||||
// Add the vertices not in edges
|
||||
|
||||
for (ex.Init(S,TopAbs_VERTEX,TopAbs_EDGE); ex.More(); ex.Next()) {
|
||||
for (ex.Init (S,TopAbs_VERTEX,TopAbs_EDGE); ex.More(); ex.Next()) {
|
||||
B.Add(BRep_Tool::Pnt(TopoDS::Vertex(ex.Current())));
|
||||
}
|
||||
|
||||
if (!B.IsVoid() && B.CornerMax().IsEqual(B.CornerMin(), Precision::Confusion()))
|
||||
if (!B.IsVoid() && B.CornerMax().IsEqual (B.CornerMin(), Precision::Confusion() + 2*B.GetGap()))
|
||||
{
|
||||
B.SetVoid();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user