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
Fix regression of smesh/bugs_13/N3 (Body Fitting) and SIGSEGV at killSalome.py
[modules/smesh.git]
/
src
/
StdMeshers
/
StdMeshers_Penta_3D.cxx
diff --git
a/src/StdMeshers/StdMeshers_Penta_3D.cxx
b/src/StdMeshers/StdMeshers_Penta_3D.cxx
index 69485a746eadeef7daf42fe8cceec2970b74ed44..ffece3ba0ee22b05e4c50bc5f2c149e7ab120af5 100644
(file)
--- a/
src/StdMeshers/StdMeshers_Penta_3D.cxx
+++ b/
src/StdMeshers/StdMeshers_Penta_3D.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
6
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
9
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
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-20,7
+20,7
@@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// SMESH StdMeshers_Penta_3D implementaion of SMESH idl descriptions
+// SMESH StdMeshers_Penta_3D implementa
t
ion of SMESH idl descriptions
// File : StdMeshers_Penta_3D.cxx
// Module : SMESH
//
// File : StdMeshers_Penta_3D.cxx
// Module : SMESH
//
@@
-33,6
+33,7
@@
#include "SMDS_MeshElement.hxx"
#include "SMDS_VolumeOfNodes.hxx"
#include "SMDS_VolumeTool.hxx"
#include "SMDS_MeshElement.hxx"
#include "SMDS_VolumeOfNodes.hxx"
#include "SMDS_VolumeTool.hxx"
+#include "SMESHDS_Mesh.hxx"
#include "SMESHDS_SubMesh.hxx"
#include "SMESH_Comment.hxx"
#include "SMESH_Mesh.hxx"
#include "SMESHDS_SubMesh.hxx"
#include "SMESH_Comment.hxx"
#include "SMESH_Mesh.hxx"
@@
-95,8
+96,6
@@
StdMeshers_Penta_3D::~StdMeshers_Penta_3D()
bool StdMeshers_Penta_3D::Compute(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape)
{
bool StdMeshers_Penta_3D::Compute(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape)
{
- MESSAGE("StdMeshers_Penta_3D::Compute()");
- //
bool bOK=false;
//
myShape=aShape;
bool bOK=false;
//
myShape=aShape;
@@
-235,8
+234,7
@@
void StdMeshers_Penta_3D::MakeNodes()
aTNode.SetBaseNodeID(aNodeID);
//
if ( SMESH_Block::IsEdgeID (aSID)) {
aTNode.SetBaseNodeID(aNodeID);
//
if ( SMESH_Block::IsEdgeID (aSID)) {
- const SMDS_EdgePosition* epos =
- static_cast<const SMDS_EdgePosition*>(aNode->GetPosition());
+ SMDS_EdgePositionPtr epos = aNode->GetPosition();
myBlock.ComputeParameters( epos->GetUParameter(), aS, aCoords );
}
else {
myBlock.ComputeParameters( epos->GetUParameter(), aS, aCoords );
}
else {
@@
-360,7
+358,7
@@
void StdMeshers_Penta_3D::MakeNodes()
// set XYZ on horizontal edges and get node columns of faces:
// 2 columns for each face, between which a base node is located
vector<const SMDS_MeshNode*>* nColumns[8];
// set XYZ on horizontal edges and get node columns of faces:
// 2 columns for each face, between which a base node is located
vector<const SMDS_MeshNode*>* nColumns[8];
- double ratio[ NB_WALL_FACES ]; // base node position between columns [0.-1.]
+ double ratio[ NB_WALL_FACES ]
= {0,0,0,0}
; // base node position between columns [0.-1.]
if ( createNode ) {
for ( k = 0; k < NB_WALL_FACES ; ++k ) {
ratio[ k ] = SetHorizEdgeXYZ (aBNXYZ, wallFaceID[ k ],
if ( createNode ) {
for ( k = 0; k < NB_WALL_FACES ; ++k ) {
ratio[ k ] = SetHorizEdgeXYZ (aBNXYZ, wallFaceID[ k ],
@@
-422,10
+420,10
@@
void StdMeshers_Penta_3D::MakeNodes()
aZ=(double)i/(double)(myISize-1);
aCoords.SetCoord(aX, aY, aZ);
//
aZ=(double)i/(double)(myISize-1);
aCoords.SetCoord(aX, aY, aZ);
//
- // suporting shape ID
+ // sup
p
orting shape ID
ShapeSupportID(bIsUpperLayer, aBNSSID, aSSID);
if (!myErrorStatus->IsOK()) {
ShapeSupportID(bIsUpperLayer, aBNSSID, aSSID);
if (!myErrorStatus->IsOK()) {
- MESSAGE("StdMeshers_Penta_3D::MakeNodes() ");
+ MESSAGE("StdMeshers_Penta_3D::MakeNodes()
pb
");
return;
}
//
return;
}
//
@@
-472,7
+470,7
@@
void StdMeshers_Penta_3D::MakeNodes()
}
}
if (!myErrorStatus->IsOK()) {
}
}
if (!myErrorStatus->IsOK()) {
- MESSAGE("StdMeshers_Penta_3D::MakeNodes() ");
+ MESSAGE("StdMeshers_Penta_3D::MakeNodes()
err
");
return;
}
//
return;
}
//
@@
-575,7
+573,7
@@
double StdMeshers_Penta_3D::SetHorizEdgeXYZ(const gp_XYZ& aBase
SMESH_Block::GetFaceEdgesIDs( aFaceID, edgeVec );
//
int coord = SMESH_Block::GetCoordIndOnEdge( edgeVec[ BASE ] );
SMESH_Block::GetFaceEdgesIDs( aFaceID, edgeVec );
//
int coord = SMESH_Block::GetCoordIndOnEdge( edgeVec[ BASE ] );
- bool isForward = myBlock.IsForwadEdge( edgeVec[ BASE ] );
+ bool isForward = myBlock.IsForwa
r
dEdge( edgeVec[ BASE ] );
double param = aBaseNodeParams.Coord( coord );
if ( !isForward)
double param = aBaseNodeParams.Coord( coord );
if ( !isForward)
@@
-684,7
+682,7
@@
void StdMeshers_Penta_3D::MakeVolumeMesh()
aID0 = pNode->GetID();
aJ[k] = GetIndexOnLayer(aID0);
if (!myErrorStatus->IsOK()) {
aID0 = pNode->GetID();
aJ[k] = GetIndexOnLayer(aID0);
if (!myErrorStatus->IsOK()) {
- MESSAGE("StdMeshers_Penta_3D::MakeVolumeMesh");
+ MESSAGE("StdMeshers_Penta_3D::MakeVolumeMesh
pb
");
return;
}
}
return;
}
}
@@
-819,7
+817,7
@@
void StdMeshers_Penta_3D::MakeMeshOnFxy1()
aID0 = pNode->GetID();
aJ = GetIndexOnLayer(aID0);
if (!myErrorStatus->IsOK()) {
aID0 = pNode->GetID();
aJ = GetIndexOnLayer(aID0);
if (!myErrorStatus->IsOK()) {
- MESSAGE("StdMeshers_Penta_3D::MakeMeshOnFxy1() ");
+ MESSAGE("StdMeshers_Penta_3D::MakeMeshOnFxy1()
pb
");
return;
}
//
return;
}
//
@@
-1046,7
+1044,7
@@
void StdMeshers_Penta_3D::MakeBlock()
if (iCnt>1) {
// \begin{E.A.}
// The current algorithm fails if there is more that one
if (iCnt>1) {
// \begin{E.A.}
// The current algorithm fails if there is more that one
- // face wich contains triangles ...
+ // face w
h
ich contains triangles ...
// In that case, replace return by break to try another
// method (coded in "if (iCnt != 1) { ... }")
//
// In that case, replace return by break to try another
// method (coded in "if (iCnt != 1) { ... }")
//
@@
-1223,7
+1221,7
@@
void StdMeshers_Penta_3D::MakeBlock()
// 1.1 Base vertex V000
iNbE = aME.Extent();
if (iNbE!= NB_WALL_FACES ){
// 1.1 Base vertex V000
iNbE = aME.Extent();
if (iNbE!= NB_WALL_FACES ){
- MESSAGE("StdMeshers_Penta_3D::MakeBlock() ");
+ MESSAGE("StdMeshers_Penta_3D::MakeBlock()
err
");
myErrorStatus->myName=7; // too few edges are in base face aFTr
myErrorStatus->myComment=SMESH_Comment("Not a quadrilateral face #")
<<pMesh->GetMeshDS()->ShapeToIndex( aFTr )<<": "<<iNbE<<" edges" ;
myErrorStatus->myName=7; // too few edges are in base face aFTr
myErrorStatus->myComment=SMESH_Comment("Not a quadrilateral face #")
<<pMesh->GetMeshDS()->ShapeToIndex( aFTr )<<": "<<iNbE<<" edges" ;
@@
-1240,7
+1238,7
@@
void StdMeshers_Penta_3D::MakeBlock()
}
iNbEV=aMEV.Extent();
if (iNbEV!=3){
}
iNbEV=aMEV.Extent();
if (iNbEV!=3){
- MESSAGE("StdMeshers_Penta_3D::MakeBlock() ");
+ MESSAGE("StdMeshers_Penta_3D::MakeBlock()
err
");
myErrorStatus->myName=7; // too few edges meet in base vertex
myErrorStatus->myComment=SMESH_Comment("3 edges must share vertex #")
<<pMesh->GetMeshDS()->ShapeToIndex( aV000 )<<" but there are "<<iNbEV<<" edges";
myErrorStatus->myName=7; // too few edges meet in base vertex
myErrorStatus->myComment=SMESH_Comment("3 edges must share vertex #")
<<pMesh->GetMeshDS()->ShapeToIndex( aV000 )<<" but there are "<<iNbEV<<" edges";
@@
-1267,7
+1265,7
@@
void StdMeshers_Penta_3D::MakeBlock()
}
//
if (!bFound) {
}
//
if (!bFound) {
- MESSAGE("StdMeshers_Penta_3D::MakeBlock() ");
+ MESSAGE("StdMeshers_Penta_3D::MakeBlock()
err
");
myErrorStatus->myName=8; // can not find reper V001
myErrorStatus->myComment=SMESH_Comment("Can't find opposite vertex for vertex #")
<<pMesh->GetMeshDS()->ShapeToIndex( aV000 );
myErrorStatus->myName=8; // can not find reper V001
myErrorStatus->myComment=SMESH_Comment("Can't find opposite vertex for vertex #")
<<pMesh->GetMeshDS()->ShapeToIndex( aV000 );
@@
-1367,7
+1365,7
@@
bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes,
// find the other edges of theFace and orientation of e1
TopoDS_Edge e1, e2, eTop;
// find the other edges of theFace and orientation of e1
TopoDS_Edge e1, e2, eTop;
- bool rev1, CumOri = false;
+ bool rev1
= false
, CumOri = false;
TopExp_Explorer exp( theFace, TopAbs_EDGE );
int nbEdges = 0;
for ( ; exp.More(); exp.Next() ) {
TopExp_Explorer exp( theFace, TopAbs_EDGE );
int nbEdges = 0;
for ( ; exp.More(); exp.Next() ) {
@@
-1466,11
+1464,9
@@
bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes,
node = nIt->next();
if(myTool->IsMedium(node))
continue;
node = nIt->next();
if(myTool->IsMedium(node))
continue;
- const SMDS_EdgePosition* pos =
- dynamic_cast<const SMDS_EdgePosition*>( node->GetPosition() );
- if ( !pos ) {
+ SMDS_EdgePositionPtr pos = node->GetPosition();
+ if ( !pos )
return false;
return false;
- }
double u = ( pos->GetUParameter() - f ) / range;
vector<const SMDS_MeshNode*> & nVec = theIJNodes[ u ];
nVec.resize( vsize, nullNode );
double u = ( pos->GetUParameter() - f ) / range;
vector<const SMDS_MeshNode*> & nVec = theIJNodes[ u ];
nVec.resize( vsize, nullNode );
@@
-1489,11
+1485,9
@@
bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes,
node = nIt->next();
if(myTool->IsMedium(node))
continue;
node = nIt->next();
if(myTool->IsMedium(node))
continue;
- const SMDS_EdgePosition* pos =
- dynamic_cast<const SMDS_EdgePosition*>( node->GetPosition() );
- if ( !pos ) {
+ SMDS_EdgePositionPtr pos = node->GetPosition();
+ if ( !pos )
return false;
return false;
- }
sortedNodes.insert( make_pair( pos->GetUParameter(), node ));
}
loadedNodes.insert( nVecf[ vsize - 1 ] = smVft->GetNodes()->next() );
sortedNodes.insert( make_pair( pos->GetUParameter(), node ));
}
loadedNodes.insert( nVecf[ vsize - 1 ] = smVft->GetNodes()->next() );
@@
-1544,7
+1538,7
@@
bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes,
}
// look for a not loaded node of the <face>
bool found = false;
}
// look for a not loaded node of the <face>
bool found = false;
- const SMDS_MeshNode* n3 = 0; // a node d
e
fferent from n1 and n2
+ const SMDS_MeshNode* n3 = 0; // a node d
i
fferent from n1 and n2
eIt = face->nodesIterator() ;
while ( !found && eIt->more() ) {
node = static_cast<const SMDS_MeshNode*>( eIt->next() );
eIt = face->nodesIterator() ;
while ( !found && eIt->more() ) {
node = static_cast<const SMDS_MeshNode*>( eIt->next() );
@@
-1610,11
+1604,11
@@
StdMeshers_SMESHBlock::StdMeshers_SMESHBlock()
}
//=======================================================================
}
//=======================================================================
-//function : IsForwadEdge
+//function : IsForwa
r
dEdge
//purpose :
//=======================================================================
//purpose :
//=======================================================================
-bool StdMeshers_SMESHBlock::IsForwadEdge(const int theEdgeID)
+bool StdMeshers_SMESHBlock::IsForwa
r
dEdge(const int theEdgeID)
{
int index = myTBlock.ShapeIndex( theEdgeID );
if ( !myTBlock.IsEdgeID( theEdgeID ))
{
int index = myTBlock.ShapeIndex( theEdgeID );
if ( !myTBlock.IsEdgeID( theEdgeID ))
@@
-1862,8
+1856,6
@@
bool StdMeshers_Penta_3D::Evaluate(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape,
MapShapeNbElems& aResMap)
{
const TopoDS_Shape& aShape,
MapShapeNbElems& aResMap)
{
- MESSAGE("StdMeshers_Penta_3D::Evaluate()");
-
// find face contains only triangles
vector < SMESH_subMesh * >meshFaces;
TopTools_SequenceOfShape aFaces;
// find face contains only triangles
vector < SMESH_subMesh * >meshFaces;
TopTools_SequenceOfShape aFaces;