// function : getNodesFromElems
// purpose : Retrieve nodes from elements
//=================================================================================
-static int getNodesFromElems( SMESH::long_array_var& theElemIds,
+static int getNodesFromElems( SMESH::smIdType_array_var& theElemIds,
const SMDS_Mesh* theMesh,
std::list<const SMDS_MeshElement*>& theResList )
{
set<const SMDS_MeshElement*> aNodeSet;
- for ( CORBA::Long i = 0, n = theElemIds->length(); i < n; i++ )
+ for ( SMESH::smIdType i = 0, n = theElemIds->length(); i < n; i++ )
{
const SMDS_MeshElement* anElem = theMesh->FindElement( theElemIds[ i ] );
if ( anElem != 0 )
// purpose : Get std::list<const SMDS_MeshElement*> from list of IDs
//=================================================================================
static int getPointers( const SMDSAbs_ElementType theRequestType,
- SMESH::long_array_var& theElemIds,
+ SMESH::smIdType_array_var& theElemIds,
const SMDS_Mesh* theMesh,
std::list<const SMDS_MeshElement*>& theResList )
{
- for ( CORBA::Long i = 0, n = theElemIds->length(); i < n; i++ )
+ for ( SMESH::smIdType i = 0, n = theElemIds->length(); i < n; i++ )
{
const SMDS_MeshElement* anElem = theRequestType == SMDSAbs_Node
? theMesh->FindNode( theElemIds[ i ] ) : theMesh->FindElement( theElemIds[ i ] );
if ( aGrpType != theType && theType != SMDSAbs_Node )
return 0;
- SMESH::long_array_var anIds = myGroupServer->GetListOfID();
+ SMESH::smIdType_array_var anIds = myGroupServer->GetListOfID();
if ( anIds->length() == 0 )
return 0;
case SMDSAbs_Face:
case SMDSAbs_Volume:
{
- SMESH::long_array_var anIds =
+ SMESH::smIdType_array_var anIds =
mySubMeshServer->GetElementsByType( SMESH::ElementType(theType) );
return anIds->length();
}
{
if ( theType == SMDSAbs_Node )
{
- SMESH::long_array_var anIds = mySubMeshServer->GetNodesId();
+ SMESH::smIdType_array_var anIds = mySubMeshServer->GetNodesId();
return getPointers( SMDSAbs_Node, anIds, aMesh, theResList );
}
}
{
if ( theType == SMDSAbs_Node )
{
- SMESH::long_array_var anIds = mySubMeshServer->GetElementsId();
+ SMESH::smIdType_array_var anIds = mySubMeshServer->GetElementsId();
return getNodesFromElems( anIds, aMesh, theResList );
}
else
{
- SMESH::long_array_var anIds =
+ SMESH::smIdType_array_var anIds =
mySubMeshServer->GetElementsByType( SMESH::ElementType(theType) );
return getPointers( theType, anIds, aMesh, theResList );
}
void SMDS_ElementHolder::beforeCompacting()
{
- for ( SMDS_ElemIteratorPtr it = getElements(); it->more() )
+ for ( SMDS_ElemIteratorPtr it = getElements(); it->more(); )
{
const SMDS_MeshElement* e = it->next();
if ( !e ) continue;
#include "SMDS_ElemIterator.hxx"
#include <smIdType.hxx>
+#include <vtkType.h>
#include <vector>
#include <set>
virtual smIdType GetID() const;
virtual vtkIdType GetVtkID() const;
- virtual smIdType getshapeId() const { return GetShapeID(); }
- virtual smIdType GetShapeID() const;
+ virtual int getshapeId() const { return GetShapeID(); }
+ virtual int GetShapeID() const;
// mark this element; to be used in algos
virtual void setIsMarked( bool is ) const;
newPoints->SetDataType( VTK_DOUBLE );
newPoints->SetNumberOfPoints( FromIdType<int>(newNodeSize) );
- int vtkIdType = 0, alreadyCopied = 0;
+ vtkIdType i = 0, alreadyCopied = 0;
while ( i < oldNodeSize )
{
// skip a hole if any
if ((vtkIdType) idNodesOldToNew.size() < oldNodeSize )
{
idNodesOldToNew.reserve( oldNodeSize );
- for ( vvtkIdType i = idNodesOldToNew.size(); i < oldNodeSize; ++i )
+ for ( vtkIdType i = idNodesOldToNew.size(); i < oldNodeSize; ++i )
idNodesOldToNew.push_back( i );
}
// --- create new compacted Connectivity, Locations and Types
- vvtkIdType newConnectivitySize = this->Connectivity->GetNumberOfConnectivityEntries();
+ vtkIdType newConnectivitySize = this->Connectivity->GetNumberOfConnectivityEntries();
if ( newCellSize != oldCellSize )
- for ( vvtkIdType i = 0; i < oldCellSize - 1; ++i )
+ for ( vtkIdType i = 0; i < oldCellSize - 1; ++i )
if ( this->Types->GetValue( i ) == VTK_EMPTY_CELL )
newConnectivitySize -= this->Connectivity->GetCellSize( i );
{
vtkDoubleArray* newDiameters = vtkDoubleArray::New();
newDiameters->SetNumberOfComponents(1);
- for ( vvtkIdType newCellID = 0; newCellID < newCellSize; newCellID++ )
+ for ( vtkIdType newCellID = 0; newCellID < newCellSize; newCellID++ )
{
if ( newTypes->GetValue( newCellID ) == VTK_POLY_VERTEX )
{
- vvtkIdType oldCellID = idCellsNewToOld[ newCellID ];
+ vtkIdType oldCellID = idCellsNewToOld[ newCellID ];
newDiameters->InsertValue( newCellID, diameters->GetValue( oldCellID ));
}
vtkDataSet::CellData->SetScalars( newDiameters );
vtkIdTypeArray *newFaces = vtkIdTypeArray::New();
newFaces->Initialize();
newFaces->Allocate(this->Faces->GetSize());
- for ( vvtkIdType newCellID = 0; newCellID < newCellSize; newCellID++ )
+ for ( vtkIdType newCellID = 0; newCellID < newCellSize; newCellID++ )
{
if ( newTypes->GetValue( newCellID ) == VTK_POLYHEDRON )
{
void SMDS_UnstructuredGrid::copyNodes(vtkPoints * newPoints,
std::vector<smIdType>& /*idNodesOldToNew*/,
- vvtkIdType& alreadyCopied,
- vvtkIdType start,
- vvtkIdType end)
+ vtkIdType& alreadyCopied,
+ vtkIdType start,
+ vtkIdType end)
{
void *target = newPoints->GetVoidPointer(3 * alreadyCopied);
void *source = this->Points->GetVoidPointer(3 * start);
- vvtkIdType nbPoints = end - start;
+ vtkIdType nbPoints = end - start;
if (nbPoints > 0)
{
memcpy(target, source, 3 * sizeof(double) * nbPoints);
{
for ( size_t iNew = 0; iNew < idCellsNewToOld.size(); iNew++ )
{
- vvtkIdType iOld = idCellsNewToOld[ iNew ];
+ vtkIdType iOld = idCellsNewToOld[ iNew ];
newTypes->SetValue( iNew, this->Types->GetValue( iOld ));
vtkIdType oldLoc = ((vtkIdTypeArray *)(this->Connectivity->GetOffsetsArray()))->GetValue( iOld );
pointsCell.resize( nbpts );
for ( int l = 0; l < nbpts; l++ )
{
- vvtkIdType oldval = oldPtsCell[l];
+ vtkIdType oldval = oldPtsCell[l];
pointsCell[l] = idNodesOldToNew[oldval];
}
- /*vvtkIdType newcnt = */newConnectivity->InsertNextCell( nbpts, pointsCell.data() );
- vvtkIdType newLoc = newConnectivity->GetInsertLocation( nbpts );
+ /*vtkIdType newcnt = */newConnectivity->InsertNextCell( nbpts, pointsCell.data() );
+ vtkIdType newLoc = newConnectivity->GetInsertLocation( nbpts );
newLocations->SetValue( iNew, newLoc );
}
}
int SMDS_UnstructuredGrid::CellIdToDownId(vtkIdType vtkCellId)
{
- if ((vtkCellId < 0) || (vtkCellId >= (vvtkIdType)_cellIdToDownId.size()))
+ if ((vtkCellId < 0) || (vtkCellId >= (vtkIdType)_cellIdToDownId.size()))
{
return -1;
}
return _cellIdToDownId[vtkCellId];
}
-void SMDS_UnstructuredGrid::setCellIdToDownId(vvtkIdType vtkCellId, int downId)
+void SMDS_UnstructuredGrid::setCellIdToDownId(vtkIdType vtkCellId, int downId)
{
// ASSERT((vtkCellId >= 0) && (vtkCellId < _cellIdToDownId.size()));
_cellIdToDownId[vtkCellId] = downId;
*/
//================================================================================
-int SMESH_ProxyMesh::SubMesh::NbElements() const
+smIdType SMESH_ProxyMesh::SubMesh::NbElements() const
{
return _uvPtStructVec.empty() ? _elements.size() : _uvPtStructVec.size() - 1;
}
*/
//================================================================================
-int SMESH_ProxyMesh::SubMesh::NbNodes() const
+smIdType SMESH_ProxyMesh::SubMesh::NbNodes() const
{
return _uvPtStructVec.size();
}
#include <TopoDS_Shape.hxx>
#include <NCollection_DataMap.hxx>
+#include <smIdType.hxx>
#include <map>
#include <vector>
const SMDS_MeshNode* GetProxyNode( const SMDS_MeshNode* n ) const;
const UVPtStructVec& GetUVPtStructVec() const { return _uvPtStructVec; }
virtual void AddElement(const SMDS_MeshElement * e);
- virtual int NbElements() const;
- virtual int NbNodes() const;
+ virtual smIdType NbElements() const;
+ virtual smIdType NbNodes() const;
virtual SMDS_ElemIteratorPtr GetElements() const;
virtual SMDS_NodeIteratorPtr GetNodes() const;
virtual void Clear();
//purpose :
//=======================================================================
-void SMESHDS_Mesh::Renumber (const bool /*isNodes*/, const int /*startID*/, const int /*deltaID*/)
+void SMESHDS_Mesh::Renumber (const bool /*isNodes*/, const smIdType /*startID*/, const smIdType /*deltaID*/)
{
// TODO not possible yet to have node numbers not starting to O and continuous.
if ( !this->IsCompacted() )
}
if ( ! notSupportedElemTypes.empty() )
{
- SMESH::long_array_var nbElems = aMeshOrGroup->GetMeshInfo();
+ SMESH::smIdType_array_var nbElems = aMeshOrGroup->GetMeshInfo();
for ( size_t iType = 0; iType < notSupportedElemTypes.size(); ++iType )
if ( nbElems[ notSupportedElemTypes[ iType ]] > 0 )
presentNotSupported.push_back( notSupportedElemTypes[ iType ]);
SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(anIO);
if ( !idSource->_is_nil() )
{
- SMESH::long_array_var ids = idSource->GetIDs();
+ SMESH::smIdType_array_var ids = idSource->GetIDs();
elements.resize( ids->length() );
for ( unsigned i = 0; i < elements.size(); ++i )
elements[i] = ids[i];
long updateLimit = resMgr->integerValue( "SMESH", "update_limit", 500000 );
bool incrementalLimit = resMgr->booleanValue( "SMESH", "incremental_limit", false );
- SMESH::long_array_var info = theMesh->GetMeshInfo();
+ SMESH::smIdType_array_var info = theMesh->GetMeshInfo();
long nbOdElems = info[SMDSEntity_0D];
long nbEdges = info[SMDSEntity_Edge] + info[SMDSEntity_Quad_Edge];
long nbFaces = info[SMDSEntity_Triangle] + info[SMDSEntity_Quad_Triangle] + info[SMDSEntity_BiQuad_Triangle] +
try {
SMESH::SMESH_Mesh_var aMesh = aSubMesh->GetFather();
// get submesh elements list by types
- SMESH::long_array_var aNodes = aSubMesh->GetElementsByType(SMESH::NODE);
- SMESH::long_array_var aEdges = aSubMesh->GetElementsByType(SMESH::EDGE);
- SMESH::long_array_var aFaces = aSubMesh->GetElementsByType(SMESH::FACE);
- SMESH::long_array_var aVolumes = aSubMesh->GetElementsByType(SMESH::VOLUME);
+ SMESH::smIdType_array_var aNodes = aSubMesh->GetElementsByType(SMESH::NODE);
+ SMESH::smIdType_array_var aEdges = aSubMesh->GetElementsByType(SMESH::EDGE);
+ SMESH::smIdType_array_var aFaces = aSubMesh->GetElementsByType(SMESH::FACE);
+ SMESH::smIdType_array_var aVolumes = aSubMesh->GetElementsByType(SMESH::VOLUME);
// create group for each type o elements
QString aName = IObject->getName();
QStringList anEntryList;
SUIT_MessageBox::warning( myDlg, tr( "SMESH_WRN_WARNING" ), tr( "SMESH_BAD_SELECTION" ) );
return false;
}
- SMESH::long_array_var idArray = new SMESH::long_array;
+ SMESH::smIdType_array_var idArray = new SMESH::smIdType_array;
idArray->length( idList.count() );
QStringList::iterator idIt = idList.begin();
for ( int i = 0; idIt != idList.end(); ++idIt, ++i )
if (myNbOkNodes && !SMESHGUI::isStudyLocked()) {
myBusy = true;
QStringList aListId = myEditCurrentArgument->text().split(" ", QString::SkipEmptyParts);
- SMESH::long_array_var anArrayOfIndices = new SMESH::long_array;
+ SMESH::smIdType_array_var anArrayOfIndices = new SMESH::smIdType_array;
anArrayOfIndices->length(aListId.count());
const std::vector<int>& revIndex = SMDS_MeshCell::reverseSmdsOrder( myGeomType );
if ( ReverseOrDulicate && ReverseOrDulicate->isChecked() && (int)revIndex.size() == aListId.count() )
}
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
- SMESH::long_array_var anIdList = new SMESH::long_array;
+ SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
anIdList->length( 1 );
anIdList[0] = -1;
int nbElemsBefore = 0;
ReverseConnectivity( anIds, myGeomType, /*toReverse=*/true, /*toVtkOrder=*/false );
int aNumberOfIds = anIds.size();
- SMESH::long_array_var anArrayOfIdeces = new SMESH::long_array;
+ SMESH::smIdType_array_var anArrayOfIdeces = new SMESH::smIdType_array;
anArrayOfIdeces->length( aNumberOfIds );
for (int i = 0; i < aNumberOfIds; i++)
}
if ( !aGroupUsed->_is_nil() ) {
- SMESH::long_array_var anIdList = new SMESH::long_array;
+ SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
anIdList->length( 1 );
anIdList[0] = anElemId;
aGroupUsed->Add( anIdList.inout() );
}
else if ( theNoCompError && theNoHypoError )
{
- SMESH::long_array_var aRes = myMesh->GetMeshInfo();
+ SMESH::smIdType_array_var aRes = myMesh->GetMeshInfo();
aCompDlg->myFullInfo->SetMeshInfo( aRes );
aCompDlg->myFullInfo->show();
aCompDlg->myBriefInfo->hide();
theCompErrors[ i ].code == SMESH::COMPERR_NO_MESH_ON_SHAPE );
// full or brief mesh info
- SMESH::long_array_var aRes = myMesh->GetMeshInfo();
+ SMESH::smIdType_array_var aRes = myMesh->GetMeshInfo();
if ( onlyWarnings ) {
aCompDlg->myFullInfo->SetMeshInfo( aRes );
aCompDlg->myFullInfo->show();
QString aHypErrors;
bool evaluateFailed = true, memoryLack = false;
- SMESH::long_array_var aRes;
+ SMESH::smIdType_array_var aRes;
_PTR(SObject) aMeshSObj = SMESH::FindSObject(myMesh);
if ( !aMeshSObj ) // IPAL21340
}
-void SMESHGUI_BaseComputeOp::showEvaluateResult(const SMESH::long_array& theRes,
+void SMESHGUI_BaseComputeOp::showEvaluateResult(const SMESH::smIdType_array& theRes,
const bool theMemoryLack,
const bool theNoCompError,
SMESH::compute_error_array_var& theCompErrors,
const QString& );
SMESHGUI_ComputeDlg* evaluateDlg() const;
void evaluateMesh();
- void showEvaluateResult(const SMESH::long_array& theRes,
+ void showEvaluateResult(const SMESH::smIdType_array& theRes,
const bool,
const bool,
SMESH::compute_error_array_var&,
SMESHGUI_ConvToQuadOp::DestinationMesh( const SMESH::SMESH_IDSource_var& idSource,
bool* isMixOrder)
{
- SMESH::long_array_var nbElemOfType = idSource->GetMeshInfo();
+ SMESH::smIdType_array_var nbElemOfType = idSource->GetMeshInfo();
bool hasBiQuad = ( nbElemOfType[SMDSEntity_BiQuad_Triangle ] ||
nbElemOfType[SMDSEntity_BiQuad_Quadrangle ] ||
else
{
QStringList aListElementsId = myLineEditElements->text().split(" ", QString::SkipEmptyParts);
- SMESH::long_array_var anElementsId = new SMESH::long_array;
+ SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++)
anElementsId[i] = aListElementsId[i].toInt();
if (GetConstructorId() == 0)
{
- SMESH::long_array_var anIdsOfNodes = new SMESH::long_array;
+ SMESH::smIdType_array_var anIdsOfNodes = new SMESH::smIdType_array;
SMESH::long_array_var aQuantities = new SMESH::long_array;
aQuantities->length( myFacesByNodes->count() );
}
else if (GetConstructorId() == 1)
{
- SMESH::long_array_var anIdsOfFaces = new SMESH::long_array;
+ SMESH::smIdType_array_var anIdsOfFaces = new SMESH::smIdType_array;
QStringList aListId = myEditCurrentArgument->text().split( " ", QString::SkipEmptyParts );
anIdsOfFaces->length(aListId.count());
}
if ( !aGroupUsed->_is_nil() ) {
- SMESH::long_array_var anIdList = new SMESH::long_array;
+ SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
anIdList->length( 1 );
anIdList[0] = anElemId;
aGroupUsed->Add( anIdList.inout() );
}
else
{
- SMESH::long_array_var elems = mesh->GetNodeInverseElements( aNodeStart, SMESH::ALL );
+ SMESH::smIdType_array_var elems = mesh->GetNodeInverseElements( aNodeStart, SMESH::ALL );
if ( elems->length() != 1 ||
mesh->GetElementType( elems[0], true ) != SMESH::EDGE )
return false;
int nbElements = aMapIndex.Extent();
if ( nbElements > 0 )
{
- SMESH::long_array_var ids = new SMESH::long_array;
+ SMESH::smIdType_array_var ids = new SMESH::smIdType_array;
ids->length( nbElements );
for ( int i = 0; i < nbElements; ++i )
aString += QString(" %1").arg( ids[ i ] = aMapIndex( i+1 ));
SMDSAbs_ElementType SMDSType = SMDSAbs_ElementType( iType+1 );
const bool isNode = ( SMDSType == SMDSAbs_Node );
- SMESH::long_array_var ids = new SMESH::long_array;
+ SMESH::smIdType_array_var ids = new SMESH::smIdType_array;
ids->length( aListId.count() );
TColStd_MapOfInteger newIndices;
for (int i = 0; i < aListId.count(); i++) {
*/
//================================================================================
-void SMESHGUI_3TypesSelector::addTmpIdSource( SMESH::long_array_var& ids, int iType, int index )
+void SMESHGUI_3TypesSelector::addTmpIdSource( SMESH::smIdType_array_var& ids, int iType, int index )
{
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
SMESH::SMESH_IDSource_var idSrc =
private:
- void addTmpIdSource( SMESH::long_array_var& ids,
+ void addTmpIdSource( SMESH::smIdType_array_var& ids,
int iType, int index);
QGroupBox* myGroups [3];
{
if (myMesh->_is_nil())
return;
- SMESH::long_array_var anIds = myFilter[ theType ]->GetElementsId(myMesh);
+ SMESH::smIdType_array_var anIds = myFilter[ theType ]->GetElementsId(myMesh);
for (int i = 0, n = anIds->length(); i < n; i++)
theResIds.append(anIds[ i ]);
}
{
if (aSubMesh->GetFather()->GetId() == myMesh->GetId())
{
- SMESH::long_array_var anIds =
+ SMESH::smIdType_array_var anIds =
theType == SMESH::NODE ? aSubMesh->GetNodesId() : aSubMesh->GetElementsId();
for (int i = 0, n = anIds->length(); i < n; i++)
aToBeFiltered.Add(anIds[ i ]);
{
if (aGroup->GetType() == theType && aGroup->GetMesh()->GetId() == myMesh->GetId())
{
- SMESH::long_array_var anIds = aGroup->GetListOfID();
+ SMESH::smIdType_array_var anIds = aGroup->GetListOfID();
for (int i = 0, n = anIds->length(); i < n; i++)
aToBeFiltered.Add(anIds[ i ]);
}
if (aMeshEditor->_is_nil())
return;
- SMESH::long_array_var foundIds;
+ SMESH::smIdType_array_var foundIds;
if ( aMesh->_is_equivalent( myMeshOrPart ) )
foundIds =
aMeshEditor->FindElementsByPoint( myDlg->myX->GetValue(),
myIdList.clear();
if (!theGroup->IsEmpty()) {
- SMESH::long_array_var anElements = theGroup->GetListOfID();
+ SMESH::smIdType_array_var anElements = theGroup->GetListOfID();
int k = anElements->length();
for (int i = 0; i < k; i++) {
myIdList.append(anElements[i]);
}
else
{
- SMESH::long_array_var anIdList = new SMESH::long_array;
+ SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
int i, k = myElements->count();
anIdList->length(k);
for (i = 0; i < k; i++) {
myIdList.removeAt(idx);
}
if (!aAddList.empty()) {
- SMESH::long_array_var anIdList = new SMESH::long_array;
+ SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
int added = aAddList.count();
anIdList->length(added);
for (i = 0; i < added; i++)
myGroup->Add(anIdList.inout());
}
if (!myIdList.empty()) {
- SMESH::long_array_var anIdList = new SMESH::long_array;
+ SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
int removed = myIdList.count();
anIdList->length(removed);
for (i = 0; i < removed; i++)
// check if mesh is the same
if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) {
try {
- SMESH::long_array_var anElements = aSubMesh->GetElementsByType(aType);
+ SMESH::smIdType_array_var anElements = aSubMesh->GetElementsByType(aType);
int k = anElements->length();
for (int i = 0; i < k; i++) {
QString aText = QString::number(anElements[i]);
if (!aGroup->_is_nil()) {
// check if mesh is the same
if (aGroup->GetType() == aType && aGroup->GetMesh()->GetId() == myMesh->GetId()) {
- SMESH::long_array_var anElements = aGroup->GetListOfID();
+ SMESH::smIdType_array_var anElements = aGroup->GetListOfID();
int k = anElements->length();
for (int i = 0; i < k; i++) {
QString aText = QString::number(anElements[i]);
aBelongToGeom->SetElementType(aType);
aFilter->SetPredicate(aBelongToGeom);
- SMESH::long_array_var anElements = aFilter->GetElementsId(myMesh);
+ SMESH::smIdType_array_var anElements = aFilter->GetElementsId(myMesh);
int k = anElements->length();
for (int i = 0; i < k; i++) {
if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) {
if (aType == SMESH::NODE) {
try {
- SMESH::long_array_var anElements = aSubMesh->GetNodesId();
+ SMESH::smIdType_array_var anElements = aSubMesh->GetNodesId();
int k = anElements->length();
for (int i = 0; i < k; i++) {
QList<QListWidgetItem*> found =
}
else {
try {
- SMESH::long_array_var anElements = aSubMesh->GetElementsId();
+ SMESH::smIdType_array_var anElements = aSubMesh->GetElementsId();
int k = anElements->length();
for (int i = 0; i < k; i++) {
QList<QListWidgetItem*> found =
if (!aGroup->_is_nil()) {
// check if mesh is the same
if (aGroup->GetType() == aType && aGroup->GetMesh()->GetId() == myMesh->GetId()) {
- SMESH::long_array_var anElements = aGroup->GetListOfID();
+ SMESH::smIdType_array_var anElements = aGroup->GetListOfID();
int k = anElements->length();
for (int i = 0; i < k; i++) {
QList<QListWidgetItem*> found =
SMESH::SMESH_Mesh_var m = myFirstSrc->GetMesh();
long id = myFirstTgt->text().toLong();
if ( !CORBA::is_nil( m ) && id ) {
- SMESH::long_array_var ids = new SMESH::long_array();
+ SMESH::smIdType_array_var ids = new SMESH::smIdType_array();
ids->length( 1 );
ids[0] = id;
SMESH::SMESH_MeshEditor_var me = m->GetMeshEditor();
SMESH::SMESH_Mesh_var m = mySecondSrc->GetMesh();
long id = mySecondTgt->text().toLong();
if ( !CORBA::is_nil( m ) && id ) {
- SMESH::long_array_var ids = new SMESH::long_array();
+ SMESH::smIdType_array_var ids = new SMESH::smIdType_array();
ids->length( 1 );
ids[0] = id;
SMESH::SMESH_MeshEditor_var me = m->GetMeshEditor();
SMESH::SMESH_Mesh_var m = mySrc[0]->GetMesh();
QStringList ids = myIDs.split( " ", QString::SkipEmptyParts );
if ( !CORBA::is_nil( m ) && ids.count() > 0 ) {
- SMESH::long_array_var ids_in = new SMESH::long_array();
+ SMESH::smIdType_array_var ids_in = new SMESH::smIdType_array();
ids_in->length( ids.count() );
for( int i = 0; i < ids.count(); i++ )
ids_in[i] = ids[i].trimmed().toLong();
int i, nb = KeepList->count();
if ( isKeepIDsSelection() )
{
- SMESH::long_array_var anIdList = new SMESH::long_array();
+ SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array();
anIdList->length(nb);
for (i = 0; i < nb; i++)
anIdList[i] = KeepList->item(i)->text().toInt();
for ( int i = 0; i < myButtons.count(); ++i )
myButtons[i]->setEnabled( true );
- SMESH::long_array_var nbElemsByType = obj->GetNbElementsByType();
+ SMESH::smIdType_array_var nbElemsByType = obj->GetNbElementsByType();
if ( ! &nbElemsByType.in() ) return;
const CORBA::Long ctrlLimit =
*/
// =========================================================================================
-void SMESHGUI_MeshInfosBox::SetMeshInfo(const SMESH::long_array& theInfo)
+void SMESHGUI_MeshInfosBox::SetMeshInfo(const SMESH::smIdType_array& theInfo)
{
// nodes
myNbNode ->setText( QString("%1").arg( theInfo[SMDSEntity_Node] ));
public:
SMESHGUI_MeshInfosBox( const bool, QWidget* );
- void SetMeshInfo( const SMESH::long_array& theInfo );
+ void SetMeshInfo( const SMESH::smIdType_array& theInfo );
private:
bool myFull;
}
QList<int> ids;
getIds(ids);
- SMESH::long_array_var varIds = new SMESH::long_array();
+ SMESH::smIdType_array_var varIds = new SMESH::smIdType_array();
varIds->length(ids.count());
- int i = 0;
+ smIdType i = 0;
for (QList<int>::iterator it = ids.begin(); it != ids.end(); ++it)
varIds[i++] = *it;
myType == Type_2d
SMESH::point_array_var pnts;
QList<int> ids;
if (isRefine() && getIds(ids)) {
- SMESH::long_array_var varIds = new SMESH::long_array();
+ SMESH::smIdType_array_var varIds = new SMESH::smIdType_array();
varIds->length(ids.count());
- int i = 0;
+ smIdType i = 0;
for (QList<int>::iterator it = ids.begin(); it != ids.end(); ++it)
varIds[i++] = *it;
pnts = myType == Type_2d
// Purpose : Retrieve identifiers from list box or the whole object
//=======================================================================
-SMESH::long_array_var SMESHGUI_MultiEditDlg::getIds(SMESH::SMESH_IDSource_var& obj)
+SMESH::smIdType_array_var SMESHGUI_MultiEditDlg::getIds(SMESH::SMESH_IDSource_var& obj)
{
- SMESH::long_array_var anIds = new SMESH::long_array;
+ SMESH::smIdType_array_var anIds = new SMESH::smIdType_array;
if (myToAllChk->isChecked())
{
SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(anIter.Value());
if (!aSubMesh->_is_nil()) {
if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) {
- SMESH::long_array_var anIds = aSubMesh->GetElementsId();
+ SMESH::smIdType_array_var anIds = aSubMesh->GetElementsId();
for (int i = 0, n = anIds->length(); i < n; i++) {
if (isIdValid(anIds[ i ]))
toBeAdded.Add(anIds[ i ]);
if (!aGroup->_is_nil() && ((aGroup->GetType() == SMESH::FACE && entityType() == 0) ||
(aGroup->GetType() == SMESH::VOLUME && entityType() == 1))) {
if (aGroup->GetMesh()->GetId() == myMesh->GetId()) {
- SMESH::long_array_var anIds = aGroup->GetListOfID();
+ SMESH::smIdType_array_var anIds = aGroup->GetListOfID();
for (int i = 0, n = anIds->length(); i < n; i++) {
if (isIdValid(anIds[ i ]))
toBeAdded.Add(anIds[ i ]);
SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_IDSource_var obj;
- SMESH::long_array_var anIds = getIds(obj);
+ SMESH::smIdType_array_var anIds = getIds(obj);
bool aResult = process(aMeshEditor, anIds.inout(), obj);
if (aResult) {
{
}
-bool SMESHGUI_ChangeOrientationDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
- const SMESH::long_array& theIds,
- SMESH::SMESH_IDSource_ptr obj)
+bool SMESHGUI_ChangeOrientationDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
+ const SMESH::smIdType_array& theIds,
+ SMESH::SMESH_IDSource_ptr obj)
{
if ( CORBA::is_nil( obj ))
return theEditor->Reorient(theIds);
}
bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
- const SMESH::long_array& theIds,
+ const SMESH::smIdType_array& theIds,
SMESH::SMESH_IDSource_ptr obj)
{
{
SUIT_OverrideCursor aWaitCursor;
// get Ids of elements
SMESH::SMESH_IDSource_var obj;
- SMESH::long_array_var anElemIds = getIds( obj );
+ SMESH::smIdType_array_var anElemIds = getIds( obj );
SMESH::NumericalFunctor_var aCriterion = getNumericalFunctor();
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
}
bool SMESHGUI_CuttingOfQuadsDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
- const SMESH::long_array& theIds,
+ const SMESH::smIdType_array& theIds,
SMESH::SMESH_IDSource_ptr obj)
{
bool hasObj = (! CORBA::is_nil( obj ));
SUIT_OverrideCursor aWaitCursor;
// get Ids of elements
SMESH::SMESH_IDSource_var obj;
- SMESH::long_array_var anElemIds = getIds(obj);
+ SMESH::smIdType_array_var anElemIds = getIds(obj);
if (anElemIds->length() == 0 && obj->_is_nil() )
return;
}
bool SMESHGUI_SplitVolumesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
- const SMESH::long_array& theIds,
+ const SMESH::smIdType_array& theIds,
SMESH::SMESH_IDSource_ptr theObj)
{
SMESH::IDSource_wrap obj = theObj;
QWidget* createButtonFrame( QWidget* );
QWidget* createMainFrame( QWidget*, const bool );
virtual bool isValid( const bool );
- SMESH::long_array_var getIds(SMESH::SMESH_IDSource_var& obj);
+ SMESH::smIdType_array_var getIds(SMESH::SMESH_IDSource_var& obj);
void updateButtons();
virtual void setSelectionMode();
virtual bool isIdValid( const int ) const;
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
- const SMESH::long_array& ,
+ const SMESH::smIdType_array& ,
SMESH::SMESH_IDSource_ptr obj) = 0;
virtual int nbElemsInMesh() = 0;
int entityType();
protected:
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
- const SMESH::long_array& ,
+ const SMESH::smIdType_array& ,
SMESH::SMESH_IDSource_ptr obj);
virtual int nbElemsInMesh();
};
protected:
virtual bool isValid( const bool );
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
- const SMESH::long_array&,
+ const SMESH::smIdType_array&,
SMESH::SMESH_IDSource_ptr obj );
virtual int nbElemsInMesh();
protected:
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
- const SMESH::long_array& ,
+ const SMESH::smIdType_array& ,
SMESH::SMESH_IDSource_ptr obj);
virtual int nbElemsInMesh();
protected:
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
- const SMESH::long_array&,
+ const SMESH::smIdType_array&,
SMESH::SMESH_IDSource_ptr obj );
virtual int nbElemsInMesh();
}
if ( !aGroupUsed->_is_nil() ) {
- SMESH::long_array_var anIdList = new SMESH::long_array;
+ SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
anIdList->length( 1 );
anIdList[0] = aNodeId;
aGroupUsed->Add( anIdList.inout() );
{
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
- SMESH::long_array_var anElementsId = new SMESH::long_array;
+ SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++)
anElementsId[i] = aListElementsId[i].toInt();
}
else
{
- SMESH::long_array_var anElementsId = new SMESH::long_array;
+ SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++)
SUIT_OverrideCursor wc;
QStringList aListId = myEditCurrentArgument->text().split(" ", QString::SkipEmptyParts);
- SMESH::long_array_var anArrayOfIdeces = new SMESH::long_array;
+ SMESH::smIdType_array_var anArrayOfIdeces = new SMESH::smIdType_array;
anArrayOfIdeces->length(aListId.count());
for (int i = 0; i < aListId.count(); i++)
anArrayOfIdeces[i] = aListId[ i ].toInt();
if (myNbOkNodes) {
QStringList aListId = myEditCurrentArgument->text().split(" ", QString::SkipEmptyParts);
- SMESH::long_array_var anArrayOfIdeces = new SMESH::long_array;
+ SMESH::smIdType_array_var anArrayOfIdeces = new SMESH::smIdType_array;
anArrayOfIdeces->length(aListId.count());
for (int i = 0; i < aListId.count(); i++)
anArrayOfIdeces[i] = aListId[ i ].toInt();
if (myNbOkElements && IsAxisOk()) {
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
- SMESH::long_array_var anElementsId = new SMESH::long_array;
+ SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++)
if (myPreviewCheckBox->isChecked() && toDisplayPreview) {
if(myNbOkElements && isValid() && IsAxisOk()) {
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
- SMESH::long_array_var anElementsId = new SMESH::long_array;
+ SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++)
if (myNbOkElements) {
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
- SMESH::long_array_var anElementsId = new SMESH::long_array;
+ SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++)
if ( myNbOkElements && isValid() ) {
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
- SMESH::long_array_var anElementsId = new SMESH::long_array;
+ SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++)
SMESH::MeshInfo info;
if ( !isNull() )
{
- SMESH::long_array_var data = myObject->GetMeshInfo();
+ SMESH::smIdType_array_var data = myObject->GetMeshInfo();
for ( uint type = SMESH::Entity_Node; type < SMESH::Entity_Last; type++ )
{
if ( type < data->length() )
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
if ( !CORBA::is_nil( mesh ) )
{
- SMESH::long_array_var elements = mesh->GetNodeInverseElements( id, SMESH::ALL );
+ SMESH::smIdType_array_var elements = mesh->GetNodeInverseElements( id, SMESH::ALL );
for ( int i = 0, n = elements->length(); i < n; i++ )
{
SMESH::ElementType type = mesh->GetElementType( elements[i], true );
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
if ( !CORBA::is_nil( mesh ) )
{
- SMESH::long_array_var nodes = mesh->GetElemNodes( id );
+ SMESH::smIdType_array_var nodes = mesh->GetElemNodes( id );
result = nodes->length() > 0;
}
}
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
if ( !CORBA::is_nil( mesh ) )
{
- SMESH::long_array_var nn = mesh->GetElemNodes( id );
+ SMESH::smIdType_array_var nn = mesh->GetElemNodes( id );
for ( int i = 0, nb = nn->length(); i < nb; i++ )
{
if ( !nodes.contains( nn[i] ))
CORBA::Long nbFaces = mesh->ElemNbFaces( id );
for ( CORBA::Long iF = 0; iF < nbFaces; ++iF )
{
- SMESH::long_array_var nodes = mesh->GetElemFaceNodes( id, iF );
+ SMESH::smIdType_array_var nodes = mesh->GetElemFaceNodes( id, iF );
for ( CORBA::ULong iN = 0; iN < nodes->length(); ++iN )
{
connectivity[ iF+1 ] << nodes[iN];
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
if ( !CORBA::is_nil( mesh ) )
{
- SMESH::long_array_var nodes = mesh->GetElemNodes( id );
+ SMESH::smIdType_array_var nodes = mesh->GetElemNodes( id );
for ( int i = 0, n = nodes->length(); i < n; i++ )
{
SMESH::double_array_var coords = mesh->GetNodeXYZ( nodes[i] );
SMESH::SMESH_GroupBase_var group = SMESH::SMESH_GroupBase::_narrow( myObject );
if ( !CORBA::is_nil( group ) )
{
- SMESH::long_array_var seq = group->GetListOfID();
+ SMESH::smIdType_array_var seq = group->GetListOfID();
for ( int i = 0, n = seq->length(); i < n; i++ )
result << (uint)seq[i];
}
QStringList aListElementsId1 = LineEdit1->text().split(" ", QString::SkipEmptyParts);
QStringList aListElementsId2 = LineEdit4->text().split(" ", QString::SkipEmptyParts);
- SMESH::long_array_var anElementsId1 = new SMESH::long_array;
- SMESH::long_array_var anElementsId2 = new SMESH::long_array;
+ SMESH::smIdType_array_var anElementsId1 = new SMESH::smIdType_array;
+ SMESH::smIdType_array_var anElementsId2 = new SMESH::smIdType_array;
anElementsId1->length(aListElementsId1.count());
anElementsId2->length(aListElementsId2.count());
QStringList aListElementsId = LineEditElements->text().split(" ", QString::SkipEmptyParts);
QStringList aListNodesId = LineEditNodes->text().split(" ", QString::SkipEmptyParts);
- SMESH::long_array_var anElementsId = new SMESH::long_array;
- SMESH::long_array_var aNodesId = new SMESH::long_array;
+ SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
+ SMESH::smIdType_array_var aNodesId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++)
if (myNbOkElements && IsMirrorOk()) {
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
- SMESH::long_array_var anElementsId = new SMESH::long_array;
+ SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++)
if ( myNbOkElements && isValid() && IsMirrorOk() )
{
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
- SMESH::long_array_var anElementsId = new SMESH::long_array;
+ SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++)
if (myNbOkElements) {
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
- SMESH::long_array_var anElementsId = new SMESH::long_array;
+ SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++)
{
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
- SMESH::long_array_var anElementsId = new SMESH::long_array;
+ SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++)
Class : NumericalFunctor_i
Description : Base class for numerical functors
*/
-CORBA::Double NumericalFunctor_i::GetValue( CORBA::Long theId )
+CORBA::Double NumericalFunctor_i::GetValue( SMESH::smIdType theId )
{
return myNumericalFunctorPtr->GetValue( theId );
}
-CORBA::Boolean NumericalFunctor_i::IsApplicable( CORBA::Long theElementId )
+CORBA::Boolean NumericalFunctor_i::IsApplicable( SMESH::smIdType theElementId )
{
return myNumericalFunctorPtr->IsApplicable( theElementId );
}
}
else
{
- SMESH::SMESH_Mesh_var mesh = object->GetMesh();
- SMESH::long_array_var objNbElems = object->GetNbElementsByType();
- SMESH::long_array_var meshNbElems = mesh-> GetNbElementsByType();
+ SMESH::SMESH_Mesh_var mesh = object->GetMesh();
+ SMESH::smIdType_array_var objNbElems = object->GetNbElementsByType();
+ SMESH::smIdType_array_var meshNbElems = mesh-> GetNbElementsByType();
if ( meshNbElems[ GetElementType() ] !=
objNbElems [ GetElementType() ] )
{
myFunctorPtr = myPredicatePtr = myRangeOfIdsPtr;
}
-void RangeOfIds_i::SetRange( const SMESH::long_array& theIds )
+void RangeOfIds_i::SetRange( const SMESH::smIdType_array& theIds )
{
- CORBA::Long iEnd = theIds.length();
- for ( CORBA::Long i = 0; i < iEnd; i++ )
+ SMESH::smIdType iEnd = theIds.length();
+ for ( SMESH::smIdType i = 0; i < iEnd; i++ )
myRangeOfIdsPtr->AddToRange( theIds[ i ] );
TPythonDump()<<this<<".SetRange("<<theIds<<")";
}
TPythonDump() << this << ".SetVertex( " << vertex << " )";
}
-void ConnectedElements_i::SetNode ( CORBA::Long nodeID )
+void ConnectedElements_i::SetNode ( SMESH::smIdType nodeID )
{
if ( nodeID < 1 )
THROW_SALOME_CORBA_EXCEPTION( "ConnectedElements_i::SetNode(): nodeID must be > 0",
myPredicate->GetPredicate()->SetMesh( aMesh );
}
-SMESH::long_array*
+SMESH::smIdType_array*
Filter_i::
GetIDs()
{
Controls::Filter::GetElementsId(aMesh,thePredicate->GetPredicate(),theSequence);
}
-SMESH::long_array*
+SMESH::smIdType_array*
Filter_i::
GetElementsId( SMESH_Mesh_ptr theMesh )
{
- SMESH::long_array_var anArray = new SMESH::long_array;
+ SMESH::smIdType_array_var anArray = new SMESH::smIdType_array;
if(!CORBA::is_nil(theMesh) && myPredicate){
theMesh->Load();
Controls::Filter::TIdSequence aSequence;
return anArray._retn();
}
-SMESH::long_array*
+SMESH::smIdType_array*
Filter_i::
GetElementsIdFromParts( const ListOfIDSources& theParts )
{
- SMESH::long_array_var array = new SMESH::long_array;
+ SMESH::smIdType_array_var array = new SMESH::smIdType_array;
if ( theParts.length() > 0 && myPredicate )
{
SMESH_Mesh_ptr mesh = theParts[0]->GetMesh();
*/
//=============================================================================
-SMESH::long_array* ::Filter_i::GetMeshInfo()
+SMESH::smIdType_array* ::Filter_i::GetMeshInfo()
{
- SMESH::long_array_var aRes = new SMESH::long_array();
+ SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::Entity_Last);
for (int i = 0; i < SMESH::Entity_Last; i++)
aRes[i] = 0;
*/
//=============================================================================
-SMESH::long_array* ::Filter_i::GetNbElementsByType()
+SMESH::smIdType_array* ::Filter_i::GetNbElementsByType()
{
- SMESH::long_array_var aRes = new SMESH::long_array();
+ SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::NB_ELEMENT_TYPES);
for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
aRes[i] = 0;
if ( !CORBA::is_nil(myMesh) && myPredicate ) {
const SMDS_Mesh* aMesh = MeshPtr2SMDSMesh(myMesh);
SMDS_ElemIteratorPtr it = aMesh->elementsIterator( SMDSAbs_ElementType( GetElementType() ));
- CORBA::Long& nbElems = aRes[ GetElementType() ];
+ SMESH::smIdType& nbElems = aRes[ GetElementType() ];
while ( it->more() )
{
const SMDS_MeshElement* anElem = it->next();
public virtual Functor_i
{
public:
- CORBA::Double GetValue( CORBA::Long theElementId );
- CORBA::Boolean IsApplicable( CORBA::Long theElementId );
+ CORBA::Double GetValue( SMESH::smIdType theElementId );
+ CORBA::Boolean IsApplicable( SMESH::smIdType theElementId );
SMESH::Histogram* GetHistogram(CORBA::Short nbIntervals,
CORBA::Boolean isLogarithmic);
SMESH::Histogram* GetLocalHistogram(CORBA::Short nbIntervals,
CORBA::Boolean isLogarithmic,
SMESH::SMESH_IDSource_ptr object);
void SetPrecision( CORBA::Long thePrecision );
- SMESH::smIdType GetPrecision();
+ CORBA::Long GetPrecision();
Controls::NumericalFunctorPtr GetNumericalFunctor();
protected:
{
public:
CORBA::Boolean IsSatisfy( CORBA::Long theElementId );
- SMESH::smIdType NbSatisfying( SMESH::SMESH_IDSource_ptr obj );
+ CORBA::Long NbSatisfying( SMESH::SMESH_IDSource_ptr obj );
Controls::PredicatePtr GetPredicate();
protected:
{
public:
RangeOfIds_i();
- void SetRange( const SMESH::long_array& theIds );
+ void SetRange( const SMESH::smIdType_array& theIds );
CORBA::Boolean SetRangeStr( const char* theRange );
char* GetRangeStr();
void SetElementType( ElementType theType );
void SetPoint( CORBA::Double x, CORBA::Double y, CORBA::Double z );
void SetVertex( GEOM::GEOM_Object_ptr vertex );
- void SetNode ( CORBA::Long nodeID );
+ void SetNode ( SMESH::smIdType nodeID );
void SetThreshold ( const char* threshold,
SMESH::ConnectedElements::ThresholdType type );
char* GetThreshold ( SMESH::ConnectedElements::ThresholdType& type );
Controls::Filter::TIdSequence& );
virtual
- long_array*
+ smIdType_array*
GetElementsId( SMESH_Mesh_ptr );
virtual
- long_array*
+ smIdType_array*
GetElementsIdFromParts( const ListOfIDSources& theParts );
virtual
// =========================
// SMESH_IDSource interface
// =========================
- virtual SMESH::long_array* GetIDs();
- virtual SMESH::long_array* GetMeshInfo();
- virtual SMESH::long_array* GetNbElementsByType();
+ virtual SMESH::smIdType_array* GetIDs();
+ virtual SMESH::smIdType_array* GetMeshInfo();
+ virtual SMESH::smIdType_array* GetNbElementsByType();
virtual SMESH::array_of_ElementType* GetTypes();
virtual SMESH::SMESH_Mesh_ptr GetMesh();
virtual bool IsMeshInfoCorrect() { return true; }
CORBA::Boolean SaveAs( const char* aFileName );
CORBA::Boolean IsPresent( const char* aFilterName );
- SMESH::smIdType NbFilters( ElementType );
+ CORBA::Long NbFilters( ElementType );
string_array* GetNames( ElementType );
string_array* GetAllNames();
void SetFileName( const char* theFileName );
GEOM::GEOM_Object_ptr
SMESH_Gen_i::GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
- CORBA::Long theElementID,
+ SMESH::smIdType theElementID,
const char* theGeomName)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Object_ptr
SMESH_Gen_i::FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
- CORBA::Long theElementID)
+ SMESH::smIdType theElementID)
{
Unexpect aCatch(SALOME_SalomeException);
if ( CORBA::is_nil( theMesh ) )
}
// remember nb of elements before filling in
- SMESH::long_array_var prevState = newMesh->GetNbElementsByType();
+ SMESH::smIdType_array_var prevState = newMesh->GetNbElementsByType();
// copy nodes
int _assert[( nbNames == SMESH::NB_ELEMENT_TYPES ) ? 2 : -1 ]; _assert[0]=_assert[1]=0;
}
- SMESH::long_array_var curState = newMesh->GetNbElementsByType();
+ SMESH::smIdType_array_var curState = newMesh->GetNbElementsByType();
for( groupType = SMESH::NODE;
groupType < SMESH::NB_ELEMENT_TYPES;
SMESH::SMESH_GroupBase_ptr group;
CORBA::String_var groupName;
- SMESH::long_array_var newIDs = new SMESH::long_array();
+ SMESH::smIdType_array_var newIDs = new SMESH::smIdType_array();
// loop on groups of a source mesh
SMESH::ListOfGroups_var listOfGroups = initImpl->GetGroups();
}
else
{
- SMESH::long_array_var ids = meshPart->GetIDs();
+ SMESH::smIdType_array_var ids = meshPart->GetIDs();
if ( srcElemTypes->length() == 1 && srcElemTypes[0] == SMESH::NODE ) // group of nodes
{
for ( CORBA::ULong i=0; i < ids->length(); i++ )
{
if ( newMeshDS->GetMeshInfo().NbElements( SMDSAbs_ElementType( elemType )) > 0 )
{
- SMESH::long_array_var elemIDs = stdlGroup->GetIDs();
+ SMESH::smIdType_array_var elemIDs = stdlGroup->GetIDs();
const bool isElem = ( elemType != SMESH::NODE );
CORBA::ULong iE = 0;
for ( ; iE < elemIDs->length(); ++iE ) // check if any element has been copied
*/
//================================================================================
-SMESH::smIdType SMESH_Gen_i::GetObjectId(CORBA::Object_ptr theObject)
+CORBA::Long SMESH_Gen_i::GetObjectId(CORBA::Object_ptr theObject)
{
if ( myStudyContext && !CORBA::is_nil( theObject )) {
string iorString = GetORB()->object_to_string( theObject );
SMESH::SMESH_Group_var gsource = SMESH::SMESH_Group::_narrow(meshPart);
if ( !gsource->_is_nil() ) {
if(theElemType == SMESH::NODE) {
- SMESH::long_array_var nodes = gsource->GetNodeIDs();
+ SMESH::smIdType_array_var nodes = gsource->GetNodeIDs();
for ( CORBA::ULong i = 0; i < nodes->length(); ++i ) {
if ( const SMDS_MeshNode* node = meshDS->FindNode( nodes[i] )) {
long anId = node->GetID();
}
}
} else if (gsource->GetType() == theElemType || theElemType == SMESH::ALL ) {
- SMESH::long_array_var elems = gsource->GetListOfID();
+ SMESH::smIdType_array_var elems = gsource->GetListOfID();
for ( CORBA::ULong i = 0; i < elems->length(); ++i ) {
if ( const SMDS_MeshElement* elem = meshDS->FindElement( elems[i] )) {
long anId = elem->GetID();
}
SMESH::SMESH_subMesh_var smsource = SMESH::SMESH_subMesh::_narrow(meshPart);
if ( !smsource->_is_nil() ) {
- SMESH::long_array_var elems = smsource->GetElementsByType( theElemType );
+ SMESH::smIdType_array_var elems = smsource->GetElementsByType( theElemType );
for ( CORBA::ULong i = 0; i < elems->length(); ++i ) {
const SMDS_MeshElement* elem = ( theElemType == SMESH::NODE ) ? meshDS->FindNode( elems[i] ) : meshDS->FindElement( elems[i] );
if (elem) {
// Return geometrical object the given element is built on. Publish it in study.
GEOM::GEOM_Object_ptr GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
- CORBA::Long theElementID,
+ SMESH::smIdType theElementID,
const char* theGeomName);
// Return geometrical object the given element is built on. Don't publish it in study.
GEOM::GEOM_Object_ptr FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
- CORBA::Long theElementID);
+ SMESH::smIdType theElementID);
// Concatenate the given meshes into one mesh
SMESH::SMESH_Mesh_ptr ConcatenateCommon(const SMESH::ListOfIDSources& meshesArray,
int RegisterObject(CORBA::Object_ptr theObject);
// Return id of registered object
- SMESH::smIdType GetObjectId(CORBA::Object_ptr theObject);
+ CORBA::Long GetObjectId(CORBA::Object_ptr theObject);
// Return an object that previously had an oldID
template<class TInterface>
{
if ( isGroupOnFilter ) // GetTypes() can be very long on GroupOnFilter!
{
- SMESH::long_array_var nbByType = mesh_i->GetNbElementsByType();
+ SMESH::smIdType_array_var nbByType = mesh_i->GetNbElementsByType();
isEmpty = ( nbByType[ grp->GetType() ] == 0 );
}
else
*/
//=============================================================================
-SMESH::smIdType SMESH_GroupBase_i::Size()
+CORBA::Long SMESH_GroupBase_i::Size()
{
if ( myPreMeshInfo )
return GetType() == SMESH::NODE ? myPreMeshInfo->NbNodes() : myPreMeshInfo->NbElements();
*/
//=============================================================================
-CORBA::Boolean SMESH_GroupBase_i::Contains( CORBA::Long theID )
+CORBA::Boolean SMESH_GroupBase_i::Contains( SMESH::smIdType theID )
{
if ( myPreMeshInfo )
myPreMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-SMESH::smIdType SMESH_Group_i::Add( const SMESH::long_array& theIDs )
+SMESH::smIdType SMESH_Group_i::Add( const SMESH::smIdType_array& theIDs )
{
if ( myPreMeshInfo )
myPreMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-SMESH::smIdType SMESH_Group_i::Remove( const SMESH::long_array& theIDs )
+SMESH::smIdType SMESH_Group_i::Remove( const SMESH::smIdType_array& theIDs )
{
if ( myPreMeshInfo )
myPreMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-SMESH::smIdType SMESH_GroupBase_i::GetID( CORBA::Long theIndex )
+SMESH::smIdType SMESH_GroupBase_i::GetID( SMESH::smIdType theIndex )
{
if ( myPreMeshInfo )
myPreMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-SMESH::long_array* SMESH_GroupBase_i::GetListOfID()
+SMESH::smIdType_array* SMESH_GroupBase_i::GetListOfID()
{
if ( myPreMeshInfo )
myPreMeshInfo->FullLoadFromFile();
- SMESH::long_array_var aRes = new SMESH::long_array();
+ SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
SMESHDS_GroupBase* aGroupDS = GetGroupDS();
if (aGroupDS)
{
*/
//================================================================================
-SMESH::long_array* SMESH_GroupBase_i::GetNodeIDs()
+SMESH::smIdType_array* SMESH_GroupBase_i::GetNodeIDs()
{
if ( GetType() == SMESH::NODE )
return GetListOfID();
if ( myPreMeshInfo )
myPreMeshInfo->FullLoadFromFile();
- SMESH::long_array_var aRes = new SMESH::long_array();
+ SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
if ( SMESHDS_GroupBase* g = GetGroupDS())
{
std::set<const SMDS_MeshNode* > nodes;
*
*/
//=============================================================================
-SMESH::smIdType SMESH_GroupBase_i::GetColorNumber()
+CORBA::Long SMESH_GroupBase_i::GetColorNumber()
{
SMESHDS_GroupBase* aGroupDS = GetGroupDS();
if (aGroupDS)
*/
//=============================================================================
-SMESH::long_array* SMESH_GroupBase_i::GetMeshInfo()
+SMESH::smIdType_array* SMESH_GroupBase_i::GetMeshInfo()
{
if ( myPreMeshInfo )
return myPreMeshInfo->GetMeshInfo();
- SMESH::long_array_var aRes = new SMESH::long_array();
+ SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::Entity_Last);
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
aRes[i] = 0;
*/
//=============================================================================
-SMESH::long_array* SMESH_GroupBase_i::GetNbElementsByType()
+SMESH::smIdType_array* SMESH_GroupBase_i::GetNbElementsByType()
{
- SMESH::long_array_var aRes = new SMESH::long_array();
+ SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::NB_ELEMENT_TYPES);
for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
aRes[ i ] = 0;
//purpose : Return ids of members
//=======================================================================
-SMESH::long_array* SMESH_GroupBase_i::GetIDs()
+SMESH::smIdType_array* SMESH_GroupBase_i::GetIDs()
{
return GetListOfID();
}
//purpose : Return ids of members
//=======================================================================
-SMESH::long_array* SMESH_GroupOnFilter_i::GetListOfID()
+SMESH::smIdType_array* SMESH_GroupOnFilter_i::GetListOfID()
{
if ( myPreMeshInfo )
myPreMeshInfo->FullLoadFromFile();
- SMESH::long_array_var aRes = new SMESH::long_array();
+ SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
SMESHDS_GroupBase* aGroupDS = GetGroupDS();
if ( SMESHDS_GroupOnFilter* grDS = dynamic_cast< SMESHDS_GroupOnFilter*>( GetGroupDS() ))
{
*/
//=============================================================================
-SMESH::long_array* SMESH_GroupOnFilter_i::GetMeshInfo()
+SMESH::smIdType_array* SMESH_GroupOnFilter_i::GetMeshInfo()
{
if ( myPreMeshInfo )
return myPreMeshInfo->GetMeshInfo();
- SMESH::long_array_var aRes = new SMESH::long_array();
+ SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::Entity_Last);
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
aRes[i] = 0;
void SetName(const char* name);
char* GetName();
SMESH::ElementType GetType();
- SMESH::smIdType Size();
+ CORBA::Long Size();
CORBA::Boolean IsEmpty();
- CORBA::Boolean Contains(CORBA::Long elem_id);
- SMESH::smIdType GetID(CORBA::Long elem_index);
- SMESH::long_array* GetListOfID();
- SMESH::long_array* GetNodeIDs();
+ CORBA::Boolean Contains(SMESH::smIdType elem_id);
+ SMESH::smIdType GetID(SMESH::smIdType elem_index);
+ SMESH::smIdType_array* GetListOfID();
+ SMESH::smIdType_array* GetNodeIDs();
SMESH::smIdType GetNumberOfNodes();
CORBA::Boolean IsNodeInfoAvailable(); // for gui
* Result array of number of elements per \a EntityType
* Inherited from SMESH_IDSource
*/
- virtual SMESH::long_array* GetMeshInfo();
+ virtual SMESH::smIdType_array* GetMeshInfo();
/*!
* Returns number of mesh elements of each \a ElementType
*/
- virtual SMESH::long_array* GetNbElementsByType();
+ virtual SMESH::smIdType_array* GetNbElementsByType();
/*!
* Returns a sequence of all element IDs
*/
- virtual SMESH::long_array* GetIDs();
+ virtual SMESH::smIdType_array* GetIDs();
/*!
* Returns types of elements it contains
* Inherited from SMESH_IDSource interface
SALOMEDS::Color GetColor();
void SetColorNumber(CORBA::Long color);
- SMESH::smIdType GetColorNumber();
+ CORBA::Long GetColorNumber();
protected:
const int theLocalID );
// CORBA interface implementation
void Clear();
- SMESH::smIdType Add( const SMESH::long_array& theIDs );
- SMESH::smIdType Remove( const SMESH::long_array& theIDs );
+ SMESH::smIdType Add( const SMESH::smIdType_array& theIDs );
+ SMESH::smIdType Remove( const SMESH::smIdType_array& theIDs );
SMESH::smIdType AddByPredicate( SMESH::Predicate_ptr thePredicate );
SMESH::smIdType RemoveByPredicate( SMESH::Predicate_ptr thePredicate );
void SetFilter(SMESH::Filter_ptr theFilter);
SMESH::Filter_ptr GetFilter();
virtual CORBA::Boolean IsUpToDate();
- virtual SMESH::long_array* GetListOfID();
- virtual SMESH::long_array* GetMeshInfo();
+ virtual SMESH::smIdType_array* GetListOfID();
+ virtual SMESH::smIdType_array* GetMeshInfo();
//! @return false in two cases: 1) if mesh not loaded and GetMeshInfo() returns
//! incorrect information 2) mesh loaded but group contents is not computed.
virtual bool IsMeshInfoCorrect();
*/
//=============================================================================
-SMESH::smIdType SMESH_Hypothesis_i::GetId()
+CORBA::Short SMESH_Hypothesis_i::GetId()
{
return myBaseImpl->GetID();
}
void SetLibName( const char* theLibName );
// Get unique id of hypothesis
- virtual SMESH::smIdType GetId();
+ virtual CORBA::Short GetId();
// Return true if a hypothesis has parameters
virtual CORBA::Boolean HasParameters();
if ( aMesh ) {
theFunctor->SetMesh( aMesh );
- SMESH::long_array_var anElementsId = theSource->GetIDs();
+ SMESH::smIdType_array_var anElementsId = theSource->GetIDs();
for ( CORBA::ULong i = 0; i < anElementsId->length(); i++) {
value += theFunctor->GetValue( anElementsId[i] );
}
bool isNode1 = isNodeType(types1);
bool isNode2 = isOrigin || isNodeType(types2);
- SMESH::long_array_var aElementsId1 = theSource1->GetIDs();
- SMESH::long_array_var aElementsId2;
+ SMESH::smIdType_array_var aElementsId1 = theSource1->GetIDs();
+ SMESH::smIdType_array_var aElementsId2;
// compute distance between two entities
/* NOTE: currently only node-to-node case is implemented
else
{
SMESH::array_of_ElementType_var types = theObject->GetTypes();
- SMESH::long_array_var aElementsId = theObject->GetIDs();
+ SMESH::smIdType_array_var aElementsId = theObject->GetIDs();
// here we assume that type of all IDs defined by first type in array
const bool isNode = isNodeType( types );
for(int i = 0, n = aElementsId->length(); i < n; i++)
*/
//================================================================================
- void arrayToSet(const SMESH::long_array & IDs,
- const SMESHDS_Mesh* aMesh,
- TIDSortedElemSet& aMap,
- const SMDSAbs_ElementType aType = SMDSAbs_All,
- SMDS_MeshElement::Filter* aFilter = NULL)
+ void arrayToSet(const SMESH::smIdType_array & IDs,
+ const SMESHDS_Mesh* aMesh,
+ TIDSortedElemSet& aMap,
+ const SMDSAbs_ElementType aType = SMDSAbs_All,
+ SMDS_MeshElement::Filter* aFilter = NULL)
{
SMDS_MeshElement::NonNullFilter filter1;
SMDS_MeshElement::TypeFilter filter2( aType );
SMDS_MeshElement::Filter & filter = *aFilter;
if ( aType == SMDSAbs_Node )
- for ( CORBA::ULong i = 0; i < IDs.length(); i++ ) {
+ for ( SMESH::smIdType i = 0; i < IDs.length(); i++ ) {
const SMDS_MeshElement * elem = aMesh->FindNode( IDs[i] );
if ( filter( elem ))
aMap.insert( aMap.end(), elem );
}
else
- for ( CORBA::ULong i = 0; i<IDs.length(); i++) {
+ for ( SMESH::smIdType i = 0; i<IDs.length(); i++) {
const SMDS_MeshElement * elem = aMesh->FindElement( IDs[i] );
if ( filter( elem ))
aMap.insert( aMap.end(), elem );
else
{
SMESH::array_of_ElementType_var types = theObject->GetTypes();
- SMESH::long_array_var aElementsId = theObject->GetIDs();
+ SMESH::smIdType_array_var aElementsId = theObject->GetIDs();
if ( types->length() == 1 && types[0] == SMESH::NODE)
{
for ( CORBA::ULong i = 0; i < aElementsId->length(); i++ )
*/
//================================================================================
-SMESH::long_array* SMESH_MeshEditor_i::GetLastCreatedNodes()
+SMESH::smIdType_array* SMESH_MeshEditor_i::GetLastCreatedNodes()
{
SMESH_TRY;
- SMESH::long_array_var myLastCreatedNodes = new SMESH::long_array();
+ SMESH::smIdType_array_var myLastCreatedNodes = new SMESH::smIdType_array();
const SMESH_SequenceOfElemPtr& aSeq = getEditor().GetLastCreatedNodes();
myLastCreatedNodes->length( aSeq.size() );
- for ( size_t i = 0; i < aSeq.size(); i++)
+ for ( smIdType i = 0; i < aSeq.size(); i++)
myLastCreatedNodes[i] = aSeq[i]->GetID();
return myLastCreatedNodes._retn();
*/
//================================================================================
-SMESH::long_array* SMESH_MeshEditor_i::GetLastCreatedElems()
+SMESH::smIdType_array* SMESH_MeshEditor_i::GetLastCreatedElems()
{
SMESH_TRY;
- SMESH::long_array_var myLastCreatedElems = new SMESH::long_array();
+ SMESH::smIdType_array_var myLastCreatedElems = new SMESH::smIdType_array();
const SMESH_SequenceOfElemPtr& aSeq = getEditor().GetLastCreatedElems();
myLastCreatedElems->length( aSeq.size() );
- for ( size_t i = 0; i < aSeq.size(); i++ )
+ for ( smIdType i = 0; i < aSeq.size(); i++ )
myLastCreatedElems[i] = aSeq[i]->GetID();
return myLastCreatedElems._retn();
struct SMESH_MeshEditor_i::_IDSource : public virtual POA_SMESH::SMESH_IDSource,
public virtual SALOME::GenericObj_i
{
- SMESH::long_array _ids;
- SMESH::ElementType _type;
- SMESH::SMESH_Mesh_ptr _mesh;
- SMESH::long_array* GetIDs() { return new SMESH::long_array( _ids ); }
- SMESH::long_array* GetMeshInfo() { return 0; }
- SMESH::long_array* GetNbElementsByType()
+ SMESH::smIdType_array _ids;
+ SMESH::ElementType _type;
+ SMESH::SMESH_Mesh_ptr _mesh;
+ SMESH::smIdType_array* GetIDs() { return new SMESH::smIdType_array( _ids ); }
+ SMESH::smIdType_array* GetMeshInfo() { return 0; }
+ SMESH::smIdType_array* GetNbElementsByType()
{
- SMESH::long_array_var aRes = new SMESH::long_array();
+ SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::NB_ELEMENT_TYPES);
- for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
+ for (smIdType i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
aRes[ i ] = ( i == _type ) ? _ids.length() : 0;
return aRes._retn();
}
}
};
-SMESH::SMESH_IDSource_ptr SMESH_MeshEditor_i::MakeIDSource(const SMESH::long_array& ids,
- SMESH::ElementType type)
+SMESH::SMESH_IDSource_ptr SMESH_MeshEditor_i::MakeIDSource(const SMESH::smIdType_array& ids,
+ SMESH::ElementType type)
{
_IDSource* idSrc = new _IDSource;
idSrc->_mesh = myMesh_i->_this();
//=============================================================================
CORBA::Boolean
-SMESH_MeshEditor_i::RemoveElements(const SMESH::long_array & IDsOfElements)
+SMESH_MeshEditor_i::RemoveElements(const SMESH::smIdType_array & IDsOfElements)
{
SMESH_TRY;
initData();
*/
//=============================================================================
-CORBA::Boolean SMESH_MeshEditor_i::RemoveNodes(const SMESH::long_array & IDsOfNodes)
+CORBA::Boolean SMESH_MeshEditor_i::RemoveNodes(const SMESH::smIdType_array & IDsOfNodes)
{
SMESH_TRY;
initData();
*/
//=============================================================================
-SMESH::smIdType SMESH_MeshEditor_i::Add0DElement(CORBA::Long IDOfNode,
- CORBA::Boolean DuplicateElements)
+SMESH::smIdType SMESH_MeshEditor_i::Add0DElement(SMESH::smIdType IDOfNode,
+ CORBA::Boolean DuplicateElements)
{
SMESH_TRY;
initData();
*/
//=============================================================================
-SMESH::smIdType SMESH_MeshEditor_i::AddBall(CORBA::Long IDOfNode, CORBA::Double diameter)
+SMESH::smIdType SMESH_MeshEditor_i::AddBall(SMESH::smIdType IDOfNode, CORBA::Double diameter)
{
SMESH_TRY;
initData();
*/
//=============================================================================
-SMESH::smIdType SMESH_MeshEditor_i::AddEdge(const SMESH::long_array & IDsOfNodes)
+SMESH::smIdType SMESH_MeshEditor_i::AddEdge(const SMESH::smIdType_array & IDsOfNodes)
{
SMESH_TRY;
initData();
*/
//=============================================================================
-SMESH::smIdType SMESH_MeshEditor_i::AddFace(const SMESH::long_array & IDsOfNodes)
+SMESH::smIdType SMESH_MeshEditor_i::AddFace(const SMESH::smIdType_array & IDsOfNodes)
{
SMESH_TRY;
initData();
*/
//=============================================================================
-SMESH::smIdType SMESH_MeshEditor_i::AddPolygonalFace (const SMESH::long_array & IDsOfNodes)
+SMESH::smIdType SMESH_MeshEditor_i::AddPolygonalFace (const SMESH::smIdType_array & IDsOfNodes)
{
SMESH_TRY;
initData();
*/
//=============================================================================
-SMESH::smIdType SMESH_MeshEditor_i::AddQuadPolygonalFace (const SMESH::long_array & IDsOfNodes)
+SMESH::smIdType SMESH_MeshEditor_i::AddQuadPolygonalFace (const SMESH::smIdType_array & IDsOfNodes)
{
SMESH_TRY;
initData();
*/
//=============================================================================
-SMESH::smIdType SMESH_MeshEditor_i::AddVolume(const SMESH::long_array & IDsOfNodes)
+SMESH::smIdType SMESH_MeshEditor_i::AddVolume(const SMESH::smIdType_array & IDsOfNodes)
{
SMESH_TRY;
initData();
* AddPolyhedralVolume
*/
//=============================================================================
-SMESH::smIdType SMESH_MeshEditor_i::AddPolyhedralVolume (const SMESH::long_array & IDsOfNodes,
+SMESH::smIdType SMESH_MeshEditor_i::AddPolyhedralVolume (const SMESH::smIdType_array & IDsOfNodes,
const SMESH::long_array & Quantities)
{
SMESH_TRY;
*/
//=============================================================================
-SMESH::smIdType SMESH_MeshEditor_i::AddPolyhedralVolumeByFaces (const SMESH::long_array & IdsOfFaces)
+SMESH::smIdType SMESH_MeshEditor_i::AddPolyhedralVolumeByFaces (const SMESH::smIdType_array & IdsOfFaces)
{
SMESH_TRY;
initData();
if ( idSourceToSet( theObject, getMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
getEditor().Create0DElementsOnAllNodes( elements, elems0D, theDuplicateElements );
- SMESH::long_array_var newElems = new SMESH::long_array;
+ SMESH::smIdType_array_var newElems = new SMESH::smIdType_array;
newElems->length( elems0D.size() );
TIDSortedElemSet::iterator eIt = elems0D.begin();
- for ( size_t i = 0; i < elems0D.size(); ++i, ++eIt )
+ for ( smIdType i = 0; i < elems0D.size(); ++i, ++eIt )
newElems[ i ] = (*eIt)->GetID();
SMESH::SMESH_GroupBase_var groupToFill;
*/
//=============================================================================
-void SMESH_MeshEditor_i::SetNodeOnVertex(CORBA::Long NodeID, CORBA::Long VertexID)
+void SMESH_MeshEditor_i::SetNodeOnVertex(SMESH::smIdType NodeID, CORBA::Long VertexID)
{
SMESH_TRY;
*/
//=============================================================================
-void SMESH_MeshEditor_i::SetNodeOnEdge(CORBA::Long NodeID, CORBA::Long EdgeID,
+void SMESH_MeshEditor_i::SetNodeOnEdge(SMESH::smIdType NodeID, CORBA::Long EdgeID,
CORBA::Double paramOnEdge)
{
SMESH_TRY;
*/
//=============================================================================
-void SMESH_MeshEditor_i::SetNodeOnFace(CORBA::Long NodeID, CORBA::Long FaceID,
+void SMESH_MeshEditor_i::SetNodeOnFace(SMESH::smIdType NodeID, CORBA::Long FaceID,
CORBA::Double u, CORBA::Double v)
{
SMESH_TRY;
*/
//=============================================================================
-void SMESH_MeshEditor_i::SetNodeInVolume(CORBA::Long NodeID, CORBA::Long SolidID)
+void SMESH_MeshEditor_i::SetNodeInVolume(SMESH::smIdType NodeID, CORBA::Long SolidID)
{
SMESH_TRY;
SMESHDS_Mesh * mesh = getMeshDS();
*/
//=============================================================================
-void SMESH_MeshEditor_i::SetMeshElementOnShape(CORBA::Long ElementID,
+void SMESH_MeshEditor_i::SetMeshElementOnShape(SMESH::smIdType ElementID,
CORBA::Long ShapeID)
{
SMESH_TRY;
*/
//=============================================================================
-CORBA::Boolean SMESH_MeshEditor_i::InverseDiag(CORBA::Long NodeID1,
- CORBA::Long NodeID2)
+CORBA::Boolean SMESH_MeshEditor_i::InverseDiag(SMESH::smIdType NodeID1,
+ SMESH::smIdType NodeID2)
{
SMESH_TRY;
initData();
*/
//=============================================================================
-CORBA::Boolean SMESH_MeshEditor_i::DeleteDiag(CORBA::Long NodeID1,
- CORBA::Long NodeID2)
+CORBA::Boolean SMESH_MeshEditor_i::DeleteDiag(SMESH::smIdType NodeID1,
+ SMESH::smIdType NodeID2)
{
SMESH_TRY;
initData();
*/
//=============================================================================
-CORBA::Boolean SMESH_MeshEditor_i::Reorient(const SMESH::long_array & IDsOfElements)
+CORBA::Boolean SMESH_MeshEditor_i::Reorient(const SMESH::smIdType_array & IDsOfElements)
{
SMESH_TRY;
initData();
prepareIdSource( theObject );
- SMESH::long_array_var anElementsId = theObject->GetIDs();
+ SMESH::smIdType_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = Reorient(anElementsId);
// Update Python script
//purpose : Reorient faces basing on orientation of adjacent volumes.
//=======================================================================
-SMESH::smIdType SMESH_MeshEditor_i::Reorient2DBy3D(const SMESH::ListOfIDSources& faceGroups,
+CORBA::Long SMESH_MeshEditor_i::Reorient2DBy3D(const SMESH::ListOfIDSources& faceGroups,
SMESH::SMESH_IDSource_ptr volumeGroup,
CORBA::Boolean outsideNormal)
{
*/
//=============================================================================
-CORBA::Boolean SMESH_MeshEditor_i::TriToQuad (const SMESH::long_array & IDsOfElements,
+CORBA::Boolean SMESH_MeshEditor_i::TriToQuad (const SMESH::smIdType_array & IDsOfElements,
SMESH::NumericalFunctor_ptr Criterion,
CORBA::Double MaxAngle)
{
TPythonDump aTPythonDump; // suppress dump in TriToQuad()
prepareIdSource( theObject );
- SMESH::long_array_var anElementsId = theObject->GetIDs();
+ SMESH::smIdType_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = TriToQuad(anElementsId, Criterion, MaxAngle);
if ( !myIsPreviewMode ) {
*/
//=============================================================================
-CORBA::Boolean SMESH_MeshEditor_i::QuadToTri (const SMESH::long_array & IDsOfElements,
+CORBA::Boolean SMESH_MeshEditor_i::QuadToTri (const SMESH::smIdType_array & IDsOfElements,
SMESH::NumericalFunctor_ptr Criterion)
{
SMESH_TRY;
TPythonDump aTPythonDump; // suppress dump in QuadToTri()
prepareIdSource( theObject );
- SMESH::long_array_var anElementsId = theObject->GetIDs();
+ SMESH::smIdType_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = QuadToTri(anElementsId, Criterion);
SMESH::NumericalFunctor_i* aNumericalFunctor =
*/
//=============================================================================
-CORBA::Boolean SMESH_MeshEditor_i::SplitQuad (const SMESH::long_array & IDsOfElements,
+CORBA::Boolean SMESH_MeshEditor_i::SplitQuad (const SMESH::smIdType_array & IDsOfElements,
CORBA::Boolean Diag13)
{
SMESH_TRY;
TPythonDump aTPythonDump; // suppress dump in SplitQuad()
prepareIdSource( theObject );
- SMESH::long_array_var anElementsId = theObject->GetIDs();
+ SMESH::smIdType_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = SplitQuad(anElementsId, Diag13);
// Update Python script
facetToSplitNormal.PS.z ));
TIDSortedElemSet elemSet;
prepareIdSource( elems );
- SMESH::long_array_var anElementsId = elems->GetIDs();
+ SMESH::smIdType_array_var anElementsId = elems->GetIDs();
SMDS_MeshElement::GeomFilter filter( SMDSGeom_HEXA );
arrayToSet( anElementsId, getMeshDS(), elemSet, SMDSAbs_Volume, &filter );
//=======================================================================
CORBA::Boolean
-SMESH_MeshEditor_i::Smooth(const SMESH::long_array & IDsOfElements,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
+SMESH_MeshEditor_i::Smooth(const SMESH::smIdType_array & IDsOfElements,
+ const SMESH::smIdType_array & IDsOfFixedNodes,
+ CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method)
{
//=======================================================================
CORBA::Boolean
-SMESH_MeshEditor_i::SmoothParametric(const SMESH::long_array & IDsOfElements,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
+SMESH_MeshEditor_i::SmoothParametric(const SMESH::smIdType_array & IDsOfElements,
+ const SMESH::smIdType_array & IDsOfFixedNodes,
+ CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method)
{
CORBA::Boolean
SMESH_MeshEditor_i::SmoothObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
+ const SMESH::smIdType_array & IDsOfFixedNodes,
+ CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method)
{
CORBA::Boolean
SMESH_MeshEditor_i::SmoothParametricObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
+ const SMESH::smIdType_array & IDsOfFixedNodes,
+ CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method)
{
//=============================================================================
CORBA::Boolean
-SMESH_MeshEditor_i::smooth(const SMESH::long_array & IDsOfElements,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
+SMESH_MeshEditor_i::smooth(const SMESH::smIdType_array & IDsOfElements,
+ const SMESH::smIdType_array & IDsOfFixedNodes,
+ CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method,
bool IsParametric)
arrayToSet(IDsOfElements, aMesh, elements, SMDSAbs_Face);
set<const SMDS_MeshNode*> fixedNodes;
- for ( CORBA::ULong i = 0; i < IDsOfFixedNodes.length(); i++) {
- CORBA::Long index = IDsOfFixedNodes[i];
+ for ( SMESH::smIdType i = 0; i < IDsOfFixedNodes.length(); i++) {
+ SMESH::smIdType index = IDsOfFixedNodes[i];
const SMDS_MeshNode * node = aMesh->FindNode(index);
if ( node )
fixedNodes.insert( node );
CORBA::Boolean
SMESH_MeshEditor_i::smoothObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
+ const SMESH::smIdType_array & IDsOfFixedNodes,
+ CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method,
bool IsParametric)
TPythonDump aTPythonDump; // suppress dump in smooth()
prepareIdSource( theObject );
- SMESH::long_array_var anElementsId = theObject->GetIDs();
+ SMESH::smIdType_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = smooth (anElementsId, IDsOfFixedNodes, MaxNbOfIterations,
MaxAspectRatio, Method, IsParametric);
//=======================================================================
SMESH::ListOfGroups*
-SMESH_MeshEditor_i::AdvancedExtrusion(const SMESH::long_array & theIDsOfElements,
- const SMESH::DirStruct & theStepVector,
- CORBA::Long theNbOfSteps,
- CORBA::Long theExtrFlags,
- CORBA::Double theSewTolerance,
- CORBA::Boolean theMakeGroups)
+SMESH_MeshEditor_i::AdvancedExtrusion(const SMESH::smIdType_array & theIDsOfElements,
+ const SMESH::DirStruct & theStepVector,
+ CORBA::Long theNbOfSteps,
+ CORBA::Long theExtrFlags,
+ CORBA::Double theSewTolerance,
+ CORBA::Boolean theMakeGroups)
{
SMESH_TRY;
initData();
const SMESH::ListOfIDSources & theFaces,
SMESH::SMESH_IDSource_ptr thePathObject,
GEOM::GEOM_Object_ptr thePathShape,
- CORBA::Long theNodeStart,
+ SMESH::smIdType theNodeStart,
CORBA::Boolean theHasAngles,
const SMESH::double_array & theAngles,
CORBA::Boolean theAnglesVariation,
//purpose :
//=======================================================================
-void SMESH_MeshEditor_i::Mirror(const SMESH::long_array & theIDsOfElements,
+void SMESH_MeshEditor_i::Mirror(const SMESH::smIdType_array & theIDsOfElements,
const SMESH::AxisStruct & theAxis,
SMESH::SMESH_MeshEditor::MirrorType theMirrorType,
CORBA::Boolean theCopy)
//=======================================================================
SMESH::ListOfGroups*
-SMESH_MeshEditor_i::MirrorMakeGroups(const SMESH::long_array& theIDsOfElements,
+SMESH_MeshEditor_i::MirrorMakeGroups(const SMESH::smIdType_array& theIDsOfElements,
const SMESH::AxisStruct& theMirror,
SMESH::SMESH_MeshEditor::MirrorType theMirrorType)
{
//=======================================================================
SMESH::SMESH_Mesh_ptr
-SMESH_MeshEditor_i::MirrorMakeMesh(const SMESH::long_array& theIDsOfElements,
+SMESH_MeshEditor_i::MirrorMakeMesh(const SMESH::smIdType_array& theIDsOfElements,
const SMESH::AxisStruct& theMirror,
SMESH::SMESH_MeshEditor::MirrorType theMirrorType,
CORBA::Boolean theCopyGroups,
//purpose :
//=======================================================================
-void SMESH_MeshEditor_i::Translate(const SMESH::long_array & theIDsOfElements,
- const SMESH::DirStruct & theVector,
- CORBA::Boolean theCopy)
+void SMESH_MeshEditor_i::Translate(const SMESH::smIdType_array & theIDsOfElements,
+ const SMESH::DirStruct & theVector,
+ CORBA::Boolean theCopy)
{
if (!myIsPreviewMode) {
TPythonDump() << this << ".Translate( "
//=======================================================================
SMESH::ListOfGroups*
-SMESH_MeshEditor_i::TranslateMakeGroups(const SMESH::long_array& theIDsOfElements,
- const SMESH::DirStruct& theVector)
+SMESH_MeshEditor_i::TranslateMakeGroups(const SMESH::smIdType_array& theIDsOfElements,
+ const SMESH::DirStruct& theVector)
{
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
//=======================================================================
SMESH::SMESH_Mesh_ptr
-SMESH_MeshEditor_i::TranslateMakeMesh(const SMESH::long_array& theIDsOfElements,
- const SMESH::DirStruct& theVector,
- CORBA::Boolean theCopyGroups,
- const char* theMeshName)
+SMESH_MeshEditor_i::TranslateMakeMesh(const SMESH::smIdType_array& theIDsOfElements,
+ const SMESH::DirStruct& theVector,
+ CORBA::Boolean theCopyGroups,
+ const char* theMeshName)
{
SMESH_Mesh_i* mesh_i;
SMESH::SMESH_Mesh_var mesh;
//purpose :
//=======================================================================
-void SMESH_MeshEditor_i::Rotate(const SMESH::long_array & theIDsOfElements,
- const SMESH::AxisStruct & theAxis,
- CORBA::Double theAngle,
- CORBA::Boolean theCopy)
+void SMESH_MeshEditor_i::Rotate(const SMESH::smIdType_array & theIDsOfElements,
+ const SMESH::AxisStruct & theAxis,
+ CORBA::Double theAngle,
+ CORBA::Boolean theCopy)
{
if (!myIsPreviewMode) {
TPythonDump() << this << ".Rotate( "
//=======================================================================
SMESH::ListOfGroups*
-SMESH_MeshEditor_i::RotateMakeGroups(const SMESH::long_array& theIDsOfElements,
- const SMESH::AxisStruct& theAxis,
- CORBA::Double theAngle)
+SMESH_MeshEditor_i::RotateMakeGroups(const SMESH::smIdType_array& theIDsOfElements,
+ const SMESH::AxisStruct& theAxis,
+ CORBA::Double theAngle)
{
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
//=======================================================================
SMESH::SMESH_Mesh_ptr
-SMESH_MeshEditor_i::RotateMakeMesh(const SMESH::long_array& theIDsOfElements,
- const SMESH::AxisStruct& theAxis,
- CORBA::Double theAngleInRadians,
- CORBA::Boolean theCopyGroups,
- const char* theMeshName)
+SMESH_MeshEditor_i::RotateMakeMesh(const SMESH::smIdType_array& theIDsOfElements,
+ const SMESH::AxisStruct& theAxis,
+ CORBA::Double theAngleInRadians,
+ CORBA::Boolean theCopyGroups,
+ const char* theMeshName)
{
SMESH_TRY;
SMESH::SMESH_Mesh_var mesh;
SMESH::array_of_ElementType_var elemTypes = theElementsToKeep[i]->GetTypes();
if ( elemTypes->length() == 1 && elemTypes[0] == SMESH::NODE )
continue;
- SMESH::long_array_var elementsId = theElementsToKeep[i]->GetIDs();
- for ( CORBA::ULong j = 0; j < elementsId->length(); ++j )
+ SMESH::smIdType_array_var elementsId = theElementsToKeep[i]->GetIDs();
+ for ( SMESH::smIdType j = 0; j < elementsId->length(); ++j )
idsToKeep.Add( elementsId[ j ]);
}
*/
//=============================================================================
-CORBA::Boolean SMESH_MeshEditor_i::MoveNode(CORBA::Long NodeID,
- CORBA::Double x,
- CORBA::Double y,
- CORBA::Double z)
+CORBA::Boolean SMESH_MeshEditor_i::MoveNode(SMESH::smIdType NodeID,
+ CORBA::Double x,
+ CORBA::Double y,
+ CORBA::Double z)
{
SMESH_TRY;
initData(/*deleteSearchers=*/false);
*/
//================================================================================
-CORBA::Long SMESH_MeshEditor_i::MoveClosestNodeToPoint(CORBA::Double x,
- CORBA::Double y,
- CORBA::Double z,
- CORBA::Long theNodeID)
+SMESH::smIdType SMESH_MeshEditor_i::MoveClosestNodeToPoint(CORBA::Double x,
+ CORBA::Double y,
+ CORBA::Double z,
+ SMESH::smIdType theNodeID)
{
SMESH_TRY;
// We keep theNodeSearcher until any mesh modification:
theSearchersDeleter.Set( myMesh ); // remove theNodeSearcher if mesh is other
- int nodeID = theNodeID;
+ smIdType nodeID = theNodeID;
const SMDS_MeshNode* node = getMeshDS()->FindNode( nodeID );
if ( !node ) // preview moving node
{
*/
//=======================================================================
-SMESH::long_array* SMESH_MeshEditor_i::FindElementsByPoint(CORBA::Double x,
+SMESH::smIdType_array* SMESH_MeshEditor_i::FindElementsByPoint(CORBA::Double x,
CORBA::Double y,
CORBA::Double z,
SMESH::ElementType type)
{
SMESH_TRY;
- SMESH::long_array_var res = new SMESH::long_array;
+ SMESH::smIdType_array_var res = new SMESH::smIdType_array;
vector< const SMDS_MeshElement* > foundElems;
theSearchersDeleter.Set( myMesh );
SMDSAbs_ElementType( type ),
foundElems);
res->length( foundElems.size() );
- for ( size_t i = 0; i < foundElems.size(); ++i )
+ for ( smIdType i = 0; i < foundElems.size(); ++i )
res[i] = foundElems[i]->GetID();
return res._retn();
// 'ALL' type means elements of any type excluding nodes
//=======================================================================
-SMESH::long_array*
+SMESH::smIdType_array*
SMESH_MeshEditor_i::FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elementIDs,
CORBA::Double x,
CORBA::Double y,
SMESH::ElementType type)
{
SMESH_TRY;
- SMESH::long_array_var res = new SMESH::long_array;
+ SMESH::smIdType_array_var res = new SMESH::smIdType_array;
prepareIdSource( elementIDs );
if ( type != SMESH::NODE )
SMDSAbs_ElementType( type ),
foundElems);
res->length( foundElems.size() );
- for ( size_t i = 0; i < foundElems.size(); ++i )
+ for ( smIdType i = 0; i < foundElems.size(); ++i )
res[i] = foundElems[i]->GetID();
return res._retn();
SMESH::array_of_long_array*
SMESH_MeshEditor_i::Get1DBranches( SMESH::SMESH_IDSource_ptr theEdges,
- CORBA::Long theStartNode,
+ SMESH::smIdType theStartNode,
SMESH::array_of_long_array_out theNodeGroups )
{
if ( CORBA::is_nil( theEdges ))
//=======================================================================
SMESH::SMESH_MeshEditor::Sew_Error
-SMESH_MeshEditor_i::SewFreeBorders(CORBA::Long FirstNodeID1,
- CORBA::Long SecondNodeID1,
- CORBA::Long LastNodeID1,
- CORBA::Long FirstNodeID2,
- CORBA::Long SecondNodeID2,
- CORBA::Long LastNodeID2,
- CORBA::Boolean CreatePolygons,
- CORBA::Boolean CreatePolyedrs)
+SMESH_MeshEditor_i::SewFreeBorders(SMESH::smIdType FirstNodeID1,
+ SMESH::smIdType SecondNodeID1,
+ SMESH::smIdType LastNodeID1,
+ SMESH::smIdType FirstNodeID2,
+ SMESH::smIdType SecondNodeID2,
+ SMESH::smIdType LastNodeID2,
+ CORBA::Boolean CreatePolygons,
+ CORBA::Boolean CreatePolyedrs)
{
SMESH_TRY;
initData();
//=======================================================================
SMESH::SMESH_MeshEditor::Sew_Error
-SMESH_MeshEditor_i::SewConformFreeBorders(CORBA::Long FirstNodeID1,
- CORBA::Long SecondNodeID1,
- CORBA::Long LastNodeID1,
- CORBA::Long FirstNodeID2,
- CORBA::Long SecondNodeID2)
+SMESH_MeshEditor_i::SewConformFreeBorders(SMESH::smIdType FirstNodeID1,
+ SMESH::smIdType SecondNodeID1,
+ SMESH::smIdType LastNodeID1,
+ SMESH::smIdType FirstNodeID2,
+ SMESH::smIdType SecondNodeID2)
{
SMESH_TRY;
initData();
//=======================================================================
SMESH::SMESH_MeshEditor::Sew_Error
-SMESH_MeshEditor_i::SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder,
- CORBA::Long SecondNodeIDOnFreeBorder,
- CORBA::Long LastNodeIDOnFreeBorder,
- CORBA::Long FirstNodeIDOnSide,
- CORBA::Long LastNodeIDOnSide,
- CORBA::Boolean CreatePolygons,
- CORBA::Boolean CreatePolyedrs)
+SMESH_MeshEditor_i::SewBorderToSide(SMESH::smIdType FirstNodeIDOnFreeBorder,
+ SMESH::smIdType SecondNodeIDOnFreeBorder,
+ SMESH::smIdType LastNodeIDOnFreeBorder,
+ SMESH::smIdType FirstNodeIDOnSide,
+ SMESH::smIdType LastNodeIDOnSide,
+ CORBA::Boolean CreatePolygons,
+ CORBA::Boolean CreatePolyedrs)
{
SMESH_TRY;
initData();
//=======================================================================
SMESH::SMESH_MeshEditor::Sew_Error
-SMESH_MeshEditor_i::SewSideElements(const SMESH::long_array& IDsOfSide1Elements,
- const SMESH::long_array& IDsOfSide2Elements,
- CORBA::Long NodeID1OfSide1ToMerge,
- CORBA::Long NodeID1OfSide2ToMerge,
- CORBA::Long NodeID2OfSide1ToMerge,
- CORBA::Long NodeID2OfSide2ToMerge)
+SMESH_MeshEditor_i::SewSideElements(const SMESH::smIdType_array& IDsOfSide1Elements,
+ const SMESH::smIdType_array& IDsOfSide2Elements,
+ SMESH::smIdType NodeID1OfSide1ToMerge,
+ SMESH::smIdType NodeID1OfSide2ToMerge,
+ SMESH::smIdType NodeID2OfSide1ToMerge,
+ SMESH::smIdType NodeID2OfSide2ToMerge)
{
SMESH_TRY;
initData();
*/
//================================================================================
-CORBA::Boolean SMESH_MeshEditor_i::ChangeElemNodes(CORBA::Long ide,
- const SMESH::long_array& newIDs)
+CORBA::Boolean SMESH_MeshEditor_i::ChangeElemNodes(SMESH::smIdType ide,
+ const SMESH::smIdType_array& newIDs)
{
SMESH_TRY;
initData();
}
}
prepareIdSource( theIDSource );
- SMESH::long_array_var anIDs = theIDSource->GetIDs();
+ SMESH::smIdType_array_var anIDs = theIDSource->GetIDs();
if ( anIDs->length() == 0 )
{
if ( error ) *error = IDSource_EMPTY;
*/
//================================================================================
-CORBA::Boolean SMESH_MeshEditor_i::DoubleNodes( const SMESH::long_array& theNodes,
- const SMESH::long_array& theModifiedElems )
+CORBA::Boolean SMESH_MeshEditor_i::DoubleNodes( const SMESH::smIdType_array& theNodes,
+ const SMESH::smIdType_array& theModifiedElems )
{
SMESH_TRY;
initData();
*/
//================================================================================
-CORBA::Boolean SMESH_MeshEditor_i::DoubleNode( CORBA::Long theNodeId,
- const SMESH::long_array& theModifiedElems )
+CORBA::Boolean SMESH_MeshEditor_i::DoubleNode( SMESH::smIdType theNodeId,
+ const SMESH::smIdType_array& theModifiedElems )
{
SMESH_TRY;
- SMESH::long_array_var aNodes = new SMESH::long_array;
+ SMESH::smIdType_array_var aNodes = new SMESH::smIdType_array;
aNodes->length( 1 );
aNodes[ 0 ] = theNodeId;
if ( CORBA::is_nil( theNodes ) && theNodes->GetType() != SMESH::NODE )
return false;
- SMESH::long_array_var aNodes = theNodes->GetListOfID();
- SMESH::long_array_var aModifiedElems;
+ SMESH::smIdType_array_var aNodes = theNodes->GetListOfID();
+ SMESH::smIdType_array_var aModifiedElems;
if ( !CORBA::is_nil( theModifiedElems ) )
aModifiedElems = theModifiedElems->GetListOfID();
else
- aModifiedElems = new SMESH::long_array;
+ aModifiedElems = new SMESH::smIdType_array;
TPythonDump pyDump; // suppress dump by the next line
return aNewGroup._retn();
// Duplicate nodes
- SMESH::long_array_var aNodes = theNodes->GetListOfID();
- SMESH::long_array_var aModifiedElems;
+ SMESH::smIdType_array_var aNodes = theNodes->GetListOfID();
+ SMESH::smIdType_array_var aModifiedElems;
if ( !CORBA::is_nil( theModifiedElems ) )
aModifiedElems = theModifiedElems->GetListOfID();
else {
- aModifiedElems = new SMESH::long_array;
+ aModifiedElems = new SMESH::smIdType_array;
aModifiedElems->length( 0 );
}
if ( aResult )
{
// Create group with newly created nodes
- SMESH::long_array_var anIds = GetLastCreatedNodes();
+ SMESH::smIdType_array_var anIds = GetLastCreatedNodes();
if (anIds->length() > 0) {
std::string anUnindexedName (theNodes->GetName());
std::string aNewName = GenerateGroupName(anUnindexedName + "_double");
initData();
std::list< int > aNodes;
- int i, n, j, m;
+ smIdType i, n, j, m;
for ( i = 0, n = theNodes.length(); i < n; i++ )
{
SMESH::SMESH_GroupBase_var aGrp = theNodes[ i ];
if ( !CORBA::is_nil( aGrp ) && aGrp->GetType() == SMESH::NODE )
{
- SMESH::long_array_var aCurr = aGrp->GetListOfID();
+ SMESH::smIdType_array_var aCurr = aGrp->GetListOfID();
for ( j = 0, m = aCurr->length(); j < m; j++ )
aNodes.push_back( aCurr[ j ] );
}
SMESH::SMESH_GroupBase_var aGrp = theModifiedElems[ i ];
if ( !CORBA::is_nil( aGrp ) && aGrp->GetType() != SMESH::NODE )
{
- SMESH::long_array_var aCurr = aGrp->GetListOfID();
+ SMESH::smIdType_array_var aCurr = aGrp->GetListOfID();
for ( j = 0, m = aCurr->length(); j < m; j++ )
anElems.push_back( aCurr[ j ] );
}
if ( aResult )
{
// Create group with newly created nodes
- SMESH::long_array_var anIds = GetLastCreatedNodes();
+ SMESH::smIdType_array_var anIds = GetLastCreatedNodes();
if (anIds->length() > 0) {
std::string anUnindexedName (theNodes[0]->GetName());
std::string aNewName = GenerateGroupName(anUnindexedName + "_double");
*/
//================================================================================
-CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElem( const SMESH::long_array& theElems,
- const SMESH::long_array& theNodesNot,
- const SMESH::long_array& theAffectedElems )
+CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElem( const SMESH::smIdType_array& theElems,
+ const SMESH::smIdType_array& theNodesNot,
+ const SMESH::smIdType_array& theAffectedElems )
{
SMESH_TRY;
initData();
*/
//================================================================================
-CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemInRegion ( const SMESH::long_array& theElems,
- const SMESH::long_array& theNodesNot,
- GEOM::GEOM_Object_ptr theShape )
+CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemInRegion ( const SMESH::smIdType_array& theElems,
+ const SMESH::smIdType_array& theNodesNot,
+ GEOM::GEOM_Object_ptr theShape )
{
SMESH_TRY;
initData();
std::string aNewName = GenerateGroupName( std::string(elemGroupName.in()) + "_double");
if ( !getEditor().GetLastCreatedElems().empty() && theElemGroupNeeded )
{
- SMESH::long_array_var anIds = GetLastCreatedElems();
+ SMESH::smIdType_array_var anIds = GetLastCreatedElems();
SMESH::ElementType aGroupType = myMesh_i->GetElementType(anIds[0], true);
aNewElemGroup = myMesh_i->CreateGroup(aGroupType, aNewName.c_str());
aNewElemGroup->Add(anIds);
}
if ( !getEditor().GetLastCreatedNodes().empty() && theNodeGroupNeeded )
{
- SMESH::long_array_var anIds = GetLastCreatedNodes();
+ SMESH::smIdType_array_var anIds = GetLastCreatedNodes();
aNewNodeGroup = myMesh_i->CreateGroup(SMESH::NODE, aNewName.c_str());
aNewNodeGroup->Add(anIds);
}
if ( !CORBA::is_nil( aGrp ) && (theIsNodeGrp ? aGrp->GetType() == SMESH::NODE
: aGrp->GetType() != SMESH::NODE ) )
{
- SMESH::long_array_var anIDs = aGrp->GetIDs();
+ SMESH::smIdType_array_var anIDs = aGrp->GetIDs();
arrayToSet( anIDs, theMeshDS, theElemSet, theIsNodeGrp ? SMDSAbs_Node : SMDSAbs_All );
}
}
std::string aNewName = GenerateGroupName( std::string(elemGroupName.in()) + "_double");
if ( !getEditor().GetLastCreatedElems().empty() && theElemGroupNeeded )
{
- SMESH::long_array_var anIds = GetLastCreatedElems();
+ SMESH::smIdType_array_var anIds = GetLastCreatedElems();
SMESH::ElementType aGroupType = myMesh_i->GetElementType(anIds[0], true);
aNewElemGroup = myMesh_i->CreateGroup(aGroupType, aNewName.c_str());
aNewElemGroup->Add(anIds);
}
if ( !getEditor().GetLastCreatedNodes().empty() && theNodeGroupNeeded )
{
- SMESH::long_array_var anIds = GetLastCreatedNodes();
+ SMESH::smIdType_array_var anIds = GetLastCreatedNodes();
aNewNodeGroup = myMesh_i->CreateGroup(SMESH::NODE, aNewName.c_str());
aNewNodeGroup->Add(anIds);
}
TPythonDump pyDump;
if ( aResult && anAffected.size() > 0 )
{
- SMESH::long_array_var volumeIds = new SMESH::long_array;
- SMESH::long_array_var faceIds = new SMESH::long_array;
- SMESH::long_array_var edgeIds = new SMESH::long_array;
+ SMESH::smIdType_array_var volumeIds = new SMESH::smIdType_array;
+ SMESH::smIdType_array_var faceIds = new SMESH::smIdType_array;
+ SMESH::smIdType_array_var edgeIds = new SMESH::smIdType_array;
volumeIds->length( anAffected.size() );
faceIds ->length( anAffected.size() );
edgeIds ->length( anAffected.size() );
{
// if ( aGrp->GetType() != SMESH::VOLUME )
// THROW_SALOME_CORBA_EXCEPTION("Not a volume group", SALOME::BAD_PARAM);
- SMESH::long_array_var anIDs = aGrp->GetIDs();
+ SMESH::smIdType_array_var anIDs = aGrp->GetIDs();
arrayToSet( anIDs, aMeshDS, domains[ i ], SMDSAbs_All );
}
}
TIDSortedElemSet faceGroup;
faceGroup.clear();
faceGroups.push_back(faceGroup);
- SMESH::long_array_var anIDs = aGrp->GetIDs();
+ SMESH::smIdType_array_var anIDs = aGrp->GetIDs();
arrayToSet( anIDs, aMeshDS, faceGroups[ i ], SMDSAbs_All );
}
}
*/
//================================================================================
-SMESH::smIdType SMESH_MeshEditor_i::MakeBoundaryElements(SMESH::Bnd_Dimension dim,
+CORBA::Long SMESH_MeshEditor_i::MakeBoundaryElements(SMESH::Bnd_Dimension dim,
const char* groupName,
const char* meshName,
CORBA::Boolean toCopyAll,
* created this method returns list of their IDs, if new nodes
* not created - returns an empty list
*/
- SMESH::long_array* GetLastCreatedNodes();
+ SMESH::smIdType_array* GetLastCreatedNodes();
/*!
* If during last operation of MeshEditor some elements were
* created this method returns list of their IDs, if new elements
* not created - returns an empty list
*/
- SMESH::long_array* GetLastCreatedElems();
+ SMESH::smIdType_array* GetLastCreatedElems();
/*!
* \brief Clears sequences of last created elements and nodes
*/
/*!
* \brief Wrap a sequence of ids in a SMESH_IDSource
*/
- SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::long_array& IDsOfElements,
- SMESH::ElementType type);
+ SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::smIdType_array& IDsOfElements,
+ SMESH::ElementType type);
static bool IsTemporaryIDSource( SMESH::SMESH_IDSource_ptr& idSource );
static SMESH::smIdType* GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource, int& nbIds );
*/
std::string GenerateGroupName(const std::string& thePrefix);
- CORBA::Boolean RemoveElements(const SMESH::long_array & IDsOfElements);
- CORBA::Boolean RemoveNodes (const SMESH::long_array & IDsOfNodes);
+ CORBA::Boolean RemoveElements(const SMESH::smIdType_array & IDsOfElements);
+ CORBA::Boolean RemoveNodes (const SMESH::smIdType_array & IDsOfNodes);
SMESH::smIdType RemoveOrphanNodes();
/*!
* Returns ID of created element or 0 if element not created
*/
SMESH::smIdType AddNode(CORBA::Double x, CORBA::Double y, CORBA::Double z);
- SMESH::smIdType Add0DElement(CORBA::Long IDOfNode, CORBA::Boolean DuplicateElements);
- SMESH::smIdType AddBall(CORBA::Long IDOfNodem, CORBA::Double diameter);
- SMESH::smIdType AddEdge(const SMESH::long_array & IDsOfNodes);
- SMESH::smIdType AddFace(const SMESH::long_array & IDsOfNodes);
- SMESH::smIdType AddPolygonalFace(const SMESH::long_array & IDsOfNodes);
- SMESH::smIdType AddQuadPolygonalFace(const SMESH::long_array & IDsOfNodes);
- SMESH::smIdType AddVolume(const SMESH::long_array & IDsOfNodes);
- SMESH::smIdType AddPolyhedralVolume(const SMESH::long_array & IDsOfNodes,
+ SMESH::smIdType Add0DElement(SMESH::smIdType IDOfNode, CORBA::Boolean DuplicateElements);
+ SMESH::smIdType AddBall(SMESH::smIdType IDOfNodem, CORBA::Double diameter);
+ SMESH::smIdType AddEdge(const SMESH::smIdType_array & IDsOfNodes);
+ SMESH::smIdType AddFace(const SMESH::smIdType_array & IDsOfNodes);
+ SMESH::smIdType AddPolygonalFace(const SMESH::smIdType_array & IDsOfNodes);
+ SMESH::smIdType AddQuadPolygonalFace(const SMESH::smIdType_array & IDsOfNodes);
+ SMESH::smIdType AddVolume(const SMESH::smIdType_array & IDsOfNodes);
+ SMESH::smIdType AddPolyhedralVolume(const SMESH::smIdType_array & IDsOfNodes,
const SMESH::long_array & Quantities);
- SMESH::smIdType AddPolyhedralVolumeByFaces(const SMESH::long_array & IdsOfFaces);
+ SMESH::smIdType AddPolyhedralVolumeByFaces(const SMESH::smIdType_array & IdsOfFaces);
/*!
* \brief Create 0D elements on all nodes of the given object except those
* \param NodeID - node ID
* \param VertexID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
*/
- void SetNodeOnVertex(CORBA::Long NodeID, CORBA::Long VertexID);
+ void SetNodeOnVertex(SMESH::smIdType NodeID, CORBA::Long VertexID);
/*!
* \brief Store node position on an edge
* \param NodeID - node ID
* \param EdgeID - edge ID available through GEOM_Object.GetSubShapeIndices()[0]
* \param paramOnEdge - parameter on edge where the node is located
*/
- void SetNodeOnEdge(CORBA::Long NodeID, CORBA::Long EdgeID,
+ void SetNodeOnEdge(SMESH::smIdType NodeID, CORBA::Long EdgeID,
CORBA::Double paramOnEdge);
/*!
* \brief Store node position on a face
* \param u - U parameter on face where the node is located
* \param v - V parameter on face where the node is located
*/
- void SetNodeOnFace(CORBA::Long NodeID, CORBA::Long FaceID,
+ void SetNodeOnFace(SMESH::smIdType NodeID, CORBA::Long FaceID,
CORBA::Double u, CORBA::Double v);
/*!
* \brief Bind a node to a solid
* \param NodeID - node ID
* \param SolidID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
*/
- void SetNodeInVolume(CORBA::Long NodeID, CORBA::Long SolidID);
+ void SetNodeInVolume(SMESH::smIdType NodeID, CORBA::Long SolidID);
/*!
* \brief Bind an element to a shape
* \param ElementID - element ID
* \param ShapeID - shape ID available through GEOM_Object.GetSubShapeIndices()[0]
*/
- void SetMeshElementOnShape(CORBA::Long ElementID, CORBA::Long ShapeID);
+ void SetMeshElementOnShape(SMESH::smIdType ElementID, CORBA::Long ShapeID);
- CORBA::Boolean MoveNode(CORBA::Long NodeID,
+ CORBA::Boolean MoveNode(SMESH::smIdType NodeID,
CORBA::Double x, CORBA::Double y, CORBA::Double z);
- CORBA::Boolean InverseDiag(CORBA::Long NodeID1, CORBA::Long NodeID2);
- CORBA::Boolean DeleteDiag(CORBA::Long NodeID1, CORBA::Long NodeID2);
- CORBA::Boolean Reorient(const SMESH::long_array & IDsOfElements);
+ CORBA::Boolean InverseDiag(SMESH::smIdType NodeID1, SMESH::smIdType NodeID2);
+ CORBA::Boolean DeleteDiag(SMESH::smIdType NodeID1, SMESH::smIdType NodeID2);
+ CORBA::Boolean Reorient(const SMESH::smIdType_array & IDsOfElements);
CORBA::Boolean ReorientObject(SMESH::SMESH_IDSource_ptr theObject);
/*!
* pointing either \a outside or \a inside the adjacent volumes.
* \return number of reoriented faces.
*/
- SMESH::smIdType Reorient2DBy3D(const SMESH::ListOfIDSources & faces,
+ CORBA::Long Reorient2DBy3D(const SMESH::ListOfIDSources & faces,
SMESH::SMESH_IDSource_ptr volumes,
CORBA::Boolean outsideNormal);
// Split/Join
- CORBA::Boolean TriToQuad (const SMESH::long_array & IDsOfElements,
- SMESH::NumericalFunctor_ptr Criterion,
- CORBA::Double MaxAngle);
- CORBA::Boolean TriToQuadObject (SMESH::SMESH_IDSource_ptr theObject,
- SMESH::NumericalFunctor_ptr Criterion,
- CORBA::Double MaxAngle);
- CORBA::Boolean QuadToTri (const SMESH::long_array & IDsOfElements,
- SMESH::NumericalFunctor_ptr Criterion);
- CORBA::Boolean QuadToTriObject (SMESH::SMESH_IDSource_ptr theObject,
- SMESH::NumericalFunctor_ptr Criterion);
- void QuadTo4Tri (SMESH::SMESH_IDSource_ptr theObject);
- CORBA::Boolean SplitQuad (const SMESH::long_array & IDsOfElements,
- CORBA::Boolean Diag13);
- CORBA::Boolean SplitQuadObject (SMESH::SMESH_IDSource_ptr theObject,
- CORBA::Boolean Diag13);
- CORBA::Long BestSplit (CORBA::Long IDOfQuad,
- SMESH::NumericalFunctor_ptr Criterion);
+ CORBA::Boolean TriToQuad (const SMESH::smIdType_array & IDsOfElements,
+ SMESH::NumericalFunctor_ptr Criterion,
+ CORBA::Double MaxAngle);
+ CORBA::Boolean TriToQuadObject (SMESH::SMESH_IDSource_ptr theObject,
+ SMESH::NumericalFunctor_ptr Criterion,
+ CORBA::Double MaxAngle);
+ CORBA::Boolean QuadToTri (const SMESH::smIdType_array & IDsOfElements,
+ SMESH::NumericalFunctor_ptr Criterion);
+ CORBA::Boolean QuadToTriObject (SMESH::SMESH_IDSource_ptr theObject,
+ SMESH::NumericalFunctor_ptr Criterion);
+ void QuadTo4Tri (SMESH::SMESH_IDSource_ptr theObject);
+ CORBA::Boolean SplitQuad (const SMESH::smIdType_array & IDsOfElements,
+ CORBA::Boolean Diag13);
+ CORBA::Boolean SplitQuadObject (SMESH::SMESH_IDSource_ptr theObject,
+ CORBA::Boolean Diag13);
+ CORBA::Long BestSplit (CORBA::Long IDOfQuad,
+ SMESH::NumericalFunctor_ptr Criterion);
void SplitVolumesIntoTetra(SMESH::SMESH_IDSource_ptr elems,
CORBA::Short methodFlags);
void SplitHexahedraIntoPrisms(SMESH::SMESH_IDSource_ptr elems,
CORBA::Boolean allDomains);
void SplitBiQuadraticIntoLinear(const SMESH::ListOfIDSources& elems);
- CORBA::Boolean Smooth(const SMESH::long_array & IDsOfElements,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
+ CORBA::Boolean Smooth(const SMESH::smIdType_array & IDsOfElements,
+ const SMESH::smIdType_array & IDsOfFixedNodes,
+ CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method);
CORBA::Boolean SmoothObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
+ const SMESH::smIdType_array & IDsOfFixedNodes,
+ CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method);
- CORBA::Boolean SmoothParametric(const SMESH::long_array & IDsOfElements,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
+ CORBA::Boolean SmoothParametric(const SMESH::smIdType_array & IDsOfElements,
+ const SMESH::smIdType_array & IDsOfFixedNodes,
+ CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method) ;
CORBA::Boolean SmoothParametricObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
+ const SMESH::smIdType_array & IDsOfFixedNodes,
+ CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method);
- CORBA::Boolean smooth(const SMESH::long_array & IDsOfElements,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
+ CORBA::Boolean smooth(const SMESH::smIdType_array & IDsOfElements,
+ const SMESH::smIdType_array & IDsOfFixedNodes,
+ CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method,
bool IsParametric);
CORBA::Boolean smoothObject(SMESH::SMESH_IDSource_ptr theObject,
- const SMESH::long_array & IDsOfFixedNodes,
- CORBA::Long MaxNbOfIterations,
+ const SMESH::smIdType_array & IDsOfFixedNodes,
+ CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method,
bool IsParametric);
CORBA::Boolean useInputElemsOnly,
CORBA::Boolean makeGroups,
CORBA::Short dim);
- SMESH::ListOfGroups* AdvancedExtrusion(const SMESH::long_array & theIDsOfElements,
- const SMESH::DirStruct & theStepVector,
- CORBA::Long theNbOfSteps,
- CORBA::Long theExtrFlags,
- CORBA::Double theSewTolerance,
- CORBA::Boolean theMakeGroups);
+ SMESH::ListOfGroups* AdvancedExtrusion(const SMESH::smIdType_array & theIDsOfElements,
+ const SMESH::DirStruct & theStepVector,
+ CORBA::Long theNbOfSteps,
+ CORBA::Long theExtrFlags,
+ CORBA::Double theSewTolerance,
+ CORBA::Boolean theMakeGroups);
SMESH::ListOfGroups*
ExtrusionAlongPathObjects(const SMESH::ListOfIDSources & Nodes,
const SMESH::ListOfIDSources & Faces,
SMESH::SMESH_IDSource_ptr PathMesh,
GEOM::GEOM_Object_ptr PathShape,
- CORBA::Long NodeStart,
+ SMESH::smIdType NodeStart,
CORBA::Boolean HasAngles,
const SMESH::double_array & Angles,
CORBA::Boolean AnglesVariation,
GEOM::GEOM_Object_ptr PathShape,
const SMESH::double_array & Angles);
- void Mirror(const SMESH::long_array & IDsOfElements,
+ void Mirror(const SMESH::smIdType_array & IDsOfElements,
const SMESH::AxisStruct & Axis,
SMESH::SMESH_MeshEditor::MirrorType MirrorType,
CORBA::Boolean Copy);
const SMESH::AxisStruct & Axis,
SMESH::SMESH_MeshEditor::MirrorType MirrorType,
CORBA::Boolean Copy);
- void Translate(const SMESH::long_array & IDsOfElements,
- const SMESH::DirStruct & Vector,
- CORBA::Boolean Copy);
+ void Translate(const SMESH::smIdType_array & IDsOfElements,
+ const SMESH::DirStruct & Vector,
+ CORBA::Boolean Copy);
void TranslateObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::DirStruct & Vector,
CORBA::Boolean Copy);
- void Rotate(const SMESH::long_array & IDsOfElements,
- const SMESH::AxisStruct & Axis,
- CORBA::Double Angle,
- CORBA::Boolean Copy);
+ void Rotate(const SMESH::smIdType_array & IDsOfElements,
+ const SMESH::AxisStruct & Axis,
+ CORBA::Double Angle,
+ CORBA::Boolean Copy);
void RotateObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::AxisStruct & Axis,
CORBA::Double Angle,
CORBA::Boolean Copy);
- SMESH::ListOfGroups* MirrorMakeGroups(const SMESH::long_array& IDsOfElements,
+ SMESH::ListOfGroups* MirrorMakeGroups(const SMESH::smIdType_array& IDsOfElements,
const SMESH::AxisStruct& Mirror,
SMESH::SMESH_MeshEditor::MirrorType MirrorType);
SMESH::ListOfGroups* MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
const SMESH::AxisStruct& Mirror,
SMESH::SMESH_MeshEditor::MirrorType MirrorType);
- SMESH::ListOfGroups* TranslateMakeGroups(const SMESH::long_array& IDsOfElements,
- const SMESH::DirStruct& Vector);
+ SMESH::ListOfGroups* TranslateMakeGroups(const SMESH::smIdType_array& IDsOfElements,
+ const SMESH::DirStruct& Vector);
SMESH::ListOfGroups* TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
const SMESH::DirStruct& Vector);
- SMESH::ListOfGroups* RotateMakeGroups(const SMESH::long_array& IDsOfElements,
- const SMESH::AxisStruct& Axis,
- CORBA::Double AngleInRadians);
+ SMESH::ListOfGroups* RotateMakeGroups(const SMESH::smIdType_array& IDsOfElements,
+ const SMESH::AxisStruct& Axis,
+ CORBA::Double AngleInRadians);
SMESH::ListOfGroups* RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
const SMESH::AxisStruct& Axis,
CORBA::Double AngleInRadians);
- SMESH::SMESH_Mesh_ptr MirrorMakeMesh(const SMESH::long_array& IDsOfElements,
+ SMESH::SMESH_Mesh_ptr MirrorMakeMesh(const SMESH::smIdType_array& IDsOfElements,
const SMESH::AxisStruct& Mirror,
SMESH::SMESH_MeshEditor::MirrorType MirrorType,
CORBA::Boolean CopyGroups,
SMESH::SMESH_MeshEditor::MirrorType MirrorType,
CORBA::Boolean CopyGroups,
const char* MeshName);
- SMESH::SMESH_Mesh_ptr TranslateMakeMesh(const SMESH::long_array& IDsOfElements,
- const SMESH::DirStruct& Vector,
- CORBA::Boolean CopyGroups,
- const char* MeshName);
+ SMESH::SMESH_Mesh_ptr TranslateMakeMesh(const SMESH::smIdType_array& IDsOfElements,
+ const SMESH::DirStruct& Vector,
+ CORBA::Boolean CopyGroups,
+ const char* MeshName);
SMESH::SMESH_Mesh_ptr TranslateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
const SMESH::DirStruct& Vector,
CORBA::Boolean CopyGroups,
const char* MeshName);
- SMESH::SMESH_Mesh_ptr RotateMakeMesh(const SMESH::long_array& IDsOfElements,
- const SMESH::AxisStruct& Axis,
- CORBA::Double AngleInRadians,
- CORBA::Boolean CopyGroups,
- const char* MeshName);
+ SMESH::SMESH_Mesh_ptr RotateMakeMesh(const SMESH::smIdType_array& IDsOfElements,
+ const SMESH::AxisStruct& Axis,
+ CORBA::Double AngleInRadians,
+ CORBA::Boolean CopyGroups,
+ const char* MeshName);
SMESH::SMESH_Mesh_ptr RotateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
const SMESH::AxisStruct& Axis,
CORBA::Double AngleInRadians,
void MergeElements(const SMESH::array_of_long_array& GroupsOfElementsID,
const SMESH::ListOfIDSources& ElementsToKeep);
void MergeEqualElements();
- CORBA::Long MoveClosestNodeToPoint(CORBA::Double x,
- CORBA::Double y,
- CORBA::Double z,
- CORBA::Long nodeID);
+ SMESH::smIdType MoveClosestNodeToPoint(CORBA::Double x,
+ CORBA::Double y,
+ CORBA::Double z,
+ SMESH::smIdType nodeID);
/*!
* \brief Return ID of node closest to a given point
*/
* Return elements of given type where the given point is IN or ON.
* 'ALL' type means elements of any type excluding nodes
*/
- SMESH::long_array* FindElementsByPoint(CORBA::Double x,
+ SMESH::smIdType_array* FindElementsByPoint(CORBA::Double x,
CORBA::Double y,
CORBA::Double z,
SMESH::ElementType type);
* where the given point is IN or ON.
* 'ALL' type means elements of any type excluding nodes
*/
- SMESH::long_array* FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elements,
+ SMESH::smIdType_array* FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elements,
CORBA::Double x,
CORBA::Double y,
CORBA::Double z,
* If a group is closed, the first and last nodes of the group are same.
*/
SMESH::array_of_long_array* Get1DBranches( SMESH::SMESH_IDSource_ptr edges,
- CORBA::Long startNode,
+ SMESH::smIdType startNode,
SMESH::array_of_long_array_out nodeGroups);
/*!
CORBA::Boolean createPolyedrs);
SMESH::SMESH_MeshEditor::Sew_Error
- SewFreeBorders(CORBA::Long FirstNodeID1,
- CORBA::Long SecondNodeID1,
- CORBA::Long LastNodeID1,
- CORBA::Long FirstNodeID2,
- CORBA::Long SecondNodeID2,
- CORBA::Long LastNodeID2,
- CORBA::Boolean CreatePolygons,
- CORBA::Boolean CreatePolyedrs);
+ SewFreeBorders(SMESH::smIdType FirstNodeID1,
+ SMESH::smIdType SecondNodeID1,
+ SMESH::smIdType LastNodeID1,
+ SMESH::smIdType FirstNodeID2,
+ SMESH::smIdType SecondNodeID2,
+ SMESH::smIdType LastNodeID2,
+ CORBA::Boolean CreatePolygons,
+ CORBA::Boolean CreatePolyedrs);
SMESH::SMESH_MeshEditor::Sew_Error
- SewConformFreeBorders(CORBA::Long FirstNodeID1,
- CORBA::Long SecondNodeID1,
- CORBA::Long LastNodeID1,
- CORBA::Long FirstNodeID2,
- CORBA::Long SecondNodeID2);
+ SewConformFreeBorders(SMESH::smIdType FirstNodeID1,
+ SMESH::smIdType SecondNodeID1,
+ SMESH::smIdType LastNodeID1,
+ SMESH::smIdType FirstNodeID2,
+ SMESH::smIdType SecondNodeID2);
SMESH::SMESH_MeshEditor::Sew_Error
- SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder,
- CORBA::Long SecondNodeIDOnFreeBorder,
- CORBA::Long LastNodeIDOnFreeBorder,
- CORBA::Long FirstNodeIDOnSide,
- CORBA::Long LastNodeIDOnSide,
+ SewBorderToSide(SMESH::smIdType FirstNodeIDOnFreeBorder,
+ SMESH::smIdType SecondNodeIDOnFreeBorder,
+ SMESH::smIdType LastNodeIDOnFreeBorder,
+ SMESH::smIdType FirstNodeIDOnSide,
+ SMESH::smIdType LastNodeIDOnSide,
CORBA::Boolean CreatePolygons,
CORBA::Boolean CreatePolyedrs);
SMESH::SMESH_MeshEditor::Sew_Error
- SewSideElements(const SMESH::long_array& IDsOfSide1Elements,
- const SMESH::long_array& IDsOfSide2Elements,
- CORBA::Long NodeID1OfSide1ToMerge,
- CORBA::Long NodeID1OfSide2ToMerge,
- CORBA::Long NodeID2OfSide1ToMerge,
- CORBA::Long NodeID2OfSide2ToMerge);
+ SewSideElements(const SMESH::smIdType_array& IDsOfSide1Elements,
+ const SMESH::smIdType_array& IDsOfSide2Elements,
+ SMESH::smIdType NodeID1OfSide1ToMerge,
+ SMESH::smIdType NodeID1OfSide2ToMerge,
+ SMESH::smIdType NodeID2OfSide1ToMerge,
+ SMESH::smIdType NodeID2OfSide2ToMerge);
/*!
* Set new nodes for given element.
* If number of nodes is not corresponded to type of
* element - returns false
*/
- CORBA::Boolean ChangeElemNodes(CORBA::Long ide, const SMESH::long_array& newIDs);
+ CORBA::Boolean ChangeElemNodes(SMESH::smIdType ide, const SMESH::smIdType_array& newIDs);
SMESH::SMESH_Group_ptr DoubleElements(SMESH::SMESH_IDSource_ptr theElements,
const char* theGroupName);
- CORBA::Boolean DoubleNodes( const SMESH::long_array& theNodes,
- const SMESH::long_array& theModifiedElems );
+ CORBA::Boolean DoubleNodes( const SMESH::smIdType_array& theNodes,
+ const SMESH::smIdType_array& theModifiedElems );
- CORBA::Boolean DoubleNode( CORBA::Long theNodeId,
- const SMESH::long_array& theModifiedElems );
+ CORBA::Boolean DoubleNode( SMESH::smIdType theNodeId,
+ const SMESH::smIdType_array& theModifiedElems );
CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theNodes,
SMESH::SMESH_GroupBase_ptr theModifiedElems );
* \return TRUE if operation has been completed successfully, FALSE otherwise
* \sa DoubleNodeGroup(), DoubleNodeGroups()
*/
- CORBA::Boolean DoubleNodeElem( const SMESH::long_array& theElems,
- const SMESH::long_array& theNodesNot,
- const SMESH::long_array& theAffectedElems );
+ CORBA::Boolean DoubleNodeElem( const SMESH::smIdType_array& theElems,
+ const SMESH::smIdType_array& theNodesNot,
+ const SMESH::smIdType_array& theAffectedElems );
/*!
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
* \return TRUE if operation has been completed successfully, FALSE otherwise
* \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
*/
- CORBA::Boolean DoubleNodeElemInRegion( const SMESH::long_array& theElems,
- const SMESH::long_array& theNodesNot,
- GEOM::GEOM_Object_ptr theShape );
+ CORBA::Boolean DoubleNodeElemInRegion( const SMESH::smIdType_array& theElems,
+ const SMESH::smIdType_array& theNodesNot,
+ GEOM::GEOM_Object_ptr theShape );
/*!
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
CORBA::Boolean toCopyMissingBondary,
SMESH::SMESH_Group_out group);
- SMESH::smIdType MakeBoundaryElements(SMESH::Bnd_Dimension dimension,
+ CORBA::Long MakeBoundaryElements(SMESH::Bnd_Dimension dimension,
const char* groupName,
const char* meshName,
CORBA::Boolean toCopyAll,
*/
//=============================================================================
-SMESH::smIdType SMESH_Mesh_i::NbGroups()
+CORBA::Long SMESH_Mesh_i::NbGroups()
{
Unexpect aCatch(SALOME_SalomeException);
return _mapGroups.size();
*/
//================================================================================
-SMESH::smIdType SMESH_Mesh_i::GetId()
+CORBA::Long SMESH_Mesh_i::GetId()
{
return _id;
}
*/
//=============================================================================
-SMESH::long_array* SMESH_Mesh_i::GetIDs()
+SMESH::smIdType_array* SMESH_Mesh_i::GetIDs()
{
return GetElementsId();
}
*/
//=============================================================================
-SMESH::long_array* SMESH_Mesh_i::GetElementsId()
+SMESH::smIdType_array* SMESH_Mesh_i::GetElementsId()
{
Unexpect aCatch(SALOME_SalomeException);
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
- SMESH::long_array_var aResult = new SMESH::long_array();
+ SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
SMESHDS_Mesh* aSMESHDS_Mesh = _impl->GetMeshDS();
if ( aSMESHDS_Mesh == NULL )
return aResult._retn();
- long nbElements = NbElements();
+ smIdType nbElements = NbElements();
aResult->length( nbElements );
SMDS_ElemIteratorPtr anIt = aSMESHDS_Mesh->elementsIterator();
- for ( int i = 0, n = nbElements; i < n && anIt->more(); i++ )
+ for ( smIdType i = 0, n = nbElements; i < n && anIt->more(); i++ )
aResult[i] = anIt->next()->GetID();
return aResult._retn();
*/
//=============================================================================
-SMESH::long_array* SMESH_Mesh_i::GetElementsByType( SMESH::ElementType theElemType )
+SMESH::smIdType_array* SMESH_Mesh_i::GetElementsByType( SMESH::ElementType theElemType )
{
Unexpect aCatch(SALOME_SalomeException);
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
- SMESH::long_array_var aResult = new SMESH::long_array();
+ SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
SMESHDS_Mesh* aSMESHDS_Mesh = _impl->GetMeshDS();
if ( aSMESHDS_Mesh == NULL )
return aResult._retn();
- long nbElements = NbElements();
+ smIdType nbElements = NbElements();
// No sense in returning ids of elements along with ids of nodes:
// when theElemType == SMESH::ALL, return node ids only if
aResult->length( nbElements );
- int i = 0;
+ smIdType i = 0;
SMDS_ElemIteratorPtr anIt = aSMESHDS_Mesh->elementsIterator( (SMDSAbs_ElementType)theElemType );
while ( i < nbElements && anIt->more() )
*/
//=============================================================================
-SMESH::long_array* SMESH_Mesh_i::GetNodesId()
+SMESH::smIdType_array* SMESH_Mesh_i::GetNodesId()
{
Unexpect aCatch(SALOME_SalomeException);
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
- SMESH::long_array_var aResult = new SMESH::long_array();
+ SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
SMESHDS_Mesh* aMeshDS = _impl->GetMeshDS();
if ( aMeshDS == NULL )
return aResult._retn();
- long nbNodes = NbNodes();
+ smIdType nbNodes = NbNodes();
aResult->length( nbNodes );
SMDS_NodeIteratorPtr anIt = aMeshDS->nodesIterator();
- for ( int i = 0, n = nbNodes; i < n && anIt->more(); i++ )
+ for ( smIdType i = 0, n = nbNodes; i < n && anIt->more(); i++ )
aResult[i] = anIt->next()->GetID();
return aResult._retn();
*/
//=============================================================================
-SMESH::ElementType SMESH_Mesh_i::GetElementType( const CORBA::Long id, const bool iselem )
+SMESH::ElementType SMESH_Mesh_i::GetElementType( const SMESH::smIdType id, const bool iselem )
{
SMESH::ElementType type = SMESH::ALL;
SMESH_TRY;
*/
//=============================================================================
-SMESH::EntityType SMESH_Mesh_i::GetElementGeomType( const CORBA::Long id )
+SMESH::EntityType SMESH_Mesh_i::GetElementGeomType( const SMESH::smIdType id )
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-SMESH::GeometryType SMESH_Mesh_i::GetElementShape( const CORBA::Long id )
+SMESH::GeometryType SMESH_Mesh_i::GetElementShape( const SMESH::smIdType id )
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-SMESH::long_array* SMESH_Mesh_i::GetSubMeshElementsId(const CORBA::Long ShapeID)
+SMESH::smIdType_array* SMESH_Mesh_i::GetSubMeshElementsId(const CORBA::Long ShapeID)
{
- SMESH::long_array_var aResult = new SMESH::long_array();
+ SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
SMESH_TRY;
if ( _preMeshInfo )
aResult->length(SDSM->NbElements());
SMDS_ElemIteratorPtr eIt = SDSM->GetElements();
- int i = 0;
+ smIdType i = 0;
while ( eIt->more() ) {
aResult[i++] = eIt->next()->GetID();
}
*/
//=============================================================================
-SMESH::long_array* SMESH_Mesh_i::GetSubMeshNodesId(const CORBA::Long ShapeID,
+SMESH::smIdType_array* SMESH_Mesh_i::GetSubMeshNodesId(const CORBA::Long ShapeID,
CORBA::Boolean all)
{
- SMESH::long_array_var aResult = new SMESH::long_array();
+ SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
SMESH_TRY;
if ( _preMeshInfo )
SMESHDS_SubMesh* SDSM = SM->GetSubMeshDS();
if(!SDSM) return aResult._retn();
- set<int> theElems;
+ set<smIdType> theElems;
if( !all || (SDSM->NbElements()==0) ) { // internal nodes or vertex submesh
SMDS_NodeIteratorPtr nIt = SDSM->GetNodes();
while ( nIt->more() ) {
}
aResult->length(theElems.size());
- set<int>::iterator itElem;
- int i = 0;
+ set<smIdType>::iterator itElem;
+ smIdType i = 0;
for ( itElem = theElems.begin(); itElem != theElems.end(); itElem++ )
aResult[i++] = *itElem;
*/
//=============================================================================
-SMESH::double_array* SMESH_Mesh_i::GetNodeXYZ(const CORBA::Long id)
+SMESH::double_array* SMESH_Mesh_i::GetNodeXYZ(const SMESH::smIdType id)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-SMESH::long_array* SMESH_Mesh_i::GetNodeInverseElements(const CORBA::Long id,
- SMESH::ElementType elemType)
+SMESH::smIdType_array* SMESH_Mesh_i::GetNodeInverseElements(const SMESH::smIdType id,
+ SMESH::ElementType elemType)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
- SMESH::long_array_var aResult = new SMESH::long_array();
+ SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
SMESHDS_Mesh* aMeshDS = _impl->GetMeshDS();
if ( aMeshDS == NULL )
return aResult._retn();
SMDSAbs_ElementType type = SMDSAbs_ElementType( elemType );
SMDS_ElemIteratorPtr eIt = aNode->GetInverseElementIterator( type );
aResult->length( aNode->NbInverseElements( type ));
- for( int i = 0; eIt->more(); ++i )
+ for( smIdType i = 0; eIt->more(); ++i )
{
const SMDS_MeshElement* elem = eIt->next();
aResult[ i ] = elem->GetID();
*/
//=============================================================================
-SMESH::NodePosition* SMESH_Mesh_i::GetNodePosition(CORBA::Long NodeID)
+SMESH::NodePosition* SMESH_Mesh_i::GetNodePosition(SMESH::smIdType NodeID)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-SMESH::ElementPosition SMESH_Mesh_i::GetElementPosition(CORBA::Long ElemID)
+SMESH::ElementPosition SMESH_Mesh_i::GetElementPosition(SMESH::smIdType ElemID)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-CORBA::Long SMESH_Mesh_i::GetShapeID(const CORBA::Long id)
+CORBA::Long SMESH_Mesh_i::GetShapeID(const SMESH::smIdType id)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-CORBA::Long SMESH_Mesh_i::GetShapeIDForElem(const CORBA::Long id)
+CORBA::Long SMESH_Mesh_i::GetShapeIDForElem(const SMESH::smIdType id)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-CORBA::Long SMESH_Mesh_i::GetElemNbNodes(const CORBA::Long id)
+CORBA::Short SMESH_Mesh_i::GetElemNbNodes(const SMESH::smIdType id)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-CORBA::Long SMESH_Mesh_i::GetElemNode(const CORBA::Long id, const CORBA::Long index)
+SMESH::smIdType SMESH_Mesh_i::GetElemNode(const SMESH::smIdType id, const CORBA::Short index)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-SMESH::long_array* SMESH_Mesh_i::GetElemNodes(const CORBA::Long id)
+SMESH::smIdType_array* SMESH_Mesh_i::GetElemNodes(const SMESH::smIdType id)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
- SMESH::long_array_var aResult = new SMESH::long_array();
+ SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
if ( SMESHDS_Mesh* aMeshDS = _impl->GetMeshDS() )
{
if ( const SMDS_MeshElement* elem = aMeshDS->FindElement(id) )
{
aResult->length( elem->NbNodes() );
- for ( CORBA::ULong i = 0; i < aResult->length(); ++i )
+ for ( SMESH::smIdType i = 0; i < aResult->length(); ++i )
if ( const SMDS_MeshNode* n = elem->GetNode( i ))
aResult[ i ] = n->GetID();
}
*/
//=============================================================================
-CORBA::Boolean SMESH_Mesh_i::IsMediumNode(const CORBA::Long ide, const CORBA::Long idn)
+CORBA::Boolean SMESH_Mesh_i::IsMediumNode(const SMESH::smIdType ide, const SMESH::smIdType idn)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-CORBA::Boolean SMESH_Mesh_i::IsMediumNodeOfAnyElem(const CORBA::Long idn,
+CORBA::Boolean SMESH_Mesh_i::IsMediumNodeOfAnyElem(const SMESH::smIdType idn,
SMESH::ElementType theElemType)
{
if ( _preMeshInfo )
*/
//=============================================================================
-CORBA::Long SMESH_Mesh_i::ElemNbEdges(const CORBA::Long id)
+CORBA::Long SMESH_Mesh_i::ElemNbEdges(const SMESH::smIdType id)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-CORBA::Long SMESH_Mesh_i::ElemNbFaces(const CORBA::Long id)
+CORBA::Long SMESH_Mesh_i::ElemNbFaces(const SMESH::smIdType id)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//================================================================================
-SMESH::long_array* SMESH_Mesh_i::GetElemFaceNodes(CORBA::Long elemId,
- CORBA::Short faceIndex)
+SMESH::smIdType_array* SMESH_Mesh_i::GetElemFaceNodes(SMESH::smIdType elemId,
+ CORBA::Short faceIndex)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
- SMESH::long_array_var aResult = new SMESH::long_array();
+ SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
if ( SMESHDS_Mesh* aMeshDS = _impl->GetMeshDS() )
{
if ( const SMDS_MeshElement* elem = aMeshDS->FindElement(elemId) )
{
aResult->length( vtool.NbFaceNodes( faceIndex ));
const SMDS_MeshNode** nn = vtool.GetFaceNodes( faceIndex );
- for ( CORBA::ULong i = 0; i < aResult->length(); ++i )
+ for ( SMESH::smIdType i = 0; i < aResult->length(); ++i )
aResult[ i ] = nn[ i ]->GetID();
}
}
*/
//================================================================================
-SMESH::smIdType SMESH_Mesh_i::FindElementByNodes(const SMESH::long_array& nodes)
+SMESH::smIdType SMESH_Mesh_i::FindElementByNodes(const SMESH::smIdType_array& nodes)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//================================================================================
-SMESH::long_array* SMESH_Mesh_i::GetElementsByNodes(const SMESH::long_array& nodes,
- SMESH::ElementType elemType)
+SMESH::smIdType_array* SMESH_Mesh_i::GetElementsByNodes(const SMESH::smIdType_array& nodes,
+ SMESH::ElementType elemType)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
- SMESH::long_array_var result = new SMESH::long_array();
+ SMESH::smIdType_array_var result = new SMESH::smIdType_array();
if ( SMESHDS_Mesh* mesh = _impl->GetMeshDS() )
{
vector< const SMDS_MeshNode * > nn( nodes.length() );
- for ( CORBA::ULong i = 0; i < nodes.length(); ++i )
+ for ( SMESH::smIdType i = 0; i < nodes.length(); ++i )
nn[i] = mesh->FindNode( nodes[i] );
std::vector<const SMDS_MeshElement *> elems;
mesh->GetElementsByNodes( nn, elems, (SMDSAbs_ElementType) elemType );
result->length( elems.size() );
- for ( size_t i = 0; i < elems.size(); ++i )
+ for ( smIdType i = 0; i < elems.size(); ++i )
result[i] = elems[i]->GetID();
}
return result._retn();
*/
//=============================================================================
-CORBA::Boolean SMESH_Mesh_i::IsPoly(const CORBA::Long id)
+CORBA::Boolean SMESH_Mesh_i::IsPoly(const SMESH::smIdType id)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-CORBA::Boolean SMESH_Mesh_i::IsQuadratic(const CORBA::Long id)
+CORBA::Boolean SMESH_Mesh_i::IsQuadratic(const SMESH::smIdType id)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-CORBA::Double SMESH_Mesh_i::GetBallDiameter(CORBA::Long id)
+CORBA::Double SMESH_Mesh_i::GetBallDiameter(SMESH::smIdType id)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-SMESH::double_array* SMESH_Mesh_i::BaryCenter(const CORBA::Long id)
+SMESH::double_array* SMESH_Mesh_i::BaryCenter(const SMESH::smIdType id)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-SMESH::long_array* SMESH_Mesh_i::GetMeshInfo()
+SMESH::smIdType_array* SMESH_Mesh_i::GetMeshInfo()
{
if ( _preMeshInfo )
return _preMeshInfo->GetMeshInfo();
- SMESH::long_array_var aRes = new SMESH::long_array();
+ SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::Entity_Last);
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
aRes[i] = 0;
*/
//=============================================================================
-SMESH::long_array* SMESH_Mesh_i::GetNbElementsByType()
+SMESH::smIdType_array* SMESH_Mesh_i::GetNbElementsByType()
{
- SMESH::long_array_var aRes = new SMESH::long_array();
+ SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::NB_ELEMENT_TYPES);
- for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
+ for (smIdType i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
aRes[ i ] = 0;
const SMDS_MeshInfo* meshInfo = 0;
meshInfo = & meshDS->GetMeshInfo();
if (meshInfo)
- for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
+ for (smIdType i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
aRes[i] = meshInfo->NbElements((SMDSAbs_ElementType)i);
return aRes._retn();
//=============================================================================
void SMESH_Mesh_i::CollectMeshInfo(const SMDS_ElemIteratorPtr theItr,
- SMESH::long_array& theInfo)
+ SMESH::smIdType_array& theInfo)
{
if (!theItr) return;
while (theItr->more())
//-----------------------------------------------------------------------------
struct IDSourceIterator : public SMDS_ElemIterator
{
- const SMESH::smIdType* _idPtr;
- const CORBA::Long* _idEndPtr;
- SMESH::long_array_var _idArray;
- const SMDS_Mesh* _mesh;
- const SMDSAbs_ElementType _type;
- const SMDS_MeshElement* _elem;
-
- IDSourceIterator( const SMDS_Mesh* mesh,
- const CORBA::Long* ids,
- const int nbIds,
- SMDSAbs_ElementType type):
+ const SMESH::smIdType* _idPtr;
+ const SMESH::smIdType* _idEndPtr;
+ SMESH::smIdType_array_var _idArray;
+ const SMDS_Mesh* _mesh;
+ const SMDSAbs_ElementType _type;
+ const SMDS_MeshElement* _elem;
+
+ IDSourceIterator( const SMDS_Mesh* mesh,
+ const SMESH::smIdType* ids,
+ const smIdType nbIds,
+ SMDSAbs_ElementType type):
_idPtr( ids ), _idEndPtr( ids + nbIds ), _mesh( mesh ), _type( type ), _elem( 0 )
{
if ( _idPtr && nbIds && _mesh )
next();
}
- IDSourceIterator( const SMDS_Mesh* mesh,
- SMESH::long_array* idArray,
- SMDSAbs_ElementType type):
+ IDSourceIterator( const SMDS_Mesh* mesh,
+ SMESH::smIdType_array* idArray,
+ SMDSAbs_ElementType type):
_idPtr( 0 ), _idEndPtr( 0 ), _idArray( idArray), _mesh( mesh ), _type( type ), _elem( 0 )
{
if ( idArray && _mesh )
}
else
{
- SMESH::long_array_var ids = theObject->GetIDs();
+ SMESH::smIdType_array_var ids = theObject->GetIDs();
elemIt = SMDS_ElemIteratorPtr( new IDSourceIterator( meshDS, ids._retn(), iterType ));
}
typeOK = ( isNodes == ( elemType == SMDSAbs_Node )) || ( elemType == SMDSAbs_All );
else
{
TMeshInfo tmpInfo;
- SMESH::long_array_var anIDs = meshPart->GetIDs();
+ SMESH::smIdType_array_var anIDs = meshPart->GetIDs();
SMESH::array_of_ElementType_var types = meshPart->GetTypes();
if ( types->length() == 1 && types[0] == SMESH::NODE ) // group of nodes
{
SMESH::ListOfGroups* GetGroups();
- SMESH::smIdType NbGroups();
+ CORBA::Long NbGroups();
SMESH::SMESH_Group_ptr UnionGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
SMESH::SMESH_GroupBase_ptr theGroup2,
void ClearLog();
- SMESH::smIdType GetId();
+ CORBA::Long GetId();
// --- C++ interface
SMESH::smIdType NbSubMesh();
- SMESH::long_array* GetElementsId();
+ SMESH::smIdType_array* GetElementsId();
- SMESH::long_array* GetElementsByType( SMESH::ElementType theElemType );
+ SMESH::smIdType_array* GetElementsByType( SMESH::ElementType theElemType );
- SMESH::long_array* GetNodesId();
+ SMESH::smIdType_array* GetNodesId();
- SMESH::ElementType GetElementType( CORBA::Long id, bool iselem );
+ SMESH::ElementType GetElementType( SMESH::smIdType id, bool iselem );
- SMESH::EntityType GetElementGeomType( CORBA::Long id );
+ SMESH::EntityType GetElementGeomType( SMESH::smIdType id );
- SMESH::GeometryType GetElementShape( CORBA::Long id );
+ SMESH::GeometryType GetElementShape( SMESH::smIdType id );
/*!
* Returns ID of elements for given submesh
*/
- SMESH::long_array* GetSubMeshElementsId(CORBA::Long ShapeID);
+ SMESH::smIdType_array* GetSubMeshElementsId(CORBA::Long ShapeID);
/*!
* Returns ID of nodes for given submesh
* If param all==true - returns all nodes, else -
* returns only nodes on shapes.
*/
- SMESH::long_array* GetSubMeshNodesId(CORBA::Long ShapeID, CORBA::Boolean all);
+ SMESH::smIdType_array* GetSubMeshNodesId(CORBA::Long ShapeID, CORBA::Boolean all);
/*!
* Returns type of elements for given submesh
* Get XYZ coordinates of node as list of double
* If there is not node for given ID - returns empty list
*/
- SMESH::double_array* GetNodeXYZ(CORBA::Long id);
+ SMESH::double_array* GetNodeXYZ(SMESH::smIdType id);
/*!
* For given node returns list of IDs of inverse elements
* If there is not node for given ID - returns empty list
*/
- SMESH::long_array* GetNodeInverseElements(CORBA::Long id,
+ SMESH::smIdType_array* GetNodeInverseElements(SMESH::smIdType id,
SMESH::ElementType elemType);
/*!
* \brief Return position of a node on shape
*/
- SMESH::NodePosition* GetNodePosition(CORBA::Long NodeID);
+ SMESH::NodePosition* GetNodePosition(SMESH::smIdType NodeID);
/*!
* \brief Return position of an element on shape
*/
- SMESH::ElementPosition GetElementPosition(CORBA::Long ElemID);
+ SMESH::ElementPosition GetElementPosition(SMESH::smIdType ElemID);
/*!
* If given element is node returns IDs of shape from position
* If there is not node for given ID - returns -1
*/
- CORBA::Long GetShapeID(CORBA::Long id);
+ CORBA::Long GetShapeID(SMESH::smIdType id);
/*!
* For given element returns ID of result shape after
* ::FindShape() from SMESH_MeshEditor
* If there is not element for given ID - returns -1
*/
- CORBA::Long GetShapeIDForElem(CORBA::Long id);
+ CORBA::Long GetShapeIDForElem(SMESH::smIdType id);
/*!
* Returns number of nodes for given element
* If there is not element for given ID - returns -1
*/
- CORBA::Long GetElemNbNodes(CORBA::Long id);
+ CORBA::Short GetElemNbNodes(SMESH::smIdType id);
/*!
* Returns IDs of nodes of given element
*/
- SMESH::long_array* GetElemNodes(CORBA::Long id);
+ SMESH::smIdType_array* GetElemNodes(SMESH::smIdType id);
/*!
* Returns ID of node by given index for given element
* If there is not element for given ID - returns -1
* If there is not node for given index - returns -2
*/
- CORBA::Long GetElemNode(CORBA::Long id, CORBA::Long index);
+ SMESH::smIdType GetElemNode(SMESH::smIdType id, CORBA::Short index);
/*!
* Returns true if given node is medium node
* in given quadratic element
*/
- CORBA::Boolean IsMediumNode(CORBA::Long ide, CORBA::Long idn);
+ CORBA::Boolean IsMediumNode(SMESH::smIdType ide, SMESH::smIdType idn);
/*!
* Returns true if given node is medium node
* in one of quadratic elements
*/
- CORBA::Boolean IsMediumNodeOfAnyElem(CORBA::Long idn,
+ CORBA::Boolean IsMediumNodeOfAnyElem(SMESH::smIdType idn,
SMESH::ElementType elemType);
/*!
* Returns number of edges for given element
*/
- CORBA::Long ElemNbEdges(CORBA::Long id);
+ CORBA::Long ElemNbEdges(SMESH::smIdType id);
/*!
* Returns number of faces for given element
*/
- CORBA::Long ElemNbFaces(CORBA::Long id);
+ CORBA::Long ElemNbFaces(SMESH::smIdType id);
/*!
* Returns nodes of given face (counted from zero) for given element.
*/
- SMESH::long_array* GetElemFaceNodes(CORBA::Long elemId, CORBA::Short faceIndex);
+ SMESH::smIdType_array* GetElemFaceNodes(SMESH::smIdType elemId, CORBA::Short faceIndex);
/*!
* Returns three components of normal of given mesh face (or an empty array in KO case)
/*!
* Returns an element based on all given nodes.
*/
- SMESH::smIdType FindElementByNodes(const SMESH::long_array& nodes);
+ SMESH::smIdType FindElementByNodes(const SMESH::smIdType_array& nodes);
/*!
* Return elements including all given nodes.
*/
- SMESH::long_array* GetElementsByNodes(const SMESH::long_array& nodes,
+ SMESH::smIdType_array* GetElementsByNodes(const SMESH::smIdType_array& nodes,
SMESH::ElementType elemType);
/*!
* Returns true if given element is polygon
*/
- CORBA::Boolean IsPoly(CORBA::Long id);
+ CORBA::Boolean IsPoly(SMESH::smIdType id);
/*!
* Returns true if given element is quadratic
*/
- CORBA::Boolean IsQuadratic(CORBA::Long id);
+ CORBA::Boolean IsQuadratic(SMESH::smIdType id);
/*!
* Returns diameter of ball discrete element or zero in case of an invalid \a id
*/
- CORBA::Double GetBallDiameter(CORBA::Long id);
+ CORBA::Double GetBallDiameter(SMESH::smIdType id);
/*!
* Returns bary center for given element
*/
- SMESH::double_array* BaryCenter(CORBA::Long id);
+ SMESH::double_array* BaryCenter(SMESH::smIdType id);
/*!
* Returns information about imported MED file
* Collect statistic of mesh elements given by iterator
*/
static void CollectMeshInfo(const SMDS_ElemIteratorPtr theItr,
- SMESH::long_array& theInfo);
+ SMESH::smIdType_array& theInfo);
/*!
* \brief Return iterator on elements of given type in given object
*/
// SMESH_IDSource interface
// =========================
- virtual SMESH::long_array* GetIDs();
+ virtual SMESH::smIdType_array* GetIDs();
/*!
* Returns number of mesh elements of each \a EntityType
* Result array of number of elements per \a EntityType
* Inherited from SMESH_IDSource
*/
- virtual SMESH::long_array* GetMeshInfo();
+ virtual SMESH::smIdType_array* GetMeshInfo();
/*!
* Returns number of mesh elements of each \a ElementType
*/
- virtual SMESH::long_array* GetNbElementsByType();
+ virtual SMESH::smIdType_array* GetNbElementsByType();
/*!
* Returns types of elements it contains
*/
//=======================================================================
SMESH::point_array*
- SMESH_Pattern_i::ApplyToMeshFaces(SMESH::SMESH_Mesh_ptr theMesh,
- const SMESH::long_array& theFacesIDs,
- CORBA::Long theNodeIndexOnKeyPoint1,
- CORBA::Boolean theReverse)
+ SMESH_Pattern_i::ApplyToMeshFaces(SMESH::SMESH_Mesh_ptr theMesh,
+ const SMESH::smIdType_array& theFacesIDs,
+ CORBA::Short theNodeIndexOnKeyPoint1,
+ CORBA::Boolean theReverse)
{
SMESH::point_array_var points = new SMESH::point_array;
//=======================================================================
SMESH::point_array*
- SMESH_Pattern_i::ApplyToHexahedrons(SMESH::SMESH_Mesh_ptr theMesh,
- const SMESH::long_array& theVolumesIDs,
- CORBA::Long theNode000Index,
- CORBA::Long theNode001Index)
+ SMESH_Pattern_i::ApplyToHexahedrons(SMESH::SMESH_Mesh_ptr theMesh,
+ const SMESH::smIdType_array& theVolumesIDs,
+ CORBA::Short theNode000Index,
+ CORBA::Short theNode001Index)
{
SMESH::point_array_var points = new SMESH::point_array;
GEOM::GEOM_Object_ptr theVertex000,
GEOM::GEOM_Object_ptr theVertex001);
- SMESH::point_array* ApplyToMeshFaces(SMESH::SMESH_Mesh_ptr theMesh,
- const SMESH::long_array& theFacesIDs,
- CORBA::Long theNodeIndexOnKeyPoint1,
- CORBA::Boolean theReverse);
-
- SMESH::point_array* ApplyToHexahedrons(SMESH::SMESH_Mesh_ptr theMesh,
- const SMESH::long_array& theVolumesIDs,
- CORBA::Long theNode000Index,
- CORBA::Long theNode001Index);
+ SMESH::point_array* ApplyToMeshFaces(SMESH::SMESH_Mesh_ptr theMesh,
+ const SMESH::smIdType_array& theFacesIDs,
+ CORBA::Short theNodeIndexOnKeyPoint1,
+ CORBA::Boolean theReverse);
+
+ SMESH::point_array* ApplyToHexahedrons(SMESH::SMESH_Mesh_ptr theMesh,
+ const SMESH::smIdType_array& theVolumesIDs,
+ CORBA::Short theNode000Index,
+ CORBA::Short theNode001Index);
//for omniORB conflict compilation
/*CORBA::Boolean MakeMesh (SMESH::SMESH_Mesh_ptr theMesh,
*/
//================================================================================
- void meshInfo2hdf( SMESH::long_array_var meshInfo,
- const std::string& name,
- HDFgroup* hdfGroup)
+ void meshInfo2hdf( SMESH::smIdType_array_var meshInfo,
+ const std::string& name,
+ HDFgroup* hdfGroup)
{
// we use med identification of element (MED::EGeometrieElement) types
// but not enum SMDSAbs_EntityType because values of SMDSAbs_EntityType may
*/
//================================================================================
-SMESH::long_array* SMESH_PreMeshInfo::GetMeshInfo() const
+SMESH::smIdType_array* SMESH_PreMeshInfo::GetMeshInfo() const
{
- SMESH::long_array_var aRes = new SMESH::long_array();
+ SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::Entity_Last);
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
aRes[i] = 0;
// meshods of SMESH_IDSource interface
SMESH::array_of_ElementType* GetTypes() const;
- SMESH::long_array* GetMeshInfo() const;
+ SMESH::smIdType_array* GetMeshInfo() const;
bool IsMeshInfoCorrect() const;
~SMESH_PreMeshInfo();
return *this;
}
+ TPythonDump&
+ TPythonDump::operator<<(const SMESH::smIdType_array& theArg)
+ {
+ DumpArray( theArg, *this );
+ return *this;
+ }
+
TPythonDump&
TPythonDump::operator<<(const SMESH::double_array& theArg)
{
}
if ( SMESH_MeshEditor_i::IsTemporaryIDSource( theArg ))
{
- SMESH::SMESH_Mesh_var mesh = theArg->GetMesh();
- SMESH::long_array_var anElementsId = theArg->GetIDs();
- SMESH::array_of_ElementType_var types = theArg->GetTypes();
- SMESH::ElementType type = types->length() ? types[0] : SMESH::ALL;
- SALOMEDS::SObject_wrap meshSO = SMESH_Gen_i::ObjectToSObject(mesh);
+ SMESH::SMESH_Mesh_var mesh = theArg->GetMesh();
+ SMESH::smIdType_array_var anElementsId = theArg->GetIDs();
+ SMESH::array_of_ElementType_var types = theArg->GetTypes();
+ SMESH::ElementType type = types->length() ? types[0] : SMESH::ALL;
+ SALOMEDS::SObject_wrap meshSO = SMESH_Gen_i::ObjectToSObject(mesh);
if ( meshSO->_is_nil() ) // don't waste memory for dumping not published objects
return *this << mesh << ".GetIDSource([], " << type << ")";
else
TPythonDump&
operator<<(const SMESH::long_array& theArg);
+ TPythonDump&
+ operator<<(const SMESH::smIdType_array& theArg);
+
TPythonDump&
operator<<(const SMESH::double_array& theArg);
*/
//=============================================================================
-SMESH::long_array* SMESH_subMesh_i::GetElementsId()
+SMESH::smIdType_array* SMESH_subMesh_i::GetElementsId()
{
Unexpect aCatch(SALOME_SalomeException);
- SMESH::long_array_var aResult = new SMESH::long_array();
+ SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
if ( _mesh_i->_mapSubMesh.find( _localId ) == _mesh_i->_mapSubMesh.end() )
return aResult._retn();
*/
//=============================================================================
-SMESH::long_array* SMESH_subMesh_i::GetElementsByType( SMESH::ElementType theElemType )
+SMESH::smIdType_array* SMESH_subMesh_i::GetElementsByType( SMESH::ElementType theElemType )
{
Unexpect aCatch(SALOME_SalomeException);
- SMESH::long_array_var aResult = new SMESH::long_array();
+ SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
if ( _mesh_i->_mapSubMesh.find( _localId ) == _mesh_i->_mapSubMesh.end() )
return aResult._retn();
::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId];
// PAL5440, return all nodes belonging to elements of the sub-mesh
- set<int> nodeIds;
- int nbElems = 0;
+ set<smIdType> nodeIds;
+ smIdType nbElems = 0;
// volumes may be bound to shell instead of solid
TListOfSubMeshes smList;
int i = 0, n = aResult->length();
if ( theElemType == SMESH::NODE && !nodeIds.empty() ) {
- set<int>::iterator idIt = nodeIds.begin();
+ set<smIdType>::iterator idIt = nodeIds.begin();
for ( ; i < n && idIt != nodeIds.end() ; i++, idIt++ )
aResult[i] = *idIt;
}
*/
//=============================================================================
-SMESH::long_array* SMESH_subMesh_i::GetNodesId()
+SMESH::smIdType_array* SMESH_subMesh_i::GetNodesId()
{
Unexpect aCatch(SALOME_SalomeException);
- SMESH::long_array_var aResult = GetElementsByType( SMESH::NODE );
+ SMESH::smIdType_array_var aResult = GetElementsByType( SMESH::NODE );
return aResult._retn();
}
/*!
*
*/
-//=============================================================================
+//========error:=====================================================================
SMESH::SMESH_Mesh_ptr SMESH_subMesh_i::GetFather()
{
*/
//=============================================================================
-SMESH::smIdType SMESH_subMesh_i::GetId()
+CORBA::Long SMESH_subMesh_i::GetId()
{
return _localId;
}
*
*/
//=============================================================================
-SMESH::long_array* SMESH_subMesh_i::GetIDs()
+SMESH::smIdType_array* SMESH_subMesh_i::GetIDs()
{
return GetElementsId();
}
*
*/
//=============================================================================
-SMESH::ElementType SMESH_subMesh_i::GetElementType( const CORBA::Long id, const bool iselem )
+SMESH::ElementType SMESH_subMesh_i::GetElementType( const SMESH::smIdType id, const bool iselem )
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
*/
//=============================================================================
-SMESH::long_array* SMESH_subMesh_i::GetMeshInfo()
+SMESH::smIdType_array* SMESH_subMesh_i::GetMeshInfo()
{
if ( _preMeshInfo )
return _preMeshInfo->GetMeshInfo();
- SMESH::long_array_var aRes = new SMESH::long_array();
+ SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::Entity_Last);
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
aRes[i] = 0;
*/
//=======================================================================
-SMESH::long_array* SMESH_subMesh_i::GetNbElementsByType()
+SMESH::smIdType_array* SMESH_subMesh_i::GetNbElementsByType()
{
- SMESH::long_array_var aRes = new SMESH::long_array();
+ SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::NB_ELEMENT_TYPES);
for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
if ( _preMeshInfo )
SMESH::smIdType GetNumberOfNodes( CORBA::Boolean all );
- SMESH::long_array* GetElementsId();
+ SMESH::smIdType_array* GetElementsId();
- SMESH::long_array* GetElementsByType( SMESH::ElementType theElemType );
+ SMESH::smIdType_array* GetElementsByType( SMESH::ElementType theElemType );
- SMESH::ElementType GetElementType( CORBA::Long id, bool iselem );
+ SMESH::ElementType GetElementType( SMESH::smIdType id, bool iselem );
- SMESH::long_array* GetNodesId();
+ SMESH::smIdType_array* GetNodesId();
SMESH::SMESH_Mesh_ptr GetFather();
GEOM::GEOM_Object_ptr GetSubShape();
- SMESH::smIdType GetId();
+ CORBA::Long GetId();
// =========================
/*!
* Returns a sequence of all element IDs
*/
- virtual SMESH::long_array* GetIDs();
+ virtual SMESH::smIdType_array* GetIDs();
/*!
* Returns number of mesh elements of each \a EntityType
* Result array of number of elements per \a EntityType
* Inherited from SMESH_IDSource
*/
- virtual SMESH::long_array* GetMeshInfo();
+ virtual SMESH::smIdType_array* GetMeshInfo();
/*!
* Returns number of mesh elements of each \a ElementType
*/
- virtual SMESH::long_array* GetNbElementsByType();
+ virtual SMESH::smIdType_array* GetNbElementsByType();
/*!
* Returns types of elements it contains
*/
#include <gp_Ax1.hxx>
#include <gp_Vec.hxx>
#include <gp_XY.hxx>
+#include <smIdType.hxx>
#include <list>
#include <string>
{
_EdgeSubMesh(const SMDS_Mesh* mesh, int index=0): SubMesh(mesh,index) {}
//virtual int NbElements() const { return _elements.size()+1; }
- virtual int NbNodes() const { return Max( 0, _uvPtStructVec.size()-2 ); }
+ virtual smIdType NbNodes() const { return Max( 0, _uvPtStructVec.size()-2 ); }
void SetUVPtStructVec(UVPtStructVec& vec) { _uvPtStructVec.swap( vec ); }
UVPtStructVec& GetUVPtStructVec() { return _uvPtStructVec; }
};