1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-21 10:13:43 +03:00

0026420: BOPAlgo_Builder resets "Closed" flag in the result

Set flag Closed to new Wires and Shells created in General Fuse algorithm if necessary.

Test-cases for issue #26420
This commit is contained in:
emv 2015-07-29 15:29:42 +03:00 committed by abv
parent 9926d83075
commit f85265c252
6 changed files with 76 additions and 1 deletions

View File

@ -445,6 +445,7 @@ void BOPAlgo_BuilderFace::PerformLoops()
}//for (; aIt.More(); aIt.Next()) { }//for (; aIt.More(); aIt.Next()) {
}//for (; aItE.More(); aItE.Next()) { }//for (; aItE.More(); aItE.Next()) {
}//for (; aItW.More(); aItW.Next()) { }//for (; aItW.More(); aItW.Next()) {
aW.Closed(BRep_Tool::IsClosed(aW));
myLoopsInternal.Append(aW); myLoopsInternal.Append(aW);
}//for (; aItM.More(); aItM.Next()) { }//for (; aItM.More(); aItM.Next()) {
} }
@ -817,6 +818,7 @@ void MakeInternalWires(const BOPCol_MapOfShape& theME,
} }
} }
} }
aW.Closed(BRep_Tool::IsClosed(aW));
theWires.Append(aW); theWires.Append(aW);
} }
} }

View File

@ -34,6 +34,12 @@
#include <BOPDS_ShapeInfo.hxx> #include <BOPDS_ShapeInfo.hxx>
#include <BOPTools_AlgoTools.hxx> #include <BOPTools_AlgoTools.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <IntTools_Context.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
//======================================================================= //=======================================================================
//function : FillImagesVertices //function : FillImagesVertices
@ -241,6 +247,8 @@
} }
} }
// //
aCIm.Closed(BRep_Tool::IsClosed(aCIm));
//
BOPCol_ListOfShape aLSIm(myAllocator); BOPCol_ListOfShape aLSIm(myAllocator);
aLSIm.Append(aCIm); aLSIm.Append(aCIm);
myImages.Bind(theS, aLSIm); myImages.Bind(theS, aLSIm);

View File

@ -13,6 +13,7 @@
// commercial license or contractual agreement. // commercial license or contractual agreement.
#include <BRep_Builder.hxx> #include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <TopoDS_Edge.hxx> #include <TopoDS_Edge.hxx>
@ -94,4 +95,5 @@ typedef NCollection_IndexedDataMap<TopoDS_Shape, \
for (; aIt.More(); aIt.Next()){ for (; aIt.More(); aIt.Next()){
aBB.Add(aWire, aIt.Value()); aBB.Add(aWire, aIt.Value());
} }
aWire.Closed(BRep_Tool::IsClosed(aWire));
} }

View File

@ -0,0 +1,21 @@
puts "========"
puts "OCC26420"
puts "========"
puts ""
######################################################
# BOPAlgo_Builder resets "Closed" flag in the result
######################################################
polyline pp 0 4 0 7 4 0 7 6 0 0 6 0 0 4 0
vertex v0 5 4 0
vertex v1 4 6 0
bclearobjects
bcleartools
baddobjects v0 v1 pp
bfillds
bbuild r
explode r w
set bug_info [whatis r_1]
if {[lindex $bug_info 8] != "Closed"} {
puts "ERROR: OCC26420 is reproduced. Flag CLOSED is not set."
}

View File

@ -0,0 +1,22 @@
puts "========"
puts "OCC26420"
puts "========"
puts ""
######################################################
# BOPAlgo_Builder resets "Closed" flag in the result
######################################################
polyline pp 0 4 0 7 4 0 7 6 0 0 6 0 0 4 0
mkplane ff pp
vertex v0 5 4 0
vertex v1 4 6 0
bclearobjects
bcleartools
baddobjects v0 v1 ff
bfillds
bbuild r
explode r w
set bug_info [whatis r_1]
if {[lindex $bug_info 8] != "Closed"} {
puts "ERROR: OCC26420 is reproduced. Flag CLOSED is not set."
}

View File

@ -0,0 +1,20 @@
puts "========"
puts "OCC26420"
puts "========"
puts ""
######################################################
# BOPAlgo_Builder resets "Closed" flag in the result
######################################################
box bb 0 0 0 5 5 5
explode bb sh
polyline pp -1 -1 2 -1 6 2 6 6 2 6 -1 2 -1 -1 2
mkplane pl pp
baddobjects pl bb_1
bfillds
bbuild r
explode r sh
set bug_info [whatis r_1]
if {[lindex $bug_info 8] != "Closed"} {
puts "ERROR: OCC26420 is reproduced. Flag CLOSED is not set."
}