1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0028259: Method MakeBlocksCnx is duplicated in two different places in BOPAlgo

The methods BOPAlgo_Tools::MakeBlocksCnx(), BOPAlgo_Tools::MakeBlocks() and static method MakeBlocksCnx in BOPAlgo_Builder_2.cxx have been replaced with the new template method BOPAlgo_Tools::MakeBlocks(). The blocks of connected elements are now stored into the list of list instead of data map.
All methods BOPAlgo_Tools::FillMap() have been replaced with the new template method BOPAlgo_Tools::FillMap().

Making the Pave Block with the smallest index of original edge to be the first in the Common Block (i.e. the representing Pave Block).

The following improvements have been made in Boolean Operations algorithm to avoid regressions:
- When updating the existing common block update its pave blocks in a way that the parameters of the paves should be valid for the original edge (bugs/modalg_5/bug24809);
- When trying to reduce the tolerance of the section edge check the tolerance of all Face/Face interferences that created this edge (boolean/volumemaker/C4,D2);
- Avoid producing the different Pave Blocks for the same section edge (boolean/volumemaker/D6);

Adjustment of the test cases.
This commit is contained in:
emv
2017-04-30 01:09:36 +03:00
committed by bugmaster
parent 884cafd893
commit edfa30deef
22 changed files with 305 additions and 641 deletions

View File

@@ -223,8 +223,11 @@ void BRepOffset_Inter3d::FaceInter(const TopoDS_Face& F1,
if (F1.IsSame(F2)) return;
if (IsDone(F1,F2)) return;
const TopoDS_Shape& InitF1 = InitOffsetFace.ImageFrom(F1);
const TopoDS_Shape& InitF2 = InitOffsetFace.ImageFrom(F2);
if (InitF1.IsSame(InitF2)) return;
Standard_Boolean InterPipes = (InitF2.ShapeType() == TopAbs_EDGE &&
InitF1.ShapeType() == TopAbs_EDGE );
Standard_Boolean InterFaces = (InitF1.ShapeType() == TopAbs_FACE &&

View File

@@ -731,7 +731,10 @@ static void MakeList (TopTools_ListOfShape& OffsetFaces,
const TopoDS_Shape& Root = itLOF.Value();
if (!myFaces.Contains(Root)) {
if (myInitOffsetFace.HasImage(Root)) {
OffsetFaces.Append(myInitOffsetFace.Image(Root).First());
TopTools_ListIteratorOfListOfShape aItLS(myInitOffsetFace.Image(Root));
for (; aItLS.More(); aItLS.Next()) {
OffsetFaces.Append(aItLS.Value());
}
}
}
}

View File

@@ -5205,8 +5205,14 @@ void UpdateValidEdges(const TopTools_IndexedDataMapOfShapeListOfShape& theFImage
//
// intersect valid splits with bounds and update both
BOPAlgo_Builder aGF;
aGF.AddArgument(aSplits);
// The order is important here, because we need to keep the
// unmodified edges from the Bounds in the resulting maps.
// In case of total coincidence of the edges with the same vertices
// the edges in the common block will not be split and no new
// edges will be created and the first pave block
// will be used as a real pave block.
aGF.AddArgument(aBounds);
aGF.AddArgument(aSplits);
aGF.Perform();
//
// update splits
@@ -5222,7 +5228,7 @@ void UpdateValidEdges(const TopTools_IndexedDataMapOfShapeListOfShape& theFImage
UpdateOrigins(aLABounds, theEdgesOrigins, aGF);
UpdateIntersectedEdges(aLABounds, theETrimEInf, aGF);
//
// update the edges to avoid with the splits
// update the EdgesToAvoid with the splits
TopTools_IndexedMapOfShape aNewEdges;
const TopTools_ListOfShape* pSplitsIm = aGF.Images().Seek(aSplits);
if (pSplitsIm) {
@@ -5240,7 +5246,7 @@ void UpdateValidEdges(const TopTools_IndexedDataMapOfShapeListOfShape& theFImage
for (; aItLEIm.More(); aItLEIm.Next()) {
const TopoDS_Shape& aEIm = aItLEIm.Value();
if (!aNewEdges.Contains(aEIm)) {
theEdgesToAvoid.Add(aItLEIm.Value());
theEdgesToAvoid.Add(aEIm);
}
}
}