else if ( OSD_File( aLogFileName ).Size() > 0 )
{
// get problem description from the log file
- _Ghs2smdsConvertor conv( aNodeByGhs3dId );
+ _Ghs2smdsConvertor conv( aNodeByGhs3dId, proxyMesh );
storeErrorDescription( aLogFileName, conv );
}
else
else if ( OSD_File( aLogFileName ).Size() > 0 )
{
// get problem description from the log file
- _Ghs2smdsConvertor conv( aNodeByGhs3dId );
+ _Ghs2smdsConvertor conv( aNodeByGhs3dId, proxyMesh );
storeErrorDescription( aLogFileName, conv );
}
else {
*/
//================================================================================
-_Ghs2smdsConvertor::_Ghs2smdsConvertor( const map <int,const SMDS_MeshNode*> & ghs2NodeMap)
- :_ghs2NodeMap( & ghs2NodeMap ), _nodeByGhsId( 0 )
+_Ghs2smdsConvertor::_Ghs2smdsConvertor( const map <int,const SMDS_MeshNode*> & ghs2NodeMap,
+ SMESH_ProxyMesh::Ptr mesh)
+ :_ghs2NodeMap( & ghs2NodeMap ), _nodeByGhsId( 0 ), _mesh( mesh )
{
}
*/
//================================================================================
-_Ghs2smdsConvertor::_Ghs2smdsConvertor( const vector <const SMDS_MeshNode*> & nodeByGhsId)
- : _ghs2NodeMap( 0 ), _nodeByGhsId( &nodeByGhsId )
+_Ghs2smdsConvertor::_Ghs2smdsConvertor( const vector <const SMDS_MeshNode*> & nodeByGhsId,
+ SMESH_ProxyMesh::Ptr mesh)
+ : _ghs2NodeMap( 0 ), _nodeByGhsId( &nodeByGhsId ), _mesh( mesh )
{
}
if ( nbNodes == 2 ) {
const SMDS_MeshElement* edge= SMDS_Mesh::FindEdge( nodes[0], nodes[1] );
- if ( !edge )
+ if ( !edge || edge->GetID() < 1 || _mesh->IsTemporary( edge ))
edge = new SMDS_LinearEdge( nodes[0], nodes[1] );
return edge;
}
if ( nbNodes == 3 ) {
const SMDS_MeshElement* face = SMDS_Mesh::FindFace( nodes );
- if ( !face )
+ if ( !face || face->GetID() < 1 || _mesh->IsTemporary( face ))
face = new SMDS_FaceOfNodes( nodes[0], nodes[1], nodes[2] );
return face;
}
#ifndef _GHS3DPlugin_GHS3D_HXX_
#define _GHS3DPlugin_GHS3D_HXX_
-#include "SMESH_Algo.hxx"
-#include "SMESH_Gen.hxx"
-#include "SMESH_Gen_i.hxx"
+#include <SMESH_Algo.hxx>
+#include <SMESH_Gen.hxx>
+#include <SMESH_Gen_i.hxx>
+#include <SMESH_ProxyMesh.hxx>
#include <map>
#include <vector>
{
const std::map <int,const SMDS_MeshNode*> * _ghs2NodeMap;
const std::vector <const SMDS_MeshNode*> * _nodeByGhsId;
+ SMESH_ProxyMesh::Ptr _mesh;
public:
- _Ghs2smdsConvertor( const std::map <int,const SMDS_MeshNode*> & ghs2NodeMap);
+ _Ghs2smdsConvertor( const std::map <int,const SMDS_MeshNode*> & ghs2NodeMap,
+ SMESH_ProxyMesh::Ptr mesh);
- _Ghs2smdsConvertor( const std::vector <const SMDS_MeshNode*> & nodeByGhsId);
+ _Ghs2smdsConvertor( const std::vector <const SMDS_MeshNode*> & nodeByGhsId,
+ SMESH_ProxyMesh::Ptr mesh);
const SMDS_MeshElement* getElement(const std::vector<int>& ghsNodes) const;
};