Standard_Boolean BRepSweep_NumLinearRegularSweep::IsUsed(const TopoDS_Shape& aGenS) const
{
Standard_Integer iGenS = myGenShapeTool.Index(aGenS);
- Standard_OutOfRange_Raise_if(iGenS == 0,
- "BRepSweep_NumLinearRegularSweep::IsUsed: shape index = 0")
+ if (iGenS == 0)
+ {
+ return Standard_False;
+ }
Standard_Integer j;
Standard_Boolean isBuilt = Standard_False;
Standard_Boolean isUsed = Standard_False;
Standard_Boolean BRepSweep_NumLinearRegularSweep::GenIsUsed(const TopoDS_Shape& aGenS) const
{
Standard_Integer iGenS = myGenShapeTool.Index(aGenS);
- Standard_OutOfRange_Raise_if(iGenS == 0,
- "BRepSweep_NumLinearRegularSweep::GenIsUsed: shape index = 0")
+ if (iGenS == 0)
+ {
+ return Standard_False;
+ }
if (iGenS == 1)
{
return myBuiltShapes(iGenS, 1);
return 0;
}
+//=======================================================================
+//function : OCC31294
+//purpose : check list of shapes generated from shape, which is not any subshape
+// of input shape for prism algorithm
+//=======================================================================
+#include <BRepPrimAPI_MakePrism.hxx>
+#include <BRepBuilderAPI_MakeVertex.hxx>
+static Standard_Integer OCC31294(Draw_Interpretor& di, Standard_Integer, const char**)
+{
+ BRepBuilderAPI_MakeVertex mkVert(gp_Pnt(0., 0., 0.));
+ BRepBuilderAPI_MakeVertex mkDummy(gp_Pnt(0., 0., 0.));
+ BRepPrimAPI_MakePrism mkPrism(mkVert.Shape(), gp_Vec(0., 0., 1.));
+
+ Standard_Integer nbgen = mkPrism.Generated(mkVert.Shape()).Extent();
+ Standard_Integer nbdummy = mkPrism.Generated(mkDummy.Shape()).Extent();
+
+ if (nbgen != 1 || nbdummy != 0)
+ {
+ di << "Error: wrong generated list \n";
+ }
+
+ return 0;
+}
+
void QABugs::Commands_20(Draw_Interpretor& theCommands) {
const char *group = "QABugs";
theCommands.Add("OCC30704", "OCC30704", __FILE__, OCC30704, group);
theCommands.Add("OCC30704_1", "OCC30704_1", __FILE__, OCC30704_1, group);
+ theCommands.Add("OCC31294", "OCC31294", __FILE__, OCC31294, group);
return;
}
--- /dev/null
+puts "======================================================="
+puts "0031294: Modeling Algorithms - Regression relatively 7.3.0."
+puts "Crash in method BRepPrimAPI_MakePrism::Generated(...) if input sub-shape does not belong to the base shape"
+puts "======================================================="
+puts ""
+
+pload QAcommands
+OCC31294
\ No newline at end of file