mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-24 16:30:34 +05:00
0021347: [CEA 497] Visualisation into SMESH and VISU of hexagonal prism cells (MED_OCTA12)
0021380: EDF 1937 SMESH: Take into account QUAD9 and HEXA27
This commit is contained in:
parent
5b191ae5dd
commit
faf45035fc
@ -71,7 +71,10 @@ module SMESH
|
|||||||
ADD_QUADPYRAMID,
|
ADD_QUADPYRAMID,
|
||||||
ADD_QUADPENTAHEDRON,
|
ADD_QUADPENTAHEDRON,
|
||||||
ADD_QUADHEXAHEDRON,
|
ADD_QUADHEXAHEDRON,
|
||||||
ADD_ELEM0D
|
ADD_ELEM0D,
|
||||||
|
ADD_BIQUAD_QUADRANGLE,
|
||||||
|
ADD_TRIQUAD_HEXA,
|
||||||
|
ADD_HEXAGONAL_PRISM
|
||||||
};
|
};
|
||||||
|
|
||||||
struct log_block
|
struct log_block
|
||||||
@ -134,6 +137,7 @@ module SMESH
|
|||||||
Geom_PYRAMID,
|
Geom_PYRAMID,
|
||||||
Geom_HEXA,
|
Geom_HEXA,
|
||||||
Geom_PENTA,
|
Geom_PENTA,
|
||||||
|
Geom_HEXAGONAL_PRISM,
|
||||||
Geom_POLYHEDRA
|
Geom_POLYHEDRA
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -161,6 +165,7 @@ module SMESH
|
|||||||
Entity_Quad_Triangle,
|
Entity_Quad_Triangle,
|
||||||
Entity_Quadrangle,
|
Entity_Quadrangle,
|
||||||
Entity_Quad_Quadrangle,
|
Entity_Quad_Quadrangle,
|
||||||
|
Entity_BiQuad_Quadrangle,
|
||||||
Entity_Polygon,
|
Entity_Polygon,
|
||||||
Entity_Quad_Polygon,
|
Entity_Quad_Polygon,
|
||||||
Entity_Tetra,
|
Entity_Tetra,
|
||||||
@ -169,8 +174,10 @@ module SMESH
|
|||||||
Entity_Quad_Pyramid,
|
Entity_Quad_Pyramid,
|
||||||
Entity_Hexa,
|
Entity_Hexa,
|
||||||
Entity_Quad_Hexa,
|
Entity_Quad_Hexa,
|
||||||
|
Entity_TriQuad_Hexa,
|
||||||
Entity_Penta,
|
Entity_Penta,
|
||||||
Entity_Quad_Penta,
|
Entity_Quad_Penta,
|
||||||
|
Entity_Hexagonal_Prism,
|
||||||
Entity_Polyhedra,
|
Entity_Polyhedra,
|
||||||
Entity_Quad_Polyhedra,
|
Entity_Quad_Polyhedra,
|
||||||
Entity_Last
|
Entity_Last
|
||||||
@ -683,6 +690,9 @@ module SMESH
|
|||||||
long NbQuadranglesOfOrder(in ElementOrder order)
|
long NbQuadranglesOfOrder(in ElementOrder order)
|
||||||
raises (SALOME::SALOME_Exception);
|
raises (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
long NbBiQuadQuadrangles()
|
||||||
|
raises (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
long NbPolygons()
|
long NbPolygons()
|
||||||
raises (SALOME::SALOME_Exception);
|
raises (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
@ -704,6 +714,9 @@ module SMESH
|
|||||||
long NbHexasOfOrder(in ElementOrder order)
|
long NbHexasOfOrder(in ElementOrder order)
|
||||||
raises (SALOME::SALOME_Exception);
|
raises (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
long NbTriQuadraticHexas()
|
||||||
|
raises (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
long NbPyramids()
|
long NbPyramids()
|
||||||
raises (SALOME::SALOME_Exception);
|
raises (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
@ -716,6 +729,9 @@ module SMESH
|
|||||||
long NbPrismsOfOrder(in ElementOrder order)
|
long NbPrismsOfOrder(in ElementOrder order)
|
||||||
raises (SALOME::SALOME_Exception);
|
raises (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
long NbHexagonalPrisms()
|
||||||
|
raises (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
long NbPolyhedrons()
|
long NbPolyhedrons()
|
||||||
raises (SALOME::SALOME_Exception);
|
raises (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
@ -466,7 +466,7 @@ double MaxElementLength2D::GetValue( long theElementId )
|
|||||||
aVal = Max(L1,Max(L2,L3));
|
aVal = Max(L1,Max(L2,L3));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if( len == 8 ) { // quadratic quadrangles
|
else if( len == 8 || len == 9 ) { // quadratic quadrangles
|
||||||
double L1 = getDistance(P( 1 ),P( 2 )) + getDistance(P( 2 ),P( 3 ));
|
double L1 = getDistance(P( 1 ),P( 2 )) + getDistance(P( 2 ),P( 3 ));
|
||||||
double L2 = getDistance(P( 3 ),P( 4 )) + getDistance(P( 4 ),P( 5 ));
|
double L2 = getDistance(P( 3 ),P( 4 )) + getDistance(P( 4 ),P( 5 ));
|
||||||
double L3 = getDistance(P( 5 ),P( 6 )) + getDistance(P( 6 ),P( 7 ));
|
double L3 = getDistance(P( 5 ),P( 6 )) + getDistance(P( 6 ),P( 7 ));
|
||||||
@ -573,6 +573,12 @@ double MaxElementLength3D::GetValue( long theElementId )
|
|||||||
aVal = Max(aVal,Max(Max(D1,D2),Max(D3,D4)));
|
aVal = Max(aVal,Max(Max(D1,D2),Max(D3,D4)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
else if( len == 12 ) { // hexagonal prism
|
||||||
|
for ( int i1 = 1; i1 < 12; ++i1 )
|
||||||
|
for ( int i2 = i1+1; i1 <= 12; ++i1 )
|
||||||
|
aVal = Max( aVal, getDistance(P( i1 ),P( i2 )));
|
||||||
|
break;
|
||||||
|
}
|
||||||
else if( len == 10 ) { // quadratic tetras
|
else if( len == 10 ) { // quadratic tetras
|
||||||
double L1 = getDistance(P( 1 ),P( 5 )) + getDistance(P( 5 ),P( 2 ));
|
double L1 = getDistance(P( 1 ),P( 5 )) + getDistance(P( 5 ),P( 2 ));
|
||||||
double L2 = getDistance(P( 2 ),P( 6 )) + getDistance(P( 6 ),P( 3 ));
|
double L2 = getDistance(P( 2 ),P( 6 )) + getDistance(P( 6 ),P( 3 ));
|
||||||
@ -610,7 +616,7 @@ double MaxElementLength3D::GetValue( long theElementId )
|
|||||||
aVal = Max(aVal,Max(Max(L7,L8),L9));
|
aVal = Max(aVal,Max(Max(L7,L8),L9));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if( len == 20 ) { // quadratic hexas
|
else if( len == 20 || len == 27 ) { // quadratic hexas
|
||||||
double L1 = getDistance(P( 1 ),P( 9 )) + getDistance(P( 9 ),P( 2 ));
|
double L1 = getDistance(P( 1 ),P( 9 )) + getDistance(P( 9 ),P( 2 ));
|
||||||
double L2 = getDistance(P( 2 ),P( 10 )) + getDistance(P( 10 ),P( 3 ));
|
double L2 = getDistance(P( 2 ),P( 10 )) + getDistance(P( 10 ),P( 3 ));
|
||||||
double L3 = getDistance(P( 3 ),P( 11 )) + getDistance(P( 11 ),P( 4 ));
|
double L3 = getDistance(P( 3 ),P( 11 )) + getDistance(P( 11 ),P( 4 ));
|
||||||
@ -805,7 +811,7 @@ double AspectRatio::GetValue( const TSequenceOfXYZ& P )
|
|||||||
return 0.;
|
return 0.;
|
||||||
return alpha * L * C1 / C2;
|
return alpha * L * C1 / C2;
|
||||||
}
|
}
|
||||||
else if( nbNodes == 8 ){ // nbNodes==8 - quadratic quadrangle
|
else if( nbNodes == 8 || nbNodes == 9 ) { // nbNodes==8 - quadratic quadrangle
|
||||||
// Compute lengths of the sides
|
// Compute lengths of the sides
|
||||||
std::vector< double > aLen (4);
|
std::vector< double > aLen (4);
|
||||||
aLen[0] = getDistance( P(1), P(3) );
|
aLen[0] = getDistance( P(1), P(3) );
|
||||||
@ -855,9 +861,10 @@ double AspectRatio::GetValue( const TSequenceOfXYZ& P )
|
|||||||
double AspectRatio::GetBadRate( double Value, int /*nbNodes*/ ) const
|
double AspectRatio::GetBadRate( double Value, int /*nbNodes*/ ) const
|
||||||
{
|
{
|
||||||
// the aspect ratio is in the range [1.0,infinity]
|
// the aspect ratio is in the range [1.0,infinity]
|
||||||
|
// < 1.0 = very bad, zero area
|
||||||
// 1.0 = good
|
// 1.0 = good
|
||||||
// infinity = bad
|
// infinity = bad
|
||||||
return Value / 1000.;
|
return ( Value < 0.9 ) ? 1000 : Value / 1000.;
|
||||||
}
|
}
|
||||||
|
|
||||||
SMDSAbs_ElementType AspectRatio::GetType() const
|
SMDSAbs_ElementType AspectRatio::GetType() const
|
||||||
@ -966,10 +973,11 @@ double AspectRatio3D::GetValue( const TSequenceOfXYZ& P )
|
|||||||
else if(nbNodes==13) nbNodes=5; // quadratic pyramid
|
else if(nbNodes==13) nbNodes=5; // quadratic pyramid
|
||||||
else if(nbNodes==15) nbNodes=6; // quadratic pentahedron
|
else if(nbNodes==15) nbNodes=6; // quadratic pentahedron
|
||||||
else if(nbNodes==20) nbNodes=8; // quadratic hexahedron
|
else if(nbNodes==20) nbNodes=8; // quadratic hexahedron
|
||||||
|
else if(nbNodes==27) nbNodes=8; // quadratic hexahedron
|
||||||
else return aQuality;
|
else return aQuality;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(nbNodes){
|
switch(nbNodes) {
|
||||||
case 4:{
|
case 4:{
|
||||||
double aLen[6] = {
|
double aLen[6] = {
|
||||||
getDistance(P( 1 ),P( 2 )), // a
|
getDistance(P( 1 ),P( 2 )), // a
|
||||||
@ -1187,7 +1195,22 @@ double AspectRatio3D::GetValue( const TSequenceOfXYZ& P )
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
case 12:
|
||||||
|
{
|
||||||
|
gp_XYZ aXYZ[8] = {P( 1 ),P( 2 ),P( 4 ),P( 5 ),P( 7 ),P( 8 ),P( 10 ),P( 11 )};
|
||||||
|
aQuality = std::max(GetValue(TSequenceOfXYZ(&aXYZ[0],&aXYZ[8])),aQuality);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
gp_XYZ aXYZ[8] = {P( 2 ),P( 3 ),P( 5 ),P( 6 ),P( 8 ),P( 9 ),P( 11 ),P( 12 )};
|
||||||
|
aQuality = std::max(GetValue(TSequenceOfXYZ(&aXYZ[0],&aXYZ[8])),aQuality);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
gp_XYZ aXYZ[8] = {P( 3 ),P( 4 ),P( 6 ),P( 1 ),P( 9 ),P( 10 ),P( 12 ),P( 7 )};
|
||||||
|
aQuality = std::max(GetValue(TSequenceOfXYZ(&aXYZ[0],&aXYZ[8])),aQuality);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
} // switch(nbNodes)
|
||||||
|
|
||||||
if ( nbNodes > 4 ) {
|
if ( nbNodes > 4 ) {
|
||||||
// avaluate aspect ratio of quadranle faces
|
// avaluate aspect ratio of quadranle faces
|
||||||
AspectRatio aspect2D;
|
AspectRatio aspect2D;
|
||||||
@ -1417,7 +1440,7 @@ SMDSAbs_ElementType Area::GetType() const
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Class : Length
|
Class : Length
|
||||||
Description : Functor for calculating length off edge
|
Description : Functor for calculating length of edge
|
||||||
*/
|
*/
|
||||||
double Length::GetValue( const TSequenceOfXYZ& P )
|
double Length::GetValue( const TSequenceOfXYZ& P )
|
||||||
{
|
{
|
||||||
@ -2112,17 +2135,13 @@ bool FreeEdges::IsFreeEdge( const SMDS_MeshNode** theNodes, const int theFaceId
|
|||||||
TColStd_MapOfInteger aMap;
|
TColStd_MapOfInteger aMap;
|
||||||
for ( int i = 0; i < 2; i++ )
|
for ( int i = 0; i < 2; i++ )
|
||||||
{
|
{
|
||||||
SMDS_ElemIteratorPtr anElemIter = theNodes[ i ]->GetInverseElementIterator();
|
SMDS_ElemIteratorPtr anElemIter = theNodes[ i ]->GetInverseElementIterator(SMDSAbs_Face);
|
||||||
while( anElemIter->more() )
|
while( anElemIter->more() )
|
||||||
{
|
{
|
||||||
const SMDS_MeshElement* anElem = anElemIter->next();
|
if ( const SMDS_MeshElement* anElem = anElemIter->next())
|
||||||
if ( anElem != 0 && anElem->GetType() == SMDSAbs_Face )
|
|
||||||
{
|
{
|
||||||
int anId = anElem->GetID();
|
const int anId = anElem->GetID();
|
||||||
|
if ( anId != theFaceId && !aMap.Add( anId ))
|
||||||
if ( i == 0 )
|
|
||||||
aMap.Add( anId );
|
|
||||||
else if ( aMap.Contains( anId ) && anId != theFaceId )
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2147,7 +2166,7 @@ bool FreeEdges::IsSatisfy( long theId )
|
|||||||
else {
|
else {
|
||||||
anIter = aFace->nodesIterator();
|
anIter = aFace->nodesIterator();
|
||||||
}
|
}
|
||||||
if ( anIter == 0 )
|
if ( !anIter )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int i = 0, nbNodes = aFace->NbNodes();
|
int i = 0, nbNodes = aFace->NbNodes();
|
||||||
@ -2225,14 +2244,11 @@ void FreeEdges::GetBoreders(TBorders& theBorders)
|
|||||||
long anId = aNode->GetID();
|
long anId = aNode->GetID();
|
||||||
Border aBorder(anElemId,aNodeId[1],anId);
|
Border aBorder(anElemId,aNodeId[1],anId);
|
||||||
aNodeId[1] = anId;
|
aNodeId[1] = anId;
|
||||||
//std::cout<<aBorder.myPntId[0]<<"; "<<aBorder.myPntId[1]<<"; "<<aBorder.myElemId<<endl;
|
|
||||||
UpdateBorders(aBorder,aRegistry,theBorders);
|
UpdateBorders(aBorder,aRegistry,theBorders);
|
||||||
}
|
}
|
||||||
Border aBorder(anElemId,aNodeId[0],aNodeId[1]);
|
Border aBorder(anElemId,aNodeId[0],aNodeId[1]);
|
||||||
//std::cout<<aBorder.myPntId[0]<<"; "<<aBorder.myPntId[1]<<"; "<<aBorder.myElemId<<endl;
|
|
||||||
UpdateBorders(aBorder,aRegistry,theBorders);
|
UpdateBorders(aBorder,aRegistry,theBorders);
|
||||||
}
|
}
|
||||||
//std::cout<<"theBorders.size() = "<<theBorders.size()<<endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2498,7 +2514,7 @@ bool ElemGeomType::IsSatisfy( long theId )
|
|||||||
if ( myGeomType == SMDSGeom_TRIANGLE )
|
if ( myGeomType == SMDSGeom_TRIANGLE )
|
||||||
isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 6 : aNbNode == 3));
|
isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 6 : aNbNode == 3));
|
||||||
else if ( myGeomType == SMDSGeom_QUADRANGLE )
|
else if ( myGeomType == SMDSGeom_QUADRANGLE )
|
||||||
isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 8 : aNbNode == 4));
|
isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? ( aNbNode == 8 || aNbNode == 9 ) : aNbNode == 4));
|
||||||
else if ( myGeomType == SMDSGeom_POLYGON )
|
else if ( myGeomType == SMDSGeom_POLYGON )
|
||||||
isOk = anElem->IsPoly();
|
isOk = anElem->IsPoly();
|
||||||
break;
|
break;
|
||||||
@ -2511,7 +2527,9 @@ bool ElemGeomType::IsSatisfy( long theId )
|
|||||||
else if ( myGeomType == SMDSGeom_PENTA )
|
else if ( myGeomType == SMDSGeom_PENTA )
|
||||||
isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 15 : aNbNode == 6));
|
isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 15 : aNbNode == 6));
|
||||||
else if ( myGeomType == SMDSGeom_HEXA )
|
else if ( myGeomType == SMDSGeom_HEXA )
|
||||||
isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 20 : aNbNode == 8));
|
isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? ( aNbNode == 20 || aNbNode == 27 ): aNbNode == 8));
|
||||||
|
else if ( myGeomType == SMDSGeom_HEXAGONAL_PRISM )
|
||||||
|
isOk = (anElem->GetEntityType() == SMDSEntity_Hexagonal_Prism );
|
||||||
else if ( myGeomType == SMDSGeom_POLYHEDRA )
|
else if ( myGeomType == SMDSGeom_POLYHEDRA )
|
||||||
isOk = anElem->IsPoly();
|
isOk = anElem->IsPoly();
|
||||||
break;
|
break;
|
||||||
|
@ -438,6 +438,10 @@ namespace
|
|||||||
{
|
{
|
||||||
return mesh->AddFaceWithID( ids[0],ids[3],ids[2],ids[1],ids[7],ids[6],ids[5],ids[4], ID );
|
return mesh->AddFaceWithID( ids[0],ids[3],ids[2],ids[1],ids[7],ids[6],ids[5],ids[4], ID );
|
||||||
}
|
}
|
||||||
|
SMDS_MeshElement* add_QUAD_9(cgsize_t* ids, SMESHDS_Mesh* mesh, int ID)
|
||||||
|
{
|
||||||
|
return mesh->AddFaceWithID( ids[0],ids[3],ids[2],ids[1],ids[7],ids[6],ids[5],ids[4],ids[8], ID);
|
||||||
|
}
|
||||||
SMDS_MeshElement* add_TETRA_4(cgsize_t* ids, SMESHDS_Mesh* mesh, int ID)
|
SMDS_MeshElement* add_TETRA_4(cgsize_t* ids, SMESHDS_Mesh* mesh, int ID)
|
||||||
{
|
{
|
||||||
return mesh->AddVolumeWithID( ids[0], ids[2], ids[1], ids[3], ID );
|
return mesh->AddVolumeWithID( ids[0], ids[2], ids[1], ids[3], ID );
|
||||||
@ -475,6 +479,13 @@ namespace
|
|||||||
ids[5],ids[11],ids[10],ids[9],ids[8],ids[12],ids[15],
|
ids[5],ids[11],ids[10],ids[9],ids[8],ids[12],ids[15],
|
||||||
ids[14],ids[13],ids[19],ids[18],ids[17],ids[16], ID );
|
ids[14],ids[13],ids[19],ids[18],ids[17],ids[16], ID );
|
||||||
}
|
}
|
||||||
|
SMDS_MeshElement* add_HEXA_27(cgsize_t* ids, SMESHDS_Mesh* mesh, int ID)
|
||||||
|
{
|
||||||
|
return mesh->AddVolumeWithID( ids[0],ids[3],ids[2],ids[1],ids[4],ids[7],ids[6],
|
||||||
|
ids[5],ids[11],ids[10],ids[9],ids[8],ids[12],ids[15],
|
||||||
|
ids[14],ids[13],ids[19],ids[18],ids[17],ids[16],
|
||||||
|
ids[20],ids[24],ids[23],ids[22],ids[21],ids[25],ids[26], ID );
|
||||||
|
}
|
||||||
SMDS_MeshElement* add_NGON(cgsize_t* ids, SMESHDS_Mesh* mesh, int ID)
|
SMDS_MeshElement* add_NGON(cgsize_t* ids, SMESHDS_Mesh* mesh, int ID)
|
||||||
{
|
{
|
||||||
vector<int> idVec( ids[0] );
|
vector<int> idVec( ids[0] );
|
||||||
@ -504,7 +515,7 @@ namespace
|
|||||||
funVec[ CGNS_ENUMV( TRI_6 )] = add_TRI_6 ;
|
funVec[ CGNS_ENUMV( TRI_6 )] = add_TRI_6 ;
|
||||||
funVec[ CGNS_ENUMV( QUAD_4 )] = add_QUAD_4 ;
|
funVec[ CGNS_ENUMV( QUAD_4 )] = add_QUAD_4 ;
|
||||||
funVec[ CGNS_ENUMV( QUAD_8 )] = add_QUAD_8 ;
|
funVec[ CGNS_ENUMV( QUAD_8 )] = add_QUAD_8 ;
|
||||||
funVec[ CGNS_ENUMV( QUAD_9 )] = add_QUAD_8 ;
|
funVec[ CGNS_ENUMV( QUAD_9 )] = add_QUAD_9 ;
|
||||||
funVec[ CGNS_ENUMV( TETRA_4 )] = add_TETRA_4 ;
|
funVec[ CGNS_ENUMV( TETRA_4 )] = add_TETRA_4 ;
|
||||||
funVec[ CGNS_ENUMV( TETRA_10 )] = add_TETRA_10;
|
funVec[ CGNS_ENUMV( TETRA_10 )] = add_TETRA_10;
|
||||||
funVec[ CGNS_ENUMV( PYRA_5 )] = add_PYRA_5 ;
|
funVec[ CGNS_ENUMV( PYRA_5 )] = add_PYRA_5 ;
|
||||||
@ -515,7 +526,7 @@ namespace
|
|||||||
funVec[ CGNS_ENUMV( PENTA_18 )] = add_PENTA_15;
|
funVec[ CGNS_ENUMV( PENTA_18 )] = add_PENTA_15;
|
||||||
funVec[ CGNS_ENUMV( HEXA_8 )] = add_HEXA_8 ;
|
funVec[ CGNS_ENUMV( HEXA_8 )] = add_HEXA_8 ;
|
||||||
funVec[ CGNS_ENUMV( HEXA_20 )] = add_HEXA_20 ;
|
funVec[ CGNS_ENUMV( HEXA_20 )] = add_HEXA_20 ;
|
||||||
funVec[ CGNS_ENUMV( HEXA_27 )] = add_HEXA_20 ;
|
funVec[ CGNS_ENUMV( HEXA_27 )] = add_HEXA_27 ;
|
||||||
funVec[ CGNS_ENUMV( NGON_n )] = add_NGON ;
|
funVec[ CGNS_ENUMV( NGON_n )] = add_NGON ;
|
||||||
}
|
}
|
||||||
return &funVec[0];
|
return &funVec[0];
|
||||||
|
@ -92,6 +92,11 @@ namespace
|
|||||||
interlaces[SMDSEntity_Quad_Quadrangle] = ids;
|
interlaces[SMDSEntity_Quad_Quadrangle] = ids;
|
||||||
cgTypes [SMDSEntity_Quad_Quadrangle] = CGNS_ENUMV( QUAD_8 );
|
cgTypes [SMDSEntity_Quad_Quadrangle] = CGNS_ENUMV( QUAD_8 );
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
static int ids[] = { 0,3,2,1,7,6,5,4,8 };
|
||||||
|
interlaces[SMDSEntity_BiQuad_Quadrangle] = ids;
|
||||||
|
cgTypes [SMDSEntity_BiQuad_Quadrangle] = CGNS_ENUMV( QUAD_9 );
|
||||||
|
}
|
||||||
{
|
{
|
||||||
static int ids[] = { 0, 2, 1, 3 };
|
static int ids[] = { 0, 2, 1, 3 };
|
||||||
interlaces[SMDSEntity_Tetra] = ids;
|
interlaces[SMDSEntity_Tetra] = ids;
|
||||||
@ -133,8 +138,15 @@ namespace
|
|||||||
cgTypes [SMDSEntity_Quad_Hexa] = CGNS_ENUMV( HEXA_20 );
|
cgTypes [SMDSEntity_Quad_Hexa] = CGNS_ENUMV( HEXA_20 );
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
cgTypes[SMDSEntity_Polygon] = CGNS_ENUMV( NGON_n );
|
static int ids[] = { 0,3,2,1,4,7,6,5,11,10,9,8,12,15,14,13,19,18,17,16,
|
||||||
cgTypes[SMDSEntity_Polyhedra] = CGNS_ENUMV( NFACE_n );
|
20, 24,23,22,21, 25};
|
||||||
|
interlaces[SMDSEntity_TriQuad_Hexa] = ids;
|
||||||
|
cgTypes [SMDSEntity_TriQuad_Hexa] = CGNS_ENUMV( HEXA_27 );
|
||||||
|
}
|
||||||
|
{
|
||||||
|
cgTypes[SMDSEntity_Polygon] = CGNS_ENUMV( NGON_n );
|
||||||
|
cgTypes[SMDSEntity_Polyhedra] = CGNS_ENUMV( NFACE_n );
|
||||||
|
cgTypes[SMDSEntity_Hexagonal_Prism] = CGNS_ENUMV( NFACE_n );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cgType = cgTypes[ smType ];
|
cgType = cgTypes[ smType ];
|
||||||
@ -353,7 +365,8 @@ Driver_Mesh::Status DriverCGNS_Write::Perform()
|
|||||||
}
|
}
|
||||||
while ( elem && elem->GetEntityType() == elemType );
|
while ( elem && elem->GetEntityType() == elemType );
|
||||||
|
|
||||||
else if ( elemType == SMDSEntity_Polyhedra ) // POLYHEDRA
|
else if ( elemType == SMDSEntity_Polyhedra ||
|
||||||
|
elemType == SMDSEntity_Hexagonal_Prism) // POLYHEDRA
|
||||||
{
|
{
|
||||||
// to save polyhedrons after all
|
// to save polyhedrons after all
|
||||||
const SMDS_MeshInfo& meshInfo = myMesh->GetMeshInfo();
|
const SMDS_MeshInfo& meshInfo = myMesh->GetMeshInfo();
|
||||||
@ -374,7 +387,7 @@ Driver_Mesh::Status DriverCGNS_Write::Perform()
|
|||||||
// Write polyhedral volumes
|
// Write polyhedral volumes
|
||||||
// -------------------------
|
// -------------------------
|
||||||
|
|
||||||
if ( myMesh->GetMeshInfo().NbPolyhedrons() > 0 )
|
if ( myMesh->GetMeshInfo().NbElements() != cgID ) // polyhedra or hexagonal prisms remain
|
||||||
{
|
{
|
||||||
// the polyhedron (NFACE_n) is described as a set of signed face IDs,
|
// the polyhedron (NFACE_n) is described as a set of signed face IDs,
|
||||||
// so first we are to write all polygones (NGON_n) bounding polyhedrons
|
// so first we are to write all polygones (NGON_n) bounding polyhedrons
|
||||||
@ -398,7 +411,9 @@ Driver_Mesh::Status DriverCGNS_Write::Perform()
|
|||||||
while ( elemIt->more() )
|
while ( elemIt->more() )
|
||||||
{
|
{
|
||||||
elem = elemIt->next();
|
elem = elemIt->next();
|
||||||
if ( elem->GetEntityType() == SMDSEntity_Polyhedra )
|
SMDSAbs_EntityType type = elem->GetEntityType();
|
||||||
|
if ( type == SMDSEntity_Polyhedra ||
|
||||||
|
type == SMDSEntity_Hexagonal_Prism )
|
||||||
{
|
{
|
||||||
++nbPolyhTreated;
|
++nbPolyhTreated;
|
||||||
vol.Set( elem );
|
vol.Set( elem );
|
||||||
|
@ -58,7 +58,8 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const SMDS_MeshNode*
|
static const SMDS_MeshNode*
|
||||||
FindNode(const SMDS_Mesh* theMesh, TInt theId){
|
FindNode(const SMDS_Mesh* theMesh, TInt theId)
|
||||||
|
{
|
||||||
const SMDS_MeshNode* aNode = theMesh->FindNode(theId);
|
const SMDS_MeshNode* aNode = theMesh->FindNode(theId);
|
||||||
if(aNode) return aNode;
|
if(aNode) return aNode;
|
||||||
EXCEPTION(runtime_error,"SMDS_Mesh::FindNode - cannot find a SMDS_MeshNode for ID = "<<theId);
|
EXCEPTION(runtime_error,"SMDS_Mesh::FindNode - cannot find a SMDS_MeshNode for ID = "<<theId);
|
||||||
@ -96,8 +97,6 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
if(aMeshName != aMeshInfo->GetName()) continue;
|
if(aMeshName != aMeshInfo->GetName()) continue;
|
||||||
aResult = DRS_OK;
|
aResult = DRS_OK;
|
||||||
|
|
||||||
//TInt aMeshDim = aMeshInfo->GetDim();
|
|
||||||
|
|
||||||
// Reading MED families to the temporary structure
|
// Reading MED families to the temporary structure
|
||||||
//------------------------------------------------
|
//------------------------------------------------
|
||||||
TErr anErr;
|
TErr anErr;
|
||||||
@ -144,7 +143,7 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
aResult = DRS_FAIL;
|
aResult = DRS_FAIL;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
aMeshInfo->myDim=aMeshInfo->mySpaceDim;//Bug correction to ignore meshdim in MEDFile because can be false.
|
aMeshInfo->myDim=aMeshInfo->mySpaceDim;// ignore meshdim in MEDFile because it can be false
|
||||||
PCoordHelper aCoordHelper = GetCoordHelper(aNodeInfo);
|
PCoordHelper aCoordHelper = GetCoordHelper(aNodeInfo);
|
||||||
|
|
||||||
EBooleen anIsNodeNum = aNodeInfo->IsElemNum();
|
EBooleen anIsNodeNum = aNodeInfo->IsElemNum();
|
||||||
@ -160,13 +159,10 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
if(anIsNodeNum) {
|
if(anIsNodeNum) {
|
||||||
aNode = myMesh->AddNodeWithID
|
aNode = myMesh->AddNodeWithID
|
||||||
(aCoords[0],aCoords[1],aCoords[2],aNodeInfo->GetElemNum(iElem));
|
(aCoords[0],aCoords[1],aCoords[2],aNodeInfo->GetElemNum(iElem));
|
||||||
//MESSAGE("AddNodeWithID " << aNodeInfo->GetElemNum(iElem));
|
|
||||||
} else {
|
} else {
|
||||||
aNode = myMesh->AddNodeWithID
|
aNode = myMesh->AddNodeWithID
|
||||||
(aCoords[0],aCoords[1],aCoords[2], iElem+1);
|
(aCoords[0],aCoords[1],aCoords[2], iElem+1);
|
||||||
//MESSAGE("AddNode " << aNode->GetID());
|
|
||||||
}
|
}
|
||||||
//cout<<aNode->GetID()<<": "<<aNode->X()<<", "<<aNode->Y()<<", "<<aNode->Z()<<endl;
|
|
||||||
|
|
||||||
// Save reference to this node from its family
|
// Save reference to this node from its family
|
||||||
TInt aFamNum = aNodeInfo->GetFamNum(iElem);
|
TInt aFamNum = aNodeInfo->GetFamNum(iElem);
|
||||||
@ -226,14 +222,12 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
if(anIsElemNum){
|
if(anIsElemNum){
|
||||||
TInt anElemId = aPolygoneInfo->GetElemNum(iElem);
|
TInt anElemId = aPolygoneInfo->GetElemNum(iElem);
|
||||||
anElement = myMesh->AddPolygonalFaceWithID(aNodeIds,anElemId);
|
anElement = myMesh->AddPolygonalFaceWithID(aNodeIds,anElemId);
|
||||||
//MESSAGE("AddPolygonalFaceWithID " << anElemId);
|
|
||||||
}
|
}
|
||||||
if(!anElement){
|
if(!anElement){
|
||||||
vector<const SMDS_MeshNode*> aNodes(aNbConn);
|
vector<const SMDS_MeshNode*> aNodes(aNbConn);
|
||||||
for(TInt iConn = 0; iConn < aNbConn; iConn++)
|
for(TInt iConn = 0; iConn < aNbConn; iConn++)
|
||||||
aNodes[iConn] = FindNode(myMesh,aNodeIds[iConn]);
|
aNodes[iConn] = FindNode(myMesh,aNodeIds[iConn]);
|
||||||
anElement = myMesh->AddPolygonalFace(aNodes);
|
anElement = myMesh->AddPolygonalFace(aNodes);
|
||||||
//MESSAGE("AddPolygonalFace " << anElement->GetID());
|
|
||||||
isRenum = anIsElemNum;
|
isRenum = anIsElemNum;
|
||||||
}
|
}
|
||||||
#ifndef _DEXCEPT_
|
#ifndef _DEXCEPT_
|
||||||
@ -273,33 +267,26 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
typedef MED::TVector<int> TQuantities;
|
typedef MED::TVector<int> TQuantities;
|
||||||
TQuantities aQuantities(aNbFaces);
|
TQuantities aQuantities(aNbFaces);
|
||||||
TInt aNbNodes = aPolyedreInfo->GetNbNodes(iElem);
|
TInt aNbNodes = aPolyedreInfo->GetNbNodes(iElem);
|
||||||
//MESSAGE("--- aNbNodes " << aNbNodes);
|
|
||||||
TNodeIds aNodeIds(aNbNodes);
|
TNodeIds aNodeIds(aNbNodes);
|
||||||
for(TInt iFace = 0, iNode = 0; iFace < aNbFaces; iFace++){
|
for(TInt iFace = 0, iNode = 0; iFace < aNbFaces; iFace++){
|
||||||
//MESSAGE("--- iface " << aNbFaces << " " << iFace);
|
|
||||||
MED::TCConnSlice aConnSlice = aConnSliceArr[iFace];
|
MED::TCConnSlice aConnSlice = aConnSliceArr[iFace];
|
||||||
TInt aNbConn = aConnSlice.size();
|
TInt aNbConn = aConnSlice.size();
|
||||||
aQuantities[iFace] = aNbConn;
|
aQuantities[iFace] = aNbConn;
|
||||||
#ifdef _EDF_NODE_IDS_
|
#ifdef _EDF_NODE_IDS_
|
||||||
//MESSAGE(anIsNodeNum);
|
|
||||||
if(anIsNodeNum)
|
if(anIsNodeNum)
|
||||||
for(TInt iConn = 0; iConn < aNbConn; iConn++)
|
for(TInt iConn = 0; iConn < aNbConn; iConn++)
|
||||||
{
|
{
|
||||||
//MESSAGE("iConn " << iConn << " aConnSlice[iConn] " << aConnSlice[iConn]);
|
|
||||||
aNodeIds[iNode] = aNodeInfo->GetElemNum(aConnSlice[iConn] - 1);
|
aNodeIds[iNode] = aNodeInfo->GetElemNum(aConnSlice[iConn] - 1);
|
||||||
//MESSAGE("aNodeIds[" << iNode << "]=" << aNodeIds[iNode]);
|
|
||||||
iNode++;
|
iNode++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
for(TInt iConn = 0; iConn < aNbConn; iConn++)
|
for(TInt iConn = 0; iConn < aNbConn; iConn++)
|
||||||
{
|
{
|
||||||
//MESSAGE("iConn " << iConn);
|
|
||||||
aNodeIds[iNode++] = aConnSlice[iConn];
|
aNodeIds[iNode++] = aConnSlice[iConn];
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
for(TInt iConn = 0; iConn < aNbConn; iConn++)
|
for(TInt iConn = 0; iConn < aNbConn; iConn++)
|
||||||
{
|
{
|
||||||
//MESSAGE("iConn " << iConn);
|
|
||||||
aNodeIds[iNode++] = aConnSlice[iConn];
|
aNodeIds[iNode++] = aConnSlice[iConn];
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -315,14 +302,12 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
if(anIsElemNum){
|
if(anIsElemNum){
|
||||||
TInt anElemId = aPolyedreInfo->GetElemNum(iElem);
|
TInt anElemId = aPolyedreInfo->GetElemNum(iElem);
|
||||||
anElement = myMesh->AddPolyhedralVolumeWithID(aNodeIds,aQuantities,anElemId);
|
anElement = myMesh->AddPolyhedralVolumeWithID(aNodeIds,aQuantities,anElemId);
|
||||||
//MESSAGE("AddPolyhedralVolumeWithID " << anElemId);
|
|
||||||
}
|
}
|
||||||
if(!anElement){
|
if(!anElement){
|
||||||
vector<const SMDS_MeshNode*> aNodes(aNbNodes);
|
vector<const SMDS_MeshNode*> aNodes(aNbNodes);
|
||||||
for(TInt iConn = 0; iConn < aNbNodes; iConn++)
|
for(TInt iConn = 0; iConn < aNbNodes; iConn++)
|
||||||
aNodes[iConn] = FindNode(myMesh,aNodeIds[iConn]);
|
aNodes[iConn] = FindNode(myMesh,aNodeIds[iConn]);
|
||||||
anElement = myMesh->AddPolyhedralVolume(aNodes,aQuantities);
|
anElement = myMesh->AddPolyhedralVolume(aNodes,aQuantities);
|
||||||
//MESSAGE("AddPolyhedralVolume " << anElement->GetID());
|
|
||||||
isRenum = anIsElemNum;
|
isRenum = anIsElemNum;
|
||||||
}
|
}
|
||||||
#ifndef _DEXCEPT_
|
#ifndef _DEXCEPT_
|
||||||
@ -365,6 +350,7 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
case eTRIA6: aNbNodes = 6; break;
|
case eTRIA6: aNbNodes = 6; break;
|
||||||
case eQUAD4: aNbNodes = 4; break;
|
case eQUAD4: aNbNodes = 4; break;
|
||||||
case eQUAD8: aNbNodes = 8; break;
|
case eQUAD8: aNbNodes = 8; break;
|
||||||
|
case eQUAD9: aNbNodes = 9; break;
|
||||||
case eTETRA4: aNbNodes = 4; break;
|
case eTETRA4: aNbNodes = 4; break;
|
||||||
case eTETRA10: aNbNodes = 10; break;
|
case eTETRA10: aNbNodes = 10; break;
|
||||||
case ePYRA5: aNbNodes = 5; break;
|
case ePYRA5: aNbNodes = 5; break;
|
||||||
@ -373,6 +359,8 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
case ePENTA15: aNbNodes = 15; break;
|
case ePENTA15: aNbNodes = 15; break;
|
||||||
case eHEXA8: aNbNodes = 8; break;
|
case eHEXA8: aNbNodes = 8; break;
|
||||||
case eHEXA20: aNbNodes = 20; break;
|
case eHEXA20: aNbNodes = 20; break;
|
||||||
|
case eHEXA27: aNbNodes = 27; break;
|
||||||
|
case eOCTA12: aNbNodes = 12; break;
|
||||||
case ePOINT1: aNbNodes = 1; break;
|
case ePOINT1: aNbNodes = 1; break;
|
||||||
default:;
|
default:;
|
||||||
}
|
}
|
||||||
@ -515,6 +503,27 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
isRenum = anIsElemNum;
|
isRenum = anIsElemNum;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case eQUAD9:
|
||||||
|
aNbNodes = 9;
|
||||||
|
if(anIsElemNum)
|
||||||
|
anElement = myMesh->AddFaceWithID(aNodeIds[0], aNodeIds[1],
|
||||||
|
aNodeIds[2], aNodeIds[3],
|
||||||
|
aNodeIds[4], aNodeIds[5],
|
||||||
|
aNodeIds[6], aNodeIds[7], aNodeIds[8],
|
||||||
|
aCellInfo->GetElemNum(iElem));
|
||||||
|
if (!anElement) {
|
||||||
|
anElement = myMesh->AddFace(FindNode(myMesh,aNodeIds[0]),
|
||||||
|
FindNode(myMesh,aNodeIds[1]),
|
||||||
|
FindNode(myMesh,aNodeIds[2]),
|
||||||
|
FindNode(myMesh,aNodeIds[3]),
|
||||||
|
FindNode(myMesh,aNodeIds[4]),
|
||||||
|
FindNode(myMesh,aNodeIds[5]),
|
||||||
|
FindNode(myMesh,aNodeIds[6]),
|
||||||
|
FindNode(myMesh,aNodeIds[7]),
|
||||||
|
FindNode(myMesh,aNodeIds[8]));
|
||||||
|
isRenum = anIsElemNum;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case eTETRA4:
|
case eTETRA4:
|
||||||
aNbNodes = 4;
|
aNbNodes = 4;
|
||||||
if(anIsElemNum)
|
if(anIsElemNum)
|
||||||
@ -554,7 +563,6 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
break;
|
break;
|
||||||
case ePYRA5:
|
case ePYRA5:
|
||||||
aNbNodes = 5;
|
aNbNodes = 5;
|
||||||
// There is some differnce between SMDS and MED
|
|
||||||
if(anIsElemNum)
|
if(anIsElemNum)
|
||||||
anElement = myMesh->AddVolumeWithID(aNodeIds[0], aNodeIds[1],
|
anElement = myMesh->AddVolumeWithID(aNodeIds[0], aNodeIds[1],
|
||||||
aNodeIds[2], aNodeIds[3],
|
aNodeIds[2], aNodeIds[3],
|
||||||
@ -571,7 +579,6 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
break;
|
break;
|
||||||
case ePYRA13:
|
case ePYRA13:
|
||||||
aNbNodes = 13;
|
aNbNodes = 13;
|
||||||
// There is some difference between SMDS and MED
|
|
||||||
if(anIsElemNum)
|
if(anIsElemNum)
|
||||||
anElement = myMesh->AddVolumeWithID(aNodeIds[0], aNodeIds[1],
|
anElement = myMesh->AddVolumeWithID(aNodeIds[0], aNodeIds[1],
|
||||||
aNodeIds[2], aNodeIds[3],
|
aNodeIds[2], aNodeIds[3],
|
||||||
@ -673,6 +680,7 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
isRenum = anIsElemNum;
|
isRenum = anIsElemNum;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case eHEXA20:
|
case eHEXA20:
|
||||||
aNbNodes = 20;
|
aNbNodes = 20;
|
||||||
if(anIsElemNum)
|
if(anIsElemNum)
|
||||||
@ -711,13 +719,86 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
isRenum = anIsElemNum;
|
isRenum = anIsElemNum;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
// if (anIsElemNum) {
|
case eHEXA27:
|
||||||
// MESSAGE("add element with id " << aCellInfo->GetElemNum(iElem));
|
aNbNodes = 27;
|
||||||
// }
|
if(anIsElemNum)
|
||||||
// else {
|
anElement = myMesh->AddVolumeWithID(aNodeIds[0], aNodeIds[1],
|
||||||
// MESSAGE("add element "<< anElement->GetID());
|
aNodeIds[2], aNodeIds[3],
|
||||||
// }
|
aNodeIds[4], aNodeIds[5],
|
||||||
|
aNodeIds[6], aNodeIds[7],
|
||||||
|
aNodeIds[8], aNodeIds[9],
|
||||||
|
aNodeIds[10], aNodeIds[11],
|
||||||
|
aNodeIds[12], aNodeIds[13],
|
||||||
|
aNodeIds[14], aNodeIds[15],
|
||||||
|
aNodeIds[16], aNodeIds[17],
|
||||||
|
aNodeIds[18], aNodeIds[19],
|
||||||
|
aNodeIds[20], aNodeIds[21],
|
||||||
|
aNodeIds[22], aNodeIds[23],
|
||||||
|
aNodeIds[24], aNodeIds[25],
|
||||||
|
aNodeIds[26],
|
||||||
|
aCellInfo->GetElemNum(iElem));
|
||||||
|
if (!anElement) {
|
||||||
|
anElement = myMesh->AddVolume(FindNode(myMesh,aNodeIds[0]),
|
||||||
|
FindNode(myMesh,aNodeIds[1]),
|
||||||
|
FindNode(myMesh,aNodeIds[2]),
|
||||||
|
FindNode(myMesh,aNodeIds[3]),
|
||||||
|
FindNode(myMesh,aNodeIds[4]),
|
||||||
|
FindNode(myMesh,aNodeIds[5]),
|
||||||
|
FindNode(myMesh,aNodeIds[6]),
|
||||||
|
FindNode(myMesh,aNodeIds[7]),
|
||||||
|
FindNode(myMesh,aNodeIds[8]),
|
||||||
|
FindNode(myMesh,aNodeIds[9]),
|
||||||
|
FindNode(myMesh,aNodeIds[10]),
|
||||||
|
FindNode(myMesh,aNodeIds[11]),
|
||||||
|
FindNode(myMesh,aNodeIds[12]),
|
||||||
|
FindNode(myMesh,aNodeIds[13]),
|
||||||
|
FindNode(myMesh,aNodeIds[14]),
|
||||||
|
FindNode(myMesh,aNodeIds[15]),
|
||||||
|
FindNode(myMesh,aNodeIds[16]),
|
||||||
|
FindNode(myMesh,aNodeIds[17]),
|
||||||
|
FindNode(myMesh,aNodeIds[18]),
|
||||||
|
FindNode(myMesh,aNodeIds[19]),
|
||||||
|
FindNode(myMesh,aNodeIds[20]),
|
||||||
|
FindNode(myMesh,aNodeIds[21]),
|
||||||
|
FindNode(myMesh,aNodeIds[22]),
|
||||||
|
FindNode(myMesh,aNodeIds[23]),
|
||||||
|
FindNode(myMesh,aNodeIds[24]),
|
||||||
|
FindNode(myMesh,aNodeIds[25]),
|
||||||
|
FindNode(myMesh,aNodeIds[26]));
|
||||||
|
isRenum = anIsElemNum;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case eOCTA12:
|
||||||
|
aNbNodes = 12;
|
||||||
|
if(anIsElemNum)
|
||||||
|
anElement = myMesh->AddVolumeWithID(aNodeIds[0], aNodeIds[1],
|
||||||
|
aNodeIds[2], aNodeIds[3],
|
||||||
|
aNodeIds[4], aNodeIds[5],
|
||||||
|
aNodeIds[6], aNodeIds[7],
|
||||||
|
aNodeIds[8], aNodeIds[9],
|
||||||
|
aNodeIds[10], aNodeIds[11],
|
||||||
|
aCellInfo->GetElemNum(iElem));
|
||||||
|
if (!anElement) {
|
||||||
|
anElement = myMesh->AddVolume(FindNode(myMesh,aNodeIds[0]),
|
||||||
|
FindNode(myMesh,aNodeIds[1]),
|
||||||
|
FindNode(myMesh,aNodeIds[2]),
|
||||||
|
FindNode(myMesh,aNodeIds[3]),
|
||||||
|
FindNode(myMesh,aNodeIds[4]),
|
||||||
|
FindNode(myMesh,aNodeIds[5]),
|
||||||
|
FindNode(myMesh,aNodeIds[6]),
|
||||||
|
FindNode(myMesh,aNodeIds[7]),
|
||||||
|
FindNode(myMesh,aNodeIds[8]),
|
||||||
|
FindNode(myMesh,aNodeIds[9]),
|
||||||
|
FindNode(myMesh,aNodeIds[10]),
|
||||||
|
FindNode(myMesh,aNodeIds[11]));
|
||||||
|
isRenum = anIsElemNum;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
} // switch(aGeom)
|
||||||
|
|
||||||
#ifndef _DEXCEPT_
|
#ifndef _DEXCEPT_
|
||||||
}catch(const std::exception& exc){
|
}catch(const std::exception& exc){
|
||||||
INFOS("The following exception was caught:\n\t"<<exc.what());
|
INFOS("The following exception was caught:\n\t"<<exc.what());
|
||||||
|
@ -215,36 +215,6 @@ namespace{
|
|||||||
};
|
};
|
||||||
typedef boost::shared_ptr<TCoordHelper> TCoordHelperPtr;
|
typedef boost::shared_ptr<TCoordHelper> TCoordHelperPtr;
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------
|
|
||||||
/*!
|
|
||||||
* \brief Class helping to use either SMDS_0DElementIterator,
|
|
||||||
* SMDS_EdgeIterator, SMDS_FaceIterator or SMDS_VolumeIterator
|
|
||||||
* in the same code
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------
|
|
||||||
struct TElemIterator
|
|
||||||
{
|
|
||||||
virtual const SMDS_MeshElement* next() = 0;
|
|
||||||
virtual ~TElemIterator() {}
|
|
||||||
};
|
|
||||||
typedef boost::shared_ptr<TElemIterator> PElemIterator;
|
|
||||||
|
|
||||||
template< class SMDSIteratorPtr > class TypedElemIterator: public TElemIterator
|
|
||||||
{
|
|
||||||
SMDSIteratorPtr myItPtr;
|
|
||||||
public:
|
|
||||||
TypedElemIterator(SMDSIteratorPtr it): myItPtr(it) {}
|
|
||||||
virtual const SMDS_MeshElement* next() {
|
|
||||||
if ( myItPtr->more() ) return myItPtr->next();
|
|
||||||
else return 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
typedef TypedElemIterator< SMDS_0DElementIteratorPtr > T0DElementIterator;
|
|
||||||
typedef TypedElemIterator< SMDS_EdgeIteratorPtr > TEdgeIterator;
|
|
||||||
typedef TypedElemIterator< SMDS_FaceIteratorPtr > TFaceIterator;
|
|
||||||
typedef TypedElemIterator< SMDS_VolumeIteratorPtr > TVolumeIterator;
|
|
||||||
|
|
||||||
//-------------------------------------------------------
|
//-------------------------------------------------------
|
||||||
/*!
|
/*!
|
||||||
* \brief Structure describing element type
|
* \brief Structure describing element type
|
||||||
@ -263,7 +233,6 @@ namespace{
|
|||||||
|
|
||||||
|
|
||||||
typedef NCollection_DataMap< Standard_Address, int > TElemFamilyMap;
|
typedef NCollection_DataMap< Standard_Address, int > TElemFamilyMap;
|
||||||
//typedef map<const SMDS_MeshElement *, int> TElemFamilyMap;
|
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
@ -573,9 +542,14 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
nbElemInfo.NbQuadrangles( ORDER_LINEAR ),
|
nbElemInfo.NbQuadrangles( ORDER_LINEAR ),
|
||||||
SMDSAbs_Face));
|
SMDSAbs_Face));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eQUAD8,
|
eQUAD8,
|
||||||
nbElemInfo.NbQuadrangles( ORDER_QUADRATIC ),
|
nbElemInfo.NbQuadrangles( ORDER_QUADRATIC ) -
|
||||||
SMDSAbs_Face));
|
nbElemInfo.NbBiQuadQuadrangles(),
|
||||||
|
SMDSAbs_Face));
|
||||||
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
|
eQUAD9,
|
||||||
|
nbElemInfo.NbBiQuadQuadrangles(),
|
||||||
|
SMDSAbs_Face));
|
||||||
if ( polyTypesSupported ) {
|
if ( polyTypesSupported ) {
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
ePOLYGONE,
|
ePOLYGONE,
|
||||||
@ -620,10 +594,18 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
SMDSAbs_Volume));
|
SMDSAbs_Volume));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eHEXA20,
|
eHEXA20,
|
||||||
nbElemInfo.NbHexas( ORDER_QUADRATIC ),
|
nbElemInfo.NbHexas( ORDER_QUADRATIC )-
|
||||||
|
nbElemInfo.NbTriQuadHexas(),
|
||||||
|
SMDSAbs_Volume));
|
||||||
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
|
eHEXA27,
|
||||||
|
nbElemInfo.NbTriQuadHexas(),
|
||||||
|
SMDSAbs_Volume));
|
||||||
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
|
eOCTA12,
|
||||||
|
nbElemInfo.NbHexPrisms(),
|
||||||
SMDSAbs_Volume));
|
SMDSAbs_Volume));
|
||||||
if ( polyTypesSupported ) {
|
if ( polyTypesSupported ) {
|
||||||
//MESSAGE("polyTypesSupported");
|
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
ePOLYEDRE,
|
ePOLYEDRE,
|
||||||
nbElemInfo.NbPolyhedrons(),
|
nbElemInfo.NbPolyhedrons(),
|
||||||
@ -645,32 +627,29 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
if ( aElemTypeData->_nbElems == 0 )
|
if ( aElemTypeData->_nbElems == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// iterator on elements of a current type
|
|
||||||
PElemIterator elemIterator;
|
|
||||||
int defaultFamilyId = 0;
|
int defaultFamilyId = 0;
|
||||||
switch ( aElemTypeData->_smdsType ) {
|
switch ( aElemTypeData->_smdsType ) {
|
||||||
case SMDSAbs_0DElement:
|
case SMDSAbs_0DElement:
|
||||||
elemIterator = PElemIterator( new T0DElementIterator( myMesh->elements0dIterator() ));
|
|
||||||
defaultFamilyId = my0DElementsDefaultFamilyId;
|
defaultFamilyId = my0DElementsDefaultFamilyId;
|
||||||
break;
|
break;
|
||||||
case SMDSAbs_Edge:
|
case SMDSAbs_Edge:
|
||||||
elemIterator = PElemIterator( new TEdgeIterator( myMesh->edgesIterator() ));
|
|
||||||
defaultFamilyId = myEdgesDefaultFamilyId;
|
defaultFamilyId = myEdgesDefaultFamilyId;
|
||||||
break;
|
break;
|
||||||
case SMDSAbs_Face:
|
case SMDSAbs_Face:
|
||||||
elemIterator = PElemIterator( new TFaceIterator( myMesh->facesIterator() ));
|
|
||||||
defaultFamilyId = myFacesDefaultFamilyId;
|
defaultFamilyId = myFacesDefaultFamilyId;
|
||||||
break;
|
break;
|
||||||
case SMDSAbs_Volume:
|
case SMDSAbs_Volume:
|
||||||
elemIterator = PElemIterator( new TVolumeIterator( myMesh->volumesIterator() ));
|
|
||||||
defaultFamilyId = myVolumesDefaultFamilyId;
|
defaultFamilyId = myVolumesDefaultFamilyId;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// iterator on elements of a current type
|
||||||
|
SMDS_ElemIteratorPtr elemIterator = myMesh->elementsIterator( aElemTypeData->_smdsType );
|
||||||
|
if ( !elemIterator->more()) continue;
|
||||||
int iElem = 0;
|
int iElem = 0;
|
||||||
|
|
||||||
//cout << " Treat type " << aElemTypeData->_geomType << " nb = " <<aElemTypeData->_nbElems<< endl;
|
|
||||||
// Treat POLYGONs
|
// Treat POLYGONs
|
||||||
// ---------------
|
// ---------------
|
||||||
if ( aElemTypeData->_geomType == ePOLYGONE )
|
if ( aElemTypeData->_geomType == ePOLYGONE )
|
||||||
@ -726,11 +705,6 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
if ( ++iElem == aPolygoneInfo->GetNbElem() )
|
if ( ++iElem == aPolygoneInfo->GetNbElem() )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// if(TInt aNbElems = aPolygoneElemNums.size())
|
|
||||||
// // add one element in connectivities,
|
|
||||||
// // referenced by the last element in indices
|
|
||||||
// aPolygoneConn.push_back(0);
|
|
||||||
//cout << " SetPolygoneInfo(aPolygoneInfo)" << endl;
|
|
||||||
myMed->SetPolygoneInfo(aPolygoneInfo);
|
myMed->SetPolygoneInfo(aPolygoneInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -740,7 +714,6 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
// ----------------
|
// ----------------
|
||||||
else if (aElemTypeData->_geomType == ePOLYEDRE )
|
else if (aElemTypeData->_geomType == ePOLYEDRE )
|
||||||
{
|
{
|
||||||
//MESSAGE("_geomType == ePOLYEDRE");
|
|
||||||
if ( nbPolyhedronNodes == 0 ) {
|
if ( nbPolyhedronNodes == 0 ) {
|
||||||
// Count nb of nodes
|
// Count nb of nodes
|
||||||
while ( const SMDS_MeshElement* anElem = elemIterator->next() ) {
|
while ( const SMDS_MeshElement* anElem = elemIterator->next() ) {
|
||||||
@ -752,9 +725,6 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//MESSAGE("nbPolyhedronNodes=" << nbPolyhedronNodes);
|
|
||||||
//MESSAGE("nbPolyhedronFaces=" << nbPolyhedronFaces);
|
|
||||||
//MESSAGE("_nbElems="<< aElemTypeData->_nbElems);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Store in med file
|
// Store in med file
|
||||||
@ -781,17 +751,14 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
continue;
|
continue;
|
||||||
if ( !aPolyedre->IsPoly() )
|
if ( !aPolyedre->IsPoly() )
|
||||||
continue;
|
continue;
|
||||||
//MESSAGE("index[" << iElem << "]=" << index[iElem] << " iElem=" << iElem);
|
|
||||||
// index
|
// index
|
||||||
TInt aNbFaces = aPolyedre->NbFaces();
|
TInt aNbFaces = aPolyedre->NbFaces();
|
||||||
index[ iElem+1 ] = index[ iElem ] + aNbFaces;
|
index[ iElem+1 ] = index[ iElem ] + aNbFaces;
|
||||||
//MESSAGE("index[" << iElem+1 << "]=" << index[iElem+1] << " iElem=" << iElem);
|
|
||||||
|
|
||||||
// face index
|
// face index
|
||||||
for (TInt f = 1; f <= aNbFaces; ++f, ++iFace ) {
|
for (TInt f = 1; f <= aNbFaces; ++f, ++iFace ) {
|
||||||
int aNbFaceNodes = aPolyedre->NbFaceNodes( f );
|
int aNbFaceNodes = aPolyedre->NbFaceNodes( f );
|
||||||
faces[ iFace+1 ] = faces[ iFace ] + aNbFaceNodes;
|
faces[ iFace+1 ] = faces[ iFace ] + aNbFaceNodes;
|
||||||
//MESSAGE("faces[" << iFace+1 << "]=" << faces[iFace+1] << " iFace=" << iFace);
|
|
||||||
}
|
}
|
||||||
// connectivity
|
// connectivity
|
||||||
SMDS_ElemIteratorPtr nodeIt = anElem->nodesIterator();
|
SMDS_ElemIteratorPtr nodeIt = anElem->nodesIterator();
|
||||||
@ -799,10 +766,8 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
const SMDS_MeshElement* aNode = nodeIt->next();
|
const SMDS_MeshElement* aNode = nodeIt->next();
|
||||||
#ifdef _EDF_NODE_IDS_
|
#ifdef _EDF_NODE_IDS_
|
||||||
conn[ iNode ] = aNodeIdMap[aNode->GetID()];
|
conn[ iNode ] = aNodeIdMap[aNode->GetID()];
|
||||||
//MESSAGE("conn["<< iNode << "]=" << conn[iNode] << " aNode->GetID()=" << aNode->GetID());
|
|
||||||
#else
|
#else
|
||||||
conn[ iNode ] = aNode->GetID();
|
conn[ iNode ] = aNode->GetID();
|
||||||
//MESSAGE("conn["<< iNode << "]=" << conn[iNode]);
|
|
||||||
#endif
|
#endif
|
||||||
++iNode;
|
++iNode;
|
||||||
}
|
}
|
||||||
@ -816,7 +781,6 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
if ( ++iElem == aPolyhInfo->GetNbElem() )
|
if ( ++iElem == aPolyhInfo->GetNbElem() )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//cout << " SetPolyedreInfo(aPolyhInfo )" << endl;
|
|
||||||
myMed->SetPolyedreInfo(aPolyhInfo);
|
myMed->SetPolyedreInfo(aPolyhInfo);
|
||||||
}
|
}
|
||||||
} // if (aElemTypeData->_geomType == ePOLYEDRE )
|
} // if (aElemTypeData->_geomType == ePOLYEDRE )
|
||||||
@ -869,7 +833,6 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// store data in a file
|
// store data in a file
|
||||||
//cout << " SetCellInfo(aCellInfo)" << endl;
|
|
||||||
myMed->SetCellInfo(aCellInfo);
|
myMed->SetCellInfo(aCellInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,6 +172,7 @@ SMESH_ActorDef::SMESH_ActorDef()
|
|||||||
aFilter->RegisterCellsWithType(VTK_QUAD);
|
aFilter->RegisterCellsWithType(VTK_QUAD);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
|
||||||
|
aFilter->RegisterCellsWithType(VTK_BIQUADRATIC_QUAD);
|
||||||
|
|
||||||
my2DExtProp = vtkProperty::New();
|
my2DExtProp = vtkProperty::New();
|
||||||
my2DExtProp->DeepCopy(mySurfaceProp);
|
my2DExtProp->DeepCopy(mySurfaceProp);
|
||||||
@ -193,6 +194,7 @@ SMESH_ActorDef::SMESH_ActorDef()
|
|||||||
aFilter->RegisterCellsWithType(VTK_QUAD);
|
aFilter->RegisterCellsWithType(VTK_QUAD);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
|
||||||
|
aFilter->RegisterCellsWithType(VTK_BIQUADRATIC_QUAD);
|
||||||
|
|
||||||
my3DActor = SMESH_CellLabelActor::New();
|
my3DActor = SMESH_CellLabelActor::New();
|
||||||
my3DActor->SetStoreGemetryMapping(true);
|
my3DActor->SetStoreGemetryMapping(true);
|
||||||
@ -208,8 +210,10 @@ SMESH_ActorDef::SMESH_ActorDef()
|
|||||||
aFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
|
aFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
|
||||||
aFilter->RegisterCellsWithType(VTK_WEDGE);
|
aFilter->RegisterCellsWithType(VTK_WEDGE);
|
||||||
aFilter->RegisterCellsWithType(VTK_PYRAMID);
|
aFilter->RegisterCellsWithType(VTK_PYRAMID);
|
||||||
|
aFilter->RegisterCellsWithType(VTK_HEXAGONAL_PRISM);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
|
||||||
|
aFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID);
|
||||||
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
|
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
|
||||||
@ -231,8 +235,10 @@ SMESH_ActorDef::SMESH_ActorDef()
|
|||||||
aFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
|
aFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
|
||||||
aFilter->RegisterCellsWithType(VTK_WEDGE);
|
aFilter->RegisterCellsWithType(VTK_WEDGE);
|
||||||
aFilter->RegisterCellsWithType(VTK_PYRAMID);
|
aFilter->RegisterCellsWithType(VTK_PYRAMID);
|
||||||
|
aFilter->RegisterCellsWithType(VTK_HEXAGONAL_PRISM);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
|
||||||
|
aFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID);
|
||||||
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
|
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
|
||||||
@ -1336,12 +1342,14 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode)
|
|||||||
aFilter->RegisterCellsWithType(VTK_QUAD);
|
aFilter->RegisterCellsWithType(VTK_QUAD);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
|
||||||
|
aFilter->RegisterCellsWithType(VTK_BIQUADRATIC_QUAD);
|
||||||
|
|
||||||
aHightFilter->RegisterCellsWithType(VTK_TRIANGLE);
|
aHightFilter->RegisterCellsWithType(VTK_TRIANGLE);
|
||||||
aHightFilter->RegisterCellsWithType(VTK_POLYGON);
|
aHightFilter->RegisterCellsWithType(VTK_POLYGON);
|
||||||
aHightFilter->RegisterCellsWithType(VTK_QUAD);
|
aHightFilter->RegisterCellsWithType(VTK_QUAD);
|
||||||
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
|
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
|
||||||
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
|
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_BIQUADRATIC_QUAD);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (myEntityMode & eVolumes) {
|
if (myEntityMode & eVolumes) {
|
||||||
@ -1351,8 +1359,10 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode)
|
|||||||
aFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
|
aFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
|
||||||
aFilter->RegisterCellsWithType(VTK_WEDGE);
|
aFilter->RegisterCellsWithType(VTK_WEDGE);
|
||||||
aFilter->RegisterCellsWithType(VTK_PYRAMID);
|
aFilter->RegisterCellsWithType(VTK_PYRAMID);
|
||||||
|
aFilter->RegisterCellsWithType(VTK_HEXAGONAL_PRISM);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
|
||||||
|
aFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON);
|
||||||
aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
|
aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
|
||||||
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
|
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
|
||||||
//#ifdef VTK_HAVE_POLYHEDRON
|
//#ifdef VTK_HAVE_POLYHEDRON
|
||||||
@ -1364,8 +1374,10 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode)
|
|||||||
aHightFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
|
aHightFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
|
||||||
aHightFilter->RegisterCellsWithType(VTK_WEDGE);
|
aHightFilter->RegisterCellsWithType(VTK_WEDGE);
|
||||||
aHightFilter->RegisterCellsWithType(VTK_PYRAMID);
|
aHightFilter->RegisterCellsWithType(VTK_PYRAMID);
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_HEXAGONAL_PRISM);
|
||||||
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
|
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
|
||||||
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
|
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
|
||||||
|
aHightFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON);
|
||||||
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
|
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
|
||||||
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID);
|
aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID);
|
||||||
aHightFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
|
aHightFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
|
||||||
|
@ -101,6 +101,7 @@ static inline vtkIdType getCellType( const SMDSAbs_ElementType theType,
|
|||||||
else if ( theNbNodes == 4 ) return VTK_QUAD;
|
else if ( theNbNodes == 4 ) return VTK_QUAD;
|
||||||
else if ( theNbNodes == 6 ) return VTK_QUADRATIC_TRIANGLE;
|
else if ( theNbNodes == 6 ) return VTK_QUADRATIC_TRIANGLE;
|
||||||
else if ( theNbNodes == 8 ) return VTK_QUADRATIC_QUAD;
|
else if ( theNbNodes == 8 ) return VTK_QUADRATIC_QUAD;
|
||||||
|
else if ( theNbNodes == 9 ) return VTK_BIQUADRATIC_QUAD;
|
||||||
else return VTK_EMPTY_CELL;
|
else return VTK_EMPTY_CELL;
|
||||||
|
|
||||||
case SMDSAbs_Volume:
|
case SMDSAbs_Volume:
|
||||||
@ -109,18 +110,12 @@ static inline vtkIdType getCellType( const SMDSAbs_ElementType theType,
|
|||||||
else if ( theNbNodes == 5 ) return VTK_PYRAMID;
|
else if ( theNbNodes == 5 ) return VTK_PYRAMID;
|
||||||
else if ( theNbNodes == 6 ) return VTK_WEDGE;
|
else if ( theNbNodes == 6 ) return VTK_WEDGE;
|
||||||
else if ( theNbNodes == 8 ) return VTK_HEXAHEDRON;
|
else if ( theNbNodes == 8 ) return VTK_HEXAHEDRON;
|
||||||
else if ( theNbNodes == 10 ) {
|
else if ( theNbNodes == 12 ) return VTK_HEXAGONAL_PRISM;
|
||||||
return VTK_QUADRATIC_TETRA;
|
else if ( theNbNodes == 10 ) return VTK_QUADRATIC_TETRA;
|
||||||
}
|
else if ( theNbNodes == 20 ) return VTK_QUADRATIC_HEXAHEDRON;
|
||||||
else if ( theNbNodes == 20 ) {
|
else if ( theNbNodes == 27 ) return VTK_TRIQUADRATIC_HEXAHEDRON;
|
||||||
return VTK_QUADRATIC_HEXAHEDRON;
|
else if ( theNbNodes == 15 ) return VTK_QUADRATIC_WEDGE;
|
||||||
}
|
else if ( theNbNodes == 13 ) return VTK_QUADRATIC_PYRAMID; //VTK_CONVEX_POINT_SET;
|
||||||
else if ( theNbNodes == 15 ) {
|
|
||||||
return VTK_QUADRATIC_WEDGE;
|
|
||||||
}
|
|
||||||
else if ( theNbNodes==13 ) {
|
|
||||||
return VTK_QUADRATIC_PYRAMID; //VTK_CONVEX_POINT_SET;
|
|
||||||
}
|
|
||||||
else return VTK_EMPTY_CELL;
|
else return VTK_EMPTY_CELL;
|
||||||
|
|
||||||
default: return VTK_EMPTY_CELL;
|
default: return VTK_EMPTY_CELL;
|
||||||
@ -277,7 +272,7 @@ void SMESH_VisualObjDef::buildPrs(bool buildGrid)
|
|||||||
GetMesh()->compactMesh();
|
GetMesh()->compactMesh();
|
||||||
}
|
}
|
||||||
vtkUnstructuredGrid *theGrid = GetMesh()->getGrid();
|
vtkUnstructuredGrid *theGrid = GetMesh()->getGrid();
|
||||||
updateEntitiesFlags();
|
updateEntitiesFlags();
|
||||||
myGrid->ShallowCopy(theGrid);
|
myGrid->ShallowCopy(theGrid);
|
||||||
//MESSAGE(myGrid->GetReferenceCount());
|
//MESSAGE(myGrid->GetReferenceCount());
|
||||||
//MESSAGE( "Update - myGrid->GetNumberOfCells() = "<<myGrid->GetNumberOfCells() );
|
//MESSAGE( "Update - myGrid->GetNumberOfCells() = "<<myGrid->GetNumberOfCells() );
|
||||||
@ -372,22 +367,22 @@ void SMESH_VisualObjDef::buildElemPrs()
|
|||||||
const TEntityList& aList = anEnts[ aTypes[ i ] ];
|
const TEntityList& aList = anEnts[ aTypes[ i ] ];
|
||||||
TEntityList::const_iterator anIter;
|
TEntityList::const_iterator anIter;
|
||||||
for ( anIter = aList.begin(); anIter != aList.end(); ++anIter ) {
|
for ( anIter = aList.begin(); anIter != aList.end(); ++anIter ) {
|
||||||
if((*anIter)->GetEntityType() != SMDSEntity_Polyhedra &&
|
if((*anIter)->GetEntityType() != SMDSEntity_Polyhedra &&
|
||||||
(*anIter)->GetEntityType() != SMDSEntity_Quad_Polyhedra) {
|
(*anIter)->GetEntityType() != SMDSEntity_Quad_Polyhedra) {
|
||||||
aCellsSize += (*anIter)->NbNodes() + 1;
|
aCellsSize += (*anIter)->NbNodes() + 1;
|
||||||
}
|
}
|
||||||
// Special case for the VTK_POLYHEDRON:
|
// Special case for the VTK_POLYHEDRON:
|
||||||
// itsinput cellArray is of special format.
|
// itsinput cellArray is of special format.
|
||||||
// [nCellFaces, nFace0Pts, i, j, k, nFace1Pts, i, j, k, ...]
|
// [nCellFaces, nFace0Pts, i, j, k, nFace1Pts, i, j, k, ...]
|
||||||
else {
|
else {
|
||||||
if( const SMDS_VtkVolume* ph = dynamic_cast<const SMDS_VtkVolume*>(*anIter) ) {
|
if( const SMDS_VtkVolume* ph = dynamic_cast<const SMDS_VtkVolume*>(*anIter) ) {
|
||||||
int nbFaces = ph->NbFaces();
|
int nbFaces = ph->NbFaces();
|
||||||
aCellsSize += (1 + ph->NbFaces());
|
aCellsSize += (1 + ph->NbFaces());
|
||||||
for( int i = 1; i <= nbFaces; i++ ) {
|
for( int i = 1; i <= nbFaces; i++ ) {
|
||||||
aCellsSize += ph->NbFaceNodes(i);
|
aCellsSize += ph->NbFaceNodes(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -429,102 +424,55 @@ void SMESH_VisualObjDef::buildElemPrs()
|
|||||||
for ( anIter = aList.begin(); anIter != aList.end(); ++anIter )
|
for ( anIter = aList.begin(); anIter != aList.end(); ++anIter )
|
||||||
{
|
{
|
||||||
const SMDS_MeshElement* anElem = *anIter;
|
const SMDS_MeshElement* anElem = *anIter;
|
||||||
|
|
||||||
vtkIdType aNbNodes = anElem->NbNodes();
|
vtkIdType aNbNodes = anElem->NbNodes();
|
||||||
anIdList->SetNumberOfIds( aNbNodes );
|
anIdList->SetNumberOfIds( aNbNodes );
|
||||||
|
const vtkIdType vtkElemType = getCellType( aType, anElem->IsPoly(), aNbNodes );
|
||||||
|
|
||||||
int anId = anElem->GetID();
|
int anId = anElem->GetID();
|
||||||
|
|
||||||
mySMDS2VTKElems.insert( TMapOfIds::value_type( anId, iElem ) );
|
mySMDS2VTKElems.insert( TMapOfIds::value_type( anId, iElem ) );
|
||||||
myVTK2SMDSElems.insert( TMapOfIds::value_type( iElem, anId ) );
|
myVTK2SMDSElems.insert( TMapOfIds::value_type( iElem, anId ) );
|
||||||
|
|
||||||
SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator();
|
SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator();
|
||||||
switch (aType) {
|
{
|
||||||
case SMDSAbs_Volume: {
|
|
||||||
aConnect.clear();
|
|
||||||
std::vector<int> aConnectivities;
|
|
||||||
// Convertions connectivities from SMDS to VTK
|
// Convertions connectivities from SMDS to VTK
|
||||||
|
|
||||||
if (anElem->IsPoly() && aNbNodes > 3) { // POLYEDRE
|
if (aType == SMDSAbs_Volume && anElem->IsPoly() && aNbNodes > 3) { // POLYEDRE
|
||||||
anIdList->Reset();
|
anIdList->Reset();
|
||||||
if ( const SMDS_VtkVolume* ph = dynamic_cast<const SMDS_VtkVolume*>(anElem) ) {
|
if ( const SMDS_VtkVolume* ph = dynamic_cast<const SMDS_VtkVolume*>(anElem) ) {
|
||||||
int nbFaces = ph->NbFaces();
|
int nbFaces = ph->NbFaces();
|
||||||
anIdList->InsertNextId(nbFaces);
|
anIdList->InsertNextId(nbFaces);
|
||||||
for( int i = 1; i <= nbFaces; i++ ) {
|
for( int i = 1; i <= nbFaces; i++ ) {
|
||||||
anIdList->InsertNextId(ph->NbFaceNodes(i));
|
anIdList->InsertNextId(ph->NbFaceNodes(i));
|
||||||
for(int j = 1; j <= ph->NbFaceNodes(i); j++) {
|
for(int j = 1; j <= ph->NbFaceNodes(i); j++) {
|
||||||
const SMDS_MeshNode* n = ph->GetFaceNode(i,j);
|
const SMDS_MeshNode* n = ph->GetFaceNode(i,j);
|
||||||
if(n) {
|
if(n) {
|
||||||
anIdList->InsertNextId(mySMDS2VTKNodes[n->GetID()]);
|
anIdList->InsertNextId(mySMDS2VTKNodes[n->GetID()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (aNbNodes == 4) {
|
|
||||||
static int anIds[] = {0,2,1,3};
|
|
||||||
for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
|
|
||||||
|
|
||||||
} else if (aNbNodes == 5) {
|
|
||||||
static int anIds[] = {0,3,2,1,4};
|
|
||||||
for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
|
|
||||||
|
|
||||||
} else if (aNbNodes == 6) {
|
|
||||||
static int anIds[] = {0,1,2,3,4,5};
|
|
||||||
for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
|
|
||||||
|
|
||||||
}
|
|
||||||
else if (aNbNodes == 8) {
|
|
||||||
static int anIds[] = {0,3,2,1,4,7,6,5};
|
|
||||||
for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
|
|
||||||
|
|
||||||
}
|
|
||||||
else if (aNbNodes == 10) {
|
|
||||||
static int anIds[] = {0,2,1,3,6,5,4,7,9,8};
|
|
||||||
for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
|
|
||||||
}
|
|
||||||
else if (aNbNodes == 13) {
|
|
||||||
static int anIds[] = {0,3,2,1,4,8,7,6,5,9,12,11,10};
|
|
||||||
for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
|
|
||||||
}
|
|
||||||
else if (aNbNodes == 15) {
|
|
||||||
//static int anIds[] = {0,2,1,3,5,4,8,7,6,11,10,9,12,14,13};
|
|
||||||
static int anIds[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14};
|
|
||||||
for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
|
|
||||||
//for (int k = 0; k < aNbNodes; k++) {
|
|
||||||
// int nn = aConnectivities[k];
|
|
||||||
// const SMDS_MeshNode* N = static_cast<const SMDS_MeshNode*> (aConnect[nn]);
|
|
||||||
// cout<<"k="<<k<<" N("<<N->X()<<","<<N->Y()<<","<<N->Z()<<")"<<endl;
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
else if (aNbNodes == 20) {
|
|
||||||
static int anIds[] = {0,3,2,1,4,7,6,5,11,10,9,8,15,14,13,12,16,19,18,17};
|
|
||||||
for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
}
|
const std::vector<int>& aConnectivities =
|
||||||
|
SMDS_MeshCell::toVtkOrder( VTKCellType( vtkElemType ));
|
||||||
if (!(anElem->IsPoly() && aNbNodes > 3)) {
|
if (aConnectivities.size() > 0) {
|
||||||
if ( aConnect.empty() )
|
aConnect.clear();
|
||||||
GetConnect(aNodesIter,aConnect);
|
GetConnect(aNodesIter,aConnect);
|
||||||
|
for (vtkIdType aNodeId = 0; aNodeId < aNbNodes; aNodeId++)
|
||||||
if (aConnectivities.size() > 0) {
|
SetId(anIdList,mySMDS2VTKNodes,aConnect,aNodeId,aConnectivities[aNodeId]);
|
||||||
for (vtkIdType aNodeId = 0; aNodeId < aNbNodes; aNodeId++)
|
}
|
||||||
SetId(anIdList,mySMDS2VTKNodes,aConnect,aNodeId,aConnectivities[aNodeId]);
|
else {
|
||||||
}
|
for( vtkIdType aNodeId = 0; aNodesIter->more(); aNodeId++ ){
|
||||||
}
|
const SMDS_MeshElement* aNode = aNodesIter->next();
|
||||||
break;
|
anIdList->SetId( aNodeId, mySMDS2VTKNodes[aNode->GetID()] );
|
||||||
}
|
}
|
||||||
default:
|
}
|
||||||
for( vtkIdType aNodeId = 0; aNodesIter->more(); aNodeId++ ){
|
|
||||||
const SMDS_MeshElement* aNode = aNodesIter->next();
|
|
||||||
anIdList->SetId( aNodeId, mySMDS2VTKNodes[aNode->GetID()] );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
aConnectivity->InsertNextCell( anIdList );
|
aConnectivity->InsertNextCell( anIdList );
|
||||||
aCellTypesArray->InsertNextValue( getCellType( aType, anElem->IsPoly(), aNbNodes ) );
|
aCellTypesArray->InsertNextValue( vtkElemType );
|
||||||
|
|
||||||
iElem++;
|
iElem++;
|
||||||
}
|
}
|
||||||
@ -601,7 +549,7 @@ vtkUnstructuredGrid* SMESH_VisualObjDef::GetUnstructuredGrid()
|
|||||||
if ( !myLocalGrid && !GetMesh()->isCompacted() )
|
if ( !myLocalGrid && !GetMesh()->isCompacted() )
|
||||||
{
|
{
|
||||||
GetMesh()->compactMesh();
|
GetMesh()->compactMesh();
|
||||||
updateEntitiesFlags();
|
updateEntitiesFlags();
|
||||||
vtkUnstructuredGrid *theGrid = GetMesh()->getGrid();
|
vtkUnstructuredGrid *theGrid = GetMesh()->getGrid();
|
||||||
myGrid->ShallowCopy(theGrid);
|
myGrid->ShallowCopy(theGrid);
|
||||||
}
|
}
|
||||||
@ -629,29 +577,29 @@ bool SMESH_VisualObjDef::IsValid() const
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESH_VisualObjDef::updateEntitiesFlags() {
|
void SMESH_VisualObjDef::updateEntitiesFlags() {
|
||||||
|
|
||||||
unsigned int tmp = myEntitiesState;
|
unsigned int tmp = myEntitiesState;
|
||||||
ClearEntitiesFlags();
|
ClearEntitiesFlags();
|
||||||
|
|
||||||
map<SMDSAbs_ElementType,int> entities = SMESH::GetEntitiesFromObject(this);
|
map<SMDSAbs_ElementType,int> entities = SMESH::GetEntitiesFromObject(this);
|
||||||
|
|
||||||
|
|
||||||
if( myEntitiesCache[SMDSAbs_0DElement] != 0 || myEntitiesCache[SMDSAbs_0DElement] >= entities[SMDSAbs_0DElement] )
|
if( myEntitiesCache[SMDSAbs_0DElement] != 0 || myEntitiesCache[SMDSAbs_0DElement] >= entities[SMDSAbs_0DElement] )
|
||||||
myEntitiesState &= ~SMESH_Actor::e0DElements;
|
myEntitiesState &= ~SMESH_Actor::e0DElements;
|
||||||
|
|
||||||
if( myEntitiesCache[SMDSAbs_Edge] != 0 || myEntitiesCache[SMDSAbs_Edge] >= entities[SMDSAbs_Edge] )
|
if( myEntitiesCache[SMDSAbs_Edge] != 0 || myEntitiesCache[SMDSAbs_Edge] >= entities[SMDSAbs_Edge] )
|
||||||
myEntitiesState &= ~SMESH_Actor::eEdges;
|
myEntitiesState &= ~SMESH_Actor::eEdges;
|
||||||
|
|
||||||
if( myEntitiesCache[SMDSAbs_Face] != 0 || myEntitiesCache[SMDSAbs_Face] >= entities[SMDSAbs_Face] )
|
if( myEntitiesCache[SMDSAbs_Face] != 0 || myEntitiesCache[SMDSAbs_Face] >= entities[SMDSAbs_Face] )
|
||||||
myEntitiesState &= ~SMESH_Actor::eFaces;
|
myEntitiesState &= ~SMESH_Actor::eFaces;
|
||||||
|
|
||||||
if( myEntitiesCache[SMDSAbs_Volume] != 0 || myEntitiesCache[SMDSAbs_Volume] >= entities[SMDSAbs_Volume] )
|
if( myEntitiesCache[SMDSAbs_Volume] != 0 || myEntitiesCache[SMDSAbs_Volume] >= entities[SMDSAbs_Volume] )
|
||||||
myEntitiesState &= ~SMESH_Actor::eVolumes;
|
myEntitiesState &= ~SMESH_Actor::eVolumes;
|
||||||
|
|
||||||
if( tmp != myEntitiesState ) {
|
if( tmp != myEntitiesState ) {
|
||||||
myEntitiesFlag = true;
|
myEntitiesFlag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
myEntitiesCache = entities;
|
myEntitiesCache = entities;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -659,8 +607,8 @@ void SMESH_VisualObjDef::updateEntitiesFlags() {
|
|||||||
// purpose : Clear the entities flags
|
// purpose : Clear the entities flags
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESH_VisualObjDef::ClearEntitiesFlags() {
|
void SMESH_VisualObjDef::ClearEntitiesFlags() {
|
||||||
myEntitiesState = SMESH_Actor::eAllEntity;
|
myEntitiesState = SMESH_Actor::eAllEntity;
|
||||||
myEntitiesFlag = false;
|
myEntitiesFlag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -668,7 +616,7 @@ void SMESH_VisualObjDef::ClearEntitiesFlags() {
|
|||||||
// purpose : Return the entities flag
|
// purpose : Return the entities flag
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool SMESH_VisualObjDef::GetEntitiesFlag() {
|
bool SMESH_VisualObjDef::GetEntitiesFlag() {
|
||||||
return myEntitiesFlag;
|
return myEntitiesFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -676,7 +624,7 @@ bool SMESH_VisualObjDef::GetEntitiesFlag() {
|
|||||||
// purpose : Return the entities state
|
// purpose : Return the entities state
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
unsigned int SMESH_VisualObjDef::GetEntitiesState() {
|
unsigned int SMESH_VisualObjDef::GetEntitiesState() {
|
||||||
return myEntitiesState;
|
return myEntitiesState;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -272,7 +272,7 @@ libSMESH_la_LDFLAGS = \
|
|||||||
$(GUI_LDFLAGS) -lSalomePrs -lsuit -lSUITApp -lCAM -lstd \
|
$(GUI_LDFLAGS) -lSalomePrs -lsuit -lSUITApp -lCAM -lstd \
|
||||||
$(GEOM_LDFLAGS) -lGEOMBase -lGEOMFiltersSelection -lGEOMObject \
|
$(GEOM_LDFLAGS) -lGEOMBase -lGEOMFiltersSelection -lGEOMObject \
|
||||||
$(PYTHON_LIBS)
|
$(PYTHON_LIBS)
|
||||||
|
|
||||||
# resources files
|
# resources files
|
||||||
nodist_salomeres_DATA= \
|
nodist_salomeres_DATA= \
|
||||||
SMESH_images.qm \
|
SMESH_images.qm \
|
||||||
|
@ -437,8 +437,12 @@
|
|||||||
{
|
{
|
||||||
// warn the user about presence of not supported elements
|
// warn the user about presence of not supported elements
|
||||||
SMESH::long_array_var nbElems = aMeshOrGroup->GetMeshInfo();
|
SMESH::long_array_var nbElems = aMeshOrGroup->GetMeshInfo();
|
||||||
int nbPyramids = nbElems[ SMESH::Entity_Pyramid ] + nbElems[ SMESH::Entity_Quad_Pyramid ];
|
int nbNotSupported = ( nbElems[ SMESH::Entity_Pyramid ] +
|
||||||
if ( nbPyramids > 0 ) {
|
nbElems[ SMESH::Entity_Quad_Pyramid ] +
|
||||||
|
nbElems[ SMESH::Entity_Hexagonal_Prism ] +
|
||||||
|
nbElems[ SMESH::Entity_Polygon ] +
|
||||||
|
nbElems[ SMESH::Entity_Polyhedra ] );
|
||||||
|
if ( nbNotSupported > 0 ) {
|
||||||
int aRet = SUIT_MessageBox::warning
|
int aRet = SUIT_MessageBox::warning
|
||||||
(SMESHGUI::desktop(),
|
(SMESHGUI::desktop(),
|
||||||
QObject::tr("SMESH_WRN_WARNING"),
|
QObject::tr("SMESH_WRN_WARNING"),
|
||||||
@ -2799,36 +2803,42 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
}
|
}
|
||||||
|
|
||||||
case 4009: // ELEM0D
|
case 4009: // ELEM0D
|
||||||
case 4010: // GEOM::EDGE
|
case 4010: // EDGE
|
||||||
case 4021: // TRIANGLE
|
case 4021: // TRIANGLE
|
||||||
case 4022: // QUAD
|
case 4022: // QUAD
|
||||||
case 4023: // POLYGON
|
case 4023: // POLYGON
|
||||||
case 4031: // TETRA
|
case 4031: // TETRA
|
||||||
case 4032: // HEXA
|
case 4032: // HEXA
|
||||||
|
case 4133: // PENTA
|
||||||
|
case 4134: // PYRAMID
|
||||||
|
case 4135: // OCTA12
|
||||||
{
|
{
|
||||||
if(checkLock(aStudy)) break;
|
if(checkLock(aStudy)) break;
|
||||||
if ( vtkwnd ) {
|
if ( vtkwnd ) {
|
||||||
EmitSignalDeactivateDialog();
|
EmitSignalDeactivateDialog();
|
||||||
SMDSAbs_ElementType type = SMDSAbs_Edge;
|
SMDSAbs_EntityType type = SMDSEntity_Edge;
|
||||||
int nbNodes = 2;
|
|
||||||
switch (theCommandID) {
|
switch (theCommandID) {
|
||||||
case 4009: // ELEM0D
|
case 4009:
|
||||||
type = SMDSAbs_0DElement; nbNodes = 1; break;
|
type = SMDSEntity_0D; break;
|
||||||
case 4021: // TRIANGLE
|
case 4021:
|
||||||
type = SMDSAbs_Face; nbNodes = 3; break;
|
type = SMDSEntity_Triangle; break;
|
||||||
case 4022: // QUAD
|
case 4022:
|
||||||
type = SMDSAbs_Face; nbNodes = 4; break;
|
type = SMDSEntity_Quadrangle; break;
|
||||||
case 4031: // TETRA
|
case 4031:
|
||||||
type = SMDSAbs_Volume; nbNodes = 4; break;
|
type = SMDSEntity_Tetra; break;
|
||||||
case 4023: // POLYGON
|
case 4023:
|
||||||
type = SMDSAbs_Face; nbNodes = 5; break; // 5 - identificator for POLYGON
|
type = SMDSEntity_Polygon; break;
|
||||||
case 4032: // HEXA
|
case 4032:
|
||||||
type = SMDSAbs_Volume; nbNodes = 8; break;
|
type = SMDSEntity_Hexa; break;
|
||||||
case 4033: // POLYHEDRE
|
case 4133:
|
||||||
type = SMDSAbs_Volume; nbNodes = 9; break; // 9 - identificator for POLYHEDRE
|
type = SMDSEntity_Penta; break;
|
||||||
|
case 4134:
|
||||||
|
type = SMDSEntity_Pyramid; break;
|
||||||
|
case 4135:
|
||||||
|
type = SMDSEntity_Hexagonal_Prism; break;
|
||||||
default:;
|
default:;
|
||||||
}
|
}
|
||||||
( new SMESHGUI_AddMeshElementDlg( this, type, nbNodes ) )->show();
|
( new SMESHGUI_AddMeshElementDlg( this, type ) )->show();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SUIT_MessageBox::warning(desktop(),
|
SUIT_MessageBox::warning(desktop(),
|
||||||
@ -2852,31 +2862,37 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
case 4034: // QUADRATIC EDGE
|
case 4034: // QUADRATIC EDGE
|
||||||
case 4035: // QUADRATIC TRIANGLE
|
case 4035: // QUADRATIC TRIANGLE
|
||||||
case 4036: // QUADRATIC QUADRANGLE
|
case 4036: // QUADRATIC QUADRANGLE
|
||||||
|
case 4136: // BIQUADRATIC QUADRANGLE
|
||||||
case 4037: // QUADRATIC TETRAHEDRON
|
case 4037: // QUADRATIC TETRAHEDRON
|
||||||
case 4038: // QUADRATIC PYRAMID
|
case 4038: // QUADRATIC PYRAMID
|
||||||
case 4039: // QUADRATIC PENTAHEDRON
|
case 4039: // QUADRATIC PENTAHEDRON
|
||||||
case 4040: // QUADRATIC HEXAHEDRON
|
case 4040: // QUADRATIC HEXAHEDRON
|
||||||
|
case 4140: // TRIQUADRATIC HEXAHEDRON
|
||||||
{
|
{
|
||||||
if(checkLock(aStudy)) break;
|
if(checkLock(aStudy)) break;
|
||||||
if ( vtkwnd ) {
|
if ( vtkwnd ) {
|
||||||
EmitSignalDeactivateDialog();
|
EmitSignalDeactivateDialog();
|
||||||
int type;
|
SMDSAbs_EntityType type;
|
||||||
|
|
||||||
switch (theCommandID) {
|
switch (theCommandID) {
|
||||||
case 4034:
|
case 4034:
|
||||||
type = QUAD_EDGE; break;
|
type = SMDSEntity_Quad_Edge; break;
|
||||||
case 4035:
|
case 4035:
|
||||||
type = QUAD_TRIANGLE; break;
|
type = SMDSEntity_Quad_Triangle; break;
|
||||||
case 4036:
|
case 4036:
|
||||||
type = QUAD_QUADRANGLE; break;
|
type = SMDSEntity_Quad_Quadrangle; break;
|
||||||
|
case 4136:
|
||||||
|
type = SMDSEntity_BiQuad_Quadrangle; break;
|
||||||
case 4037:
|
case 4037:
|
||||||
type = QUAD_TETRAHEDRON; break;
|
type = SMDSEntity_Quad_Tetra; break;
|
||||||
case 4038:
|
case 4038:
|
||||||
type = QUAD_PYRAMID; break;
|
type = SMDSEntity_Quad_Pyramid; break;
|
||||||
case 4039:
|
case 4039:
|
||||||
type = QUAD_PENTAHEDRON; break;
|
type = SMDSEntity_Quad_Penta; break;
|
||||||
case 4040:
|
case 4040:
|
||||||
type = QUAD_HEXAHEDRON;
|
type = SMDSEntity_Quad_Hexa;
|
||||||
|
case 4140:
|
||||||
|
type = SMDSEntity_TriQuad_Hexa;
|
||||||
break;
|
break;
|
||||||
default:;
|
default:;
|
||||||
}
|
}
|
||||||
@ -2985,7 +3001,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
}
|
}
|
||||||
catch (const SALOME::SALOME_Exception& S_ex) {
|
catch (const SALOME::SALOME_Exception& S_ex) {
|
||||||
SalomeApp_Tools::QtCatchCorbaException(S_ex);
|
SalomeApp_Tools::QtCatchCorbaException(S_ex);
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3295,7 +3311,7 @@ void SMESHGUI::BuildPresentation( const Handle(SALOME_InteractiveObject) & theIO
|
|||||||
// function : createSMESHAction
|
// function : createSMESHAction
|
||||||
// purpose :
|
// purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHGUI::createSMESHAction( const int id, const QString& po_id, const QString& icon_id,
|
void SMESHGUI::createSMESHAction( const int id, const QString& po_id, const QString& icon_id,
|
||||||
const int key, const bool toggle, const QString& shortcutAction )
|
const int key, const bool toggle, const QString& shortcutAction )
|
||||||
{
|
{
|
||||||
QIcon icon;
|
QIcon icon;
|
||||||
@ -3313,7 +3329,7 @@ void SMESHGUI::createSMESHAction( const int id, const QString& po_id, const QStr
|
|||||||
menu = tr( QString( "MEN_%1" ).arg( po_id ).toLatin1().data() ),
|
menu = tr( QString( "MEN_%1" ).arg( po_id ).toLatin1().data() ),
|
||||||
status_bar = tr( QString( "STB_%1" ).arg( po_id ).toLatin1().data() );
|
status_bar = tr( QString( "STB_%1" ).arg( po_id ).toLatin1().data() );
|
||||||
|
|
||||||
createAction( id, tooltip, icon, menu, status_bar, key, parent,
|
createAction( id, tooltip, icon, menu, status_bar, key, parent,
|
||||||
toggle, this, SLOT( OnGUIEvent() ), shortcutAction );
|
toggle, this, SLOT( OnGUIEvent() ), shortcutAction );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3445,9 +3461,22 @@ void SMESHGUI::initialize( CAM_Application* app )
|
|||||||
createSMESHAction( 4023, "POLYGON", "ICON_DLG_POLYGON" );
|
createSMESHAction( 4023, "POLYGON", "ICON_DLG_POLYGON" );
|
||||||
createSMESHAction( 4031, "TETRA", "ICON_DLG_TETRAS" );
|
createSMESHAction( 4031, "TETRA", "ICON_DLG_TETRAS" );
|
||||||
createSMESHAction( 4032, "HEXA", "ICON_DLG_HEXAS" );
|
createSMESHAction( 4032, "HEXA", "ICON_DLG_HEXAS" );
|
||||||
createSMESHAction( 4041, "REMOVE_NODES", "ICON_DLG_REM_NODE" );
|
createSMESHAction( 4133, "PENTA", "ICON_DLG_PENTA" );
|
||||||
createSMESHAction( 4042, "REMOVE_ELEMENTS", "ICON_DLG_REM_ELEMENT" );
|
createSMESHAction( 4134, "PYRAMID", "ICON_DLG_PYRAMID" );
|
||||||
createSMESHAction( 4044, "REMOVE_ORPHAN_NODES", "ICON_DLG_REM_ORPHAN_NODES" );
|
createSMESHAction( 4135, "OCTA", "ICON_DLG_OCTA" );
|
||||||
|
createSMESHAction( 4033, "POLYHEDRON", "ICON_DLG_POLYHEDRON" );
|
||||||
|
createSMESHAction( 4034, "QUADRATIC_EDGE", "ICON_DLG_QUADRATIC_EDGE" );
|
||||||
|
createSMESHAction( 4035, "QUADRATIC_TRIANGLE", "ICON_DLG_QUADRATIC_TRIANGLE" );
|
||||||
|
createSMESHAction( 4036, "QUADRATIC_QUADRANGLE", "ICON_DLG_QUADRATIC_QUADRANGLE" );
|
||||||
|
createSMESHAction( 4136, "BIQUADRATIC_QUADRANGLE", "ICON_DLG_BIQUADRATIC_QUADRANGLE" );
|
||||||
|
createSMESHAction( 4037, "QUADRATIC_TETRAHEDRON", "ICON_DLG_QUADRATIC_TETRAHEDRON" );
|
||||||
|
createSMESHAction( 4038, "QUADRATIC_PYRAMID", "ICON_DLG_QUADRATIC_PYRAMID" );
|
||||||
|
createSMESHAction( 4039, "QUADRATIC_PENTAHEDRON", "ICON_DLG_QUADRATIC_PENTAHEDRON" );
|
||||||
|
createSMESHAction( 4040, "QUADRATIC_HEXAHEDRON", "ICON_DLG_QUADRATIC_HEXAHEDRON" );
|
||||||
|
createSMESHAction( 4140, "TRIQUADRATIC_HEXAHEDRON", "ICON_DLG_TRIQUADRATIC_HEXAHEDRON" );
|
||||||
|
createSMESHAction( 4041, "REMOVE_NODES", "ICON_DLG_REM_NODE" );
|
||||||
|
createSMESHAction( 4042, "REMOVE_ELEMENTS", "ICON_DLG_REM_ELEMENT" );
|
||||||
|
createSMESHAction( 4044, "REMOVE_ORPHAN_NODES", "ICON_DLG_REM_ORPHAN_NODES" );
|
||||||
createSMESHAction( 4043, "CLEAR_MESH" , "ICON_CLEAR_MESH" );
|
createSMESHAction( 4043, "CLEAR_MESH" , "ICON_CLEAR_MESH" );
|
||||||
createSMESHAction( 4051, "RENUM_NODES", "ICON_DLG_RENUMBERING_NODES" );
|
createSMESHAction( 4051, "RENUM_NODES", "ICON_DLG_RENUMBERING_NODES" );
|
||||||
createSMESHAction( 4052, "RENUM_ELEMENTS", "ICON_DLG_RENUMBERING_ELEMENTS" );
|
createSMESHAction( 4052, "RENUM_ELEMENTS", "ICON_DLG_RENUMBERING_ELEMENTS" );
|
||||||
@ -3514,14 +3543,6 @@ void SMESHGUI::initialize( CAM_Application* app )
|
|||||||
createSMESHAction( 300, "ERASE" );
|
createSMESHAction( 300, "ERASE" );
|
||||||
createSMESHAction( 301, "DISPLAY" );
|
createSMESHAction( 301, "DISPLAY" );
|
||||||
createSMESHAction( 302, "DISPLAY_ONLY" );
|
createSMESHAction( 302, "DISPLAY_ONLY" );
|
||||||
createSMESHAction( 4033, "POLYHEDRON", "ICON_DLG_POLYHEDRON" );
|
|
||||||
createSMESHAction( 4034, "QUADRATIC_EDGE", "ICON_DLG_QUADRATIC_EDGE" );
|
|
||||||
createSMESHAction( 4035, "QUADRATIC_TRIANGLE", "ICON_DLG_QUADRATIC_TRIANGLE" );
|
|
||||||
createSMESHAction( 4036, "QUADRATIC_QUADRANGLE", "ICON_DLG_QUADRATIC_QUADRANGLE" );
|
|
||||||
createSMESHAction( 4037, "QUADRATIC_TETRAHEDRON", "ICON_DLG_QUADRATIC_TETRAHEDRON" );
|
|
||||||
createSMESHAction( 4038, "QUADRATIC_PYRAMID", "ICON_DLG_QUADRATIC_PYRAMID" );
|
|
||||||
createSMESHAction( 4039, "QUADRATIC_PENTAHEDRON", "ICON_DLG_QUADRATIC_PENTAHEDRON" );
|
|
||||||
createSMESHAction( 4040, "QUADRATIC_HEXAHEDRON", "ICON_DLG_QUADRATIC_HEXAHEDRON" );
|
|
||||||
|
|
||||||
// ----- create menu --------------
|
// ----- create menu --------------
|
||||||
int fileId = createMenu( tr( "MEN_FILE" ), -1, 1 ),
|
int fileId = createMenu( tr( "MEN_FILE" ), -1, 1 ),
|
||||||
@ -3628,15 +3649,20 @@ void SMESHGUI::initialize( CAM_Application* app )
|
|||||||
createMenu( 4023, addId, -1 );
|
createMenu( 4023, addId, -1 );
|
||||||
createMenu( 4031, addId, -1 );
|
createMenu( 4031, addId, -1 );
|
||||||
createMenu( 4032, addId, -1 );
|
createMenu( 4032, addId, -1 );
|
||||||
|
createMenu( 4133, addId, -1 );
|
||||||
|
createMenu( 4134, addId, -1 );
|
||||||
|
createMenu( 4135, addId, -1 );
|
||||||
createMenu( 4033, addId, -1 );
|
createMenu( 4033, addId, -1 );
|
||||||
createMenu( separator(), addId, -1 );
|
createMenu( separator(), addId, -1 );
|
||||||
createMenu( 4034, addId, -1 );
|
createMenu( 4034, addId, -1 );
|
||||||
createMenu( 4035, addId, -1 );
|
createMenu( 4035, addId, -1 );
|
||||||
createMenu( 4036, addId, -1 );
|
createMenu( 4036, addId, -1 );
|
||||||
|
createMenu( 4136, addId, -1 );
|
||||||
createMenu( 4037, addId, -1 );
|
createMenu( 4037, addId, -1 );
|
||||||
createMenu( 4038, addId, -1 );
|
createMenu( 4038, addId, -1 );
|
||||||
createMenu( 4039, addId, -1 );
|
createMenu( 4039, addId, -1 );
|
||||||
createMenu( 4040, addId, -1 );
|
createMenu( 4040, addId, -1 );
|
||||||
|
createMenu( 4140, addId, -1 );
|
||||||
|
|
||||||
createMenu( 4041, removeId, -1 );
|
createMenu( 4041, removeId, -1 );
|
||||||
createMenu( 4042, removeId, -1 );
|
createMenu( 4042, removeId, -1 );
|
||||||
@ -3742,15 +3768,20 @@ void SMESHGUI::initialize( CAM_Application* app )
|
|||||||
createTool( 4023, addRemTb );
|
createTool( 4023, addRemTb );
|
||||||
createTool( 4031, addRemTb );
|
createTool( 4031, addRemTb );
|
||||||
createTool( 4032, addRemTb );
|
createTool( 4032, addRemTb );
|
||||||
|
createTool( 4133, addRemTb );
|
||||||
|
createTool( 4134, addRemTb );
|
||||||
|
createTool( 4135, addRemTb );
|
||||||
createTool( 4033, addRemTb );
|
createTool( 4033, addRemTb );
|
||||||
createTool( separator(), addRemTb );
|
createTool( separator(), addRemTb );
|
||||||
createTool( 4034, addRemTb );
|
createTool( 4034, addRemTb );
|
||||||
createTool( 4035, addRemTb );
|
createTool( 4035, addRemTb );
|
||||||
createTool( 4036, addRemTb );
|
createTool( 4036, addRemTb );
|
||||||
|
createTool( 4136, addRemTb );
|
||||||
createTool( 4037, addRemTb );
|
createTool( 4037, addRemTb );
|
||||||
createTool( 4038, addRemTb );
|
createTool( 4038, addRemTb );
|
||||||
createTool( 4039, addRemTb );
|
createTool( 4039, addRemTb );
|
||||||
createTool( 4040, addRemTb );
|
createTool( 4040, addRemTb );
|
||||||
|
createTool( 4140, addRemTb );
|
||||||
createTool( separator(), addRemTb );
|
createTool( separator(), addRemTb );
|
||||||
createTool( 4041, addRemTb );
|
createTool( 4041, addRemTb );
|
||||||
createTool( 4042, addRemTb );
|
createTool( 4042, addRemTb );
|
||||||
@ -3852,7 +3883,7 @@ void SMESHGUI::initialize( CAM_Application* app )
|
|||||||
popupMgr()->insert( separator(), -1, 0 );
|
popupMgr()->insert( separator(), -1, 0 );
|
||||||
createPopupItem( 417, OB, mesh + " " + subMesh ); // convert to quadratic
|
createPopupItem( 417, OB, mesh + " " + subMesh ); // convert to quadratic
|
||||||
createPopupItem( 418, OB, mesh + " " + group, // create 2D mesh from 3D
|
createPopupItem( 418, OB, mesh + " " + group, // create 2D mesh from 3D
|
||||||
"&& dim>=2");
|
"&& dim>=2");
|
||||||
popupMgr()->insert( separator(), -1, 0 );
|
popupMgr()->insert( separator(), -1, 0 );
|
||||||
|
|
||||||
QString only_one_non_empty = QString( " && %1=1 && numberOfNodes>0" ).arg( dc );
|
QString only_one_non_empty = QString( " && %1=1 && numberOfNodes>0" ).arg( dc );
|
||||||
@ -4225,7 +4256,7 @@ bool SMESHGUI::activateModule( SUIT_Study* study )
|
|||||||
GetSMESHGen()->SetCurrentStudy( _CAST(Study,aStudy)->GetStudy() );
|
GetSMESHGen()->SetCurrentStudy( _CAST(Study,aStudy)->GetStudy() );
|
||||||
updateObjBrowser(); // objects can be removed
|
updateObjBrowser(); // objects can be removed
|
||||||
}
|
}
|
||||||
|
|
||||||
// get all view currently opened in the study and connect their signals to
|
// get all view currently opened in the study and connect their signals to
|
||||||
// the corresponding slots of the class.
|
// the corresponding slots of the class.
|
||||||
SUIT_Desktop* aDesk = study->application()->desktop();
|
SUIT_Desktop* aDesk = study->application()->desktop();
|
||||||
@ -4333,7 +4364,7 @@ void SMESHGUI::onViewManagerActivated( SUIT_ViewManager* mgr )
|
|||||||
{
|
{
|
||||||
if ( dynamic_cast<SVTK_ViewManager*>( mgr ) ) {
|
if ( dynamic_cast<SVTK_ViewManager*>( mgr ) ) {
|
||||||
SMESH::UpdateSelectionProp( this );
|
SMESH::UpdateSelectionProp( this );
|
||||||
|
|
||||||
QVector<SUIT_ViewWindow*> aViews = mgr->getViews();
|
QVector<SUIT_ViewWindow*> aViews = mgr->getViews();
|
||||||
for(int i = 0; i < aViews.count() ; i++){
|
for(int i = 0; i < aViews.count() ; i++){
|
||||||
SUIT_ViewWindow *sf = aViews[i];
|
SUIT_ViewWindow *sf = aViews[i];
|
||||||
@ -4519,7 +4550,7 @@ void SMESHGUI::createPreferences()
|
|||||||
setPreferenceProperty( chunkSize, "min", 0 );
|
setPreferenceProperty( chunkSize, "min", 0 );
|
||||||
setPreferenceProperty( chunkSize, "max", 1000 );
|
setPreferenceProperty( chunkSize, "max", 1000 );
|
||||||
setPreferenceProperty( chunkSize, "step", 50 );
|
setPreferenceProperty( chunkSize, "step", 50 );
|
||||||
|
|
||||||
// Mesh tab ------------------------------------------------------------------------
|
// Mesh tab ------------------------------------------------------------------------
|
||||||
int meshTab = addPreference( tr( "PREF_TAB_MESH" ) );
|
int meshTab = addPreference( tr( "PREF_TAB_MESH" ) );
|
||||||
int nodeGroup = addPreference( tr( "PREF_GROUP_NODES" ), meshTab );
|
int nodeGroup = addPreference( tr( "PREF_GROUP_NODES" ), meshTab );
|
||||||
@ -4557,10 +4588,10 @@ void SMESHGUI::createPreferences()
|
|||||||
|
|
||||||
int ColorId = addPreference( tr( "PREF_FILL" ), elemGroup, LightApp_Preferences::BiColor, "SMESH", "fill_color" );
|
int ColorId = addPreference( tr( "PREF_FILL" ), elemGroup, LightApp_Preferences::BiColor, "SMESH", "fill_color" );
|
||||||
addPreference( tr( "PREF_COLOR_0D" ), elemGroup, LightApp_Preferences::Color, "SMESH", "elem0d_color" );
|
addPreference( tr( "PREF_COLOR_0D" ), elemGroup, LightApp_Preferences::Color, "SMESH", "elem0d_color" );
|
||||||
|
|
||||||
addPreference( tr( "PREF_OUTLINE" ), elemGroup, LightApp_Preferences::Color, "SMESH", "outline_color" );
|
addPreference( tr( "PREF_OUTLINE" ), elemGroup, LightApp_Preferences::Color, "SMESH", "outline_color" );
|
||||||
addPreference( tr( "PREF_WIREFRAME" ), elemGroup, LightApp_Preferences::Color, "SMESH", "wireframe_color" );
|
addPreference( tr( "PREF_WIREFRAME" ), elemGroup, LightApp_Preferences::Color, "SMESH", "wireframe_color" );
|
||||||
|
|
||||||
setPreferenceProperty( ColorId, "text", tr("PREF_BACKFACE") );
|
setPreferenceProperty( ColorId, "text", tr("PREF_BACKFACE") );
|
||||||
|
|
||||||
int grpGroup = addPreference( tr( "PREF_GROUP_GROUPS" ), meshTab );
|
int grpGroup = addPreference( tr( "PREF_GROUP_GROUPS" ), meshTab );
|
||||||
@ -4697,12 +4728,12 @@ void SMESHGUI::createPreferences()
|
|||||||
setPreferenceProperty( hh, "min", 0.0 );
|
setPreferenceProperty( hh, "min", 0.0 );
|
||||||
setPreferenceProperty( hh, "max", 1.0 );
|
setPreferenceProperty( hh, "max", 1.0 );
|
||||||
setPreferenceProperty( hh, "step", 0.1 );
|
setPreferenceProperty( hh, "step", 0.1 );
|
||||||
|
|
||||||
int distributionGr = addPreference( tr( "SMESH_DISTRIBUTION_SCALARBAR" ), sbarTab, LightApp_Preferences::Auto, "SMESH", "distribution_visibility" );
|
int distributionGr = addPreference( tr( "SMESH_DISTRIBUTION_SCALARBAR" ), sbarTab, LightApp_Preferences::Auto, "SMESH", "distribution_visibility" );
|
||||||
int coloringType = addPreference( tr( "SMESH_DISTRIBUTION_COLORING_TYPE" ), distributionGr, LightApp_Preferences::Selector, "SMESH", "distribution_coloring_type" );
|
int coloringType = addPreference( tr( "SMESH_DISTRIBUTION_COLORING_TYPE" ), distributionGr, LightApp_Preferences::Selector, "SMESH", "distribution_coloring_type" );
|
||||||
setPreferenceProperty( distributionGr, "columns", 3 );
|
setPreferenceProperty( distributionGr, "columns", 3 );
|
||||||
QStringList types;
|
QStringList types;
|
||||||
types.append( tr( "SMESH_MONOCOLOR" ) );
|
types.append( tr( "SMESH_MONOCOLOR" ) );
|
||||||
types.append( tr( "SMESH_MULTICOLOR" ) );
|
types.append( tr( "SMESH_MULTICOLOR" ) );
|
||||||
indices.clear(); indices.append( 0 ); indices.append( 1 );
|
indices.clear(); indices.append( 0 ); indices.append( 1 );
|
||||||
setPreferenceProperty( coloringType, "strings", types );
|
setPreferenceProperty( coloringType, "strings", types );
|
||||||
@ -5132,7 +5163,7 @@ void SMESHGUI::storeVisualParameters (int savePoint)
|
|||||||
// Colors (surface:edge:)
|
// Colors (surface:edge:)
|
||||||
vtkFloatingPointType r, g, b;
|
vtkFloatingPointType r, g, b;
|
||||||
int delta;
|
int delta;
|
||||||
|
|
||||||
aSmeshActor->GetSufaceColor(r, g, b, delta);
|
aSmeshActor->GetSufaceColor(r, g, b, delta);
|
||||||
QString colorStr ("surface");
|
QString colorStr ("surface");
|
||||||
colorStr += gDigitsSep; colorStr += QString::number(r);
|
colorStr += gDigitsSep; colorStr += QString::number(r);
|
||||||
@ -5141,7 +5172,7 @@ void SMESHGUI::storeVisualParameters (int savePoint)
|
|||||||
|
|
||||||
colorStr += gDigitsSep; colorStr += "backsurface";
|
colorStr += gDigitsSep; colorStr += "backsurface";
|
||||||
colorStr += gDigitsSep; colorStr += QString::number(delta);
|
colorStr += gDigitsSep; colorStr += QString::number(delta);
|
||||||
|
|
||||||
|
|
||||||
aSmeshActor->GetEdgeColor(r, g, b);
|
aSmeshActor->GetEdgeColor(r, g, b);
|
||||||
colorStr += gDigitsSep; colorStr += "edge";
|
colorStr += gDigitsSep; colorStr += "edge";
|
||||||
@ -5211,7 +5242,7 @@ void SMESHGUI::storeVisualParameters (int savePoint)
|
|||||||
for ( ; anIter2 != anActorList.end(); anIter2++ ) {
|
for ( ; anIter2 != anActorList.end(); anIter2++ ) {
|
||||||
if( aSmeshActor == *anIter2 ) {
|
if( aSmeshActor == *anIter2 ) {
|
||||||
ip->setParameter( entry, param + QString::number( ++aPlaneId ).toLatin1().constData(),
|
ip->setParameter( entry, param + QString::number( ++aPlaneId ).toLatin1().constData(),
|
||||||
QString::number( anId ).toLatin1().constData() );
|
QString::number( anId ).toLatin1().constData() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5376,7 +5407,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
TPlaneDataList& aPlaneDataList = aPlaneDataMap[ aViewId ];
|
TPlaneDataList& aPlaneDataList = aPlaneDataMap[ aViewId ];
|
||||||
aPlaneDataList.push_back( aPlaneData );
|
aPlaneDataList.push_back( aPlaneData );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5520,18 +5551,18 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
|
|||||||
"surface:r:g:b:backsurface:r:g:b:edge:r:g:b:node:r:g:b or surface:r:g:b:backsurface:delta:edge:r:g:b:node:r:g:b:outline:r:g:b");
|
"surface:r:g:b:backsurface:r:g:b:edge:r:g:b:node:r:g:b or surface:r:g:b:backsurface:delta:edge:r:g:b:node:r:g:b:outline:r:g:b");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int delta = 0;
|
int delta = 0;
|
||||||
float er,eg,eb;
|
float er,eg,eb;
|
||||||
float nr,ng,nb;
|
float nr,ng,nb;
|
||||||
vtkFloatingPointType otr,otg,otb;
|
vtkFloatingPointType otr,otg,otb;
|
||||||
//Old case backsurface color is independent
|
//Old case backsurface color is independent
|
||||||
if( colors.count() == 16 ) {
|
if( colors.count() == 16 ) {
|
||||||
QColor ffc;
|
QColor ffc;
|
||||||
SMESH::GetColor( "SMESH", "fill_color", ffc, delta, "0,170,255|-100" ) ;
|
SMESH::GetColor( "SMESH", "fill_color", ffc, delta, "0,170,255|-100" ) ;
|
||||||
er = colors[9].toFloat();
|
er = colors[9].toFloat();
|
||||||
eg = colors[10].toFloat();
|
eg = colors[10].toFloat();
|
||||||
eb = colors[11].toFloat();
|
eb = colors[11].toFloat();
|
||||||
|
|
||||||
nr = colors[13].toFloat();
|
nr = colors[13].toFloat();
|
||||||
ng = colors[14].toFloat();
|
ng = colors[14].toFloat();
|
||||||
nb = colors[15].toFloat();
|
nb = colors[15].toFloat();
|
||||||
@ -5543,7 +5574,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
|
|||||||
er = colors[7].toFloat();
|
er = colors[7].toFloat();
|
||||||
eg = colors[8].toFloat();
|
eg = colors[8].toFloat();
|
||||||
eb = colors[9].toFloat();
|
eb = colors[9].toFloat();
|
||||||
|
|
||||||
nr = colors[11].toFloat();
|
nr = colors[11].toFloat();
|
||||||
ng = colors[12].toFloat();
|
ng = colors[12].toFloat();
|
||||||
nb = colors[13].toFloat();
|
nb = colors[13].toFloat();
|
||||||
@ -5842,7 +5873,7 @@ void SMESHGUI::onViewClosed( SUIT_ViewWindow* pview ) {
|
|||||||
#ifndef DISABLE_PLOT2DVIEWER
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
//Crear all Plot2d Viewers if need.
|
//Crear all Plot2d Viewers if need.
|
||||||
SMESH::ClearPlot2Viewers(pview);
|
SMESH::ClearPlot2Viewers(pview);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -5852,17 +5883,17 @@ void SMESHGUI::onViewClosed( SUIT_ViewWindow* pview ) {
|
|||||||
void SMESHGUI::connectView( const SUIT_ViewWindow* pview ) {
|
void SMESHGUI::connectView( const SUIT_ViewWindow* pview ) {
|
||||||
if(!pview)
|
if(!pview)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SUIT_ViewManager* viewMgr = pview->getViewManager();
|
SUIT_ViewManager* viewMgr = pview->getViewManager();
|
||||||
if ( viewMgr ) {
|
if ( viewMgr ) {
|
||||||
disconnect( viewMgr, SIGNAL( deleteView( SUIT_ViewWindow* ) ),
|
disconnect( viewMgr, SIGNAL( deleteView( SUIT_ViewWindow* ) ),
|
||||||
this, SLOT( onViewClosed( SUIT_ViewWindow* ) ) );
|
this, SLOT( onViewClosed( SUIT_ViewWindow* ) ) );
|
||||||
|
|
||||||
connect( viewMgr, SIGNAL( deleteView( SUIT_ViewWindow* ) ),
|
connect( viewMgr, SIGNAL( deleteView( SUIT_ViewWindow* ) ),
|
||||||
this, SLOT( onViewClosed( SUIT_ViewWindow* ) ) );
|
this, SLOT( onViewClosed( SUIT_ViewWindow* ) ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Return \c true if object can be renamed
|
\brief Return \c true if object can be renamed
|
||||||
*/
|
*/
|
||||||
@ -5878,7 +5909,7 @@ bool SMESHGUI::renameAllowed( const QString& entry) const {
|
|||||||
bool appRes = SalomeApp_Module::renameAllowed(entry);
|
bool appRes = SalomeApp_Module::renameAllowed(entry);
|
||||||
if( !appRes )
|
if( !appRes )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// check type to prevent renaming of inappropriate objects
|
// check type to prevent renaming of inappropriate objects
|
||||||
int aType = SMESHGUI_Selection::type(qPrintable(entry), aStudy);
|
int aType = SMESHGUI_Selection::type(qPrintable(entry), aStudy);
|
||||||
if (aType == MESH || aType == GROUP ||
|
if (aType == MESH || aType == GROUP ||
|
||||||
@ -5898,11 +5929,11 @@ bool SMESHGUI::renameAllowed( const QString& entry) const {
|
|||||||
\brief Return \c true if rename operation finished successfully, \c false otherwise.
|
\brief Return \c true if rename operation finished successfully, \c false otherwise.
|
||||||
*/
|
*/
|
||||||
bool SMESHGUI::renameObject( const QString& entry, const QString& name) {
|
bool SMESHGUI::renameObject( const QString& entry, const QString& name) {
|
||||||
|
|
||||||
SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( application() );
|
SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( application() );
|
||||||
if( !anApp )
|
if( !anApp )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
_PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); //Document OCAF de l'etude active
|
_PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); //Document OCAF de l'etude active
|
||||||
if( !aStudy )
|
if( !aStudy )
|
||||||
return false;
|
return false;
|
||||||
@ -5910,7 +5941,7 @@ bool SMESHGUI::renameObject( const QString& entry, const QString& name) {
|
|||||||
bool appRes = SalomeApp_Module::renameObject(entry,name);
|
bool appRes = SalomeApp_Module::renameObject(entry,name);
|
||||||
if( !appRes )
|
if( !appRes )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
_PTR(SObject) obj = aStudy->FindObjectID( qPrintable(entry) );
|
_PTR(SObject) obj = aStudy->FindObjectID( qPrintable(entry) );
|
||||||
_PTR(GenericAttribute) anAttr;
|
_PTR(GenericAttribute) anAttr;
|
||||||
_PTR(AttributeName) aName;
|
_PTR(AttributeName) aName;
|
||||||
@ -5926,11 +5957,11 @@ bool SMESHGUI::renameObject( const QString& entry, const QString& name) {
|
|||||||
aType == HYPOTHESIS || aType == ALGORITHM) {
|
aType == HYPOTHESIS || aType == ALGORITHM) {
|
||||||
if ( !name.isEmpty() ) {
|
if ( !name.isEmpty() ) {
|
||||||
SMESHGUI::GetSMESHGen()->SetName(obj->GetIOR().c_str(), qPrintable(name) );
|
SMESHGUI::GetSMESHGen()->SetName(obj->GetIOR().c_str(), qPrintable(name) );
|
||||||
|
|
||||||
// update name of group object and its actor
|
// update name of group object and its actor
|
||||||
Handle(SALOME_InteractiveObject) IObject =
|
Handle(SALOME_InteractiveObject) IObject =
|
||||||
new SALOME_InteractiveObject ( qPrintable(entry), "SMESH", qPrintable(name) );
|
new SALOME_InteractiveObject ( qPrintable(entry), "SMESH", qPrintable(name) );
|
||||||
|
|
||||||
SMESH::SMESH_GroupBase_var aGroupObject = SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IObject);
|
SMESH::SMESH_GroupBase_var aGroupObject = SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IObject);
|
||||||
if( !aGroupObject->_is_nil() ) {
|
if( !aGroupObject->_is_nil() ) {
|
||||||
aGroupObject->SetName( qPrintable(name) );
|
aGroupObject->SetName( qPrintable(name) );
|
||||||
@ -5939,7 +5970,7 @@ bool SMESHGUI::renameObject( const QString& entry, const QString& name) {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -157,43 +157,19 @@ namespace SMESH
|
|||||||
|
|
||||||
typedef std::vector<vtkIdType> TVTKIds;
|
typedef std::vector<vtkIdType> TVTKIds;
|
||||||
void SetPosition (SMESH_Actor* theActor,
|
void SetPosition (SMESH_Actor* theActor,
|
||||||
vtkIdType theType,
|
vtkIdType theType,
|
||||||
const TVTKIds& theIds)
|
TVTKIds& theIds)
|
||||||
{
|
{
|
||||||
vtkUnstructuredGrid *aGrid = theActor->GetUnstructuredGrid();
|
vtkUnstructuredGrid *aGrid = theActor->GetUnstructuredGrid();
|
||||||
myGrid->SetPoints(aGrid->GetPoints());
|
myGrid->SetPoints(aGrid->GetPoints());
|
||||||
|
|
||||||
const int* aConn = NULL;
|
|
||||||
switch (theType) {
|
|
||||||
case VTK_TETRA:
|
|
||||||
{
|
|
||||||
static int anIds[] = {0,2,1,3};
|
|
||||||
aConn = anIds;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case VTK_PYRAMID:
|
|
||||||
{
|
|
||||||
static int anIds[] = {0,3,2,1,4};
|
|
||||||
aConn = anIds;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case VTK_HEXAHEDRON:
|
|
||||||
{
|
|
||||||
static int anIds[] = {0,3,2,1,4,7,6,5};
|
|
||||||
aConn = anIds;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
myGrid->Reset();
|
myGrid->Reset();
|
||||||
vtkIdList *anIds = vtkIdList::New();
|
|
||||||
|
|
||||||
if(aConn)
|
const std::vector<int>& interlace = SMDS_MeshCell::toVtkOrder( VTKCellType( theType ));
|
||||||
for (int i = 0, iEnd = theIds.size(); i < iEnd; i++)
|
SMDS_MeshCell::applyInterlace( interlace, theIds );
|
||||||
anIds->InsertId(i,theIds[aConn[i]]);
|
|
||||||
else
|
vtkIdList *anIds = vtkIdList::New();
|
||||||
for (int i = 0, iEnd = theIds.size(); i < iEnd; i++)
|
for (int i = 0, iEnd = theIds.size(); i < iEnd; i++)
|
||||||
anIds->InsertId(i,theIds[i]);
|
anIds->InsertId(i,theIds[i]);
|
||||||
|
|
||||||
myGrid->InsertNextCell(theType,anIds);
|
myGrid->InsertNextCell(theType,anIds);
|
||||||
anIds->Delete();
|
anIds->Delete();
|
||||||
@ -238,9 +214,8 @@ namespace SMESH
|
|||||||
// function : SMESHGUI_AddMeshElementDlg()
|
// function : SMESHGUI_AddMeshElementDlg()
|
||||||
// purpose : constructor
|
// purpose : constructor
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( SMESHGUI* theModule,
|
SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( SMESHGUI* theModule,
|
||||||
SMDSAbs_ElementType ElementType,
|
SMDSAbs_EntityType ElementType)
|
||||||
int nbNodes )
|
|
||||||
: QDialog( SMESH::GetDesktop( theModule ) ),
|
: QDialog( SMESH::GetDesktop( theModule ) ),
|
||||||
mySMESHGUI( theModule ),
|
mySMESHGUI( theModule ),
|
||||||
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
|
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
|
||||||
@ -254,62 +229,72 @@ SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( SMESHGUI* theModule,
|
|||||||
myIsPoly = false;
|
myIsPoly = false;
|
||||||
mySimulation = new SMESH::TElementSimulation (anApp);
|
mySimulation = new SMESH::TElementSimulation (anApp);
|
||||||
mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
|
mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
|
||||||
|
myGeomType = ElementType;
|
||||||
|
myElementType = SMDSAbs_Volume;
|
||||||
|
|
||||||
// verify nb nodes and type
|
// verify nb nodes and type
|
||||||
myNbNodes = nbNodes;
|
|
||||||
myElementType = ElementType;
|
|
||||||
switch (ElementType) {
|
|
||||||
case SMDSAbs_0DElement:
|
|
||||||
if (myNbNodes != 1)
|
|
||||||
myNbNodes = 1;
|
|
||||||
break;
|
|
||||||
case SMDSAbs_Face:
|
|
||||||
// if (myNbNodes != 3 && myNbNodes != 4)
|
|
||||||
// myNbNodes = 3;
|
|
||||||
// break;
|
|
||||||
case SMDSAbs_Volume:
|
|
||||||
// if (myNbNodes != 4 && myNbNodes != 8) //(nbNodes < 4 || nbNodes > 8 || nbNodes == 7)
|
|
||||||
// myNbNodes = 4;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
myElementType = SMDSAbs_Edge;
|
|
||||||
myNbNodes = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString elemName;
|
QString elemName;
|
||||||
if (myNbNodes == 1) {
|
switch ( myGeomType ) {
|
||||||
|
case SMDSEntity_0D:
|
||||||
|
myNbNodes = 1;
|
||||||
|
myElementType = SMDSAbs_0DElement;
|
||||||
elemName = "ELEM0D";
|
elemName = "ELEM0D";
|
||||||
myHelpFileName = "adding_nodes_and_elements_page.html#adding_0delems_anchor";
|
myHelpFileName = "adding_nodes_and_elements_page.html#adding_0delems_anchor";
|
||||||
}
|
break;
|
||||||
else if (myNbNodes == 2) {
|
case SMDSEntity_Edge:
|
||||||
|
myNbNodes = 2;
|
||||||
|
myElementType = SMDSAbs_Edge;
|
||||||
elemName = "EDGE";
|
elemName = "EDGE";
|
||||||
myHelpFileName = "adding_nodes_and_elements_page.html#adding_edges_anchor";
|
myHelpFileName = "adding_nodes_and_elements_page.html#adding_edges_anchor";
|
||||||
}
|
break;
|
||||||
else if (myNbNodes == 3) {
|
case SMDSEntity_Triangle:
|
||||||
|
myNbNodes = 3;
|
||||||
elemName = "TRIANGLE";
|
elemName = "TRIANGLE";
|
||||||
|
myElementType = SMDSAbs_Face;
|
||||||
myHelpFileName = "adding_nodes_and_elements_page.html#adding_triangles_anchor";
|
myHelpFileName = "adding_nodes_and_elements_page.html#adding_triangles_anchor";
|
||||||
}
|
break;
|
||||||
else if (myNbNodes == 4) {
|
case SMDSEntity_Quadrangle:
|
||||||
if (myElementType == SMDSAbs_Face) {
|
myNbNodes = 4;
|
||||||
elemName = "QUADRANGLE";
|
myElementType = SMDSAbs_Face;
|
||||||
myHelpFileName = "adding_nodes_and_elements_page.html#adding_quadrangles_anchor";
|
elemName = "QUADRANGLE";
|
||||||
}
|
myHelpFileName = "adding_nodes_and_elements_page.html#adding_quadrangles_anchor";
|
||||||
else {
|
break;
|
||||||
elemName = "TETRAS";
|
case SMDSEntity_Polygon:
|
||||||
myHelpFileName = "adding_nodes_and_elements_page.html#adding_tetrahedrons_anchor";
|
myNbNodes = 0;
|
||||||
}
|
myElementType = SMDSAbs_Face;
|
||||||
}
|
|
||||||
else if (myNbNodes == 8) {
|
|
||||||
elemName = "HEXAS";
|
|
||||||
myHelpFileName = "adding_nodes_and_elements_page.html#adding_hexahedrons_anchor";
|
|
||||||
}
|
|
||||||
else if (myElementType == SMDSAbs_Face) {
|
|
||||||
elemName = "POLYGON";
|
elemName = "POLYGON";
|
||||||
myIsPoly = true;
|
myIsPoly = true;
|
||||||
myHelpFileName = "adding_nodes_and_elements_page.html#adding_polygons_anchor";
|
myHelpFileName = "adding_nodes_and_elements_page.html#adding_polygons_anchor";
|
||||||
}
|
break;
|
||||||
else if (myElementType == SMDSAbs_Volume) {
|
case SMDSEntity_Tetra:
|
||||||
myHelpFileName = "adding_nodes_and_elements_page.html#adding_polyhedrons_anchor";
|
myNbNodes = 4;
|
||||||
|
elemName = "TETRAS";
|
||||||
|
myHelpFileName = "adding_nodes_and_elements_page.html#adding_tetrahedrons_anchor";
|
||||||
|
break;
|
||||||
|
case SMDSEntity_Pyramid:
|
||||||
|
myNbNodes = 5;
|
||||||
|
elemName = "PYRAMID";
|
||||||
|
myHelpFileName = "adding_nodes_and_elements_page.html#adding_pyramids_anchor";
|
||||||
|
break;
|
||||||
|
case SMDSEntity_Hexa:
|
||||||
|
myNbNodes = 8;
|
||||||
|
elemName = "HEXAS";
|
||||||
|
myHelpFileName = "adding_nodes_and_elements_page.html#adding_hexahedrons_anchor";
|
||||||
|
break;
|
||||||
|
case SMDSEntity_Penta:
|
||||||
|
myNbNodes = 6;
|
||||||
|
elemName = "PENTA";
|
||||||
|
myHelpFileName = "adding_nodes_and_elements_page.html#adding_pentahedrons_anchor";
|
||||||
|
break;
|
||||||
|
case SMDSEntity_Hexagonal_Prism:
|
||||||
|
myNbNodes = 12;
|
||||||
|
elemName = "OCTA";
|
||||||
|
myHelpFileName = "adding_nodes_and_elements_page.html#adding_octahedrons_anchor";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
myNbNodes = 2;
|
||||||
|
elemName = "EDGE";
|
||||||
|
myHelpFileName = "adding_nodes_and_elements_page.html#adding_edges_anchor";
|
||||||
}
|
}
|
||||||
|
|
||||||
QString iconName = tr(QString("ICON_DLG_%1").arg(elemName).toLatin1().data());
|
QString iconName = tr(QString("ICON_DLG_%1").arg(elemName).toLatin1().data());
|
||||||
@ -351,11 +336,9 @@ SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( SMESHGUI* theModule,
|
|||||||
SelectButtonC1A1 = new QPushButton(GroupC1);
|
SelectButtonC1A1 = new QPushButton(GroupC1);
|
||||||
SelectButtonC1A1->setIcon(image1);
|
SelectButtonC1A1->setIcon(image1);
|
||||||
LineEditC1A1 = new QLineEdit(GroupC1);
|
LineEditC1A1 = new QLineEdit(GroupC1);
|
||||||
// LineEditC1A1->setReadOnly(true);
|
LineEditC1A1->setValidator(new SMESHGUI_IdValidator(this, myIsPoly ? 1000 : myNbNodes));
|
||||||
if (!myIsPoly)
|
|
||||||
LineEditC1A1->setValidator(new SMESHGUI_IdValidator(this, myNbNodes));
|
|
||||||
|
|
||||||
Reverse = myElementType == SMDSAbs_Face ? new QCheckBox(tr("SMESH_REVERSE"), GroupC1) : 0;
|
Reverse = (myElementType == SMDSAbs_Face || myElementType == SMDSAbs_Volume ) ? new QCheckBox(tr("SMESH_REVERSE"), GroupC1) : 0;
|
||||||
|
|
||||||
GroupC1Layout->addWidget(TextLabelC1A1, 0, 0);
|
GroupC1Layout->addWidget(TextLabelC1A1, 0, 0);
|
||||||
GroupC1Layout->addWidget(SelectButtonC1A1, 0, 1);
|
GroupC1Layout->addWidget(SelectButtonC1A1, 0, 1);
|
||||||
@ -478,12 +461,16 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
|
|||||||
myBusy = true;
|
myBusy = true;
|
||||||
SMESH::long_array_var anArrayOfIndices = new SMESH::long_array;
|
SMESH::long_array_var anArrayOfIndices = new SMESH::long_array;
|
||||||
anArrayOfIndices->length(myNbNodes);
|
anArrayOfIndices->length(myNbNodes);
|
||||||
bool reverse = (Reverse && Reverse->isChecked());
|
|
||||||
QStringList aListId = myEditCurrentArgument->text().split(" ", QString::SkipEmptyParts);
|
QStringList aListId = myEditCurrentArgument->text().split(" ", QString::SkipEmptyParts);
|
||||||
for (int i = 0; i < aListId.count(); i++)
|
const std::vector<int>& revIndex = SMDS_MeshCell::reverseSmdsOrder( myGeomType );
|
||||||
if (reverse)
|
if ( Reverse && Reverse->isChecked() && !revIndex.empty() )
|
||||||
anArrayOfIndices[i] = aListId[ myNbNodes - i - 1 ].toInt();
|
for (int i = 0; i < aListId.count(); i++)
|
||||||
else
|
anArrayOfIndices[i] = aListId[ revIndex[i] ].toInt();
|
||||||
|
else if ( Reverse && Reverse->isChecked() && revIndex.empty() ) // polygon
|
||||||
|
for (int i = 0; i < aListId.count(); i++)
|
||||||
|
anArrayOfIndices[i] = aListId[ aListId.count()-1 - i ].toInt();
|
||||||
|
else
|
||||||
|
for (int i = 0; i < aListId.count(); i++)
|
||||||
anArrayOfIndices[i] = aListId[ i ].toInt();
|
anArrayOfIndices[i] = aListId[ i ].toInt();
|
||||||
|
|
||||||
bool addToGroup = GroupGroups->isChecked();
|
bool addToGroup = GroupGroups->isChecked();
|
||||||
@ -517,16 +504,14 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
|
|||||||
anElemId = aMeshEditor->Add0DElement(anArrayOfIndices[0]); break;
|
anElemId = aMeshEditor->Add0DElement(anArrayOfIndices[0]); break;
|
||||||
case SMDSAbs_Edge:
|
case SMDSAbs_Edge:
|
||||||
anElemId = aMeshEditor->AddEdge(anArrayOfIndices.inout()); break;
|
anElemId = aMeshEditor->AddEdge(anArrayOfIndices.inout()); break;
|
||||||
case SMDSAbs_Face: {
|
case SMDSAbs_Face:
|
||||||
if(myIsPoly)
|
if ( myIsPoly )
|
||||||
anElemId = aMeshEditor->AddPolygonalFace(anArrayOfIndices.inout());
|
anElemId = aMeshEditor->AddPolygonalFace(anArrayOfIndices.inout());
|
||||||
else
|
else
|
||||||
anElemId = aMeshEditor->AddFace(anArrayOfIndices.inout());
|
anElemId = aMeshEditor->AddFace(anArrayOfIndices.inout());
|
||||||
break;
|
break;
|
||||||
}
|
default:
|
||||||
case SMDSAbs_Volume:
|
|
||||||
anElemId = aMeshEditor->AddVolume(anArrayOfIndices.inout()); break;
|
anElemId = aMeshEditor->AddVolume(anArrayOfIndices.inout()); break;
|
||||||
default: break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
|
if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
|
||||||
@ -785,24 +770,15 @@ void SMESHGUI_AddMeshElementDlg::displaySimulation()
|
|||||||
anIds.push_back(myActor->GetObject()->GetNodeVTKId(aListId[ i ].toInt()));
|
anIds.push_back(myActor->GetObject()->GetNodeVTKId(aListId[ i ].toInt()));
|
||||||
|
|
||||||
if (Reverse && Reverse->isChecked())
|
if (Reverse && Reverse->isChecked())
|
||||||
reverse(anIds.begin(),anIds.end());
|
{
|
||||||
|
const std::vector<int>& i = SMDS_MeshCell::reverseSmdsOrder( myGeomType );
|
||||||
vtkIdType aType = 0;
|
if ( i.empty() ) // polygon
|
||||||
if (myIsPoly)
|
std::reverse( anIds.begin(), anIds.end() );
|
||||||
switch ( myElementType ) {
|
else
|
||||||
case SMDSAbs_Face : aType = VTK_POLYGON; break;
|
SMDS_MeshCell::applyInterlace( i, anIds );
|
||||||
default: return;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
switch (myNbNodes) {
|
|
||||||
case 2: aType = VTK_LINE; break;
|
|
||||||
case 3: aType = VTK_TRIANGLE; break;
|
|
||||||
case 4: aType = myElementType == SMDSAbs_Face ? VTK_QUAD : VTK_TETRA; break;
|
|
||||||
case 8: aType = VTK_HEXAHEDRON; break;
|
|
||||||
default: return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vtkIdType aType = SMDS_MeshCell::toVtkType( myGeomType );
|
||||||
mySimulation->SetPosition(myActor,aType,anIds);
|
mySimulation->SetPosition(myActor,aType,anIds);
|
||||||
SMESH::UpdateView();
|
SMESH::UpdateView();
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ class SMESHGUI_EXPORT SMESHGUI_AddMeshElementDlg : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SMESHGUI_AddMeshElementDlg( SMESHGUI*, SMDSAbs_ElementType = SMDSAbs_Edge, int = 2 );
|
SMESHGUI_AddMeshElementDlg( SMESHGUI*, SMDSAbs_EntityType = SMDSEntity_Edge );
|
||||||
~SMESHGUI_AddMeshElementDlg();
|
~SMESHGUI_AddMeshElementDlg();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -88,6 +88,7 @@ private:
|
|||||||
|
|
||||||
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
|
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
|
||||||
|
|
||||||
|
SMDSAbs_EntityType myGeomType;
|
||||||
int myElementType;
|
int myElementType;
|
||||||
int myNbNodes;
|
int myNbNodes;
|
||||||
bool myIsPoly;
|
bool myIsPoly;
|
||||||
|
@ -91,63 +91,26 @@
|
|||||||
#define SPACING 6
|
#define SPACING 6
|
||||||
#define MARGIN 11
|
#define MARGIN 11
|
||||||
|
|
||||||
namespace SMESH
|
namespace
|
||||||
{
|
{
|
||||||
void ReverseConnectivity( std::vector<vtkIdType> & ids, int type )
|
void ReverseConnectivity( std::vector<vtkIdType> & ids, SMDSAbs_EntityType type,
|
||||||
|
bool toReverse, // inverse element
|
||||||
|
bool toVtkOrder ) // smds connectivity to vtk one
|
||||||
{
|
{
|
||||||
// for reverse connectivity of other types keeping the first id, see
|
if ( toReverse ) // first reverse smds order
|
||||||
// void SMESH_VisualObjDef::buildElemPrs() in SMESH_Object.cxx:900
|
{
|
||||||
const int* conn = 0;
|
const std::vector<int>& index = SMDS_MeshCell::reverseSmdsOrder(type);
|
||||||
|
SMDS_MeshCell::applyInterlace( index, ids );
|
||||||
switch ( type ) {
|
|
||||||
case QUAD_TETRAHEDRON: {
|
|
||||||
static int aConn[] = {0,2,1,3,6,5,4,7,9,8};
|
|
||||||
conn = aConn;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case QUAD_PYRAMID: {
|
if ( toVtkOrder ) // from smds to vtk connectivity
|
||||||
static int aConn[] = {0,3,2,1,4,8,7,6,5,9,12,11,10};
|
{
|
||||||
conn = aConn;
|
const std::vector<int>& index = SMDS_MeshCell::toVtkOrder(type);
|
||||||
break;
|
SMDS_MeshCell::applyInterlace( index, ids );
|
||||||
}
|
|
||||||
case QUAD_PENTAHEDRON: {
|
|
||||||
static int aConn[] = {0,2,1,3,5,4,8,7,6,11,10,9,12,14,13};
|
|
||||||
conn = aConn;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case QUAD_HEXAHEDRON: {
|
|
||||||
static int aConn[] = {0,3,2,1,4,7,6,5,11,10,9,8,15,14,13,12,16,19,18,17};
|
|
||||||
conn = aConn;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case QUAD_EDGE: {
|
|
||||||
static int aConn[] = {1,0,2};
|
|
||||||
conn = aConn;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case QUAD_TRIANGLE: {
|
|
||||||
static int aConn[] = {0,2,1,5,4,3};
|
|
||||||
conn = aConn;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case QUAD_QUADRANGLE: {
|
|
||||||
static int aConn[] = {0,3,2,1,7,6,5,4};
|
|
||||||
conn = aConn;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:;
|
|
||||||
}
|
|
||||||
if ( !conn ) {
|
|
||||||
reverse( ids.begin(), ids.end() );
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
std::vector<vtkIdType> aRevIds( ids.size() );
|
|
||||||
for ( int i = 0; i < ids.size(); i++)
|
|
||||||
aRevIds[ i ] = ids[ conn[ i ]];
|
|
||||||
ids = aRevIds;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
namespace SMESH
|
||||||
|
{
|
||||||
class TElementSimulation {
|
class TElementSimulation {
|
||||||
SalomeApp_Application* myApplication;
|
SalomeApp_Application* myApplication;
|
||||||
SUIT_ViewWindow* myViewWindow;
|
SUIT_ViewWindow* myViewWindow;
|
||||||
@ -221,85 +184,36 @@ namespace SMESH
|
|||||||
}
|
}
|
||||||
|
|
||||||
typedef std::vector<vtkIdType> TVTKIds;
|
typedef std::vector<vtkIdType> TVTKIds;
|
||||||
void SetPosition (SMESH_Actor* theActor,
|
void SetPosition (SMESH_Actor* theActor,
|
||||||
const int theType,
|
SMDSAbs_EntityType theType,
|
||||||
TVTKIds& theIds,
|
TVTKIds& theIds,
|
||||||
const int theMode,
|
const int theMode,
|
||||||
const bool theReverse)
|
const bool theReverse)
|
||||||
{
|
{
|
||||||
vtkUnstructuredGrid *aGrid = theActor->GetUnstructuredGrid();
|
vtkUnstructuredGrid *aGrid = theActor->GetUnstructuredGrid();
|
||||||
myGrid->SetPoints(aGrid->GetPoints());
|
myGrid->SetPoints(aGrid->GetPoints());
|
||||||
|
|
||||||
//add points
|
//add points
|
||||||
|
|
||||||
vtkIdType aType = 0;
|
ReverseConnectivity( theIds, theType, theReverse, /*toVtkOrder=*/true);
|
||||||
|
|
||||||
switch (theType) {
|
|
||||||
case QUAD_EDGE:
|
|
||||||
aType = VTK_QUADRATIC_EDGE;
|
|
||||||
break;
|
|
||||||
case QUAD_TRIANGLE:
|
|
||||||
aType = VTK_QUADRATIC_TRIANGLE;
|
|
||||||
break;
|
|
||||||
case QUAD_QUADRANGLE:
|
|
||||||
aType = VTK_QUADRATIC_QUAD;
|
|
||||||
break;
|
|
||||||
case QUAD_TETRAHEDRON:
|
|
||||||
aType = VTK_QUADRATIC_TETRA;
|
|
||||||
break;
|
|
||||||
case QUAD_PYRAMID:
|
|
||||||
//aType = VTK_QUADRATIC_PYRAMID; // NOT SUPPORTED IN VTK4.2
|
|
||||||
aType = VTK_CONVEX_POINT_SET;
|
|
||||||
break;
|
|
||||||
case QUAD_PENTAHEDRON:
|
|
||||||
aType = VTK_QUADRATIC_WEDGE;
|
|
||||||
//aType = VTK_CONVEX_POINT_SET;
|
|
||||||
break;
|
|
||||||
case QUAD_HEXAHEDRON:
|
|
||||||
aType = VTK_QUADRATIC_HEXAHEDRON;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// take care of orientation
|
|
||||||
if ( aType == VTK_CONVEX_POINT_SET ) {
|
|
||||||
if ( theReverse && theMode == VTK_SURFACE ) {
|
|
||||||
//myPreviewActor->GetProperty()->SetColor( myBackRGB[0], myBackRGB[1], myBackRGB[2] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// VTK cell connectivity opposites the MED one for volumic elements
|
|
||||||
if( aType != VTK_QUADRATIC_WEDGE) {
|
|
||||||
if ( theIds.size() > 8 ? !theReverse : theReverse ) {
|
|
||||||
ReverseConnectivity( theIds, theType );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(theReverse)
|
|
||||||
ReverseConnectivity( theIds, theType );
|
|
||||||
}
|
|
||||||
|
|
||||||
myGrid->Reset();
|
myGrid->Reset();
|
||||||
vtkIdList *anIds = vtkIdList::New();
|
vtkIdList *anIds = vtkIdList::New();
|
||||||
|
|
||||||
for (int i = 0, iEnd = theIds.size(); i < iEnd; i++) {
|
for (int i = 0, iEnd = theIds.size(); i < iEnd; i++) {
|
||||||
anIds->InsertId(i,theIds[i]);
|
anIds->InsertId(i,theIds[i]);
|
||||||
//std::cout << i<< ": " << theIds[i] << std::endl;
|
//std::cout << i<< ": " << theIds[i] << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vtkIdType aType = SMDS_MeshCell::toVtkType(theType);
|
||||||
myGrid->InsertNextCell(aType,anIds);
|
myGrid->InsertNextCell(aType,anIds);
|
||||||
anIds->Delete();
|
anIds->Delete();
|
||||||
|
|
||||||
myGrid->Modified();
|
myGrid->Modified();
|
||||||
|
|
||||||
myPreviewActor->GetMapper()->Update();
|
myPreviewActor->GetMapper()->Update();
|
||||||
myPreviewActor->SetRepresentation( theMode );
|
myPreviewActor->SetRepresentation( theMode );
|
||||||
SetVisibility(true, theActor->GetFacesOriented());
|
SetVisibility(true, theActor->GetFacesOriented());
|
||||||
|
|
||||||
// restore normal orientation
|
|
||||||
if ( aType == VTK_CONVEX_POINT_SET ) {
|
|
||||||
if ( theReverse && theMode == VTK_SURFACE ) {
|
|
||||||
//myPreviewActor->GetProperty()->SetColor( myRGB[0], myRGB[1], myRGB[2] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -412,49 +326,55 @@ QWidget* IdEditItem::createEditor() const
|
|||||||
// purpose : constructor
|
// purpose : constructor
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theModule,
|
SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theModule,
|
||||||
const int theType )
|
const SMDSAbs_EntityType theType )
|
||||||
: QDialog( SMESH::GetDesktop( theModule ) ),
|
: QDialog( SMESH::GetDesktop( theModule ) ),
|
||||||
mySMESHGUI( theModule ),
|
mySMESHGUI( theModule ),
|
||||||
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
|
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
|
||||||
myType( theType ),
|
myGeomType( theType ),
|
||||||
myBusy( false ),
|
//myType( theType ),
|
||||||
myIsEditCorners( false )
|
myBusy( false )
|
||||||
{
|
{
|
||||||
setModal( false );
|
setModal( false );
|
||||||
setAttribute( Qt::WA_DeleteOnClose, true );
|
setAttribute( Qt::WA_DeleteOnClose, true );
|
||||||
|
|
||||||
SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>
|
SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>
|
||||||
(SUIT_Session::session()->activeApplication());
|
(SUIT_Session::session()->activeApplication());
|
||||||
|
|
||||||
mySimulation = new SMESH::TElementSimulation (anApp);
|
mySimulation = new SMESH::TElementSimulation (anApp);
|
||||||
mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
|
mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
|
||||||
|
|
||||||
QString anElementName;
|
QString anElementName;
|
||||||
|
|
||||||
switch ( myType ) {
|
switch ( myGeomType ) {
|
||||||
case QUAD_EDGE:
|
case SMDSEntity_Quad_Edge:
|
||||||
anElementName = QString("QUADRATIC_EDGE");
|
anElementName = QString("QUADRATIC_EDGE");
|
||||||
break;
|
break;
|
||||||
case QUAD_TRIANGLE:
|
case SMDSEntity_Quad_Triangle:
|
||||||
anElementName = QString("QUADRATIC_TRIANGLE");
|
anElementName = QString("QUADRATIC_TRIANGLE");
|
||||||
break;
|
break;
|
||||||
case QUAD_QUADRANGLE:
|
case SMDSEntity_Quad_Quadrangle:
|
||||||
anElementName = QString("QUADRATIC_QUADRANGLE");
|
anElementName = QString("QUADRATIC_QUADRANGLE");
|
||||||
break;
|
break;
|
||||||
case QUAD_TETRAHEDRON:
|
case SMDSEntity_BiQuad_Quadrangle:
|
||||||
|
anElementName = QString("BIQUADRATIC_QUADRANGLE");
|
||||||
|
break;
|
||||||
|
case SMDSEntity_Quad_Tetra:
|
||||||
anElementName = QString("QUADRATIC_TETRAHEDRON");
|
anElementName = QString("QUADRATIC_TETRAHEDRON");
|
||||||
break;
|
break;
|
||||||
case QUAD_PYRAMID:
|
case SMDSEntity_Quad_Pyramid:
|
||||||
anElementName = QString("QUADRATIC_PYRAMID");
|
anElementName = QString("QUADRATIC_PYRAMID");
|
||||||
break;
|
break;
|
||||||
case QUAD_PENTAHEDRON:
|
case SMDSEntity_Quad_Penta:
|
||||||
anElementName = QString("QUADRATIC_PENTAHEDRON");
|
anElementName = QString("QUADRATIC_PENTAHEDRON");
|
||||||
break;
|
break;
|
||||||
case QUAD_HEXAHEDRON:
|
case SMDSEntity_Quad_Hexa:
|
||||||
anElementName = QString("QUADRATIC_HEXAHEDRON");
|
anElementName = QString("QUADRATIC_HEXAHEDRON");
|
||||||
break;
|
break;
|
||||||
|
case SMDSEntity_TriQuad_Hexa:
|
||||||
|
anElementName = QString("TRIQUADRATIC_HEXAHEDRON");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
myType = QUAD_EDGE;
|
myGeomType = SMDSEntity_Quad_Edge;
|
||||||
anElementName = QString("QUADRATIC_EDGE");
|
anElementName = QString("QUADRATIC_EDGE");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -462,12 +382,12 @@ SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theM
|
|||||||
QString caption = tr(QString("SMESH_ADD_%1_TITLE").arg(anElementName).toLatin1().data());
|
QString caption = tr(QString("SMESH_ADD_%1_TITLE").arg(anElementName).toLatin1().data());
|
||||||
QString argumentsGrTitle = tr(QString("SMESH_ADD_%1").arg(anElementName).toLatin1().data());
|
QString argumentsGrTitle = tr(QString("SMESH_ADD_%1").arg(anElementName).toLatin1().data());
|
||||||
QString constructorGrTitle = tr(QString("SMESH_%1").arg(anElementName).toLatin1().data());
|
QString constructorGrTitle = tr(QString("SMESH_%1").arg(anElementName).toLatin1().data());
|
||||||
|
|
||||||
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", iconName));
|
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", iconName));
|
||||||
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
|
|
||||||
setWindowTitle(caption);
|
setWindowTitle(caption);
|
||||||
|
|
||||||
setSizeGripEnabled(true);
|
setSizeGripEnabled(true);
|
||||||
|
|
||||||
QVBoxLayout* aDialogLayout = new QVBoxLayout(this);
|
QVBoxLayout* aDialogLayout = new QVBoxLayout(this);
|
||||||
@ -492,22 +412,44 @@ SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theM
|
|||||||
aGroupArgumentsLayout->setSpacing(SPACING);
|
aGroupArgumentsLayout->setSpacing(SPACING);
|
||||||
aGroupArgumentsLayout->setMargin(MARGIN);
|
aGroupArgumentsLayout->setMargin(MARGIN);
|
||||||
|
|
||||||
|
// Corner nodes
|
||||||
QLabel* aCornerNodesLabel = new QLabel(tr("SMESH_CORNER_NODES"), GroupArguments);
|
QLabel* aCornerNodesLabel = new QLabel(tr("SMESH_CORNER_NODES"), GroupArguments);
|
||||||
mySelectButton = new QPushButton(GroupArguments);
|
myCornerSelectButton = new QPushButton(GroupArguments);
|
||||||
mySelectButton->setIcon(image1);
|
myCornerSelectButton->setIcon(image1);
|
||||||
myCornerNodes = new QLineEdit(GroupArguments);
|
myCornerNodes = new QLineEdit(GroupArguments);
|
||||||
|
|
||||||
|
// Mid-edge nodes
|
||||||
myTable = new QTableWidget(GroupArguments);
|
myTable = new QTableWidget(GroupArguments);
|
||||||
|
|
||||||
|
// Mid-face nodes
|
||||||
|
myMidFaceLabel = new QLabel(tr("SMESH_MIDFACE_NODES"), GroupArguments);
|
||||||
|
myMidFaceSelectButton = new QPushButton(GroupArguments);
|
||||||
|
myMidFaceSelectButton->setIcon(image1);
|
||||||
|
myMidFaceNodes = new QLineEdit(GroupArguments);
|
||||||
|
myMidFaceNodes->setValidator(new SMESHGUI_IdValidator(this, 6));
|
||||||
|
|
||||||
|
// Central node
|
||||||
|
myCenterLabel = new QLabel(tr("SMESH_CENTER_NODE"), GroupArguments);
|
||||||
|
myCenterSelectButton = new QPushButton(GroupArguments);
|
||||||
|
myCenterSelectButton->setIcon(image1);
|
||||||
|
myCenterNode = new QLineEdit(GroupArguments);
|
||||||
|
myCenterNode->setValidator(new SMESHGUI_IdValidator(this, 1));
|
||||||
|
|
||||||
myReverseCB = new QCheckBox(tr("SMESH_REVERSE"), GroupArguments);
|
myReverseCB = new QCheckBox(tr("SMESH_REVERSE"), GroupArguments);
|
||||||
|
|
||||||
aGroupArgumentsLayout->addWidget(aCornerNodesLabel, 0, 0);
|
aGroupArgumentsLayout->addWidget(aCornerNodesLabel, 0, 0);
|
||||||
aGroupArgumentsLayout->addWidget(mySelectButton, 0, 1);
|
aGroupArgumentsLayout->addWidget(myCornerSelectButton, 0, 1);
|
||||||
aGroupArgumentsLayout->addWidget(myCornerNodes, 0, 2);
|
aGroupArgumentsLayout->addWidget(myCornerNodes, 0, 2);
|
||||||
aGroupArgumentsLayout->addWidget(myTable, 1, 0, 1, 3);
|
aGroupArgumentsLayout->addWidget(myTable, 1, 0, 1, 3);
|
||||||
aGroupArgumentsLayout->addWidget(myReverseCB, 2, 0, 1, 3);
|
aGroupArgumentsLayout->addWidget(myMidFaceLabel, 2, 0);
|
||||||
|
aGroupArgumentsLayout->addWidget(myMidFaceSelectButton, 2, 1);
|
||||||
/***************************************************************/
|
aGroupArgumentsLayout->addWidget(myMidFaceNodes, 2, 2);
|
||||||
|
aGroupArgumentsLayout->addWidget(myCenterLabel, 3, 0);
|
||||||
|
aGroupArgumentsLayout->addWidget(myCenterSelectButton, 3, 1);
|
||||||
|
aGroupArgumentsLayout->addWidget(myCenterNode, 3, 2);
|
||||||
|
aGroupArgumentsLayout->addWidget(myReverseCB, 4, 0, 1, 3);
|
||||||
|
|
||||||
|
/***************************************************************/
|
||||||
GroupGroups = new QGroupBox( tr( "SMESH_ADD_TO_GROUP" ), this );
|
GroupGroups = new QGroupBox( tr( "SMESH_ADD_TO_GROUP" ), this );
|
||||||
GroupGroups->setCheckable( true );
|
GroupGroups->setCheckable( true );
|
||||||
QHBoxLayout* GroupGroupsLayout = new QHBoxLayout(GroupGroups);
|
QHBoxLayout* GroupGroupsLayout = new QHBoxLayout(GroupGroups);
|
||||||
@ -572,52 +514,74 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
|
|||||||
{
|
{
|
||||||
myRadioButton1->setChecked(true);
|
myRadioButton1->setChecked(true);
|
||||||
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
|
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
|
||||||
|
|
||||||
/* reset "Add to group" control */
|
/* reset "Add to group" control */
|
||||||
GroupGroups->setChecked( false );
|
GroupGroups->setChecked( false );
|
||||||
|
|
||||||
myActor = 0;
|
myActor = 0;
|
||||||
|
myNbMidFaceNodes = 0;
|
||||||
|
myNbCenterNodes = 0;
|
||||||
|
|
||||||
int aNumRows;
|
int aNumRows;
|
||||||
|
|
||||||
switch (myType) {
|
switch (myGeomType) {
|
||||||
case QUAD_EDGE:
|
case SMDSEntity_Quad_Edge:
|
||||||
aNumRows = 1;
|
aNumRows = 1;
|
||||||
myNbCorners = 2;
|
myNbCorners = 2;
|
||||||
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_edges
|
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_edges
|
||||||
break;
|
break;
|
||||||
case QUAD_TRIANGLE:
|
case SMDSEntity_Quad_Triangle:
|
||||||
aNumRows = 3;
|
aNumRows = 3;
|
||||||
myNbCorners = 3;
|
myNbCorners = 3;
|
||||||
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_triangles
|
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_triangles
|
||||||
break;
|
break;
|
||||||
case QUAD_QUADRANGLE:
|
case SMDSEntity_Quad_Quadrangle:
|
||||||
aNumRows = 4;
|
aNumRows = 4;
|
||||||
myNbCorners = 4;
|
myNbCorners = 4;
|
||||||
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_quadrangles
|
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_quadrangles
|
||||||
break;
|
break;
|
||||||
case QUAD_TETRAHEDRON:
|
case SMDSEntity_BiQuad_Quadrangle:
|
||||||
|
aNumRows = 4;
|
||||||
|
myNbCorners = 4;
|
||||||
|
myNbCenterNodes = 1;
|
||||||
|
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_quadrangles
|
||||||
|
break;
|
||||||
|
case SMDSEntity_Quad_Tetra:
|
||||||
aNumRows = 6;
|
aNumRows = 6;
|
||||||
myNbCorners = 4;
|
myNbCorners = 4;
|
||||||
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_tetrahedrons
|
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_tetrahedrons
|
||||||
break;
|
break;
|
||||||
case QUAD_PYRAMID:
|
case SMDSEntity_Quad_Pyramid:
|
||||||
aNumRows = 8;
|
aNumRows = 8;
|
||||||
myNbCorners = 5;
|
myNbCorners = 5;
|
||||||
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_pyramids
|
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_pyramids
|
||||||
break;
|
break;
|
||||||
case QUAD_PENTAHEDRON:
|
case SMDSEntity_Quad_Penta:
|
||||||
aNumRows = 9;
|
aNumRows = 9;
|
||||||
myNbCorners = 6;
|
myNbCorners = 6;
|
||||||
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_pentahedrons
|
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_pentahedrons
|
||||||
break;
|
break;
|
||||||
case QUAD_HEXAHEDRON:
|
case SMDSEntity_Quad_Hexa:
|
||||||
aNumRows = 12;
|
aNumRows = 12;
|
||||||
myNbCorners = 8;
|
myNbCorners = 8;
|
||||||
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_hexahedrons
|
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_hexahedrons
|
||||||
break;
|
break;
|
||||||
|
case SMDSEntity_TriQuad_Hexa:
|
||||||
|
aNumRows = 12;
|
||||||
|
myNbCorners = 8;
|
||||||
|
myNbMidFaceNodes = 6;
|
||||||
|
myNbCenterNodes = 1;
|
||||||
|
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_hexahedrons
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
myMidFaceLabel ->setVisible( myNbMidFaceNodes );
|
||||||
|
myMidFaceSelectButton->setVisible( myNbMidFaceNodes );
|
||||||
|
myMidFaceNodes ->setVisible( myNbMidFaceNodes );
|
||||||
|
myCenterLabel ->setVisible( myNbCenterNodes );
|
||||||
|
myCenterSelectButton ->setVisible( myNbCenterNodes );
|
||||||
|
myCenterNode ->setVisible( myNbCenterNodes );
|
||||||
|
|
||||||
myCornerNodes->setValidator(new SMESHGUI_IdValidator(this, myNbCorners));
|
myCornerNodes->setValidator(new SMESHGUI_IdValidator(this, myNbCorners));
|
||||||
|
|
||||||
/* initialize table */
|
/* initialize table */
|
||||||
@ -629,7 +593,7 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
|
|||||||
aColLabels.append(tr("SMESH_MIDDLE"));
|
aColLabels.append(tr("SMESH_MIDDLE"));
|
||||||
aColLabels.append(tr("SMESH_LAST"));
|
aColLabels.append(tr("SMESH_LAST"));
|
||||||
myTable->setHorizontalHeaderLabels(aColLabels);
|
myTable->setHorizontalHeaderLabels(aColLabels);
|
||||||
|
|
||||||
for ( int col = 0; col < myTable->columnCount(); col++ )
|
for ( int col = 0; col < myTable->columnCount(); col++ )
|
||||||
myTable->setColumnWidth(col, 80);
|
myTable->setColumnWidth(col, 80);
|
||||||
|
|
||||||
@ -637,7 +601,7 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
|
|||||||
//myTable->setColumnReadOnly(2, true); // VSR: TODO
|
//myTable->setColumnReadOnly(2, true); // VSR: TODO
|
||||||
|
|
||||||
myTable->setEnabled( false );
|
myTable->setEnabled( false );
|
||||||
|
|
||||||
for ( int row = 0; row < myTable->rowCount(); row++ )
|
for ( int row = 0; row < myTable->rowCount(); row++ )
|
||||||
{
|
{
|
||||||
myTable->setItem( row, 0, new QTableWidgetItem( "" ) );
|
myTable->setItem( row, 0, new QTableWidgetItem( "" ) );
|
||||||
@ -650,13 +614,17 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
|
|||||||
myTable->setItem( row, 2, new QTableWidgetItem( "" ) );
|
myTable->setItem( row, 2, new QTableWidgetItem( "" ) );
|
||||||
myTable->item( row, 2 )->setFlags(0);
|
myTable->item( row, 2 )->setFlags(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
connect(mySelectButton, SIGNAL(clicked()), SLOT(SetEditCorners()));
|
connect(myCornerSelectButton, SIGNAL(clicked()), SLOT(SetCurrentSelection()));
|
||||||
|
connect(myMidFaceSelectButton, SIGNAL(clicked()), SLOT(SetCurrentSelection()));
|
||||||
|
connect(myCenterSelectButton, SIGNAL(clicked()), SLOT(SetCurrentSelection()));
|
||||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(SelectionIntoArgument()));
|
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(SelectionIntoArgument()));
|
||||||
connect(myTable, SIGNAL(cellDoubleClicked(int, int)), SLOT(onCellDoubleClicked(int, int)));
|
connect(myTable, SIGNAL(cellDoubleClicked(int, int)), SLOT(onCellDoubleClicked(int, int)));
|
||||||
connect(myTable, SIGNAL(cellChanged (int, int)), SLOT(onCellTextChange(int, int)));
|
connect(myTable, SIGNAL(cellChanged (int, int)), SLOT(onCellTextChange(int, int)));
|
||||||
connect(myCornerNodes, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
|
connect(myCornerNodes, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
|
||||||
|
connect(myMidFaceNodes, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
|
||||||
|
connect(myCenterNode, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
|
||||||
connect(myReverseCB, SIGNAL(stateChanged(int)), SLOT(onReverse(int)));
|
connect(myReverseCB, SIGNAL(stateChanged(int)), SLOT(onReverse(int)));
|
||||||
|
|
||||||
connect(buttonOk, SIGNAL(clicked()), SLOT(ClickOnOk()));
|
connect(buttonOk, SIGNAL(clicked()), SLOT(ClickOnOk()));
|
||||||
@ -668,13 +636,15 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
|
|||||||
connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), SLOT(ClickOnCancel()));
|
connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), SLOT(ClickOnCancel()));
|
||||||
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), SLOT(ClickOnCancel()));
|
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), SLOT(ClickOnCancel()));
|
||||||
|
|
||||||
|
myCurrentLineEdit = myCornerNodes;
|
||||||
|
|
||||||
// set selection mode
|
// set selection mode
|
||||||
SMESH::SetPointRepresentation(true);
|
SMESH::SetPointRepresentation(true);
|
||||||
|
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode( NodeSelection );
|
aViewWindow->SetSelectionMode( NodeSelection );
|
||||||
|
|
||||||
SetEditCorners();
|
SelectionIntoArgument();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -693,37 +663,50 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
|
|||||||
|
|
||||||
std::vector<vtkIdType> anIds;
|
std::vector<vtkIdType> anIds;
|
||||||
|
|
||||||
switch (myType) {
|
switch (myGeomType) {
|
||||||
case QUAD_EDGE:
|
case SMDSEntity_Quad_Edge:
|
||||||
anIds.push_back(myTable->item(0, 0)->text().toInt());
|
anIds.push_back(myTable->item(0, 0)->text().toInt());
|
||||||
anIds.push_back(myTable->item(0, 2)->text().toInt());
|
anIds.push_back(myTable->item(0, 2)->text().toInt());
|
||||||
anIds.push_back(myTable->item(0, 1)->text().toInt());
|
anIds.push_back(myTable->item(0, 1)->text().toInt());
|
||||||
break;
|
break;
|
||||||
case QUAD_TRIANGLE:
|
case SMDSEntity_Quad_Triangle:
|
||||||
case QUAD_QUADRANGLE:
|
case SMDSEntity_Quad_Quadrangle:
|
||||||
case QUAD_TETRAHEDRON:
|
case SMDSEntity_BiQuad_Quadrangle:
|
||||||
case QUAD_PYRAMID:
|
case SMDSEntity_Quad_Tetra:
|
||||||
case QUAD_PENTAHEDRON:
|
case SMDSEntity_Quad_Pyramid:
|
||||||
case QUAD_HEXAHEDRON:
|
case SMDSEntity_Quad_Penta:
|
||||||
|
case SMDSEntity_Quad_Hexa:
|
||||||
|
case SMDSEntity_TriQuad_Hexa:
|
||||||
for ( int row = 0; row < myNbCorners; row++ )
|
for ( int row = 0; row < myNbCorners; row++ )
|
||||||
anIds.push_back(myTable->item(row, 0)->text().toInt());
|
anIds.push_back(myTable->item(row, 0)->text().toInt());
|
||||||
for ( int row = 0; row < myTable->rowCount(); row++ )
|
for ( int row = 0; row < myTable->rowCount(); row++ )
|
||||||
anIds.push_back(myTable->item(row, 1)->text().toInt());
|
anIds.push_back(myTable->item(row, 1)->text().toInt());
|
||||||
|
if ( myNbMidFaceNodes )
|
||||||
|
{
|
||||||
|
QStringList aListId = myMidFaceNodes->text().split(" ", QString::SkipEmptyParts);
|
||||||
|
for (int i = 0; i < aListId.count(); i++)
|
||||||
|
anIds.push_back( aListId[ i ].toInt() );
|
||||||
|
}
|
||||||
|
if ( myNbCenterNodes )
|
||||||
|
{
|
||||||
|
QStringList aListId = myCenterNode->text().split(" ", QString::SkipEmptyParts);
|
||||||
|
anIds.push_back( aListId[ 0 ].toInt() );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ( myReverseCB->isChecked())
|
if ( myReverseCB->isChecked())
|
||||||
SMESH::ReverseConnectivity( anIds, myType );
|
ReverseConnectivity( anIds, myGeomType, /*toReverse=*/true, /*toVtkOrder=*/false );
|
||||||
|
|
||||||
int aNumberOfIds = anIds.size();
|
int aNumberOfIds = anIds.size();
|
||||||
SMESH::long_array_var anArrayOfIdeces = new SMESH::long_array;
|
SMESH::long_array_var anArrayOfIdeces = new SMESH::long_array;
|
||||||
anArrayOfIdeces->length( aNumberOfIds );
|
anArrayOfIdeces->length( aNumberOfIds );
|
||||||
|
|
||||||
for (int i = 0; i < aNumberOfIds; i++)
|
for (int i = 0; i < aNumberOfIds; i++)
|
||||||
anArrayOfIdeces[i] = anIds[ i ];
|
anArrayOfIdeces[i] = anIds[ i ];
|
||||||
|
|
||||||
bool addToGroup = GroupGroups->isChecked();
|
bool addToGroup = GroupGroups->isChecked();
|
||||||
QString aGroupName;
|
QString aGroupName;
|
||||||
|
|
||||||
SMESH::SMESH_GroupBase_var aGroup;
|
SMESH::SMESH_GroupBase_var aGroup;
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
if( addToGroup ) {
|
if( addToGroup ) {
|
||||||
@ -748,27 +731,29 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
|
|||||||
SMESH::ElementType anElementType;
|
SMESH::ElementType anElementType;
|
||||||
long anElemId = -1;
|
long anElemId = -1;
|
||||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
|
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
|
||||||
switch (myType) {
|
switch (myGeomType) {
|
||||||
case QUAD_EDGE:
|
case SMDSEntity_Quad_Edge:
|
||||||
anElementType = SMESH::EDGE;
|
anElementType = SMESH::EDGE;
|
||||||
anElemId = aMeshEditor->AddEdge(anArrayOfIdeces.inout()); break;
|
anElemId = aMeshEditor->AddEdge(anArrayOfIdeces.inout()); break;
|
||||||
case QUAD_TRIANGLE:
|
case SMDSEntity_Quad_Triangle:
|
||||||
case QUAD_QUADRANGLE:
|
case SMDSEntity_Quad_Quadrangle:
|
||||||
|
case SMDSEntity_BiQuad_Quadrangle:
|
||||||
anElementType = SMESH::FACE;
|
anElementType = SMESH::FACE;
|
||||||
anElemId = aMeshEditor->AddFace(anArrayOfIdeces.inout()); break;
|
anElemId = aMeshEditor->AddFace(anArrayOfIdeces.inout()); break;
|
||||||
case QUAD_TETRAHEDRON:
|
case SMDSEntity_Quad_Tetra:
|
||||||
case QUAD_PYRAMID:
|
case SMDSEntity_Quad_Pyramid:
|
||||||
case QUAD_PENTAHEDRON:
|
case SMDSEntity_Quad_Penta:
|
||||||
case QUAD_HEXAHEDRON:
|
case SMDSEntity_Quad_Hexa:
|
||||||
|
case SMDSEntity_TriQuad_Hexa:
|
||||||
anElementType = SMESH::VOLUME;
|
anElementType = SMESH::VOLUME;
|
||||||
anElemId = aMeshEditor->AddVolume(anArrayOfIdeces.inout()); break;
|
anElemId = aMeshEditor->AddVolume(anArrayOfIdeces.inout()); break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
|
if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
|
||||||
SMESH::SMESH_Group_var aGroupUsed;
|
SMESH::SMESH_Group_var aGroupUsed;
|
||||||
if ( aGroup->_is_nil() ) {
|
if ( aGroup->_is_nil() ) {
|
||||||
// create new group
|
// create new group
|
||||||
aGroupUsed = SMESH::AddGroup( myMesh, anElementType, aGroupName );
|
aGroupUsed = SMESH::AddGroup( myMesh, anElementType, aGroupName );
|
||||||
if ( !aGroupUsed->_is_nil() ) {
|
if ( !aGroupUsed->_is_nil() ) {
|
||||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
||||||
@ -787,7 +772,7 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
|
|||||||
else
|
else
|
||||||
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !aGroupUsed->_is_nil() ) {
|
if ( !aGroupUsed->_is_nil() ) {
|
||||||
SMESH::long_array_var anIdList = new SMESH::long_array;
|
SMESH::long_array_var anIdList = new SMESH::long_array;
|
||||||
anIdList->length( 1 );
|
anIdList->length( 1 );
|
||||||
@ -802,9 +787,9 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
|
|||||||
|
|
||||||
mySimulation->SetVisibility(false);
|
mySimulation->SetVisibility(false);
|
||||||
SMESH::UpdateView();
|
SMESH::UpdateView();
|
||||||
|
|
||||||
UpdateTable();
|
UpdateTable();
|
||||||
SetEditCorners();
|
SetCurrentSelection();
|
||||||
|
|
||||||
updateButtons();
|
updateButtons();
|
||||||
|
|
||||||
@ -844,7 +829,7 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnCancel()
|
|||||||
void SMESHGUI_AddQuadraticElementDlg::ClickOnHelp()
|
void SMESHGUI_AddQuadraticElementDlg::ClickOnHelp()
|
||||||
{
|
{
|
||||||
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
|
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
|
||||||
if (app)
|
if (app)
|
||||||
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
|
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
|
||||||
else {
|
else {
|
||||||
QString platform;
|
QString platform;
|
||||||
@ -855,7 +840,7 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnHelp()
|
|||||||
#endif
|
#endif
|
||||||
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
|
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
|
||||||
tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
|
tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
|
||||||
arg(app->resourceMgr()->stringValue("ExternalBrowser",
|
arg(app->resourceMgr()->stringValue("ExternalBrowser",
|
||||||
platform)).
|
platform)).
|
||||||
arg(myHelpFileName));
|
arg(myHelpFileName));
|
||||||
}
|
}
|
||||||
@ -869,7 +854,7 @@ void SMESHGUI_AddQuadraticElementDlg::onTextChange (const QString& theNewText)
|
|||||||
{
|
{
|
||||||
if (myBusy) return;
|
if (myBusy) return;
|
||||||
BusyLocker lock( myBusy );
|
BusyLocker lock( myBusy );
|
||||||
|
|
||||||
mySimulation->SetVisibility(false);
|
mySimulation->SetVisibility(false);
|
||||||
|
|
||||||
// hilight entered nodes
|
// hilight entered nodes
|
||||||
@ -877,9 +862,15 @@ void SMESHGUI_AddQuadraticElementDlg::onTextChange (const QString& theNewText)
|
|||||||
if (myActor)
|
if (myActor)
|
||||||
aMesh = myActor->GetObject()->GetMesh();
|
aMesh = myActor->GetObject()->GetMesh();
|
||||||
|
|
||||||
|
QLineEdit* send = (QLineEdit*)sender();
|
||||||
|
if (send == myCornerNodes ||
|
||||||
|
send == myMidFaceNodes ||
|
||||||
|
send == myCenterNode)
|
||||||
|
myCurrentLineEdit = send;
|
||||||
|
|
||||||
if (aMesh) {
|
if (aMesh) {
|
||||||
TColStd_MapOfInteger newIndices;
|
TColStd_MapOfInteger newIndices;
|
||||||
|
|
||||||
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
|
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
|
||||||
bool allOk = true;
|
bool allOk = true;
|
||||||
for (int i = 0; i < aListId.count(); i++) {
|
for (int i = 0; i < aListId.count(); i++) {
|
||||||
@ -893,15 +884,15 @@ void SMESHGUI_AddQuadraticElementDlg::onTextChange (const QString& theNewText)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
|
mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->highlight( myActor->getIO(), true, true );
|
aViewWindow->highlight( myActor->getIO(), true, true );
|
||||||
|
|
||||||
if ( sender() == myCornerNodes )
|
if ( myCurrentLineEdit == myCornerNodes )
|
||||||
UpdateTable( allOk );
|
UpdateTable( allOk );
|
||||||
}
|
}
|
||||||
|
|
||||||
updateButtons();
|
updateButtons();
|
||||||
displaySimulation();
|
displaySimulation();
|
||||||
}
|
}
|
||||||
@ -914,32 +905,32 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
|
|||||||
{
|
{
|
||||||
if (myBusy) return;
|
if (myBusy) return;
|
||||||
BusyLocker lock( myBusy );
|
BusyLocker lock( myBusy );
|
||||||
|
|
||||||
QString aCurrentEntry = myEntry;
|
QString aCurrentEntry = myEntry;
|
||||||
|
|
||||||
if ( myIsEditCorners )
|
if ( myCurrentLineEdit )
|
||||||
{
|
{
|
||||||
// clear
|
// clear
|
||||||
myActor = 0;
|
myActor = 0;
|
||||||
|
|
||||||
myCornerNodes->setText("");
|
myCurrentLineEdit->setText("");
|
||||||
|
|
||||||
if (!GroupButtons->isEnabled()) // inactive
|
if (!GroupButtons->isEnabled()) // inactive
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mySimulation->SetVisibility(false);
|
mySimulation->SetVisibility(false);
|
||||||
|
|
||||||
// get selected mesh
|
// get selected mesh
|
||||||
SALOME_ListIO aList;
|
SALOME_ListIO aList;
|
||||||
mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
|
mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
|
||||||
|
|
||||||
if (aList.Extent() != 1)
|
if (aList.Extent() != 1)
|
||||||
{
|
{
|
||||||
UpdateTable();
|
UpdateTable();
|
||||||
updateButtons();
|
updateButtons();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle(SALOME_InteractiveObject) anIO = aList.First();
|
Handle(SALOME_InteractiveObject) anIO = aList.First();
|
||||||
myEntry = anIO->getEntry();
|
myEntry = anIO->getEntry();
|
||||||
myMesh = SMESH::GetMeshByIO(anIO);
|
myMesh = SMESH::GetMeshByIO(anIO);
|
||||||
@ -947,24 +938,26 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
|
|||||||
updateButtons();
|
updateButtons();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
myActor = SMESH::FindActorByEntry(anIO->getEntry());
|
myActor = SMESH::FindActorByEntry(anIO->getEntry());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// process groups
|
// process groups
|
||||||
if ( !myMesh->_is_nil() && myEntry != aCurrentEntry ) {
|
if ( !myMesh->_is_nil() && myEntry != aCurrentEntry ) {
|
||||||
SMESH::ElementType anElementType;
|
SMESH::ElementType anElementType;
|
||||||
switch ( myType ) {
|
switch ( myGeomType ) {
|
||||||
case QUAD_EDGE:
|
case SMDSEntity_Quad_Edge:
|
||||||
anElementType = SMESH::EDGE; break;
|
anElementType = SMESH::EDGE; break;
|
||||||
case QUAD_TRIANGLE:
|
case SMDSEntity_Quad_Triangle:
|
||||||
case QUAD_QUADRANGLE:
|
case SMDSEntity_Quad_Quadrangle:
|
||||||
|
case SMDSEntity_BiQuad_Quadrangle:
|
||||||
anElementType = SMESH::FACE; break;
|
anElementType = SMESH::FACE; break;
|
||||||
case QUAD_TETRAHEDRON:
|
case SMDSEntity_Quad_Tetra:
|
||||||
case QUAD_PYRAMID:
|
case SMDSEntity_Quad_Pyramid:
|
||||||
case QUAD_PENTAHEDRON:
|
case SMDSEntity_Quad_Penta:
|
||||||
case QUAD_HEXAHEDRON:
|
case SMDSEntity_Quad_Hexa:
|
||||||
|
case SMDSEntity_TriQuad_Hexa:
|
||||||
anElementType = SMESH::VOLUME; break;
|
anElementType = SMESH::VOLUME; break;
|
||||||
}
|
}
|
||||||
myGroups.clear();
|
myGroups.clear();
|
||||||
@ -982,21 +975,23 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!myActor) {
|
if (!myActor) {
|
||||||
updateButtons();
|
updateButtons();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get selected nodes
|
// get selected nodes
|
||||||
QString aString = "";
|
QString aString = "";
|
||||||
int nbNodes = SMESH::GetNameOfSelectedNodes(mySelector,myActor->getIO(),aString);
|
int nbNodes = SMESH::GetNameOfSelectedNodes(mySelector,myActor->getIO(),aString);
|
||||||
|
|
||||||
if ( myIsEditCorners )
|
if ( myCurrentLineEdit )
|
||||||
{
|
{
|
||||||
myCornerNodes->setText(aString);
|
if ( myCurrentLineEdit != myCenterNode || nbNodes == 1 )
|
||||||
|
myCurrentLineEdit->setText(aString);
|
||||||
UpdateTable();
|
|
||||||
|
if ( myCurrentLineEdit == myCornerNodes )
|
||||||
|
UpdateTable();
|
||||||
}
|
}
|
||||||
else if ( myTable->isEnabled() && nbNodes == 1 )
|
else if ( myTable->isEnabled() && nbNodes == 1 )
|
||||||
{
|
{
|
||||||
@ -1004,7 +999,7 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
|
|||||||
if ( theCol == 1 )
|
if ( theCol == 1 )
|
||||||
myTable->item(theRow, 1)->setText(aString);
|
myTable->item(theRow, 1)->setText(aString);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateButtons();
|
updateButtons();
|
||||||
displaySimulation();
|
displaySimulation();
|
||||||
}
|
}
|
||||||
@ -1018,13 +1013,13 @@ void SMESHGUI_AddQuadraticElementDlg::displaySimulation()
|
|||||||
if ( IsValid() )
|
if ( IsValid() )
|
||||||
{
|
{
|
||||||
SMESH::TElementSimulation::TVTKIds anIds;
|
SMESH::TElementSimulation::TVTKIds anIds;
|
||||||
|
|
||||||
// Collect ids from the dialog
|
// Collect ids from the dialog
|
||||||
int anID;
|
int anID;
|
||||||
bool ok;
|
bool ok;
|
||||||
int aDisplayMode = VTK_SURFACE;
|
int aDisplayMode = VTK_SURFACE;
|
||||||
|
|
||||||
if ( myType == QUAD_EDGE )
|
if ( myGeomType == SMDSEntity_Quad_Edge )
|
||||||
{
|
{
|
||||||
anIds.push_back( myActor->GetObject()->GetNodeVTKId( myTable->item(0, 0)->text().toInt() ) );
|
anIds.push_back( myActor->GetObject()->GetNodeVTKId( myTable->item(0, 0)->text().toInt() ) );
|
||||||
anIds.push_back( myActor->GetObject()->GetNodeVTKId( myTable->item(0, 2)->text().toInt() ) );
|
anIds.push_back( myActor->GetObject()->GetNodeVTKId( myTable->item(0, 2)->text().toInt() ) );
|
||||||
@ -1037,7 +1032,7 @@ void SMESHGUI_AddQuadraticElementDlg::displaySimulation()
|
|||||||
{
|
{
|
||||||
for ( int row = 0; row < myNbCorners; row++ )
|
for ( int row = 0; row < myNbCorners; row++ )
|
||||||
anIds.push_back( myActor->GetObject()->GetNodeVTKId( myTable->item(row, 0)->text().toInt() ) );
|
anIds.push_back( myActor->GetObject()->GetNodeVTKId( myTable->item(row, 0)->text().toInt() ) );
|
||||||
|
|
||||||
for ( int row = 0; row < myTable->rowCount(); row++ )
|
for ( int row = 0; row < myTable->rowCount(); row++ )
|
||||||
{
|
{
|
||||||
anID = myTable->item(row, 1)->text().toInt(&ok);
|
anID = myTable->item(row, 1)->text().toInt(&ok);
|
||||||
@ -1047,9 +1042,20 @@ void SMESHGUI_AddQuadraticElementDlg::displaySimulation()
|
|||||||
}
|
}
|
||||||
anIds.push_back( myActor->GetObject()->GetNodeVTKId(anID) );
|
anIds.push_back( myActor->GetObject()->GetNodeVTKId(anID) );
|
||||||
}
|
}
|
||||||
|
if ( myNbMidFaceNodes )
|
||||||
|
{
|
||||||
|
QStringList aListId = myMidFaceNodes->text().split(" ", QString::SkipEmptyParts);
|
||||||
|
for (int i = 0; i < aListId.count(); i++)
|
||||||
|
anIds.push_back( myActor->GetObject()->GetNodeVTKId( aListId[ i ].toInt() ));
|
||||||
|
}
|
||||||
|
if ( myNbCenterNodes )
|
||||||
|
{
|
||||||
|
QStringList aListId = myCenterNode->text().split(" ", QString::SkipEmptyParts);
|
||||||
|
anIds.push_back( myActor->GetObject()->GetNodeVTKId( aListId[ 0 ].toInt() ));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mySimulation->SetPosition(myActor,myType,anIds,aDisplayMode,myReverseCB->isChecked());
|
mySimulation->SetPosition(myActor,myGeomType,anIds,aDisplayMode,myReverseCB->isChecked());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1059,15 +1065,26 @@ void SMESHGUI_AddQuadraticElementDlg::displaySimulation()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : SetEditCorners()
|
// function : SetCurrentSelection()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_AddQuadraticElementDlg::SetEditCorners()
|
void SMESHGUI_AddQuadraticElementDlg::SetCurrentSelection()
|
||||||
{
|
{
|
||||||
myCornerNodes->setFocus();
|
QPushButton* send = (QPushButton*)sender();
|
||||||
myIsEditCorners = true;
|
myCurrentLineEdit = 0;
|
||||||
SelectionIntoArgument();
|
|
||||||
updateButtons();
|
if (send == myCornerSelectButton)
|
||||||
|
myCurrentLineEdit = myCornerNodes;
|
||||||
|
else if ( send == myMidFaceSelectButton )
|
||||||
|
myCurrentLineEdit = myMidFaceNodes;
|
||||||
|
else if ( send == myCenterSelectButton )
|
||||||
|
myCurrentLineEdit = myCenterNode;
|
||||||
|
|
||||||
|
if ( myCurrentLineEdit )
|
||||||
|
{
|
||||||
|
myCurrentLineEdit->setFocus();
|
||||||
|
SelectionIntoArgument();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -1162,19 +1179,37 @@ bool SMESHGUI_AddQuadraticElementDlg::IsValid()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool ok;
|
bool ok;
|
||||||
|
std::set< int > okIDs;
|
||||||
for ( int row = 0; row < myTable->rowCount(); row++ )
|
for ( int row = 0; row < myTable->rowCount(); row++ )
|
||||||
{
|
{
|
||||||
int anID = myTable->item(row, 1)->text().toInt(&ok);
|
int anID = myTable->item(row, 1)->text().toInt(&ok);
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const SMDS_MeshNode * aNode = aMesh->FindNode(anID);
|
const SMDS_MeshNode * aNode = aMesh->FindNode(anID);
|
||||||
if ( !aNode )
|
if ( !aNode )
|
||||||
return false;
|
return false;
|
||||||
|
okIDs.insert( anID );
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
QStringList aListId;
|
||||||
|
if ( myNbMidFaceNodes )
|
||||||
|
aListId += myMidFaceNodes->text().split(" ", QString::SkipEmptyParts);
|
||||||
|
if ( myNbCenterNodes )
|
||||||
|
aListId += myCenterNode->text().split(" ", QString::SkipEmptyParts);
|
||||||
|
|
||||||
|
for (int i = 0; i < aListId.count(); i++)
|
||||||
|
{
|
||||||
|
int anID = aListId[ i ].toInt(&ok);
|
||||||
|
if ( !ok )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ( !aMesh->FindNode(anID) )
|
||||||
|
return false;
|
||||||
|
okIDs.insert( anID );
|
||||||
|
}
|
||||||
|
|
||||||
|
return okIDs.size() == myTable->rowCount() + myNbMidFaceNodes + myNbCenterNodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -1184,53 +1219,55 @@ bool SMESHGUI_AddQuadraticElementDlg::IsValid()
|
|||||||
void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity )
|
void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity )
|
||||||
{
|
{
|
||||||
QStringList aListCorners = myCornerNodes->text().split(" ", QString::SkipEmptyParts);
|
QStringList aListCorners = myCornerNodes->text().split(" ", QString::SkipEmptyParts);
|
||||||
|
|
||||||
if ( aListCorners.count() == myNbCorners && theConersValidity )
|
if ( aListCorners.count() == myNbCorners && theConersValidity )
|
||||||
{
|
{
|
||||||
myTable->setEnabled( true );
|
myTable->setEnabled( true );
|
||||||
|
|
||||||
// clear the Middle column
|
// clear the Middle column
|
||||||
for ( int row = 0; row < myTable->rowCount(); row++ )
|
for ( int row = 0; row < myTable->rowCount(); row++ )
|
||||||
myTable->item( row, 1 )->setText("");
|
myTable->item( row, 1 )->setText("");
|
||||||
|
|
||||||
int* aFirstColIds;
|
int* aFirstColIds;
|
||||||
int* aLastColIds;
|
int* aLastColIds;
|
||||||
|
|
||||||
switch (myType) {
|
switch (myGeomType) {
|
||||||
case QUAD_EDGE:
|
case SMDSEntity_Quad_Edge:
|
||||||
aFirstColIds = FirstEdgeIds;
|
aFirstColIds = FirstEdgeIds;
|
||||||
aLastColIds = LastEdgeIds;
|
aLastColIds = LastEdgeIds;
|
||||||
break;
|
break;
|
||||||
case QUAD_TRIANGLE:
|
case SMDSEntity_Quad_Triangle:
|
||||||
aFirstColIds = FirstTriangleIds;
|
aFirstColIds = FirstTriangleIds;
|
||||||
aLastColIds = LastTriangleIds;
|
aLastColIds = LastTriangleIds;
|
||||||
break;
|
break;
|
||||||
case QUAD_QUADRANGLE:
|
case SMDSEntity_Quad_Quadrangle:
|
||||||
|
case SMDSEntity_BiQuad_Quadrangle:
|
||||||
aFirstColIds = FirstQuadrangleIds;
|
aFirstColIds = FirstQuadrangleIds;
|
||||||
aLastColIds = LastQuadrangleIds;
|
aLastColIds = LastQuadrangleIds;
|
||||||
break;
|
break;
|
||||||
case QUAD_TETRAHEDRON:
|
case SMDSEntity_Quad_Tetra:
|
||||||
aFirstColIds = FirstTetrahedronIds;
|
aFirstColIds = FirstTetrahedronIds;
|
||||||
aLastColIds = LastTetrahedronIds;
|
aLastColIds = LastTetrahedronIds;
|
||||||
break;
|
break;
|
||||||
case QUAD_PYRAMID:
|
case SMDSEntity_Quad_Pyramid:
|
||||||
aFirstColIds = FirstPyramidIds;
|
aFirstColIds = FirstPyramidIds;
|
||||||
aLastColIds = LastPyramidIds;
|
aLastColIds = LastPyramidIds;
|
||||||
break;
|
break;
|
||||||
case QUAD_PENTAHEDRON:
|
case SMDSEntity_Quad_Penta:
|
||||||
aFirstColIds = FirstPentahedronIds;
|
aFirstColIds = FirstPentahedronIds;
|
||||||
aLastColIds = LastPentahedronIds;
|
aLastColIds = LastPentahedronIds;
|
||||||
break;
|
break;
|
||||||
case QUAD_HEXAHEDRON:
|
case SMDSEntity_Quad_Hexa:
|
||||||
|
case SMDSEntity_TriQuad_Hexa:
|
||||||
aFirstColIds = FirstHexahedronIds;
|
aFirstColIds = FirstHexahedronIds;
|
||||||
aLastColIds = LastHexahedronIds;
|
aLastColIds = LastHexahedronIds;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fill the First and the Last columns
|
// fill the First and the Last columns
|
||||||
for (int i = 0, iEnd = myTable->rowCount(); i < iEnd; i++)
|
for (int i = 0, iEnd = myTable->rowCount(); i < iEnd; i++)
|
||||||
myTable->item( i, 0 )->setText( aListCorners[ aFirstColIds[i] ] );
|
myTable->item( i, 0 )->setText( aListCorners[ aFirstColIds[i] ] );
|
||||||
|
|
||||||
for (int i = 0, iEnd = myTable->rowCount(); i < iEnd; i++)
|
for (int i = 0, iEnd = myTable->rowCount(); i < iEnd; i++)
|
||||||
myTable->item( i, 2 )->setText( aListCorners[ aLastColIds[i] ] );
|
myTable->item( i, 2 )->setText( aListCorners[ aLastColIds[i] ] );
|
||||||
}
|
}
|
||||||
@ -1240,7 +1277,7 @@ void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity )
|
|||||||
for ( int row = 0; row < myTable->rowCount(); row++ )
|
for ( int row = 0; row < myTable->rowCount(); row++ )
|
||||||
for ( int col = 0; col < myTable->columnCount(); col++ )
|
for ( int col = 0; col < myTable->columnCount(); col++ )
|
||||||
if ( QTableWidgetItem* aTWI = myTable->item(row, col) ) aTWI->setText("");
|
if ( QTableWidgetItem* aTWI = myTable->item(row, col) ) aTWI->setText("");
|
||||||
|
|
||||||
myTable->setEnabled( false );
|
myTable->setEnabled( false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1252,7 +1289,7 @@ void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_AddQuadraticElementDlg::onCellDoubleClicked( int theRow, int theCol )
|
void SMESHGUI_AddQuadraticElementDlg::onCellDoubleClicked( int theRow, int theCol )
|
||||||
{
|
{
|
||||||
myIsEditCorners = false;
|
myCurrentLineEdit = 0;
|
||||||
displaySimulation();
|
displaySimulation();
|
||||||
updateButtons();
|
updateButtons();
|
||||||
}
|
}
|
||||||
@ -1264,7 +1301,7 @@ void SMESHGUI_AddQuadraticElementDlg::onCellDoubleClicked( int theRow, int theCo
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_AddQuadraticElementDlg::onCellTextChange(int theRow, int theCol)
|
void SMESHGUI_AddQuadraticElementDlg::onCellTextChange(int theRow, int theCol)
|
||||||
{
|
{
|
||||||
myIsEditCorners = false;
|
myCurrentLineEdit = 0;
|
||||||
displaySimulation();
|
displaySimulation();
|
||||||
updateButtons();
|
updateButtons();
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
// SMESH includes
|
// SMESH includes
|
||||||
#include "SMESH_SMESHGUI.hxx"
|
#include "SMESH_SMESHGUI.hxx"
|
||||||
|
#include "SMDSAbs_ElementType.hxx"
|
||||||
|
|
||||||
// Qt includes
|
// Qt includes
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
@ -38,6 +39,7 @@
|
|||||||
#include CORBA_SERVER_HEADER(SMESH_Mesh)
|
#include CORBA_SERVER_HEADER(SMESH_Mesh)
|
||||||
|
|
||||||
class QComboBox;
|
class QComboBox;
|
||||||
|
class QFrame;
|
||||||
class QGroupBox;
|
class QGroupBox;
|
||||||
class QLabel;
|
class QLabel;
|
||||||
class QLineEdit;
|
class QLineEdit;
|
||||||
@ -55,9 +57,6 @@ namespace SMESH
|
|||||||
struct TElementSimulation;
|
struct TElementSimulation;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum { QUAD_EDGE, QUAD_TRIANGLE, QUAD_QUADRANGLE, QUAD_TETRAHEDRON,
|
|
||||||
QUAD_PYRAMID, QUAD_PENTAHEDRON, QUAD_HEXAHEDRON };
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : SMESHGUI_AddQuadraticElementDlg
|
// class : SMESHGUI_AddQuadraticElementDlg
|
||||||
// purpose :
|
// purpose :
|
||||||
@ -67,7 +66,7 @@ class SMESHGUI_EXPORT SMESHGUI_AddQuadraticElementDlg : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SMESHGUI_AddQuadraticElementDlg( SMESHGUI*, const int );
|
SMESHGUI_AddQuadraticElementDlg( SMESHGUI*, const SMDSAbs_EntityType );
|
||||||
~SMESHGUI_AddQuadraticElementDlg();
|
~SMESHGUI_AddQuadraticElementDlg();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -88,6 +87,8 @@ private:
|
|||||||
SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
|
SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
|
||||||
LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
|
LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
|
||||||
int myNbCorners; /* The required number of corners */
|
int myNbCorners; /* The required number of corners */
|
||||||
|
int myNbMidFaceNodes;
|
||||||
|
int myNbCenterNodes;
|
||||||
bool myBusy;
|
bool myBusy;
|
||||||
SVTK_Selector* mySelector;
|
SVTK_Selector* mySelector;
|
||||||
|
|
||||||
@ -97,15 +98,21 @@ private:
|
|||||||
QString myEntry;
|
QString myEntry;
|
||||||
GrpList myGroups;
|
GrpList myGroups;
|
||||||
|
|
||||||
int myType;
|
SMDSAbs_EntityType myGeomType;
|
||||||
bool myIsEditCorners;
|
QLineEdit* myCurrentLineEdit;
|
||||||
|
|
||||||
QGroupBox* GroupConstructors;
|
QGroupBox* GroupConstructors;
|
||||||
QRadioButton* myRadioButton1;
|
QRadioButton* myRadioButton1;
|
||||||
|
|
||||||
QGroupBox* GroupArguments;
|
QGroupBox* GroupArguments;
|
||||||
|
QPushButton* myCornerSelectButton;
|
||||||
QLineEdit* myCornerNodes;
|
QLineEdit* myCornerNodes;
|
||||||
QPushButton* mySelectButton;
|
QLabel* myMidFaceLabel;
|
||||||
|
QPushButton* myMidFaceSelectButton;
|
||||||
|
QLineEdit* myMidFaceNodes;
|
||||||
|
QLabel* myCenterLabel;
|
||||||
|
QPushButton* myCenterSelectButton;
|
||||||
|
QLineEdit* myCenterNode;
|
||||||
QTableWidget* myTable;
|
QTableWidget* myTable;
|
||||||
QCheckBox* myReverseCB;
|
QCheckBox* myReverseCB;
|
||||||
|
|
||||||
@ -131,7 +138,7 @@ private slots:
|
|||||||
void ClickOnCancel();
|
void ClickOnCancel();
|
||||||
void ClickOnApply();
|
void ClickOnApply();
|
||||||
void ClickOnHelp();
|
void ClickOnHelp();
|
||||||
void SetEditCorners();
|
void SetCurrentSelection();
|
||||||
void SelectionIntoArgument();
|
void SelectionIntoArgument();
|
||||||
void DeactivateActiveDialog();
|
void DeactivateActiveDialog();
|
||||||
void ActivateThisDialog();
|
void ActivateThisDialog();
|
||||||
|
@ -1620,6 +1620,7 @@ static QList<int> geomTypes( const int theType )
|
|||||||
typeIds.append( SMESH::Geom_PYRAMID );
|
typeIds.append( SMESH::Geom_PYRAMID );
|
||||||
typeIds.append( SMESH::Geom_HEXA );
|
typeIds.append( SMESH::Geom_HEXA );
|
||||||
typeIds.append( SMESH::Geom_PENTA );
|
typeIds.append( SMESH::Geom_PENTA );
|
||||||
|
typeIds.append( SMESH::Geom_HEXAGONAL_PRISM );
|
||||||
typeIds.append( SMESH::Geom_POLYHEDRA );
|
typeIds.append( SMESH::Geom_POLYHEDRA );
|
||||||
}
|
}
|
||||||
return typeIds;
|
return typeIds;
|
||||||
|
@ -1122,12 +1122,12 @@ bool SMESHGUI_GroupDlg::onApply()
|
|||||||
case 1: anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B ); break;
|
case 1: anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B ); break;
|
||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
QColor c;
|
QColor c;
|
||||||
int delta;
|
int delta;
|
||||||
SMESH::GetColor("SMESH", "fill_color", c , delta, "0,170,255|-100");
|
SMESH::GetColor("SMESH", "fill_color", c , delta, "0,170,255|-100");
|
||||||
anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B, delta ); break;
|
anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B, delta ); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,7 @@ vtkIdType getCellType( const SMDSAbs_ElementType theType,
|
|||||||
else if ( theNbNodes == 4 ) return VTK_QUAD;
|
else if ( theNbNodes == 4 ) return VTK_QUAD;
|
||||||
else if ( theNbNodes == 6 ) return VTK_QUADRATIC_TRIANGLE;
|
else if ( theNbNodes == 6 ) return VTK_QUADRATIC_TRIANGLE;
|
||||||
else if ( theNbNodes == 8 ) return VTK_QUADRATIC_QUAD;
|
else if ( theNbNodes == 8 ) return VTK_QUADRATIC_QUAD;
|
||||||
|
else if ( theNbNodes == 9 ) return VTK_BIQUADRATIC_QUAD;
|
||||||
else return VTK_EMPTY_CELL;
|
else return VTK_EMPTY_CELL;
|
||||||
|
|
||||||
case SMDSAbs_Volume:
|
case SMDSAbs_Volume:
|
||||||
@ -131,18 +132,11 @@ vtkIdType getCellType( const SMDSAbs_ElementType theType,
|
|||||||
else if ( theNbNodes == 5 ) return VTK_PYRAMID;
|
else if ( theNbNodes == 5 ) return VTK_PYRAMID;
|
||||||
else if ( theNbNodes == 6 ) return VTK_WEDGE;
|
else if ( theNbNodes == 6 ) return VTK_WEDGE;
|
||||||
else if ( theNbNodes == 8 ) return VTK_HEXAHEDRON;
|
else if ( theNbNodes == 8 ) return VTK_HEXAHEDRON;
|
||||||
else if ( theNbNodes == 10 ) {
|
else if ( theNbNodes == 10 ) return VTK_QUADRATIC_TETRA;
|
||||||
return VTK_QUADRATIC_TETRA;
|
else if ( theNbNodes == 20 ) return VTK_QUADRATIC_HEXAHEDRON;
|
||||||
}
|
else if ( theNbNodes == 27 ) return VTK_TRIQUADRATIC_HEXAHEDRON;
|
||||||
else if ( theNbNodes == 20 ) {
|
else if ( theNbNodes == 15 ) return VTK_QUADRATIC_WEDGE;
|
||||||
return VTK_QUADRATIC_HEXAHEDRON;
|
else if ( theNbNodes == 13 ) return VTK_QUADRATIC_PYRAMID;//VTK_CONVEX_POINT_SET;
|
||||||
}
|
|
||||||
else if ( theNbNodes==15 ) {
|
|
||||||
return VTK_QUADRATIC_WEDGE;
|
|
||||||
}
|
|
||||||
else if ( theNbNodes==13 ) {
|
|
||||||
return VTK_CONVEX_POINT_SET;
|
|
||||||
}
|
|
||||||
else return VTK_EMPTY_CELL;
|
else return VTK_EMPTY_CELL;
|
||||||
|
|
||||||
default: return VTK_EMPTY_CELL;
|
default: return VTK_EMPTY_CELL;
|
||||||
|
@ -169,6 +169,8 @@ SMESHGUI_MeshInfo::SMESHGUI_MeshInfo( QWidget* parent )
|
|||||||
QLabel* a3DPriTotal = createField();
|
QLabel* a3DPriTotal = createField();
|
||||||
QLabel* a3DPriLin = createField();
|
QLabel* a3DPriLin = createField();
|
||||||
QLabel* a3DPriQuad = createField();
|
QLabel* a3DPriQuad = createField();
|
||||||
|
QLabel* a3DHexPriLab = new QLabel( tr( "HEX_PRISMS_LAB" ), this );
|
||||||
|
QLabel* a3DHexPriTotal = createField();
|
||||||
QLabel* a3DPolLab = new QLabel( tr( "POLYHEDRONS_LAB" ), this );
|
QLabel* a3DPolLab = new QLabel( tr( "POLYHEDRONS_LAB" ), this );
|
||||||
QLabel* a3DPolTotal = createField();
|
QLabel* a3DPolTotal = createField();
|
||||||
myWidgets[15] << a3DLine;
|
myWidgets[15] << a3DLine;
|
||||||
@ -177,7 +179,8 @@ SMESHGUI_MeshInfo::SMESHGUI_MeshInfo( QWidget* parent )
|
|||||||
myWidgets[18] << a3DHexLab << a3DHexTotal << a3DHexLin << a3DHexQuad;
|
myWidgets[18] << a3DHexLab << a3DHexTotal << a3DHexLin << a3DHexQuad;
|
||||||
myWidgets[19] << a3DPyrLab << a3DPyrTotal << a3DPyrLin << a3DPyrQuad;
|
myWidgets[19] << a3DPyrLab << a3DPyrTotal << a3DPyrLin << a3DPyrQuad;
|
||||||
myWidgets[20] << a3DPriLab << a3DPriTotal << a3DPriLin << a3DPriQuad;
|
myWidgets[20] << a3DPriLab << a3DPriTotal << a3DPriLin << a3DPriQuad;
|
||||||
myWidgets[21] << a3DPolLab << a3DPolTotal;
|
myWidgets[21] << a3DHexPriLab << a3DHexPriTotal;
|
||||||
|
myWidgets[22] << a3DPolLab << a3DPolTotal;
|
||||||
|
|
||||||
setFontAttributes( aNameLab, Bold );
|
setFontAttributes( aNameLab, Bold );
|
||||||
setFontAttributes( aObjLab, Bold );
|
setFontAttributes( aObjLab, Bold );
|
||||||
@ -247,8 +250,10 @@ SMESHGUI_MeshInfo::SMESHGUI_MeshInfo( QWidget* parent )
|
|||||||
l->addWidget( a3DPriTotal, 20, 1 );
|
l->addWidget( a3DPriTotal, 20, 1 );
|
||||||
l->addWidget( a3DPriLin, 20, 2 );
|
l->addWidget( a3DPriLin, 20, 2 );
|
||||||
l->addWidget( a3DPriQuad, 20, 3 );
|
l->addWidget( a3DPriQuad, 20, 3 );
|
||||||
l->addWidget( a3DPolLab, 21, 0 );
|
l->addWidget( a3DHexPriLab, 21, 0 );
|
||||||
l->addWidget( a3DPolTotal, 21, 1 );
|
l->addWidget( a3DHexPriTotal, 21, 1 );
|
||||||
|
l->addWidget( a3DPolLab, 22, 0 );
|
||||||
|
l->addWidget( a3DPolTotal, 22, 1 );
|
||||||
l->setColumnStretch( 0, 0 );
|
l->setColumnStretch( 0, 0 );
|
||||||
l->setColumnStretch( 1, 5 );
|
l->setColumnStretch( 1, 5 );
|
||||||
l->setColumnStretch( 2, 5 );
|
l->setColumnStretch( 2, 5 );
|
||||||
@ -317,9 +322,9 @@ void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
|
|||||||
myWidgets[i1D][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Edge] ) );
|
myWidgets[i1D][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Edge] ) );
|
||||||
myWidgets[i1D][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Edge] ) );
|
myWidgets[i1D][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Edge] ) );
|
||||||
long nbTriangles = info[SMDSEntity_Triangle] + info[SMDSEntity_Quad_Triangle];
|
long nbTriangles = info[SMDSEntity_Triangle] + info[SMDSEntity_Quad_Triangle];
|
||||||
long nbQuadrangles = info[SMDSEntity_Quadrangle] + info[SMDSEntity_Quad_Quadrangle];
|
long nbQuadrangles = info[SMDSEntity_Quadrangle] + info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle];
|
||||||
long nb2DLinear = info[SMDSEntity_Triangle] + info[SMDSEntity_Quadrangle] + info[SMDSEntity_Polygon];
|
long nb2DLinear = info[SMDSEntity_Triangle] + info[SMDSEntity_Quadrangle] + info[SMDSEntity_Polygon];
|
||||||
long nb2DQuadratic = info[SMDSEntity_Quad_Triangle] + info[SMDSEntity_Quad_Quadrangle];
|
long nb2DQuadratic = info[SMDSEntity_Quad_Triangle] + info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle];
|
||||||
myWidgets[i2D][iTotal]->setProperty( "text", QString::number( nb2DLinear + nb2DQuadratic ) );
|
myWidgets[i2D][iTotal]->setProperty( "text", QString::number( nb2DLinear + nb2DQuadratic ) );
|
||||||
myWidgets[i2D][iLinear]->setProperty( "text", QString::number( nb2DLinear ) );
|
myWidgets[i2D][iLinear]->setProperty( "text", QString::number( nb2DLinear ) );
|
||||||
myWidgets[i2D][iQuadratic]->setProperty( "text", QString::number( nb2DQuadratic ) );
|
myWidgets[i2D][iQuadratic]->setProperty( "text", QString::number( nb2DQuadratic ) );
|
||||||
@ -328,14 +333,14 @@ void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
|
|||||||
myWidgets[i2DTriangles][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Triangle] ) );
|
myWidgets[i2DTriangles][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Triangle] ) );
|
||||||
myWidgets[i2DQuadrangles][iTotal]->setProperty( "text", QString::number( nbQuadrangles ) );
|
myWidgets[i2DQuadrangles][iTotal]->setProperty( "text", QString::number( nbQuadrangles ) );
|
||||||
myWidgets[i2DQuadrangles][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Quadrangle] ) );
|
myWidgets[i2DQuadrangles][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Quadrangle] ) );
|
||||||
myWidgets[i2DQuadrangles][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Quadrangle] ) );
|
myWidgets[i2DQuadrangles][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle] ));
|
||||||
myWidgets[i2DPolygons][iTotal]->setProperty( "text", QString::number( info[SMDSEntity_Polygon] ) );
|
myWidgets[i2DPolygons][iTotal]->setProperty( "text", QString::number( info[SMDSEntity_Polygon] ) );
|
||||||
long nbTetrahedrons = info[SMDSEntity_Tetra] + info[SMDSEntity_Quad_Tetra];
|
long nbTetrahedrons = info[SMDSEntity_Tetra] + info[SMDSEntity_Quad_Tetra];
|
||||||
long nbHexahedrons = info[SMDSEntity_Hexa] + info[SMDSEntity_Quad_Hexa];
|
long nbHexahedrons = info[SMDSEntity_Hexa] + info[SMDSEntity_Quad_Hexa] + info[SMDSEntity_TriQuad_Hexa];
|
||||||
long nbPyramids = info[SMDSEntity_Pyramid] + info[SMDSEntity_Quad_Pyramid];
|
long nbPyramids = info[SMDSEntity_Pyramid] + info[SMDSEntity_Quad_Pyramid];
|
||||||
long nbPrisms = info[SMDSEntity_Penta] + info[SMDSEntity_Quad_Penta];
|
long nbPrisms = info[SMDSEntity_Penta] + info[SMDSEntity_Quad_Penta];
|
||||||
long nb3DLinear = info[SMDSEntity_Tetra] + info[SMDSEntity_Hexa] + info[SMDSEntity_Pyramid] + info[SMDSEntity_Penta] + info[SMDSEntity_Polyhedra];
|
long nb3DLinear = info[SMDSEntity_Tetra] + info[SMDSEntity_Hexa] + info[SMDSEntity_Pyramid] + info[SMDSEntity_Penta] + info[SMDSEntity_Polyhedra] + info[SMDSEntity_Hexagonal_Prism];
|
||||||
long nb3DQuadratic = info[SMDSEntity_Quad_Tetra] + info[SMDSEntity_Quad_Hexa] + info[SMDSEntity_Quad_Pyramid] + info[SMDSEntity_Quad_Penta];
|
long nb3DQuadratic = info[SMDSEntity_Quad_Tetra] + info[SMDSEntity_Quad_Hexa] + info[SMDSEntity_TriQuad_Hexa] + info[SMDSEntity_Quad_Pyramid] + info[SMDSEntity_Quad_Penta];
|
||||||
myWidgets[i3D][iTotal]->setProperty( "text", QString::number( nb3DLinear + nb3DQuadratic ) );
|
myWidgets[i3D][iTotal]->setProperty( "text", QString::number( nb3DLinear + nb3DQuadratic ) );
|
||||||
myWidgets[i3D][iLinear]->setProperty( "text", QString::number( nb3DLinear ) );
|
myWidgets[i3D][iLinear]->setProperty( "text", QString::number( nb3DLinear ) );
|
||||||
myWidgets[i3D][iQuadratic]->setProperty( "text", QString::number( nb3DQuadratic ) );
|
myWidgets[i3D][iQuadratic]->setProperty( "text", QString::number( nb3DQuadratic ) );
|
||||||
@ -344,13 +349,14 @@ void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
|
|||||||
myWidgets[i3DTetrahedrons][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Tetra] ) );
|
myWidgets[i3DTetrahedrons][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Tetra] ) );
|
||||||
myWidgets[i3DHexahedrons][iTotal]->setProperty( "text", QString::number( nbHexahedrons ) );
|
myWidgets[i3DHexahedrons][iTotal]->setProperty( "text", QString::number( nbHexahedrons ) );
|
||||||
myWidgets[i3DHexahedrons][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Hexa] ) );
|
myWidgets[i3DHexahedrons][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Hexa] ) );
|
||||||
myWidgets[i3DHexahedrons][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Hexa] ) );
|
myWidgets[i3DHexahedrons][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Hexa] + info[SMDSEntity_TriQuad_Hexa] ) );
|
||||||
myWidgets[i3DPyramids][iTotal]->setProperty( "text", QString::number( nbPyramids ) );
|
myWidgets[i3DPyramids][iTotal]->setProperty( "text", QString::number( nbPyramids ) );
|
||||||
myWidgets[i3DPyramids][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Pyramid] ) );
|
myWidgets[i3DPyramids][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Pyramid] ) );
|
||||||
myWidgets[i3DPyramids][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Pyramid] ) );
|
myWidgets[i3DPyramids][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Pyramid] ) );
|
||||||
myWidgets[i3DPrisms][iTotal]->setProperty( "text", QString::number( nbPrisms ) );
|
myWidgets[i3DPrisms][iTotal]->setProperty( "text", QString::number( nbPrisms ) );
|
||||||
myWidgets[i3DPrisms][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Penta] ) );
|
myWidgets[i3DPrisms][iLinear]->setProperty( "text", QString::number( info[SMDSEntity_Penta] ) );
|
||||||
myWidgets[i3DPrisms][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Penta] ) );
|
myWidgets[i3DPrisms][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Penta] ) );
|
||||||
|
myWidgets[i3DHexaPrisms][iTotal]->setProperty( "text", QString::number( info[SMDSEntity_Hexagonal_Prism] ) );
|
||||||
myWidgets[i3DPolyhedrons][iTotal]->setProperty( "text", QString::number( info[SMDSEntity_Polyhedra] ) );
|
myWidgets[i3DPolyhedrons][iTotal]->setProperty( "text", QString::number( info[SMDSEntity_Polyhedra] ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -392,6 +398,7 @@ void SMESHGUI_MeshInfo::clear()
|
|||||||
myWidgets[i3DPrisms][iTotal]->setProperty( "text", QString::number( 0 ) );
|
myWidgets[i3DPrisms][iTotal]->setProperty( "text", QString::number( 0 ) );
|
||||||
myWidgets[i3DPrisms][iLinear]->setProperty( "text", QString::number( 0 ) );
|
myWidgets[i3DPrisms][iLinear]->setProperty( "text", QString::number( 0 ) );
|
||||||
myWidgets[i3DPrisms][iQuadratic]->setProperty( "text", QString::number( 0 ) );
|
myWidgets[i3DPrisms][iQuadratic]->setProperty( "text", QString::number( 0 ) );
|
||||||
|
myWidgets[i3DHexaPrisms][iTotal]->setProperty( "text", QString::number( 0 ) );
|
||||||
myWidgets[i3DPolyhedrons][iTotal]->setProperty( "text", QString::number( 0 ) );
|
myWidgets[i3DPolyhedrons][iTotal]->setProperty( "text", QString::number( 0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -783,6 +790,7 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
|
|||||||
gtype = tr( "TRIANGLE" ); break;
|
gtype = tr( "TRIANGLE" ); break;
|
||||||
case SMDSEntity_Quadrangle:
|
case SMDSEntity_Quadrangle:
|
||||||
case SMDSEntity_Quad_Quadrangle:
|
case SMDSEntity_Quad_Quadrangle:
|
||||||
|
case SMDSEntity_BiQuad_Quadrangle:
|
||||||
gtype = tr( "QUADRANGLE" ); break;
|
gtype = tr( "QUADRANGLE" ); break;
|
||||||
case SMDSEntity_Polygon:
|
case SMDSEntity_Polygon:
|
||||||
case SMDSEntity_Quad_Polygon:
|
case SMDSEntity_Quad_Polygon:
|
||||||
@ -795,10 +803,13 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
|
|||||||
gtype = tr( "PYRAMID" ); break;
|
gtype = tr( "PYRAMID" ); break;
|
||||||
case SMDSEntity_Hexa:
|
case SMDSEntity_Hexa:
|
||||||
case SMDSEntity_Quad_Hexa:
|
case SMDSEntity_Quad_Hexa:
|
||||||
|
case SMDSEntity_TriQuad_Hexa:
|
||||||
gtype = tr( "HEXAHEDRON" ); break;
|
gtype = tr( "HEXAHEDRON" ); break;
|
||||||
case SMDSEntity_Penta:
|
case SMDSEntity_Penta:
|
||||||
case SMDSEntity_Quad_Penta:
|
case SMDSEntity_Quad_Penta:
|
||||||
gtype = tr( "PRISM" ); break;
|
gtype = tr( "PRISM" ); break;
|
||||||
|
case SMDSEntity_Hexagonal_Prism:
|
||||||
|
gtype = tr( "HEX_PRISM" ); break;
|
||||||
case SMDSEntity_Polyhedra:
|
case SMDSEntity_Polyhedra:
|
||||||
case SMDSEntity_Quad_Polyhedra:
|
case SMDSEntity_Quad_Polyhedra:
|
||||||
gtype = tr( "POLYHEDRON" ); break;
|
gtype = tr( "POLYHEDRON" ); break;
|
||||||
@ -1026,6 +1037,7 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
|
|||||||
gtype = tr( "TRIANGLE" ); break;
|
gtype = tr( "TRIANGLE" ); break;
|
||||||
case SMDSEntity_Quadrangle:
|
case SMDSEntity_Quadrangle:
|
||||||
case SMDSEntity_Quad_Quadrangle:
|
case SMDSEntity_Quad_Quadrangle:
|
||||||
|
case SMDSEntity_BiQuad_Quadrangle:
|
||||||
gtype = tr( "QUADRANGLE" ); break;
|
gtype = tr( "QUADRANGLE" ); break;
|
||||||
case SMDSEntity_Polygon:
|
case SMDSEntity_Polygon:
|
||||||
case SMDSEntity_Quad_Polygon:
|
case SMDSEntity_Quad_Polygon:
|
||||||
@ -1038,10 +1050,13 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
|
|||||||
gtype = tr( "PYRAMID" ); break;
|
gtype = tr( "PYRAMID" ); break;
|
||||||
case SMDSEntity_Hexa:
|
case SMDSEntity_Hexa:
|
||||||
case SMDSEntity_Quad_Hexa:
|
case SMDSEntity_Quad_Hexa:
|
||||||
|
case SMDSEntity_TriQuad_Hexa:
|
||||||
gtype = tr( "HEXAHEDRON" ); break;
|
gtype = tr( "HEXAHEDRON" ); break;
|
||||||
case SMDSEntity_Penta:
|
case SMDSEntity_Penta:
|
||||||
case SMDSEntity_Quad_Penta:
|
case SMDSEntity_Quad_Penta:
|
||||||
gtype = tr( "PRISM" ); break;
|
gtype = tr( "PRISM" ); break;
|
||||||
|
case SMDSEntity_Hexagonal_Prism:
|
||||||
|
gtype = tr( "HEX_PRISM" ); break;
|
||||||
case SMDSEntity_Polyhedra:
|
case SMDSEntity_Polyhedra:
|
||||||
case SMDSEntity_Quad_Polyhedra:
|
case SMDSEntity_Quad_Polyhedra:
|
||||||
gtype = tr( "POLYHEDRON" ); break;
|
gtype = tr( "POLYHEDRON" ); break;
|
||||||
@ -1365,7 +1380,7 @@ void SMESHGUI_AddInfo::meshInfo( SMESH::SMESH_Mesh_ptr mesh, QTreeWidgetItem* pa
|
|||||||
itemSubMeshes = createItem( parent, Bold | All );
|
itemSubMeshes = createItem( parent, Bold | All );
|
||||||
itemSubMeshes->setText( 0, tr( "SUBMESHES" ) );
|
itemSubMeshes->setText( 0, tr( "SUBMESHES" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( smItems.find( smType ) == smItems.end() ) {
|
if ( smItems.find( smType ) == smItems.end() ) {
|
||||||
smItems[ smType ] = createItem( itemSubMeshes, Bold | All );
|
smItems[ smType ] = createItem( itemSubMeshes, Bold | All );
|
||||||
smItems[ smType ]->setText( 0, tr( QString( "SUBMESHES_%1" ).arg( smType ).toLatin1().constData() ) );
|
smItems[ smType ]->setText( 0, tr( QString( "SUBMESHES_%1" ).arg( smType ).toLatin1().constData() ) );
|
||||||
|
@ -80,6 +80,7 @@ class SMESHGUI_EXPORT SMESHGUI_MeshInfo : public QFrame
|
|||||||
i3DHexahedrons,
|
i3DHexahedrons,
|
||||||
i3DPyramids,
|
i3DPyramids,
|
||||||
i3DPrisms,
|
i3DPrisms,
|
||||||
|
i3DHexaPrisms,
|
||||||
i3DPolyhedrons,
|
i3DPolyhedrons,
|
||||||
i3DEnd,
|
i3DEnd,
|
||||||
iElementsEnd = i3DEnd
|
iElementsEnd = i3DEnd
|
||||||
|
@ -143,6 +143,14 @@
|
|||||||
<source>ICON_DLG_NODE</source>
|
<source>ICON_DLG_NODE</source>
|
||||||
<translation>mesh_vertex.png</translation>
|
<translation>mesh_vertex.png</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ICON_DLG_OCTA</source>
|
||||||
|
<translation>mesh_octahedron.png</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ICON_DLG_PENTA</source>
|
||||||
|
<translation>mesh_pentahedron.png</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>ICON_DLG_POLYGON</source>
|
<source>ICON_DLG_POLYGON</source>
|
||||||
<translation>mesh_polygon.png</translation>
|
<translation>mesh_polygon.png</translation>
|
||||||
@ -151,6 +159,10 @@
|
|||||||
<source>ICON_DLG_POLYHEDRON</source>
|
<source>ICON_DLG_POLYHEDRON</source>
|
||||||
<translation>mesh_polyhedron.png</translation>
|
<translation>mesh_polyhedron.png</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ICON_DLG_PYRAMID</source>
|
||||||
|
<translation>mesh_pyramid.png</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>ICON_DLG_QUADRANGLE</source>
|
<source>ICON_DLG_QUADRANGLE</source>
|
||||||
<translation>mesh_quad.png</translation>
|
<translation>mesh_quad.png</translation>
|
||||||
@ -163,6 +175,10 @@
|
|||||||
<source>ICON_DLG_QUADRATIC_HEXAHEDRON</source>
|
<source>ICON_DLG_QUADRATIC_HEXAHEDRON</source>
|
||||||
<translation>mesh_quad_hexahedron.png</translation>
|
<translation>mesh_quad_hexahedron.png</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ICON_DLG_TRIQUADRATIC_HEXAHEDRON</source>
|
||||||
|
<translation>mesh_triquad_hexahedron.png</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>ICON_DLG_QUADRATIC_PENTAHEDRON</source>
|
<source>ICON_DLG_QUADRATIC_PENTAHEDRON</source>
|
||||||
<translation>mesh_quad_pentahedron.png</translation>
|
<translation>mesh_quad_pentahedron.png</translation>
|
||||||
@ -175,6 +191,10 @@
|
|||||||
<source>ICON_DLG_QUADRATIC_QUADRANGLE</source>
|
<source>ICON_DLG_QUADRATIC_QUADRANGLE</source>
|
||||||
<translation>mesh_quad_quadrangle.png</translation>
|
<translation>mesh_quad_quadrangle.png</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ICON_DLG_BIQUADRATIC_QUADRANGLE</source>
|
||||||
|
<translation>mesh_biquad_quadrangle.png</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>ICON_DLG_QUADRATIC_TETRAHEDRON</source>
|
<source>ICON_DLG_QUADRATIC_TETRAHEDRON</source>
|
||||||
<translation>mesh_quad_tetrahedron.png</translation>
|
<translation>mesh_quad_tetrahedron.png</translation>
|
||||||
|
@ -976,13 +976,37 @@ Please enter correct values and try again</translation>
|
|||||||
<translation>"%1" assigned but:
|
<translation>"%1" assigned but:
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_ADD_OCTA</source>
|
||||||
|
<translation>Add hexagonal prism</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_ADD_OCTA_TITLE</source>
|
||||||
|
<translation>Add Hexagonal Prism</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_ADD_POLYGON</source>
|
<source>SMESH_ADD_POLYGON</source>
|
||||||
<translation>Add polygon</translation>
|
<translation>Add polygon</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_ADD_POLYGON_TITLE</source>
|
<source>SMESH_ADD_POLYGON_TITLE</source>
|
||||||
<translation>Add polygon</translation>
|
<translation>Add Polygon</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_ADD_PENTA</source>
|
||||||
|
<translation>Add pentahedron</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_ADD_PENTA_TITLE</source>
|
||||||
|
<translation>Add Pentahedron</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_ADD_PYRAMID</source>
|
||||||
|
<translation>Add pyramid</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_ADD_PYRAMID_TITLE</source>
|
||||||
|
<translation>Add Pyramid</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_ADD_QUADRANGLE</source>
|
<source>SMESH_ADD_QUADRANGLE</source>
|
||||||
@ -1000,6 +1024,10 @@ Please enter correct values and try again</translation>
|
|||||||
<source>SMESH_ADD_QUADRATIC_HEXAHEDRON_TITLE</source>
|
<source>SMESH_ADD_QUADRATIC_HEXAHEDRON_TITLE</source>
|
||||||
<translation>Add Quadratic Hexahedron</translation>
|
<translation>Add Quadratic Hexahedron</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_ADD_TRIQUADRATIC_HEXAHEDRON_TITLE</source>
|
||||||
|
<translation>Add TriQuadratic Hexahedron</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_ADD_QUADRATIC_PENTAHEDRON_TITLE</source>
|
<source>SMESH_ADD_QUADRATIC_PENTAHEDRON_TITLE</source>
|
||||||
<translation>Add Quadratic Pentahedron</translation>
|
<translation>Add Quadratic Pentahedron</translation>
|
||||||
@ -1008,6 +1036,10 @@ Please enter correct values and try again</translation>
|
|||||||
<source>SMESH_ADD_QUADRATIC_PYRAMID_TITLE</source>
|
<source>SMESH_ADD_QUADRATIC_PYRAMID_TITLE</source>
|
||||||
<translation>Add Quadratic Pyramid</translation>
|
<translation>Add Quadratic Pyramid</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_ADD_BIQUADRATIC_QUADRANGLE_TITLE</source>
|
||||||
|
<translation>Add BiQuadratic Quadrangle</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_ADD_QUADRATIC_QUADRANGLE_TITLE</source>
|
<source>SMESH_ADD_QUADRATIC_QUADRANGLE_TITLE</source>
|
||||||
<translation>Add Quadratic Quadrangle</translation>
|
<translation>Add Quadratic Quadrangle</translation>
|
||||||
@ -1388,8 +1420,8 @@ Overwrite the file?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_EXPORT_UNV</source>
|
<source>SMESH_EXPORT_UNV</source>
|
||||||
<translation>During export mesh with name - "%1" to UNV
|
<translation>During export mesh with name "%1" to UNV
|
||||||
pyramid's elements will be missed</translation>
|
pyramids, hexagonal prisms, polygons and polyhedra elements will be missed</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_EXTRUSION</source>
|
<source>SMESH_EXTRUSION</source>
|
||||||
@ -1858,6 +1890,18 @@ Check algorithm documentation for supported geometry</translation>
|
|||||||
<source>SMESH_OPERATION_FAILED</source>
|
<source>SMESH_OPERATION_FAILED</source>
|
||||||
<translation>Operation failed</translation>
|
<translation>Operation failed</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_OCTA</source>
|
||||||
|
<translation>Hexagonal prism</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>TOP_OCTA</source>
|
||||||
|
<translation>Hexagonal prism</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>MEN_OCTA</source>
|
||||||
|
<translation>Hexagonal prism</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_ORIENTATION</source>
|
<source>SMESH_ORIENTATION</source>
|
||||||
<translation>Orientation</translation>
|
<translation>Orientation</translation>
|
||||||
@ -1874,6 +1918,18 @@ Check algorithm documentation for supported geometry</translation>
|
|||||||
<source>SMESH_PARAMETERS</source>
|
<source>SMESH_PARAMETERS</source>
|
||||||
<translation>Parameters</translation>
|
<translation>Parameters</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_PENTA</source>
|
||||||
|
<translation>Pentahedron</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>TOP_PENTA</source>
|
||||||
|
<translation>Pentahedron</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>MEN_PENTA</source>
|
||||||
|
<translation>Pentahedron</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_PLANE</source>
|
<source>SMESH_PLANE</source>
|
||||||
<translation>Plane</translation>
|
<translation>Plane</translation>
|
||||||
@ -1946,6 +2002,14 @@ Check algorithm documentation for supported geometry</translation>
|
|||||||
<source>SMESH_PYRAMID</source>
|
<source>SMESH_PYRAMID</source>
|
||||||
<translation>Pyramid</translation>
|
<translation>Pyramid</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>MEN_PYRAMID</source>
|
||||||
|
<translation>Pyramid</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>TOP_PYRAMID</source>
|
||||||
|
<translation>Pyramid</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_QUADRANGLE</source>
|
<source>SMESH_QUADRANGLE</source>
|
||||||
<translation>Quadrangle</translation>
|
<translation>Quadrangle</translation>
|
||||||
@ -1958,6 +2022,18 @@ Check algorithm documentation for supported geometry</translation>
|
|||||||
<source>SMESH_QUADRATIC_HEXAHEDRON</source>
|
<source>SMESH_QUADRATIC_HEXAHEDRON</source>
|
||||||
<translation>Quadratic Hexahedron</translation>
|
<translation>Quadratic Hexahedron</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_TRIQUADRATIC_HEXAHEDRON</source>
|
||||||
|
<translation>TriQuadratic Hexahedron</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>TOP_TRIQUADRATIC_HEXAHEDRON</source>
|
||||||
|
<translation>TriQuadratic Hexahedron</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>MEN_TRIQUADRATIC_HEXAHEDRON</source>
|
||||||
|
<translation>TriQuadratic Hexahedron</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_QUADRATIC_PENTAHEDRON</source>
|
<source>SMESH_QUADRATIC_PENTAHEDRON</source>
|
||||||
<translation>Quadratic Pentahedron</translation>
|
<translation>Quadratic Pentahedron</translation>
|
||||||
@ -1970,6 +2046,18 @@ Check algorithm documentation for supported geometry</translation>
|
|||||||
<source>SMESH_QUADRATIC_QUADRANGLE</source>
|
<source>SMESH_QUADRATIC_QUADRANGLE</source>
|
||||||
<translation>Quadratic Quadrangle</translation>
|
<translation>Quadratic Quadrangle</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_BIQUADRATIC_QUADRANGLE</source>
|
||||||
|
<translation>BiQuadratic Quadrangle</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>MEN_BIQUADRATIC_QUADRANGLE</source>
|
||||||
|
<translation>BiQuadratic Quadrangle</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>TOP_BIQUADRATIC_QUADRANGLE</source>
|
||||||
|
<translation>BiQuadratic Quadrangle</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_QUADRATIC_TETRAHEDRON</source>
|
<source>SMESH_QUADRATIC_TETRAHEDRON</source>
|
||||||
<translation>Quadratic Tetrahedron</translation>
|
<translation>Quadratic Tetrahedron</translation>
|
||||||
@ -3787,6 +3875,10 @@ Please, create VTK viewer and try again</translation>
|
|||||||
<source>SMESH_ADD_QUADRATIC_HEXAHEDRON</source>
|
<source>SMESH_ADD_QUADRATIC_HEXAHEDRON</source>
|
||||||
<translation>Add Quadratic Hexahedron</translation>
|
<translation>Add Quadratic Hexahedron</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_ADD_TRIQUADRATIC_HEXAHEDRON</source>
|
||||||
|
<translation>Add TriQuadratic Hexahedron</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_ADD_QUADRATIC_PENTAHEDRON</source>
|
<source>SMESH_ADD_QUADRATIC_PENTAHEDRON</source>
|
||||||
<translation>Add Quadratic Pentahedron</translation>
|
<translation>Add Quadratic Pentahedron</translation>
|
||||||
@ -3799,6 +3891,10 @@ Please, create VTK viewer and try again</translation>
|
|||||||
<source>SMESH_ADD_QUADRATIC_QUADRANGLE</source>
|
<source>SMESH_ADD_QUADRATIC_QUADRANGLE</source>
|
||||||
<translation>Add Quadratic Quadrangle</translation>
|
<translation>Add Quadratic Quadrangle</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_ADD_BIQUADRATIC_QUADRANGLE</source>
|
||||||
|
<translation>Add BiQuadratic Quadrangle</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_ADD_QUADRATIC_TETRAHEDRON</source>
|
<source>SMESH_ADD_QUADRATIC_TETRAHEDRON</source>
|
||||||
<translation>Add Quadratic Tetrahedron</translation>
|
<translation>Add Quadratic Tetrahedron</translation>
|
||||||
@ -3811,6 +3907,14 @@ Please, create VTK viewer and try again</translation>
|
|||||||
<source>SMESH_CORNER_NODES</source>
|
<source>SMESH_CORNER_NODES</source>
|
||||||
<translation>Corner Nodes:</translation>
|
<translation>Corner Nodes:</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_MIDFACE_NODES</source>
|
||||||
|
<translation>Mid-face Nodes:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_CENTER_NODE</source>
|
||||||
|
<translation>Center Node:</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_FIRST</source>
|
<source>SMESH_FIRST</source>
|
||||||
<translation>First</translation>
|
<translation>First</translation>
|
||||||
@ -4717,6 +4821,10 @@ Please enter correct value and try again</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>GEOM_TYPE_9</source>
|
<source>GEOM_TYPE_9</source>
|
||||||
|
<translation>Hexagonal prism</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_TYPE_10</source>
|
||||||
<translation>Polyhedra</translation>
|
<translation>Polyhedra</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
@ -5800,6 +5908,10 @@ as they are of improper type:
|
|||||||
<source>PRISMS_LAB</source>
|
<source>PRISMS_LAB</source>
|
||||||
<translation>Prisms:</translation>
|
<translation>Prisms:</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>HEX_PRISMS_LAB</source>
|
||||||
|
<translation>Hexagonal Prisms:</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>POLYHEDRONS_LAB</source>
|
<source>POLYHEDRONS_LAB</source>
|
||||||
<translation>Polyhedrons:</translation>
|
<translation>Polyhedrons:</translation>
|
||||||
@ -5950,6 +6062,10 @@ as they are of improper type:
|
|||||||
<source>PRISM</source>
|
<source>PRISM</source>
|
||||||
<translation>Prism</translation>
|
<translation>Prism</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>HEX_PRISM</source>
|
||||||
|
<translation>Hexagonal Prism</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>POLYHEDRON</source>
|
<source>POLYHEDRON</source>
|
||||||
<translation>Polyhedron</translation>
|
<translation>Polyhedron</translation>
|
||||||
|
@ -660,6 +660,10 @@ CORBA::Long SMESH_MeshEditor_i::AddFace(const SMESH::long_array & IDsOfNodes)
|
|||||||
elem = GetMeshDS()->AddFace(nodes[0], nodes[1], nodes[2], nodes[3],
|
elem = GetMeshDS()->AddFace(nodes[0], nodes[1], nodes[2], nodes[3],
|
||||||
nodes[4], nodes[5], nodes[6], nodes[7]);
|
nodes[4], nodes[5], nodes[6], nodes[7]);
|
||||||
}
|
}
|
||||||
|
else if (NbNodes == 9) {
|
||||||
|
elem = GetMeshDS()->AddFace(nodes[0], nodes[1], nodes[2], nodes[3],
|
||||||
|
nodes[4], nodes[5], nodes[6], nodes[7], nodes[8] );
|
||||||
|
}
|
||||||
else if (NbNodes > 2) {
|
else if (NbNodes > 2) {
|
||||||
elem = GetMeshDS()->AddPolygonalFace(nodes);
|
elem = GetMeshDS()->AddPolygonalFace(nodes);
|
||||||
}
|
}
|
||||||
@ -722,6 +726,9 @@ CORBA::Long SMESH_MeshEditor_i::AddVolume(const SMESH::long_array & IDsOfNodes)
|
|||||||
case 10:elem = GetMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],
|
case 10:elem = GetMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],
|
||||||
n[6],n[7],n[8],n[9]);
|
n[6],n[7],n[8],n[9]);
|
||||||
break;
|
break;
|
||||||
|
case 12:elem = GetMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],
|
||||||
|
n[6],n[7],n[8],n[9],n[10],n[11]);
|
||||||
|
break;
|
||||||
case 13:elem = GetMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],n[6],
|
case 13:elem = GetMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],n[6],
|
||||||
n[7],n[8],n[9],n[10],n[11],n[12]);
|
n[7],n[8],n[9],n[10],n[11],n[12]);
|
||||||
break;
|
break;
|
||||||
@ -732,6 +739,11 @@ CORBA::Long SMESH_MeshEditor_i::AddVolume(const SMESH::long_array & IDsOfNodes)
|
|||||||
n[8],n[9],n[10],n[11],n[12],n[13],n[14],
|
n[8],n[9],n[10],n[11],n[12],n[13],n[14],
|
||||||
n[15],n[16],n[17],n[18],n[19]);
|
n[15],n[16],n[17],n[18],n[19]);
|
||||||
break;
|
break;
|
||||||
|
case 27:elem = GetMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],
|
||||||
|
n[8],n[9],n[10],n[11],n[12],n[13],n[14],
|
||||||
|
n[15],n[16],n[17],n[18],n[19],
|
||||||
|
n[20],n[21],n[22],n[23],n[24],n[25],n[26]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update Python script
|
// Update Python script
|
||||||
|
Loading…
Reference in New Issue
Block a user