Salome HOME
Abort document operation after error in process apply (Bug #340).
[modules/hydro.git] / src / HYDROData / HYDROData_Pipes.cxx
index 5147d01e0edd936c7ed6bcfe4dae975747177463..997f8a208bf744e90d917c921720e1ac85bc0654 100644 (file)
@@ -971,6 +971,8 @@ HYDROData_Canal3dAnd2d::HYDROData_Canal3dAnd2d(const TopoDS_Wire& Profile,
   MakeSharpVertexList();
   if (!mySharpVertexList.IsEmpty())
     MakeFillet();
+  else
+    myGuideline = myOriginalGuideline;
 
   ProjectWireOntoXOY(myGuideline, myProjectedGuideline);
   Make2dProfile();
@@ -1218,7 +1220,10 @@ Standard_Boolean HYDROData_Canal3dAnd2d::Create3dPresentation()
   mySweep3d = new BRepOffsetAPI_MakePipeShell(myGuideline);
   mySweep3d->SetMode(gp::DZ()); //optional
   mySweep3d->Add(myTransformedProfile3d);
-  //mySweep3d->SetTransitionMode(BRepBuilderAPI_RightCorner); //optional
+  //Set approx parameters
+  mySweep3d->SetMaxDegree(14);
+  mySweep3d->SetMaxSegments(500);
+  ///////////////////////
   mySweep3d->Build();
   if (!mySweep3d->IsDone())
     return Standard_False;
@@ -1234,7 +1239,10 @@ Standard_Boolean HYDROData_Canal3dAnd2d::Create2dPresentation()
   mySweep2d = new BRepOffsetAPI_MakePipeShell(myProjectedGuideline);
   mySweep2d->SetMode(gp::DZ()); //optional
   mySweep2d->Add(myTransformedProfile2d);
-  //mySweep2d->SetTransitionMode(BRepBuilderAPI_RightCorner); //optional
+  //Set approx parameters
+  mySweep2d->SetMaxDegree(14);
+  mySweep2d->SetMaxSegments(500);
+  ///////////////////////
   mySweep2d->Build();
   if (!mySweep2d->IsDone())
     return Standard_False;
@@ -1276,7 +1284,7 @@ TopoDS_Wire HYDROData_Canal3dAnd2d::GetBank(const TopoDS_Vertex& aFreeVertex)
   return aBankOnUnifiedPipe2d;
 }
 
-TopoDS_Wire Canal3dAnd2d::CreateWireOnUnifiedPipe2d(const TopoDS_Wire& aWireOnPipe2d)
+TopoDS_Wire HYDROData_Canal3dAnd2d::CreateWireOnUnifiedPipe2d(const TopoDS_Wire& aWireOnPipe2d)
 {
   BRepLib_MakeWire MW;
   BRepTools_WireExplorer wexp(aWireOnPipe2d);