From 5d989d42c5356a5cab7b369fc8c67ef41a75e139 Mon Sep 17 00:00:00 2001 From: msv Date: Mon, 12 Sep 2016 10:21:53 +0300 Subject: [PATCH] 0027862: Exception in BRepOffsetAPI_MakePipeShell Check if the shape is not null before querying its ShapeType. --- src/BRepFill/BRepFill_Sweep.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/BRepFill/BRepFill_Sweep.cxx b/src/BRepFill/BRepFill_Sweep.cxx index 93c3d3d01c..411d3049c0 100644 --- a/src/BRepFill/BRepFill_Sweep.cxx +++ b/src/BRepFill/BRepFill_Sweep.cxx @@ -2451,11 +2451,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); } -- 2.39.5