Set flag Closed to new Wires and Shells created in General Fuse algorithm if necessary.
Test-cases for issue #26420
}//for (; aIt.More(); aIt.Next()) {
}//for (; aItE.More(); aItE.Next()) {
}//for (; aItW.More(); aItW.Next()) {
+ aW.Closed(BRep_Tool::IsClosed(aW));
myLoopsInternal.Append(aW);
}//for (i = 1; (i <= aNbEA) && bFlag; ++i) {
}
}
}
}
+ aW.Closed(BRep_Tool::IsClosed(aW));
theWires.Append(aW);
}
}
#include <BOPDS_VectorOfListOfPaveBlock.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>
}
}
//
+ aCIm.Closed(BRep_Tool::IsClosed(aCIm));
+ //
BOPCol_ListOfShape aLSIm(myAllocator);
aLSIm.Append(aCIm);
myImages.Bind(theS, aLSIm);
// commercial license or contractual agreement.
#include <BRep_Builder.hxx>
+#include <BRep_Tool.hxx>
#include <TopoDS_Edge.hxx>
//purpose :
//=======================================================================
inline void BOPAlgo_WireSplitter::MakeWire(BOPCol_ListOfShape& aLE,
- TopoDS_Wire& aWire)
+ TopoDS_Wire& aWire)
{
BRep_Builder aBB;
aBB.MakeWire(aWire);
for (; aIt.More(); aIt.Next()){
aBB.Add(aWire, aIt.Value());
}
+ aWire.Closed(BRep_Tool::IsClosed(aWire));
}
--- /dev/null
+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."
+}
--- /dev/null
+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."
+}
--- /dev/null
+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."
+}