X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FNMTAlgo%2FNMTAlgo_Splitter.cxx;h=a922453462424076a201a51c19a574b0e8972418;hb=52a39bebf31f3f73230d6d6ac4ff127c8ca421dc;hp=83b82b84d54138d0ababbc374e6b8bb715130187;hpb=d3dd282390888d7dc091ba2c2ffe7923bd7458e6;p=modules%2Fgeom.git diff --git a/src/NMTAlgo/NMTAlgo_Splitter.cxx b/src/NMTAlgo/NMTAlgo_Splitter.cxx index 83b82b84d..a92245346 100644 --- a/src/NMTAlgo/NMTAlgo_Splitter.cxx +++ b/src/NMTAlgo/NMTAlgo_Splitter.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// // File: NMTAlgo_Splitter.cxx // Created: Thu Jan 29 17:13:03 2004 // Author: Peter KURNEV @@ -114,6 +133,9 @@ static myObjShapes.Clear(); myToolShapes.Clear(); myMapSIFC.Clear(); + //modified by NIZNHY-PKV Mon Jan 24 09:47:37 2005f + myModifiedFaces.Clear(); + //modified by NIZNHY-PKV Mon Jan 24 09:47:41 2005t myErrorStatus=0; } //======================================================================= @@ -287,12 +309,18 @@ static return; } // - if (!mySourceShapes.Extent()){ + if (!mySourceShapes.Extent()) { // No source shapes to treat myErrorStatus=103; return; } // + if (!aDSF.IsDone()) { + // NMTTools_DSFiller failed + myErrorStatus=104; + return; + } + // NMTAlgo_Builder::ComputeWithFiller(aDSF); // myIsComputed=Standard_True; @@ -472,10 +500,13 @@ static TopTools_ListIteratorOfListOfShape aItS, aItFI; TopExp_Explorer aExp; TopAbs_Orientation aOriFS; - TopoDS_Face aFIx; + TopoDS_Face aFIx, aFIy; BRep_Builder aBB; // myImageShape.Clear(); + //modified by NIZNHY-PKV Mon Jan 24 09:48:15 2005f + myModifiedFaces.Clear(); + //modified by NIZNHY-PKV Mon Jan 24 09:48:18 2005t // aItS.Initialize(myListShapes); for ( ;aItS.More(); aItS.Next()) { @@ -490,6 +521,14 @@ static // if (!myImagesFaces.HasImage(aFS)) { myQueryShapes.Add(aFS); + //modified by NIZNHY-PKV Mon Jan 24 09:50:42 2005 f + if (!myModifiedFaces.IsBound(aFS)) { + TopTools_ListOfShape aLS; + // + aLS.Append(aFS); + myModifiedFaces.Bind(aFS, aLS); + } + //modified by NIZNHY-PKV Mon Jan 24 09:50:44 2005 t continue; } // @@ -510,10 +549,28 @@ static aFSDIx.Reverse(); } myQueryShapes.Add(aFSDIx); + //modified by NIZNHY-PKV Mon Jan 24 09:56:06 2005f + aFIy=aFSDIx; + //modified by NIZNHY-PKV Mon Jan 24 09:56:09 2005t } else { myQueryShapes.Add(aFIx); + //modified by NIZNHY-PKV Mon Jan 24 09:56:06 2005f + aFIy=aFIx; + //modified by NIZNHY-PKV Mon Jan 24 09:56:09 2005t + } + //modified by NIZNHY-PKV Mon Jan 24 09:53:38 2005f + if (!myModifiedFaces.IsBound(aFS)) { + TopTools_ListOfShape aLS; + // + aLS.Append(aFIy); + myModifiedFaces.Bind(aFS, aLS); + } + else { + TopTools_ListOfShape& aLS=myModifiedFaces.ChangeFind(aFS); + aLS.Append(aFIy); } + //modified by NIZNHY-PKV Mon Jan 24 09:53:43 2005t } }//for (; aExp.More(); aExp.Next()) { // @@ -571,3 +628,4 @@ static // 101 - Null shape is not allowed here // 102 - DS is not computed // 103 - No source shapes to treat +// 104 - NMTTools_DSFiller failed