mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 17:00:34 +05:00
bos #24052 [CEA 24050] Body Fitting with shared faces
+ fix merging polyhedra
This commit is contained in:
parent
3dd9e6ddb3
commit
e9ce775931
@ -6959,9 +6959,19 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes,
|
|||||||
|
|
||||||
for ( size_t i = 0; i < newElemDefs.size(); ++i )
|
for ( size_t i = 0; i < newElemDefs.size(); ++i )
|
||||||
{
|
{
|
||||||
if ( i > 0 || !mesh->ChangeElementNodes( elem,
|
bool elemChanged = false;
|
||||||
& newElemDefs[i].myNodes[0],
|
if ( i == 0 )
|
||||||
newElemDefs[i].myNodes.size() ))
|
{
|
||||||
|
if ( elem->GetGeomType() == SMDSGeom_POLYHEDRA )
|
||||||
|
elemChanged = mesh->ChangePolyhedronNodes( elem,
|
||||||
|
newElemDefs[i].myNodes,
|
||||||
|
newElemDefs[i].myPolyhedQuantities );
|
||||||
|
else
|
||||||
|
elemChanged = mesh->ChangeElementNodes( elem,
|
||||||
|
& newElemDefs[i].myNodes[0],
|
||||||
|
newElemDefs[i].myNodes.size() );
|
||||||
|
}
|
||||||
|
if ( i > 0 || !elemChanged )
|
||||||
{
|
{
|
||||||
if ( i == 0 )
|
if ( i == 0 )
|
||||||
{
|
{
|
||||||
@ -7128,6 +7138,7 @@ bool SMESH_MeshEditor::applyMerge( const SMDS_MeshElement* elem,
|
|||||||
// each face has to be analyzed in order to check volume validity
|
// each face has to be analyzed in order to check volume validity
|
||||||
if ( const SMDS_MeshVolume* aPolyedre = SMDS_Mesh::DownCast< SMDS_MeshVolume >( elem ))
|
if ( const SMDS_MeshVolume* aPolyedre = SMDS_Mesh::DownCast< SMDS_MeshVolume >( elem ))
|
||||||
{
|
{
|
||||||
|
toRemove = false;
|
||||||
int nbFaces = aPolyedre->NbFaces();
|
int nbFaces = aPolyedre->NbFaces();
|
||||||
|
|
||||||
vector<const SMDS_MeshNode *>& poly_nodes = newElemDefs[0].myNodes;
|
vector<const SMDS_MeshNode *>& poly_nodes = newElemDefs[0].myNodes;
|
||||||
|
@ -256,14 +256,14 @@ bool SMESHDS_Mesh
|
|||||||
{
|
{
|
||||||
ASSERT(nodes.size() > 3);
|
ASSERT(nodes.size() > 3);
|
||||||
|
|
||||||
|
size_t i, len = nodes.size();
|
||||||
|
std::vector<smIdType> nodes_ids( len );
|
||||||
|
for ( i = 0; i < len; i++ )
|
||||||
|
nodes_ids[i] = nodes[i]->GetID();
|
||||||
|
|
||||||
if ( !SMDS_Mesh::ChangePolyhedronNodes( elem, nodes, quantities ))
|
if ( !SMDS_Mesh::ChangePolyhedronNodes( elem, nodes, quantities ))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
smIdType i, len = nodes.size();
|
|
||||||
std::vector<smIdType> nodes_ids (len);
|
|
||||||
for (i = 0; i < len; i++) {
|
|
||||||
nodes_ids[i] = nodes[i]->GetID();
|
|
||||||
}
|
|
||||||
myScript->ChangePolyhedronNodes(elem->GetID(), nodes_ids, quantities);
|
myScript->ChangePolyhedronNodes(elem->GetID(), nodes_ids, quantities);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user