Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Porting to OCCT 7.8.0
[modules/smesh.git]
/
src
/
StdMeshers
/
StdMeshers_Projection_2D.cxx
diff --git
a/src/StdMeshers/StdMeshers_Projection_2D.cxx
b/src/StdMeshers/StdMeshers_Projection_2D.cxx
index 1940bd3a316ba420a5f0b20d9b94de243e878478..b73b3a0fe54d44ddd80eb78a98058443f5cef85b 100644
(file)
--- a/
src/StdMeshers/StdMeshers_Projection_2D.cxx
+++ b/
src/StdMeshers/StdMeshers_Projection_2D.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-202
2 CEA/DEN, EDF R&D
, OPEN CASCADE
+// Copyright (C) 2007-202
4 CEA, EDF
, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-45,6
+45,7
@@
#include <SMESH_Comment.hxx>
#include <SMESH_Gen.hxx>
#include <SMESH_Mesh.hxx>
#include <SMESH_Comment.hxx>
#include <SMESH_Gen.hxx>
#include <SMESH_Mesh.hxx>
+#include <SMESH_SequentialMesh.hxx>
#include <SMESH_MeshAlgos.hxx>
#include <SMESH_MeshEditor.hxx>
#include <SMESH_MesherHelper.hxx>
#include <SMESH_MeshAlgos.hxx>
#include <SMESH_MeshEditor.hxx>
#include <SMESH_MesherHelper.hxx>
@@
-62,9
+63,15
@@
#include <GeomAPI_ExtremaCurveCurve.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAPI_ExtremaCurveCurve.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
#include <GeomAdaptor_Curve.hxx>
+#include <GeomAdaptor_Surface.hxx>
+
+#include <Basics_OCCTVersion.hxx>
+
+#if OCC_VERSION_LARGE < 0x07070000
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
-#include <GeomAdaptor_Surface.hxx>
+#endif
+
#include <GeomLib_IsPlanarSurface.hxx>
#include <Geom_Line.hxx>
#include <IntCurveSurface_HInter.hxx>
#include <GeomLib_IsPlanarSurface.hxx>
#include <Geom_Line.hxx>
#include <IntCurveSurface_HInter.hxx>
@@
-318,7
+325,7
@@
namespace {
break;
}
case TopAbs_EDGE: {
break;
}
case TopAbs_EDGE: {
-
+
// Get submeshes of sub-vertices
const map< int, SMESH_subMesh * >& subSM = sm->DependsOn();
if ( subSM.size() != 2 )
// Get submeshes of sub-vertices
const map< int, SMESH_subMesh * >& subSM = sm->DependsOn();
if ( subSM.size() != 2 )
@@
-705,7
+712,7
@@
namespace {
while ( elemIt->more() ) // loop on all mesh faces on srcFace
{
const SMDS_MeshElement* elem = elemIt->next();
while ( elemIt->more() ) // loop on all mesh faces on srcFace
{
const SMDS_MeshElement* elem = elemIt->next();
- const int nbN = elem->NbCornerNodes();
+ const int nbN = elem->NbCornerNodes();
tgtNodes.resize( nbN );
helper->SetElementsOnShape( false );
for ( int i = 0; i < nbN; ++i ) // loop on nodes of the source element
tgtNodes.resize( nbN );
helper->SetElementsOnShape( false );
for ( int i = 0; i < nbN; ++i ) // loop on nodes of the source element
@@
-1090,7
+1097,7
@@
namespace {
*/
//================================================================================
*/
//================================================================================
- struct QuadMesh : public SMESH_Mesh
+ struct QuadMesh : public SMESH_
Sequential
Mesh
{
ObjectPool< TriaCoordSys > _traiLCSPool;
SMESH_ElementSearcher* _elemSearcher;
{
ObjectPool< TriaCoordSys > _traiLCSPool;
SMESH_ElementSearcher* _elemSearcher;
@@
-1422,7
+1429,7
@@
namespace {
// const SMDS_MeshElement* elem = elemIt->next();
// TFaceConn& tgtNodes = newFacesVec[ iFaceSrc++ ];
// const SMDS_MeshElement* elem = elemIt->next();
// TFaceConn& tgtNodes = newFacesVec[ iFaceSrc++ ];
- // const int nbN = elem->NbCornerNodes();
+ // const int nbN = elem->NbCornerNodes();
// tgtNodes.resize( nbN );
// for ( int i = 0; i < nbN; ++i ) // loop on nodes of the source element
// {
// tgtNodes.resize( nbN );
// for ( int i = 0; i < nbN; ++i ) // loop on nodes of the source element
// {
@@
-1436,7
+1443,7
@@
namespace {
// {
// tgtNodeOrXY.first = srcN_tgtN->second; // tgt node exists
// }
// {
// tgtNodeOrXY.first = srcN_tgtN->second; // tgt node exists
// }
- // else
+ // else
// {
// // find XY of src node within the quadrilateral srcFace
// if ( !block.ComputeParameters( SMESH_TNodeXYZ( srcNode ),
// {
// // find XY of src node within the quadrilateral srcFace
// if ( !block.ComputeParameters( SMESH_TNodeXYZ( srcNode ),
@@
-1883,8
+1890,13
@@
namespace {
SMESHDS_Mesh* tgtMeshDS = tgtMesh->GetMeshDS();
Handle(Geom_Surface) tgtSurface = BRep_Tool::Surface( theTgtFace );
SMESHDS_Mesh* tgtMeshDS = tgtMesh->GetMeshDS();
Handle(Geom_Surface) tgtSurface = BRep_Tool::Surface( theTgtFace );
+#if OCC_VERSION_LARGE < 0x07070000
Handle(GeomAdaptor_HSurface) tgtSurfAdaptor = new GeomAdaptor_HSurface( tgtSurface );
Handle(GeomAdaptor_HCurve) piercingCurve = new GeomAdaptor_HCurve( thePiercingLine );
Handle(GeomAdaptor_HSurface) tgtSurfAdaptor = new GeomAdaptor_HSurface( tgtSurface );
Handle(GeomAdaptor_HCurve) piercingCurve = new GeomAdaptor_HCurve( thePiercingLine );
+#else
+ Handle(GeomAdaptor_Surface) tgtSurfAdaptor = new GeomAdaptor_Surface( tgtSurface );
+ Handle(GeomAdaptor_Curve) piercingCurve = new GeomAdaptor_Curve( thePiercingLine );
+#endif
IntCurveSurface_HInter intersect;
SMESH_MesherHelper* srcHelper = theSrcWires[0]->FaceHelper();
IntCurveSurface_HInter intersect;
SMESH_MesherHelper* srcHelper = theSrcWires[0]->FaceHelper();
@@
-2507,9
+2519,8
@@
bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
TAssocTool::Morph morph( srcWires );
morph.Perform( helper, tgtWires, helper.GetSurface( tgtFace ),
_src2tgtNodes, /*moveAll=*/true );
TAssocTool::Morph morph( srcWires );
morph.Perform( helper, tgtWires, helper.GetSurface( tgtFace ),
_src2tgtNodes, /*moveAll=*/true );
-#ifdef _DEBUG_
- cout << "StdMeshers_Projection_2D: Projection mesh IsDistorted2D() ==> do morph" << endl;
-#endif
+ if(SALOME::VerbosityActivated())
+ cout << "StdMeshers_Projection_2D: Projection mesh IsDistorted2D() ==> do morph" << endl;
if ( !fixDistortedFaces( helper, tgtWires )) // smooth and check
return error("Invalid mesh generated");
if ( !fixDistortedFaces( helper, tgtWires )) // smooth and check
return error("Invalid mesh generated");