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

0025333: Result wires obtained after TestHarness command "connectedges" contains internal edges

Fix contains protection in order to avoid addition in result wires INTERNAL or EXTERNAL edges during connecting edges in wires.

Test case for issue #25333
This commit is contained in:
gka 2014-10-09 16:03:27 +04:00 committed by bugmaster
parent ab1469893c
commit 519b544671
2 changed files with 40 additions and 6 deletions

View File

@ -286,6 +286,8 @@ ShapeAnalysis_FreeBounds::ShapeAnalysis_FreeBounds(const TopoDS_Shape& shape,
TopoDS_Wire aCurW = TopoDS::Wire (arrwires->Value (lwire));
Handle(ShapeExtend_WireData) acurwd = new
ShapeExtend_WireData ( TopoDS::Wire (arrwires->Value (lwire)), Standard_True, isUsedManifoldMode);
if( !acurwd->NbEdges())
continue;
sewd->Add (acurwd, (tail ? 0 : 1));
}
else
@ -369,21 +371,22 @@ ShapeAnalysis_FreeBounds::ShapeAnalysis_FreeBounds(const TopoDS_Shape& shape,
// Recherche de la premier edge non traitee pour un autre wire.
//Searching for first edge for next wire
lwire = -1;
for (/*Standard_Integer*/ i = 1 ; i <= arrwires->Length() && lwire == -1; i++)
for (/*Standard_Integer*/ i = 1 ; i <= arrwires->Length(); i++)
{
if (!aSel.ContWire(i))
{
lwire = i; //szv#4:S4163:12Mar99 optimized
sewd->Add (TopoDS::Wire (arrwires->Value (lwire)));
aSel.LoadList(lwire);
if (sewd->NbEdges() > 0)
break;
sewd->Clear();
}
}
if (lwire == -1)
done = 1;
else
{
sewd->Add (TopoDS::Wire (arrwires->Value (lwire)));
aSel.LoadList(lwire);
}
}
}

31
tests/bugs/heal/bug25333 Normal file
View File

@ -0,0 +1,31 @@
puts "========"
puts "OCC25333"
puts "========"
puts ""
##########################################################################################
# Result wires obtained after TestHarness command "connectedges" contains internal edges
##########################################################################################
restore [locate_data_file bug25318_TheShapeTotal.brep] a
connectedges r a
set WireSet [explode r]
set ii 0
set IsFixed "TRUE"
while {$ii != [llength $WireSet]} {
set EdgeSet [explode [lindex $WireSet $ii]]
set iii 0
while {$iii != [llength $EdgeSet]} {
set EdgeInfo [whatis [lindex $EdgeSet $iii]]
if {[lindex $EdgeInfo 5] == "INTERNAL"} {
set IsFixed "FALSE"
}
set iii [expr $iii + 1]
}
set ii [expr $ii + 1]
}
if {$IsFixed == "FALSE"} {
puts "ERROR: OCC25333 is reproduced"
puts " Internal edge is detected"
}