case TopAbs_WIRE :
{
- Standard_Integer ii = InitialLength+1;
Handle(BRepFill_ShapeLaw) Section =
- new (BRepFill_ShapeLaw) (TopoDS::Wire(S), Standard_False);
- InitialLength += Section->NbLaw();
-
- for (; (ii<=InitialLength) && (!result); ii++) {
- if (E.IsSame(Section->Edge(ii)) ) result = ii;
+ new (BRepFill_ShapeLaw) (TopoDS::Wire(S), Standard_False);
+ Standard_Integer NbLaw = Section->NbLaw();
+
+ for (Standard_Integer ii = 1; (ii<=NbLaw) && (!result); ii++) {
+ if (E.IsSame(Section->Edge(ii)) ) result = InitialLength + ii;
}
+ InitialLength += NbLaw;
break;
}
return 0;
}
+//=======================================================================
+//function : OCC26553
+//purpose :
+//=======================================================================
+#include <BRepBuilderAPI_MakeWire.hxx>
+
+static Standard_Integer OCC26553 (Draw_Interpretor& theDI, Standard_Integer theArgc, const char** theArgv)
+{
+ if (theArgc < 2)
+ {
+ theDI << "Error: path to file with shell is missing\n";
+ return 1;
+ }
+
+ BRep_Builder aBuilder;
+ TopoDS_Shape aShell;
+ BRepTools::Read(aShell, theArgv[1], aBuilder);
+
+ if (aShell.IsNull())
+ {
+ theDI << "Error: shell not loaded\n";
+ return 1;
+ }
+
+ TopoDS_Edge aPipeEdge = BRepBuilderAPI_MakeEdge (gp_Pnt (0, 0, 0), gp_Pnt (0, 0, 10));
+ TopoDS_Wire aPipeWire = BRepBuilderAPI_MakeWire(aPipeEdge).Wire();
+
+ BRepOffsetAPI_MakePipe aPipeBuilder(aPipeWire, aShell);
+ if (!aPipeBuilder.IsDone())
+ {
+ theDI << "Error: failed to create pipe\n";
+ return 1;
+ }
+
+ for (TopExp_Explorer aShapeExplorer(aShell, TopAbs_EDGE); aShapeExplorer.More(); aShapeExplorer.Next ()) {
+ const TopoDS_Shape& aGeneratedShape = aPipeBuilder.Generated(aPipeEdge, aShapeExplorer.Current());
+ if (aGeneratedShape.IsNull())
+ {
+ theDI << "Error: null shape\n";
+ return 1;
+ }
+ }
+
+ theDI << "History returned successfully\n";
+ return 0;
+}
+
void QABugs::Commands_19(Draw_Interpretor& theCommands) {
const char *group = "QABugs";
theCommands.Add ("OCC26139", "OCC26139 [-boxsize value] [-boxgrid value] [-compgrid value]", __FILE__, OCC26139, group);
theCommands.Add ("OCC26195", "OCC26195 x1_pix y1_pix [x2_pix y2_pix] [toPrintPixelCoord 0|1]", __FILE__, OCC26195, group);
theCommands.Add ("OCC26462", "OCC26462", __FILE__, OCC26462, group);
+ theCommands.Add ("OCC26553", "OCC26553 file_path", __FILE__, OCC26553, group);
return;
}