Salome HOME
projects
/
modules
/
shaper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cb04b7a
)
Do not increase tolerance for UnifySameDomain (issue #18608)
author
azv
<azv@opencascade.com>
Wed, 5 Feb 2020 05:06:51 +0000
(08:06 +0300)
committer
vsr
<vsr@opencascade.com>
Mon, 10 Feb 2020 14:05:29 +0000
(17:05 +0300)
src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp
patch
|
blob
|
history
diff --git
a/src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp
b/src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp
index 496ec907949479afe454c09898d307042a47e32c..b8d49ef679664a2c5fc209278132eed341754d6f 100644
(file)
--- a/
src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp
+++ b/
src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp
@@
-23,6
+23,7
@@
#include <GeomAlgoAPI_DFLoader.h>
#include <GeomAlgoAPI_ShapeTools.h>
#include <GeomAlgoAPI_DFLoader.h>
#include <GeomAlgoAPI_ShapeTools.h>
+#include <BRep_Tool.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Shape.hxx>
#include <Precision.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Shape.hxx>
#include <Precision.hxx>
@@
-72,29
+73,18
@@
void GeomAlgoAPI_UnifySameDomain::build(const ListOfShape& theShapes)
}
// calculates maximum possible tolerance on edges of shape
}
// calculates maximum possible tolerance on edges of shape
-// (method from GEOM module BlockFix_UnionFaces.cxx)
static Standard_Real defineLinearTolerance(const TopoDS_Shape& theShape)
{
static Standard_Real defineLinearTolerance(const TopoDS_Shape& theShape)
{
- Standard_Real aTol = Precision::Confusion();
+ Standard_Real a
Max
Tol = Precision::Confusion();
- Standard_Real MinSize = RealLast();
TopExp_Explorer Explo(theShape, TopAbs_EDGE);
for (; Explo.More(); Explo.Next())
{
const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current());
TopExp_Explorer Explo(theShape, TopAbs_EDGE);
for (; Explo.More(); Explo.Next())
{
const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current());
- Bnd_Box aBox;
- BRepBndLib::Add(anEdge, aBox);
- Standard_Real Xmin, Ymin, Zmin, Xmax, Ymax, Zmax;
- aBox.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax);
- Standard_Real MaxSize = Max(Xmax - Xmin, Max(Ymax - Ymin, Zmax - Zmin));
- if (MaxSize < MinSize)
- MinSize = MaxSize;
+ aMaxTol = Max(aMaxTol, BRep_Tool::Tolerance(anEdge));
}
}
- if (!Precision::IsInfinite(MinSize))
- aTol = 0.1 * MinSize;
-
- return aTol;
+ return aMaxTol;
}
//==================================================================================================
}
//==================================================================================================