Salome HOME
Variables naming.
[modules/hydro.git] / src / HYDROData / HYDROData_Channel.cxx
index 2159ce7f9d5fbf17a67657ee9045538536b851b7..bd757fbd7b4bc1ba8c1f34edcdf8344f4b641aef 100644 (file)
@@ -13,7 +13,6 @@
 #include <BRepOffsetAPI_MakePipeShell.hxx>
 #include <BRepOffsetAPI_MakePipe.hxx>
 #include <BRepCheck_Analyzer.hxx>
-#include <BRepTools.hxx>
 
 #include <TopExp.hxx>
 
@@ -103,17 +102,24 @@ void HYDROData_Channel::Update()
   if(aProfileWire.IsNull())
     return;
 
+#ifdef DEB_CHANNEL
   BRepTools::Write( aPathWire, "guideline.brep" );
   BRepTools::Write( aProfileWire, "profile.brep" );
+#endif
 
   HYDROData_Canal3dAnd2d aChannelConstructor( aProfileWire, aPathWire );
+  if( aChannelConstructor.GetStatus() != 0 )
+    return;
+
   aChannelConstructor.Create3dPresentation();
   aChannelConstructor.Create2dPresentation();
   SetShape3D( aChannelConstructor.Get3dPresentation() );
   SetTopShape( aChannelConstructor.Get2dPresentation() );
 
+#ifdef DEB_CHANNEL
   BRepTools::Write( aChannelConstructor.Get2dPresentation(), "channel2d.brep" );
   BRepTools::Write( aChannelConstructor.Get3dPresentation(), "channel3d.brep" );
+#endif
 
   TopAbs_ShapeEnum aType = GetTopShape().ShapeType();
 
@@ -123,6 +129,14 @@ void HYDROData_Channel::Update()
   TopoDS_Wire anInlet = aChannelConstructor.GetInlet();
   TopoDS_Wire anOutlet = aChannelConstructor.GetOutlet();
 
+#ifdef DEB_CHANNEL
+  HYDROData_ShapesTool::DumpShapeSubShapes( std::cout, "Top shape edges:", GetTopShape(), TopAbs_EDGE );
+  HYDROData_ShapesTool::DumpShapeSubShapes( std::cout, "Left bank edges:", aLeftBank, TopAbs_EDGE );
+  HYDROData_ShapesTool::DumpShapeSubShapes( std::cout, "Right bank edges:", aRightBank, TopAbs_EDGE );
+  HYDROData_ShapesTool::DumpShapeSubShapes( std::cout, "Inlet edges:", anInlet, TopAbs_EDGE );
+  HYDROData_ShapesTool::DumpShapeSubShapes( std::cout, "Outlet edges:", anOutlet, TopAbs_EDGE );
+#endif
+
   TopTools_SequenceOfShape aLeftBankEdges;
   HYDROData_ShapesTool::ExploreShapeToShapes( aLeftBank, TopAbs_EDGE, aLeftBankEdges );