Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,12 @@ static void connectWiresToWiresImpl(
{
if (!aSel.ContWire(i))
{
lwire = i;
sewd->Add(TopoDS::Wire(arrwires->Value(lwire)));
aSel.LoadList(lwire);
sewd->Add(TopoDS::Wire(arrwires->Value(i)));
aSel.LoadList(i);

if (sewd->NbEdges() > 0)
{
lwire = i;
break;
}
sewd->Clear();
Expand Down
26 changes: 26 additions & 0 deletions tests/bugs/heal/bug1330
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
puts "=========="
puts "BUG1330"
puts "=========="

# ShapeAnalysis_FreeBounds::ConnectEdgesToWires crash (Standard_OutOfRange
# NCollection_Sequence::Value) with 2 wires, the first a valid loop and
# the second a single internal-oriented edge

pload MODELING

# Create w1, a valid closed loop
polyline w1 0 0 0 1 0 0 0 1 0 0 0 0

# Create w2, a wire composd of a single *internal orientation* edge
vertex v1 0 0 0
vertex v2 2 -1 0
edge e v1 v2
orientation e I
shape w2 W
add e w2


# Invoke connectWiresToWiresImpl on the pair of wires (order matters)
# This should succeed, but instead it throws Standard_OutOfRange: NCollection_Sequence::Value
compound w1 w2 c
connectedges result c
Loading