X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FNMTTools%2FNMTTools_PaveFiller_2.cxx;h=438e75255117ee6eeeee6c40572818659bbb8df4;hb=32e56a241f21859130edcfcc7a9d9c452c8d00d4;hp=2430025f4ce7af83839b8386b8d6250d2b4e5668;hpb=0b6826bc5f36b5420f41af1475e1a79371a25323;p=modules%2Fgeom.git diff --git a/src/NMTTools/NMTTools_PaveFiller_2.cxx b/src/NMTTools/NMTTools_PaveFiller_2.cxx index 2430025f4..438e75255 100644 --- a/src/NMTTools/NMTTools_PaveFiller_2.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_2.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -19,11 +19,15 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_PaveFiller_2.cxx -// Created: Mon Dec 8 12:02:56 2003 -// Author: Peter KURNEV -// + +// File: NMTTools_PaveFiller_2.cxx +// Created: Mon Dec 8 12:02:56 2003 +// Author: Peter KURNEV +// // + +#include + #include #include @@ -48,33 +52,45 @@ #include #include + #include #include #include -// -// Modified Thu Sep 14 14:35:18 2006 + +// Modified Thu Sep 14 14:35:18 2006 // Contribution of Samtech www.samcef.com BEGIN #include #include #include - static Standard_Boolean Contains(const TopoDS_Edge& aE, const TopoDS_Vertex& aV); // Contribution of Samtech www.samcef.com END +// In OCCT6.3.0sp9 is changed a signature of IntTools_Context::ComputeVE() method +#ifdef OCC_VERSION_SERVICEPACK +#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK) +#else +#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8) +#endif + //======================================================================= // function: PerformVE -// purpose: +// purpose: //======================================================================= - void NMTTools_PaveFiller::PerformVE() +void NMTTools_PaveFiller::PerformVE() { myIsDone=Standard_False; // Standard_Boolean bJustAdd; - Standard_Integer n1, n2, anIndexIn, aFlag, aWhat, aWith, aNbVEs, aBlockLength, iSDV, nV1; + Standard_Integer n1, n2, anIndexIn, aFlag, aWhat; + Standard_Integer aWith, aNbVEs, aBlockLength, iSDV, nV1; Standard_Real aT; +#if OCC_VERSION_LARGE > 0x06030008 + Standard_Boolean bToUpdateVertex; + Standard_Real aDist; +#endif TopoDS_Vertex aV1; TopoDS_Edge aE2; BOPTools_IndexedMapOfCoupleOfInteger aSnareMap; @@ -103,7 +119,6 @@ static } // if(bJustAdd) { - //myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexEdge, anIndexIn); continue; } // Edge @@ -119,7 +134,7 @@ static if (iSDV) { nV1=iSDV; aV1=TopoDS::Vertex(myDS->Shape(nV1)); - // Modified to find same domain vertex Thu Sep 14 14:35:18 2006 + // Modified to find same domain vertex Thu Sep 14 14:35:18 2006 // Contribution of Samtech www.samcef.com BEGIN Standard_Integer nVE, iSDVE, iRet; // @@ -145,7 +160,13 @@ static // Contribution of Samtech www.samcef.com END } // + //modified by NIZNHY-PKV Mon Dec 28 08:58:05 2009f +#if OCC_VERSION_LARGE > 0x06030008 + aFlag=myContext.ComputeVE (aV1, aE2, aT, bToUpdateVertex, aDist); +#else aFlag=myContext.ComputeVE (aV1, aE2, aT); +#endif + //modified by NIZNHY-PKV Mon Dec 28 08:58:13 2009t // if (!aFlag) { // Add Interference to the Pool @@ -168,22 +189,30 @@ static // Insert Vertex in Interference Object BOPTools_VEInterference& aVE=aVEs(anIndexIn); aVE.SetNewShape(aWhat); - // qqf - { - myIP->Add(aWhat, aWith, Standard_True, NMTDS_TI_VE); - } - // qqt - } - //myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexEdge, anIndexIn); + // + myIP->Add(aWhat, aWith, Standard_True, NMTDS_TI_VE); + // + //modified by NIZNHY-PKV Mon Dec 28 09:00:54 2009f +#if OCC_VERSION_LARGE > 0x06030008 + if (bToUpdateVertex) { + BRep_Builder aBB; + // + aBB.UpdateVertex(aV1, aDist); + } +#endif + //modified by NIZNHY-PKV Mon Dec 28 09:00:57 2009t + // + } //if (!aFlag) { } } myIsDone=Standard_True; } + //======================================================================= // function: PrepareEdges -// purpose: +// purpose: //======================================================================= - void NMTTools_PaveFiller::PrepareEdges() +void NMTTools_PaveFiller::PrepareEdges() { Standard_Integer i, nV, ii, aNBSuc, ip, aNbShapesObject; Standard_Real aT; @@ -214,22 +243,22 @@ static ip=FindSDVertex(nV); if (ip) { aV=TopoDS::Vertex(myDS->Shape(ip)); - aV.Orientation(anOr);// XX ? if the edge is closed it'll be amazing result + aV.Orientation(anOr);// XX ? if the edge is closed it'll be amazing result nV=ip; } // - BOPTools_Pave aPave(nV, aT); + BOPTools_Pave aPave(nV, aT); aPaveSet.Append (aPave); } } } } -// Modified Thu Sep 14 14:35:18 2006 +// Modified Thu Sep 14 14:35:18 2006 // Contribution of Samtech www.samcef.com BEGIN //======================================================================= //function : Contains -//purpose : +//purpose : //======================================================================= Standard_Boolean Contains(const TopoDS_Edge& aE, const TopoDS_Vertex& aV)