mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
0025453: SIGSEGV in BRepFill_Sweep::BuildShell
Fixed the bug causing exception when the first edge in generated sweep occurs to be degenerated. Comments have been added. Test-case for issue #25453
This commit is contained in:
parent
076ca35c3f
commit
21b7d8be4c
@ -2465,10 +2465,19 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (uclose && (isec==NbLaw)) {
|
if (uclose && (isec==NbLaw)) {
|
||||||
|
if (UEdge(1, ipath).IsNull()) //degenerated case
|
||||||
|
{
|
||||||
|
UEdge(isec+1, ipath) = BuildEdge(S, !exuv, ULast,
|
||||||
|
Vertex(isec+1, ipath),
|
||||||
|
Vertex(isec+1, ipath+1),
|
||||||
|
myTol3d);
|
||||||
|
}
|
||||||
|
else {
|
||||||
UpdateEdge(TopoDS::Edge(UEdge(1, ipath)),
|
UpdateEdge(TopoDS::Edge(UEdge(1, ipath)),
|
||||||
S, !exuv, ULast);
|
S, !exuv, ULast);
|
||||||
UEdge(isec+1, ipath) = UEdge(1, ipath);
|
UEdge(isec+1, ipath) = UEdge(1, ipath);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if (UEdge(isec+1, ipath).IsNull())
|
if (UEdge(isec+1, ipath).IsNull())
|
||||||
UEdge(isec+1, ipath) = BuildEdge(S, !exuv, ULast,
|
UEdge(isec+1, ipath) = BuildEdge(S, !exuv, ULast,
|
||||||
@ -2502,10 +2511,19 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
|
|||||||
S, exuv, VFirst);
|
S, exuv, VFirst);
|
||||||
|
|
||||||
if (vclose && (ipath == NbPath)) {
|
if (vclose && (ipath == NbPath)) {
|
||||||
|
if (VEdge(isec, 1).IsNull()) //degenerated case
|
||||||
|
{
|
||||||
|
VEdge(isec, ipath+1) = BuildEdge(S, exuv, VLast,
|
||||||
|
Vertex(isec , ipath+1),
|
||||||
|
Vertex(isec+1, ipath+1),
|
||||||
|
myTol3d);
|
||||||
|
}
|
||||||
|
else {
|
||||||
UpdateEdge(TopoDS::Edge(VEdge(isec, 1)),
|
UpdateEdge(TopoDS::Edge(VEdge(isec, 1)),
|
||||||
S, exuv, VLast);
|
S, exuv, VLast);
|
||||||
VEdge(isec, ipath+1) = VEdge(isec, 1);
|
VEdge(isec, ipath+1) = VEdge(isec, 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (VEdge(isec, ipath+1).IsNull())
|
else if (VEdge(isec, ipath+1).IsNull())
|
||||||
VEdge(isec, ipath+1) = BuildEdge(S, exuv, VLast,
|
VEdge(isec, ipath+1) = BuildEdge(S, exuv, VLast,
|
||||||
Vertex(isec , ipath+1),
|
Vertex(isec , ipath+1),
|
||||||
|
22
tests/bugs/modalg_5/bug25453
Normal file
22
tests/bugs/modalg_5/bug25453
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "OCC25453"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
#########################################
|
||||||
|
# SIGSEGV in BRepFill_Sweep::BuildShell
|
||||||
|
#########################################
|
||||||
|
|
||||||
|
smallview
|
||||||
|
|
||||||
|
restore [locate_data_file OCC25453_sweep9-draw-Sketch001.brep] Sketch001
|
||||||
|
explode Sketch001 E
|
||||||
|
wire Sweep-0-spine Sketch001_1
|
||||||
|
mksweep Sweep-0-spine
|
||||||
|
setsweep -CF
|
||||||
|
restore [locate_data_file OCC25453_sweep9-draw-Sketch.brep] Sketch
|
||||||
|
trotate Sketch 0 0 0 1 0 0 90
|
||||||
|
addsweep Sketch
|
||||||
|
buildsweep Sweep -C
|
||||||
|
|
||||||
|
fit
|
||||||
|
set only_screen_axo 1
|
Loading…
x
Reference in New Issue
Block a user