From: szy Date: Mon, 13 Jan 2014 13:24:50 +0000 (+0000) Subject: 13.01.2014. Added some debugging code. X-Git-Tag: BR_hydro_v_1_0~104 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f6e82cafbb285e25b68609759bb187e43faef8e5;p=modules%2Fhydro.git 13.01.2014. Added some debugging code. --- diff --git a/src/HYDROData/HYDROData_SplitToZonesTool.cxx b/src/HYDROData/HYDROData_SplitToZonesTool.cxx index 998667b7..42b8a1b6 100644 --- a/src/HYDROData/HYDROData_SplitToZonesTool.cxx +++ b/src/HYDROData/HYDROData_SplitToZonesTool.cxx @@ -23,10 +23,13 @@ #include #include -//#define DEB_SPLIT_TO_ZONES 1 -#ifdef DEB_SPLIT_TO_ZONES +#define DEB_SPLIT_TO_ZONES 1 +#define DEB_SPLIT_TO_ZONES_CHECK_PARTITION 1 +#if (defined (DEB_SPLIT_TO_ZONES) || defined(DEB_SPLIT_TO_ZONES_CHECK_PARTITION)) #include +static TCollection_AsciiString fileNameBefore("BeforeTranslation"); #endif + TopoDS_Face HYDROData_SplitToZonesTool::SplitData::Face() const { TopoDS_Face aResFace; @@ -187,6 +190,11 @@ HYDROData_SplitToZonesTool::SplitDataList //TCollection_AsciiString aName = aNam + i + ".brep"; //BRepTools::Write(aSh, aName.ToCString()); } +#ifdef DEB_SPLIT_TO_ZONES_CHECK_PARTITION + TCollection_AsciiString aNameBefore = fileNameBefore + ".brep"; + BRepTools::Write(aCmp, aNameBefore.ToCString()); +#endif + HYDROData_Transform splitTool; const Standard_Integer anErr = SplitFaces(aCmp, splitTool); if(anErr) @@ -209,8 +217,8 @@ HYDROData_SplitToZonesTool::SplitDataList // Step 3. Collect history HYDROData_DataMapOfShapeListOfShape aDM1; BOPCol_ListIteratorOfListOfShape anIt(aLS); - //TCollection_AsciiString aNamM ("EdgM_"); - //TCollection_AsciiString aNamG ("EdgG_"); + TCollection_AsciiString aNamM ("EdgM_"); + TCollection_AsciiString aNamG ("EdgG_"); for (int i =1;anIt.More();anIt.Next(),i++) { Standard_Boolean foundF(Standard_False); const TopTools_ListOfShape& aListOfNew = splitTool.Modified(anIt.Value()); @@ -230,7 +238,9 @@ HYDROData_SplitToZonesTool::SplitDataList if(!foundF) // face is not modified aList.Append (anIt.Value()); aDM1.Bind(anIt.Value(), aList); - //TCollection_AsciiString aName; +#ifdef DEB_SPLIT_TO_ZONES + TCollection_AsciiString aName; +#endif if(!anInputGroupList.isEmpty() ) { // 1 aList.Clear(); TopExp_Explorer exp (anIt.Value(), TopAbs_EDGE); @@ -254,11 +264,14 @@ HYDROData_SplitToZonesTool::SplitDataList //BRepTools::Write(it.Value(),aName.ToCString()); } //cout << "NB_EDGE = " << aList.Extent() <Shape(); +#ifdef DEB_SPLIT_TO_ZONES_CHECK_PARTITION + TCollection_AsciiString aNameBefore = fileNameAfter + ".brep"; + BRepTools::Write(aS1, aNameBefore.ToCString()); +#endif // aIt.Initialize(aS1); for (; aIt.More(); aIt.Next()) {