return 0;
}
+#include <ShapeFix_Wireframe.hxx>
+//=======================================================================
+//function : OCC7570
+//purpose :
+//=======================================================================
+static Standard_Integer OCC7570 (Draw_Interpretor& di, Standard_Integer n, const char** a)
+{
+ if (n != 2) {
+ di<<"Usage: "<<a[0]<<" invalid number of arguments"<<"\n";
+ return 1;
+ }
+ TopoDS_Shape in_shape (DBRep::Get (a[1]));
+ ShapeFix_Wireframe fix_tool (in_shape);
+ fix_tool.ModeDropSmallEdges () = Standard_True;
+ fix_tool.SetPrecision (1.e+6);
+ fix_tool.SetLimitAngle (0.01);
+ fix_tool.FixSmallEdges ();
+ TopoDS_Shape new_shape = fix_tool.Shape ();
+ return 0;
+}
+
/*****************************************************************************/
void QABugs::Commands_19(Draw_Interpretor& theCommands) {
theCommands.Add ("OCC25043", "OCC25043 shape", __FILE__, OCC25043, group);
theCommands.Add ("OCC24606", "OCC24606 : Tests ::FitAll for V3d view ('vfit' is for NIS view)", __FILE__, OCC24606, group);
theCommands.Add ("OCC25202", "OCC25202 res shape numF1 face1 numF2 face2", __FILE__, OCC25202, group);
+ theCommands.Add ("OCC7570", "OCC7570 shape", __FILE__, OCC7570, group);
return;
}
TopoDS_Shape res;
if ( cont.IsBound ( shape1 ) )
{
- res = cont.Find ( shape1 ).Oriented ( shape1.Orientation() );
+ res = cont.Find ( shape1 ).Oriented ( shape1.Orientation() );
}
else
{
- myShape = shape1;
- FixSmallEdges();
- res = Shape();
- cont.Bind(myShape,res);
+ myShape = shape1;
+ FixSmallEdges();
+ res = Shape();
+ cont.Bind(myShape,res);
}
if ( ! res.IsSame ( shape1 ) ) locModified = Standard_True;
+
+ //check if resulting shape if not empty
+ if( res.IsNull())
+ continue;
+
res.Location ( L );
B.Add ( C, res );
--- /dev/null
+puts "======="
+puts "OCC7570"
+puts "======="
+puts ""
+##################################################
+# Exception in ShapeFix_Wireframe::FixSmallEdges
+##################################################
+
+pload QAcommands
+
+restore [locate_data_file bug7570_small.brep] a
+
+OCC7570 a