1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

Compare commits

...

4 Commits

Author SHA1 Message Date
FtpSantos
73d353ce65 0033727: Modeling Algorithms - Add corner check in AddClose function to detect void bounding box
Correct spacing in B.GetGap
2024-07-16 17:03:12 +01:00
FtpSantos
62205d3db1 0033727: Modeling Algorithms - Add corner check in AddClose function to detect void bounding box
Coherent formating
2024-07-16 17:03:12 +01:00
FtpSantos
89372b4a70 0033727: Modeling Algorithms - Add corner check in AddClose function to detect void bounding box
Added gap to void bounding box calculation
Formating
2024-07-16 17:03:11 +01:00
FtpSantos
a54fad2fb3 0033727: Modeling Algorithms - Add corner check in AddClose function to detect void bounding box
Added corner check to AddClose for void bounding boxes
2024-07-16 17:03:11 +01:00

View File

@@ -207,19 +207,26 @@ 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()) {
B.Add(BRep_Tool::Pnt(TopoDS::Vertex(ex.Current())));
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() + 2 * B.GetGap()))
{
B.SetVoid();
}
}