mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-30 19:30:35 +05:00
NPAL16132 (GHS3D execution failed in Salome version 4.0.0)
make each node in volume has it's own position but not set volume ID to static originSpacePosition()
This commit is contained in:
parent
105d08dcbf
commit
362e7633ec
@ -32,7 +32,9 @@
|
||||
#include "SMDS_VertexPosition.hxx"
|
||||
#include "SMDS_EdgePosition.hxx"
|
||||
#include "SMDS_FacePosition.hxx"
|
||||
#include "SMDS_SpacePosition.hxx"
|
||||
#include "SMESHDS_GroupOnGeom.hxx"
|
||||
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
@ -850,6 +852,22 @@ bool SMESHDS_Mesh::add(const SMDS_MeshElement* elem, SMESHDS_SubMesh* subMesh )
|
||||
return false;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Creates a node position in volume
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
inline SMDS_PositionPtr volumePosition(int volId)
|
||||
{
|
||||
SMDS_SpacePosition* pos = new SMDS_SpacePosition();
|
||||
pos->SetShapeId( volId );
|
||||
return SMDS_PositionPtr(pos);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetNodeOnVolume
|
||||
//purpose :
|
||||
@ -858,7 +876,7 @@ void SMESHDS_Mesh::SetNodeInVolume(SMDS_MeshNode * aNode,
|
||||
const TopoDS_Shell & S)
|
||||
{
|
||||
if ( add( aNode, getSubmesh(S) ))
|
||||
const_cast<SMDS_Position*>( aNode->GetPosition().get() )->SetShapeId( myCurSubID );
|
||||
aNode->SetPosition ( volumePosition( myCurSubID ));
|
||||
}
|
||||
//=======================================================================
|
||||
//function : SetNodeOnVolume
|
||||
@ -868,7 +886,7 @@ void SMESHDS_Mesh::SetNodeInVolume(SMDS_MeshNode * aNode,
|
||||
const TopoDS_Solid & S)
|
||||
{
|
||||
if ( add( aNode, getSubmesh(S) ))
|
||||
const_cast<SMDS_Position*>( aNode->GetPosition().get() )->SetShapeId( myCurSubID );
|
||||
aNode->SetPosition ( volumePosition( myCurSubID ));
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -1154,7 +1172,7 @@ int SMESHDS_Mesh::ShapeToIndex(const TopoDS_Shape & S) const
|
||||
void SMESHDS_Mesh::SetNodeInVolume(const SMDS_MeshNode* aNode, int Index)
|
||||
{
|
||||
if ( add( aNode, getSubmesh( Index )))
|
||||
const_cast<SMDS_Position*>( aNode->GetPosition().get() )->SetShapeId( Index );
|
||||
((SMDS_MeshNode*) aNode)->SetPosition( volumePosition( Index ));
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user