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

0027862: Exception in BRepOffsetAPI_MakePipeShell

Check if the shape is not null before querying its ShapeType.
Create test case for the bug.

Small correction of test case for issue CR27862
This commit is contained in:
msv 2016-09-12 10:21:53 +03:00 committed by bugmaster
parent 4897e58dcd
commit ef444297f5
2 changed files with 17 additions and 5 deletions

View File

@ -2606,11 +2606,12 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
B.MakeCompound(Comp);
for (isec=1; isec <= NbLaw+1; isec++)
for (ipath=1, IPath=IFirst; ipath<= NbPath+1; ipath++, IPath++) {
if (ipath <= NbPath) myUEdges->SetValue(isec, IPath, UEdge(isec, ipath));
if (isec <= NbLaw) myVEdges->SetValue(isec, IPath, VEdge(isec, ipath));
if ((ipath <= NbPath) && (isec <= NbLaw) &&
(myFaces->Value(isec, IPath).ShapeType() == TopAbs_FACE))
B.Add(Comp, myFaces->Value(isec, IPath));
if (ipath <= NbPath) myUEdges->SetValue(isec, IPath, UEdge(isec, ipath));
if (isec <= NbLaw) myVEdges->SetValue(isec, IPath, VEdge(isec, ipath));
if ((ipath <= NbPath) && (isec <= NbLaw) &&
!myFaces->Value(isec, IPath).IsNull() &&
myFaces->Value(isec, IPath).ShapeType() == TopAbs_FACE)
B.Add(Comp, myFaces->Value(isec, IPath));
}
BRepLib::EncodeRegularity(Comp, myTolAngular);
}

View File

@ -0,0 +1,11 @@
puts "============"
puts "OCC27862"
puts "============"
puts ""
######################################################
# Exception in BRepOffsetAPI_MakePipeShell
######################################################
restore [locate_data_file bug27862.brep] a
explode a
pipe r a_1 a_2