From: adv Date: Fri, 31 Jan 2014 10:53:31 +0000 (+0000) Subject: Minor changes. X-Git-Tag: BR_hydro_v_1_0~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b578011fe730e320bdd1c4a43a708dfd6365a728;p=modules%2Fhydro.git Minor changes. --- diff --git a/src/HYDROData/HYDROData_SplitToZonesTool.cxx b/src/HYDROData/HYDROData_SplitToZonesTool.cxx index 95c514de..ae9518b3 100644 --- a/src/HYDROData/HYDROData_SplitToZonesTool.cxx +++ b/src/HYDROData/HYDROData_SplitToZonesTool.cxx @@ -65,13 +65,13 @@ Standard_Boolean buildLimFace(const TopoDS_Wire& theBndWire, TopoDS_Face& outFac aPln = gp_Pln(aCPnt, gp::OZ().Direction()); BRepBuilderAPI_MakeFace aMkFace(aPln, theBndWire); if(aMkFace.IsDone()) { - outFace = aMkFace.Face(); + outFace = aMkFace.Face(); if(!outFace.IsNull()) { #ifdef DEB_SPLIT_TO_ZONES -// BRepTools::Write(limFace,"FL.brep"); +// BRepTools::Write(limFace,"FL.brep"); #endif return Standard_True; - } + } } return Standard_False; } @@ -83,7 +83,7 @@ void HYDROData_SplitToZonesTool::SetFileNames(const QString& theNameBefore, cons if(!theNameBefore.isNull() && !theNameBefore.isEmpty()) { TCollection_AsciiString aName (theNameBefore.toStdString().data()); - fileNameBefore = aName; + fileNameBefore = aName; } if(!theNameAfter.isNull() && !theNameAfter.isEmpty()) { @@ -94,7 +94,7 @@ void HYDROData_SplitToZonesTool::SetFileNames(const QString& theNameBefore, cons } //====================================================================================== Standard_Integer HYDROData_SplitToZonesTool::SplitFaces(const TopoDS_Compound& theComp, - HYDROData_Transform& theTool) + HYDROData_Transform& theTool) { theTool.Clear(); theTool.SetArgument(theComp); @@ -173,28 +173,28 @@ HYDROData_SplitToZonesTool::SplitDataList SplitData aSplitData( SplitData::Data_Edge, anEdge, aGeomGroup->GetName() ); anInputGroupList.append( aSplitData ); } - } + } } else { SplitData aSplitData( SplitData::Data_Edge, aGroupShape, aGeomGroup->GetName() ); anInputGroupList.append( aSplitData ); #ifdef DEB_SPLIT_TO_ZONES - QString aStr = aSplitData.ObjectNames.join(" "); - cout << "Group# = " < 1) { - HYDROData_Transform splitTool; - const Standard_Integer anErr = SplitFaces(aCmp, splitTool); - if(anErr) - return anOutputSplitDataList; - aResult = splitTool.Shape(); - if (aResult.IsNull()) - return anOutputSplitDataList; - BRepCheck_Analyzer aCheck (aResult); - if(!aCheck.IsValid()) { -#ifdef DEB_SPLIT_TO_ZONES - cout << "result is not valid" <GetName(); - hasLimits = Standard_True; // DM2 should be filled here - TopExp_Explorer exp (limFace, TopAbs_EDGE); - for (int i =1;exp.More();exp.Next(),i++) { + BRepTools::Write(aComResult,"CommonV.brep"); + BRepTools::Write(limFace,"limFace.brep"); +#endif + aBndName = thePolyline->GetName(); + hasLimits = Standard_True; // DM2 should be filled here + TopExp_Explorer exp (limFace, TopAbs_EDGE); + for (int i =1;exp.More();exp.Next(),i++) { const TopoDS_Shape& anEdge = exp.Current(); - if(anEdge.IsNull()) continue; - aBndView.Add(anEdge); - QStringList aListOfNames; - aListOfNames.append(aBndName); - aDM3.Bind(anEdge, aListOfNames); - TopTools_ListOfShape aList; - aList.Append(anEdge); - aDM1.Bind(anEdge,aList); - } - HYDROData_MapOfShape aView; - exp.Init (aResult, TopAbs_FACE); - for (int i =1;exp.More();exp.Next(),i++) { + if(anEdge.IsNull()) continue; + aBndView.Add(anEdge); + QStringList aListOfNames; + aListOfNames.append(aBndName); + aDM3.Bind(anEdge, aListOfNames); + TopTools_ListOfShape aList; + aList.Append(anEdge); + aDM1.Bind(anEdge,aList); + } + HYDROData_MapOfShape aView; + exp.Init (aResult, TopAbs_FACE); + for (int i =1;exp.More();exp.Next(),i++) { const TopoDS_Shape& aFace = exp.Current(); - if(!aFace.IsNull()) { - const TopTools_ListOfShape& aListOfNew = mkCom.Modified(aFace); - //cout << "Modified: " << aListOfNew.Extent() <