mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 18:30:35 +05:00
PAL13460 (PAL EDF 301 force the mesh to go through a point)
get only unique nodes of SMDS_PolyhedralVolumeOfNodes
This commit is contained in:
parent
02e939b150
commit
abbf577ef8
@ -29,6 +29,7 @@
|
|||||||
#include "SMESH_ActorUtils.h"
|
#include "SMESH_ActorUtils.h"
|
||||||
|
|
||||||
#include "SMDS_Mesh.hxx"
|
#include "SMDS_Mesh.hxx"
|
||||||
|
#include "SMDS_PolyhedralVolumeOfNodes.hxx"
|
||||||
#include "SMESH_Actor.h"
|
#include "SMESH_Actor.h"
|
||||||
#include "SMESH_ControlsDef.hxx"
|
#include "SMESH_ControlsDef.hxx"
|
||||||
#include "SalomeApp_Application.h"
|
#include "SalomeApp_Application.h"
|
||||||
@ -346,14 +347,19 @@ void SMESH_VisualObjDef::buildElemPrs()
|
|||||||
switch(aType){
|
switch(aType){
|
||||||
case SMDSAbs_Volume:{
|
case SMDSAbs_Volume:{
|
||||||
std::vector<int> aConnectivities;
|
std::vector<int> aConnectivities;
|
||||||
GetConnect(aNodesIter,aConnect);
|
|
||||||
// Convertions connectivities from SMDS to VTK
|
// Convertions connectivities from SMDS to VTK
|
||||||
if (anElem->IsPoly() && aNbNodes > 3) { // POLYEDRE
|
if (anElem->IsPoly() && aNbNodes > 3) { // POLYEDRE
|
||||||
for (int k = 0; k < aNbNodes; k++) {
|
|
||||||
aConnectivities.push_back(k);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (aNbNodes == 4) {
|
if ( const SMDS_PolyhedralVolumeOfNodes* ph =
|
||||||
|
dynamic_cast<const SMDS_PolyhedralVolumeOfNodes*> (anElem))
|
||||||
|
{
|
||||||
|
aNbNodes = GetConnect(ph->uniqueNodesIterator(),aConnect);
|
||||||
|
anIdList->SetNumberOfIds( aNbNodes );
|
||||||
|
}
|
||||||
|
for (int k = 0; k < aNbNodes; k++)
|
||||||
|
aConnectivities.push_back(k);
|
||||||
|
|
||||||
|
} else if (aNbNodes == 4) {
|
||||||
static int anIds[] = {0,2,1,3};
|
static int anIds[] = {0,2,1,3};
|
||||||
for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
|
for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
|
||||||
|
|
||||||
@ -395,6 +401,9 @@ void SMESH_VisualObjDef::buildElemPrs()
|
|||||||
else {
|
else {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( aConnect.empty() )
|
||||||
|
GetConnect(aNodesIter,aConnect);
|
||||||
|
|
||||||
if (aConnectivities.size() > 0) {
|
if (aConnectivities.size() > 0) {
|
||||||
for (vtkIdType aNodeId = 0; aNodeId < aNbNodes; aNodeId++)
|
for (vtkIdType aNodeId = 0; aNodeId < aNbNodes; aNodeId++)
|
||||||
SetId(anIdList,mySMDS2VTKNodes,aConnect,aNodeId,aConnectivities[aNodeId]);
|
SetId(anIdList,mySMDS2VTKNodes,aConnect,aNodeId,aConnectivities[aNodeId]);
|
||||||
|
Loading…
Reference in New Issue
Block a user