1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0027540: Run-to-run differences in the 3D Offset algorithm

Calculating the offset vertices by the superposition of intersection vertices
between pairs of edges (BRepOffset_Inter2d::FuseVertices()).

To obtain stable result when calculating the superposition of vertices
they are sorted (BOPTools_AlgoTools::MakeVertex()).

The support of vertices has been added in nexplode command.

Small correction of tests cases for issue CR27540
This commit is contained in:
emv
2016-05-27 11:19:25 +03:00
committed by bugmaster
parent 625e195819
commit b0fbc5796a
17 changed files with 533 additions and 262 deletions

View File

@@ -1189,14 +1189,18 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
//---------------------------------------------------------------------------------
// Extension of neighbor edges of new edges and intersection between neighbors.
//--------------------------------------------------------------------------------
TopTools_IndexedDataMapOfShapeListOfShape aDMVV;
Handle(BRepAlgo_AsDes) AsDes2d = new BRepAlgo_AsDes();
for (Exp.Init(myShape,TopAbs_FACE) ; Exp.More(); Exp.Next())
{
const TopoDS_Face& FI = TopoDS::Face(Exp.Current());
Standard_Real aCurrFaceTol = BRep_Tool::Tolerance(FI);
BRepOffset_Inter2d::ConnexIntByInt (FI, MapSF(FI), MES, Build,
AsDes, AsDes2d, myOffset, aCurrFaceTol);
AsDes, AsDes2d, myOffset, aCurrFaceTol, aDMVV);
}
//
// fuse vertices on edges
BRepOffset_Inter2d::FuseVertices(aDMVV, AsDes2d);
//-----------------------------------------------------------
// Great restriction of new edges and update of AsDes.
//------------------------------------------ ----------------
@@ -1326,12 +1330,13 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
}
}
aDMVV.Clear();
TopTools_ListIteratorOfListOfShape itLFE(LFE);
for (; itLFE.More(); itLFE.Next())
{
const TopoDS_Face& NEF = TopoDS::Face(itLFE.Value());
Standard_Real aCurrFaceTol = BRep_Tool::Tolerance(NEF);
BRepOffset_Inter2d::Compute(AsDes, NEF, NewEdges, aCurrFaceTol);
BRepOffset_Inter2d::Compute(AsDes, NEF, NewEdges, aCurrFaceTol, aDMVV);
}
//----------------------------------------------
// Intersections 2d on caps.
@@ -1341,9 +1346,10 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
{
const TopoDS_Face& Cork = TopoDS::Face(myFaces(i));
Standard_Real aCurrFaceTol = BRep_Tool::Tolerance(Cork);
BRepOffset_Inter2d::Compute(AsDes, Cork, NewEdges, aCurrFaceTol);
BRepOffset_Inter2d::Compute(AsDes, Cork, NewEdges, aCurrFaceTol, aDMVV);
}
//
BRepOffset_Inter2d::FuseVertices(aDMVV, AsDes);
//-------------------------------
// Unwinding of extended Faces.
//-------------------------------
@@ -2909,12 +2915,15 @@ void BRepOffset_MakeOffset::Intersection2D(const TopTools_IndexedMapOfShape& Mod
//-----------------------------------------------
// Intersection of edges 2 by 2.
//-----------------------------------------------
TopTools_IndexedDataMapOfShapeListOfShape aDMVV;
Standard_Integer i;
for (i = 1; i <= Modif.Extent(); i++) {
const TopoDS_Face& F = TopoDS::Face(Modif(i));
BRepOffset_Inter2d::Compute(myAsDes,F,NewEdges,myTol);
BRepOffset_Inter2d::Compute(myAsDes,F,NewEdges,myTol, aDMVV);
}
//
BRepOffset_Inter2d::FuseVertices(aDMVV, myAsDes);
//
#ifdef OCCT_DEBUG
if (AffichInt2d) {
DEBVerticesControl (NewEdges,myAsDes);