fix some error. Build complete

This commit is contained in:
Viktor UZLOV 2021-02-11 11:11:25 +03:00
parent a9c899c3a0
commit 6b9f5b0da6
5 changed files with 20 additions and 17 deletions

View File

@ -34,6 +34,7 @@
#include "SMESHDS_Mesh.hxx"
#include "SMESH_MeshAlgos.hxx"
#include "SMESH_OctreeNode.hxx"
#include "SMESH_Comment.hxx"
#include <GEOMUtils.hxx>
#include <Basics_Utils.hxx>
@ -3295,39 +3296,39 @@ void RangeOfIds::GetRangeStr( TCollection_AsciiString& theResStr )
smIdType aMinId = myMin[i];
smIdType aMaxId = myMax[i];
TCollection_AsciiString aStr;
SMESH_Comment aStr;
if ( aMinId != IntegerFirst() )
aStr += FromIdType<int>(aMinId);
aStr << aMinId;
aStr += "-";
if ( aMaxId != IntegerLast() )
aStr += FromIdType<int>(aMaxId);
if ( aMaxId != std::numeric_limits<smIdType>::max() )
aStr << aMaxId;
// find position of the string in result sequence and insert string in it
if ( anIntSeq.Length() == 0 )
{
anIntSeq.Append( aMinId );
aStrSeq.Append( aStr );
aStrSeq.Append( (const char*)aStr );
}
else
{
if ( aMinId < anIntSeq.First() )
{
anIntSeq.Prepend( aMinId );
aStrSeq.Prepend( aStr );
aStrSeq.Prepend( (const char*)aStr );
}
else if ( aMinId > anIntSeq.Last() )
{
anIntSeq.Append( aMinId );
aStrSeq.Append( aStr );
aStrSeq.Append( (const char*)aStr );
}
else
for ( int j = 1, k = anIntSeq.Length(); j <= k; j++ )
if ( aMinId < anIntSeq( j ) )
{
anIntSeq.InsertBefore( j, aMinId );
aStrSeq.InsertBefore( j, aStr );
aStrSeq.InsertBefore( j, (const char*)aStr );
break;
}
}

View File

@ -978,14 +978,14 @@ namespace
{
if (( myOri = ( n1->GetID() < n2->GetID() )))
{
first = FromIdType<int>(n1->GetID());
second = FromIdType<int>(n2->GetID());
first = n1->GetID();
second = n2->GetID();
}
else
{
myOri = -1;
first = FromIdType<int>(n2->GetID());
second = FromIdType<int>(n1->GetID());
first = n2->GetID();
second = n1->GetID();
}
myOri *= ori;
}
@ -2210,7 +2210,7 @@ const SMDS_MeshVolume* SMDS_VolumeTool::Element() const
//purpose : return element ID
//=======================================================================
int SMDS_VolumeTool::ID() const
smIdType SMDS_VolumeTool::ID() const
{
return myVolume ? FromIdType<int>(myVolume->GetID()) : 0;
return myVolume ? myVolume->GetID() : 0;
}

View File

@ -31,6 +31,8 @@
#include "SMESH_SMDS.hxx"
#include <smIdType.hxx>
class SMDS_MeshElement;
class SMDS_MeshNode;
class SMDS_MeshVolume;
@ -72,7 +74,7 @@ class SMDS_EXPORT SMDS_VolumeTool
const SMDS_MeshVolume* Element() const;
// return element
int ID() const;
smIdType ID() const;
// return element ID
bool IsPoly() const { return myPolyedre; }

View File

@ -154,7 +154,7 @@ bool SMESHDS_GroupBase::Contains (const smIdType theID)
bool SMESHDS_GroupBase::Contains (const SMDS_MeshElement* elem)
{
if ( elem )
return Contains( FromIdType<int>(elem->GetID()) );
return Contains( elem->GetID() );
return false;
}

View File

@ -992,7 +992,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::displaySimulation()
SMESH::TPolySimulation::TVTKIds aVTKIds_faces;
while( anIter->more() )
if ( const SMDS_MeshNode* aNode = (SMDS_MeshNode*)anIter->next() ){
vtkIdType aId = myActor->GetObject()->GetNodeVTKId( FromIdType<int>(aNode->GetID()) );
vtkIdType aId = myActor->GetObject()->GetNodeVTKId( aNode->GetID() );
aVTKIds.push_back(aId);
aVTKIds_faces.push_back(aId);
}