mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 09:20:34 +05:00
bos #24194: EDF - SplitHexahedraIntoPrisms
This commit is contained in:
parent
21b39b9997
commit
aae0e72c35
@ -1808,17 +1808,17 @@ namespace
|
|||||||
TSplitMethod( int nbTet=0, const int* conn=0, bool addNode=false)
|
TSplitMethod( int nbTet=0, const int* conn=0, bool addNode=false)
|
||||||
: _nbSplits(nbTet), _nbCorners(4), _connectivity(conn), _baryNode(addNode), _ownConn(false) {}
|
: _nbSplits(nbTet), _nbCorners(4), _connectivity(conn), _baryNode(addNode), _ownConn(false) {}
|
||||||
~TSplitMethod() { if ( _ownConn ) delete [] _connectivity; _connectivity = 0; }
|
~TSplitMethod() { if ( _ownConn ) delete [] _connectivity; _connectivity = 0; }
|
||||||
TSplitMethod(const TSplitMethod &splitMethod)
|
TSplitMethod(const TSplitMethod &splitMethod)
|
||||||
: _nbSplits(splitMethod._nbSplits),
|
: _nbSplits(splitMethod._nbSplits),
|
||||||
_nbCorners(splitMethod._nbCorners),
|
_nbCorners(splitMethod._nbCorners),
|
||||||
_baryNode(splitMethod._baryNode),
|
_baryNode(splitMethod._baryNode),
|
||||||
_ownConn(splitMethod._ownConn),
|
_ownConn(splitMethod._ownConn),
|
||||||
_faceBaryNode(splitMethod._faceBaryNode)
|
_faceBaryNode(splitMethod._faceBaryNode)
|
||||||
{
|
{
|
||||||
_connectivity = splitMethod._connectivity;
|
_connectivity = splitMethod._connectivity;
|
||||||
const_cast<TSplitMethod&>(splitMethod)._connectivity = nullptr;
|
const_cast<TSplitMethod&>(splitMethod)._connectivity = nullptr;
|
||||||
const_cast<TSplitMethod&>(splitMethod)._ownConn = false;
|
const_cast<TSplitMethod&>(splitMethod)._ownConn = false;
|
||||||
}
|
}
|
||||||
bool hasFacet( const TTriangleFacet& facet ) const
|
bool hasFacet( const TTriangleFacet& facet ) const
|
||||||
{
|
{
|
||||||
if ( _nbCorners == 4 )
|
if ( _nbCorners == 4 )
|
||||||
@ -2069,6 +2069,8 @@ namespace
|
|||||||
const int methodFlags,
|
const int methodFlags,
|
||||||
const int facetToSplit)
|
const int facetToSplit)
|
||||||
{
|
{
|
||||||
|
TSplitMethod method;
|
||||||
|
|
||||||
// order of facets in HEX according to SMDS_VolumeTool::Hexa_F :
|
// order of facets in HEX according to SMDS_VolumeTool::Hexa_F :
|
||||||
// B, T, L, B, R, F
|
// B, T, L, B, R, F
|
||||||
const int iF = ( facetToSplit < 2 ) ? 0 : 1 + ( facetToSplit-2 ) % 2; // [0,1,2]
|
const int iF = ( facetToSplit < 2 ) ? 0 : 1 + ( facetToSplit-2 ) % 2; // [0,1,2]
|
||||||
@ -2099,12 +2101,12 @@ namespace
|
|||||||
to4methods[iF]._nbSplits = 4;
|
to4methods[iF]._nbSplits = 4;
|
||||||
to4methods[iF]._nbCorners = 6;
|
to4methods[iF]._nbCorners = 6;
|
||||||
}
|
}
|
||||||
return to4methods[iF];
|
method = to4methods[iF];
|
||||||
|
to4methods[iF]._connectivity = method._connectivity; // as copy ctor resets _connectivity
|
||||||
|
return method;
|
||||||
}
|
}
|
||||||
// else if ( methodFlags == HEXA_TO_2_PRISMS )
|
// else if ( methodFlags == HEXA_TO_2_PRISMS )
|
||||||
|
|
||||||
TSplitMethod method;
|
|
||||||
|
|
||||||
const int iQ = vol.Element()->IsQuadratic() ? 2 : 1;
|
const int iQ = vol.Element()->IsQuadratic() ? 2 : 1;
|
||||||
|
|
||||||
const int nbVariants = 2, nbSplits = 2;
|
const int nbVariants = 2, nbSplits = 2;
|
||||||
@ -2276,7 +2278,7 @@ void SMESH_MeshEditor::SplitVolumes (const TFacetOfElem & theElems,
|
|||||||
TSplitMethod splitMethod = ( facetToSplit < 0 ?
|
TSplitMethod splitMethod = ( facetToSplit < 0 ?
|
||||||
getTetraSplitMethod( volTool, theMethodFlags ) :
|
getTetraSplitMethod( volTool, theMethodFlags ) :
|
||||||
getPrismSplitMethod( volTool, theMethodFlags, facetToSplit ));
|
getPrismSplitMethod( volTool, theMethodFlags, facetToSplit ));
|
||||||
if ( splitMethod._nbSplits < 1 ) continue;
|
if ( splitMethod._nbSplits < 1 ) continue;
|
||||||
|
|
||||||
// find submesh to add new tetras to
|
// find submesh to add new tetras to
|
||||||
if ( !subMesh || !subMesh->Contains( elem ))
|
if ( !subMesh || !subMesh->Contains( elem ))
|
||||||
|
@ -354,6 +354,22 @@ Consider creating another hypothesis instead of using this one for this mesh/sub
|
|||||||
<source>SMESH_IMPORT_SOURCE_2D_TITLE</source>
|
<source>SMESH_IMPORT_SOURCE_2D_TITLE</source>
|
||||||
<translation>Hypothesis Construction</translation>
|
<translation>Hypothesis Construction</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_PROJECTION_SOURCE_2D_HYPOTHESIS</source>
|
||||||
|
<translation>Source faces</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_PROJECTION_SOURCE_2D_TITLE</source>
|
||||||
|
<translation>Hypothesis Construction</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_PROJECTION_SOURCE_1D_HYPOTHESIS</source>
|
||||||
|
<translation>Source edges</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_PROJECTION_SOURCE_1D_TITLE</source>
|
||||||
|
<translation>Hypothesis Construction</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_REMOVE_ROW</source>
|
<source>SMESH_REMOVE_ROW</source>
|
||||||
<translation>Remove row</translation>
|
<translation>Remove row</translation>
|
||||||
|
Loading…
Reference in New Issue
Block a user