mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 10:10:33 +05:00
Fix regressions caused by improvements
This commit is contained in:
parent
256994070c
commit
0460bb60e0
@ -776,7 +776,10 @@ module SMESH
|
||||
long NbBiQuadQuadrangles()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
long NbPolygons(in ElementOrder order)
|
||||
long NbPolygons()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
long NbPolygonsOfOrder(in ElementOrder order)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
long NbVolumes()
|
||||
|
@ -5356,8 +5356,7 @@ void SMESH_MeshEditor::makeWalls (TNodeOfNodeListMap & mapNewNodes,
|
||||
SMDS_MeshCell::interlacedSmdsOrder( elem->GetEntityType(), nbn );
|
||||
SMDS_MeshCell::applyInterlaceRev( interlace, nodeVec );
|
||||
|
||||
if ( const SMDS_MeshElement* face = AddElement( nodeVec, anyFace.Init( elem )))
|
||||
myLastCreatedElems.Append( face );
|
||||
AddElement( nodeVec, anyFace.Init( elem ));
|
||||
|
||||
while ( srcElements.Length() < myLastCreatedElems.Length() )
|
||||
srcElements.Append( elem );
|
||||
@ -12531,7 +12530,7 @@ int SMESH_MeshEditor::MakeBoundaryMesh(const TIDSortedElemSet& elements,
|
||||
|
||||
typedef vector<const SMDS_MeshNode*> TConnectivity;
|
||||
TConnectivity tgtNodes;
|
||||
ElemFeatures elemKind( missType );
|
||||
ElemFeatures elemKind( missType ), elemToCopy;
|
||||
|
||||
SMDS_ElemIteratorPtr eIt;
|
||||
if (elements.empty()) eIt = aMesh->elementsIterator(elemType);
|
||||
@ -12566,9 +12565,9 @@ int SMESH_MeshEditor::MakeBoundaryMesh(const TIDSortedElemSet& elements,
|
||||
for ( int i = 0; i < nbFaceNodes; i += 1+iQuad)
|
||||
{
|
||||
for ( int j = 0; j < nodes.size(); ++j )
|
||||
nodes[j] =nn[i+j];
|
||||
nodes[j] = nn[ i+j ];
|
||||
if ( const SMDS_MeshElement* edge =
|
||||
aMesh->FindElement(nodes,SMDSAbs_Edge,/*noMedium=*/false))
|
||||
aMesh->FindElement( nodes, SMDSAbs_Edge, /*noMedium=*/false ))
|
||||
presentBndElems.push_back( edge );
|
||||
else
|
||||
missingBndElems.push_back( nodes );
|
||||
@ -12703,7 +12702,7 @@ int SMESH_MeshEditor::MakeBoundaryMesh(const TIDSortedElemSet& elements,
|
||||
tgtNodes.resize( e->NbNodes() );
|
||||
for ( inode = 0; inode < nodes.size(); ++inode )
|
||||
tgtNodes[inode] = getNodeWithSameID( tgtMeshDS, e->GetNode(inode) );
|
||||
presentEditor->AddElement( tgtNodes, elemKind.Init( e ));
|
||||
presentEditor->AddElement( tgtNodes, elemToCopy.Init( e ));
|
||||
}
|
||||
else // store present elements to add them to a group
|
||||
for ( int i = 0 ; i < presentBndElems.size(); ++i )
|
||||
@ -12738,7 +12737,7 @@ int SMESH_MeshEditor::MakeBoundaryMesh(const TIDSortedElemSet& elements,
|
||||
tgtNodes.resize( elem->NbNodes() );
|
||||
for ( inode = 0; inode < tgtNodes.size(); ++inode )
|
||||
tgtNodes[inode] = getNodeWithSameID( tgtMeshDS, elem->GetNode(inode) );
|
||||
tgtEditor.AddElement( tgtNodes, elemKind.Init( elem ));
|
||||
tgtEditor.AddElement( tgtNodes, elemToCopy.Init( elem ));
|
||||
|
||||
tgtEditor.myLastCreatedElems.Clear();
|
||||
}
|
||||
|
@ -6441,9 +6441,9 @@ CORBA::Long SMESH_MeshEditor_i::MakeBoundaryElements(SMESH::Bnd_Dimension dim,
|
||||
THROW_SALOME_CORBA_EXCEPTION("Invalid boundary dimension", SALOME::BAD_PARAM);
|
||||
|
||||
// separate groups belonging to this and other mesh
|
||||
SMESH::ListOfIDSources_var groupsOfThisMesh = new SMESH::ListOfIDSources;
|
||||
SMESH::ListOfIDSources_var groupsOfThisMesh = new SMESH::ListOfIDSources;
|
||||
SMESH::ListOfIDSources_var groupsOfOtherMesh = new SMESH::ListOfIDSources;
|
||||
groupsOfThisMesh->length( groups.length() );
|
||||
groupsOfThisMesh ->length( groups.length() );
|
||||
groupsOfOtherMesh->length( groups.length() );
|
||||
int nbGroups = 0, nbGroupsOfOtherMesh = 0;
|
||||
for ( int i = 0; i < groups.length(); ++i )
|
||||
|
@ -3765,7 +3765,16 @@ CORBA::Long SMESH_Mesh_i::NbBiQuadQuadrangles()throw(SALOME::SALOME_Exception)
|
||||
return _impl->NbBiQuadQuadrangles();
|
||||
}
|
||||
|
||||
CORBA::Long SMESH_Mesh_i::NbPolygons(SMESH::ElementOrder order) throw(SALOME::SALOME_Exception)
|
||||
CORBA::Long SMESH_Mesh_i::NbPolygons() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SALOME_SalomeException);
|
||||
if ( _preMeshInfo )
|
||||
return _preMeshInfo->NbPolygons();
|
||||
|
||||
return _impl->NbPolygons();
|
||||
}
|
||||
|
||||
CORBA::Long SMESH_Mesh_i::NbPolygonsOfOrder(SMESH::ElementOrder order) throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SALOME_SalomeException);
|
||||
if ( _preMeshInfo )
|
||||
|
@ -315,7 +315,10 @@ public:
|
||||
CORBA::Long NbBiQuadQuadrangles()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long NbPolygons(SMESH::ElementOrder order=SMESH::ORDER_ANY)
|
||||
CORBA::Long NbPolygons()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long NbPolygonsOfOrder(SMESH::ElementOrder order=SMESH::ORDER_ANY)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long NbVolumes()
|
||||
|
@ -2359,7 +2359,7 @@ class Mesh:
|
||||
# @return an integer value
|
||||
# @ingroup l1_meshinfo
|
||||
def NbPolygons(self, elementOrder = SMESH.ORDER_ANY):
|
||||
return self.mesh.NbPolygons(elementOrder)
|
||||
return self.mesh.NbPolygonsOfOrder(elementOrder)
|
||||
|
||||
## Returns the number of volumes in the mesh
|
||||
# @return an integer value
|
||||
@ -4940,6 +4940,10 @@ class meshEditor(SMESH._objref_SMESH_MeshEditor):
|
||||
if len( args ) == 1:
|
||||
return SMESH._objref_SMESH_MeshEditor.FindCoincidentNodes( self, args[0], False )
|
||||
return SMESH._objref_SMESH_MeshEditor.FindCoincidentNodes( self, *args )
|
||||
def FindCoincidentNodesOnPart(self,*args): # a 3d arg added (SeparateCornerAndMediumNodes)
|
||||
if len( args ) == 2:
|
||||
args += False,
|
||||
return SMESH._objref_SMESH_MeshEditor.FindCoincidentNodesOnPart( self, *args )
|
||||
def MergeNodes(self,*args): # a 2nd arg added (NodesToKeep)
|
||||
if len( args ) == 1:
|
||||
return SMESH._objref_SMESH_MeshEditor.MergeNodes( self, args[0], [] )
|
||||
|
@ -369,7 +369,7 @@ namespace
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
void getInternalEdges( SMESH_Mesh& mesh,
|
||||
bool getInternalEdges( SMESH_Mesh& mesh,
|
||||
const TopoDS_Shape& shape,
|
||||
const TopTools_MapOfShape& cornerVV,
|
||||
TopTools_MapOfShape& internEE)
|
||||
@ -436,11 +436,13 @@ namespace
|
||||
ridgeE = TopoDS::Edge( nextRidgeE );
|
||||
V0 = V1;
|
||||
|
||||
if ( ridgeE.IsNull() )
|
||||
return false;
|
||||
} // check EDGEs around the last VERTEX of ridgeE
|
||||
} // loop on ridge EDGEs around a corner VERTEX
|
||||
} // loop on on corner VERTEXes
|
||||
|
||||
return;
|
||||
return true;
|
||||
} // getInternalEdges()
|
||||
} // namespace
|
||||
|
||||
@ -463,9 +465,10 @@ bool StdMeshers_CompositeHexa_3D::findBoxFaces( const TopoDS_Shape& shape,
|
||||
TopTools_MapOfShape cornerVertices;
|
||||
getBlockCorners( mesh, shape, cornerVertices );
|
||||
if ( cornerVertices.Extent() != 8 )
|
||||
return false;
|
||||
return error( COMPERR_BAD_INPUT_MESH, "Can't find 8 corners of a block" );
|
||||
TopTools_MapOfShape internalEdges;
|
||||
getInternalEdges( mesh, shape, cornerVertices, internalEdges );
|
||||
if ( !getInternalEdges( mesh, shape, cornerVertices, internalEdges ))
|
||||
return error( COMPERR_BAD_INPUT_MESH, "2D mesh is not suitable for i,j,k hexa meshing" );
|
||||
|
||||
list< _QuadFaceGrid >::iterator boxFace;
|
||||
TopExp_Explorer exp;
|
||||
|
Loading…
Reference in New Issue
Block a user