1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0027862: Exception in BRepOffsetAPI_MakePipeShell

Check if the shape is not null before querying its ShapeType.
This commit is contained in:
msv
2016-09-12 10:21:53 +03:00
parent 861f38f969
commit 5d989d42c5

View File

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