+// 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: NMTTools_PaveFiller_5.cxx
// Created: Mon Dec 15 11:28:33 2003
// Author: Peter KURNEV
#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
#include <NMTTools_CommonBlockAPI.hxx>
#include <NMTTools_ListOfCommonBlock.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopExp.hxx>
static
void VertexParameter(const IntTools_CommonPrt& aCPart,
Standard_Boolean IsOnPave(const Standard_Real& aTR,
const IntTools_Range& aCPRange,
const Standard_Real& aTolerance);
-
+//
//=======================================================================
// function: PerformEF
// purpose:
BooleanOperations_IndexedDataMapOfShapeInteger aMapVI;
BOPTools_IDMapOfPaveBlockIMapOfInteger aMapCB;
BOPTools_IMapOfPaveBlock aIMPBx;
-
//
BOPTools_CArray1OfESInterference& aEFs=myIntrPool->ESInterferences();
//
continue;
}
// Edge
- const TopoDS_Edge& aE=TopoDS::Edge(myDS->GetShape(nE));
+ const TopoDS_Edge aE=TopoDS::Edge(myDS->GetShape(nE));//mpv
if (BRep_Tool::Degenerated(aE)){
continue;
}
- aTolE=BRep_Tool::Tolerance(aE);
// Face
- const TopoDS_Face& aF=TopoDS::Face(myDS->GetShape(nF));
+ const TopoDS_Face aF=TopoDS::Face(myDS->GetShape(nF));//mpv
+ //
+ // Modified
+ // to avoid intersection between face and edge from that face
+ // Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ TopTools_IndexedMapOfShape aME;
+ //
+ TopExp::MapShapes(aF, TopAbs_EDGE, aME);
+ if (aME.Contains(aE)) {
+ continue;
+ }
+ // Contribution of Samtech www.samcef.com END
+ //
aTolF=BRep_Tool::Tolerance(aF);
+
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ aTolE=BRep_Tool::Tolerance(aE);
+ // Contribution of Samtech www.samcef.com END
+
const Bnd_Box& aBBF=myDS->GetBoundingBox(nF);
//
// Process each PaveBlock on edge nE
aNbEdges=aME.Extent();
for (j=1; j<=aNbEdges; ++j) {
nE=aME(j);
- const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE));
+ const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));//mpv
//
aFlag=myContext.ComputeVE (aNewVertex, aE, aT);
//
aNbV=aMVF.Extent();
for (i=1; i<=aNbV; ++i) {
nVF=aMVF(i);
- const TopoDS_Vertex& aVF=TopoDS::Vertex(myDS->Shape(nVF));
+ const TopoDS_Vertex aVF=TopoDS::Vertex(myDS->Shape(nVF));//mpv
iFlag=IntTools_Tools::ComputeVV(aNewVertex, aVF);
if (!iFlag) {
return nVF;