mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +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,9 +2465,18 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
|
||||
}
|
||||
|
||||
if (uclose && (isec==NbLaw)) {
|
||||
UpdateEdge(TopoDS::Edge(UEdge(1, ipath)),
|
||||
S, !exuv, ULast);
|
||||
UEdge(isec+1, ipath) = UEdge(1, ipath);
|
||||
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)),
|
||||
S, !exuv, ULast);
|
||||
UEdge(isec+1, ipath) = UEdge(1, ipath);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (UEdge(isec+1, ipath).IsNull())
|
||||
@ -2502,9 +2511,18 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
|
||||
S, exuv, VFirst);
|
||||
|
||||
if (vclose && (ipath == NbPath)) {
|
||||
UpdateEdge(TopoDS::Edge(VEdge(isec, 1)),
|
||||
S, exuv, VLast);
|
||||
VEdge(isec, ipath+1) = VEdge(isec, 1);
|
||||
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)),
|
||||
S, exuv, VLast);
|
||||
VEdge(isec, ipath+1) = VEdge(isec, 1);
|
||||
}
|
||||
}
|
||||
else if (VEdge(isec, ipath+1).IsNull())
|
||||
VEdge(isec, ipath+1) = BuildEdge(S, exuv, VLast,
|
||||
|
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