0027557: Unstable HLR tests
[occt.git] / src / HLRTest / HLRTest.cxx
index 891dc05..2af070d 100644 (file)
@@ -487,11 +487,14 @@ static Standard_Integer hlrin3d(Draw_Interpretor& , Standard_Integer n, const ch
   BB.MakeCompound(Result);
   
   TopoDS_Shape SharpEdges = Reflector.GetCompoundOf3dEdges(HLRBRep_Sharp, Standard_True, Standard_True);
-  BB.Add(Result, SharpEdges);
+  if (!SharpEdges.IsNull())
+    BB.Add(Result, SharpEdges);
   TopoDS_Shape OutLines = Reflector.GetCompoundOf3dEdges(HLRBRep_OutLine, Standard_True, Standard_True);
-  BB.Add(Result, OutLines);
+  if (!OutLines.IsNull())
+    BB.Add(Result, OutLines);
   TopoDS_Shape SmoothEdges = Reflector.GetCompoundOf3dEdges(HLRBRep_Rg1Line, Standard_True, Standard_True);
-  BB.Add(Result, SmoothEdges);
+  if (!SmoothEdges.IsNull())
+    BB.Add(Result, SmoothEdges);
   
   DBRep::Set(a[1], Result);