mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-03 11:20:34 +05:00
parent
53cfbcdd33
commit
d5aa4efde2
@ -664,8 +664,7 @@ module SMESH
|
||||
in boolean autoDimension) raises (SALOME::SALOME_Exception);
|
||||
|
||||
long long ExportMEDCoupling(in boolean auto_groups,
|
||||
in boolean autoDimension
|
||||
) raises (SALOME::SALOME_Exception);
|
||||
in boolean autoDimension) raises (SALOME::SALOME_Exception);
|
||||
|
||||
/*!
|
||||
* Export a [part of] Mesh into a MED file
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <smIdType.hxx>
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined MESHDRIVER_EXPORTS || defined MeshDriver_EXPORTS
|
||||
@ -79,7 +80,7 @@ class MESHDRIVER_EXPORT Driver_Mesh
|
||||
{
|
||||
if ( sizeof( IDTYPE ) < sizeof( smIdType ))
|
||||
{
|
||||
const smIdType maxNB = std::numeric_limits< IDTYPE >::max();
|
||||
const smIdType maxNB = ToSmIdType( std::numeric_limits< IDTYPE >::max() );
|
||||
return (( checkIDs ? mesh->MaxNodeID() : mesh->NbNodes() ) > maxNB ||
|
||||
( checkIDs ? mesh->MaxElementID() : mesh->NbElements() > maxNB ));
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
|
||||
myMesh->AddNodeWithID(coordX, coordY, coordZ, intNumPoint);
|
||||
}
|
||||
|
||||
fprintf(stdout, "%ld noeuds\n", myMesh->NbNodes());
|
||||
fprintf(stdout, "%ld noeuds\n", static_cast< long >( myMesh->NbNodes() ));
|
||||
/****************************************************************************
|
||||
* LECTURE DES ELEMENTS *
|
||||
****************************************************************************/
|
||||
|
@ -1004,12 +1004,12 @@ void SMDS_UnstructuredGrid::ModifyCellNodes(int vtkVolId, std::map<int, int> loc
|
||||
*/
|
||||
int SMDS_UnstructuredGrid::getOrderedNodesOfFace(int vtkVolId, int& dim, std::vector<vtkIdType>& orderedNodes)
|
||||
{
|
||||
int vtkType = this->GetCellType(vtkVolId);
|
||||
dim = SMDS_Downward::getCellDimension(vtkType);
|
||||
int vtkType = this->GetCellType( vtkVolId );
|
||||
dim = SMDS_Downward::getCellDimension( vtkType );
|
||||
if (dim == 3)
|
||||
{
|
||||
SMDS_Down3D *downvol = static_cast<SMDS_Down3D*> (_downArray[vtkType]);
|
||||
int downVolId = this->_cellIdToDownId[vtkVolId];
|
||||
int downVolId = this->_cellIdToDownId[ vtkVolId ];
|
||||
downvol->getOrderedNodesOfFace(downVolId, orderedNodes);
|
||||
}
|
||||
// else nothing to do;
|
||||
@ -1155,6 +1155,20 @@ SMDS_UnstructuredGrid::extrudeVolumeFromFace(int vtkVolId,
|
||||
}
|
||||
else if (dim == 2)
|
||||
{
|
||||
// bos #24368
|
||||
// orient face by the original one, as getOrderedNodesOfFace() not implemented for faces
|
||||
const SMDS_MeshElement* origFace = _mesh->FindElementVtk( vtkVolId );
|
||||
int i0 = origFace->GetNodeIndex( _mesh->FindNodeVtk( orderedNodes[0] ));
|
||||
int i1 = origFace->GetNodeIndex( _mesh->FindNodeVtk( orderedNodes[1] ));
|
||||
int diff = i0 - i1;
|
||||
// order of nodes must be reverse in face and origFace
|
||||
bool oriOk = ( diff == 1 ) || ( diff == -3 );
|
||||
if ( !oriOk )
|
||||
{
|
||||
SMDSAbs_EntityType type = isQuadratic ? SMDSEntity_Quad_Quadrangle : SMDSEntity_Quadrangle;
|
||||
const std::vector<int>& interlace = SMDS_MeshCell::reverseSmdsOrder( type );
|
||||
SMDS_MeshCell::applyInterlace( interlace, orderedNodes );
|
||||
}
|
||||
SMDS_MeshFace *face = _mesh->AddFaceFromVtkIds(orderedNodes);
|
||||
return face;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user