}
void SetPointsData ( SMDS_Mesh* theMesh,
- TColStd_MapOfInteger & theNodesIdMap )
+ TColStd_MapOfInteger & theNodesIdMap )
{
vtkPoints* aPoints = vtkPoints::New();
aPoints->SetNumberOfPoints(theNodesIdMap.Extent());
TColStd_MapIteratorOfMapOfInteger idIter( theNodesIdMap );
for( int i = 0; idIter.More(); idIter.Next(), i++ ) {
- const SMDS_MeshNode* aNode = theMesh->FindNode(idIter.Key());
- aPoints->SetPoint( i, aNode->X(), aNode->Y(), aNode->Z() );
- myIDs.push_back(idIter.Key());
+ const SMDS_MeshNode* aNode = theMesh->FindNode(idIter.Key());
+ aPoints->SetPoint( i, aNode->X(), aNode->Y(), aNode->Z() );
+ myIDs.push_back(idIter.Key());
}
myIdGrid->SetPoints(aPoints);
}
void SetElemsData( TColStd_MapOfInteger & theElemsIdMap,
- std::list<gp_XYZ> & aGrCentersXYZ )
+ std::list<gp_XYZ> & aGrCentersXYZ )
{
vtkPoints* aPoints = vtkPoints::New();
aPoints->SetNumberOfPoints(theElemsIdMap.Extent());
TColStd_MapIteratorOfMapOfInteger idIter( theElemsIdMap );
for( ; idIter.More(); idIter.Next() ) {
- myIDs.push_back(idIter.Key());
+ myIDs.push_back(idIter.Key());
}
gp_XYZ aXYZ;
std::list<gp_XYZ>::iterator coordIt = aGrCentersXYZ.begin();
for( int i = 0; coordIt != aGrCentersXYZ.end(); coordIt++, i++ ) {
- aXYZ = *coordIt;
- aPoints->SetPoint( i, aXYZ.X(), aXYZ.Y(), aXYZ.Z() );
+ aXYZ = *coordIt;
+ aPoints->SetPoint( i, aXYZ.X(), aXYZ.Y(), aXYZ.Z() );
}
myIdGrid->SetPoints(aPoints);
aPoints->Delete();
myIsPointsLabeled = theIsPointsLabeled && myIdGrid->GetNumberOfPoints();
if ( myIsPointsLabeled ) {
- myPointsNumDataSet->ShallowCopy(myIdGrid);
- vtkDataSet *aDataSet = myPointsNumDataSet;
- int aNbElem = myIDs.size();
- vtkIntArray *anArray = vtkIntArray::New();
- anArray->SetNumberOfValues( aNbElem );
- for ( int i = 0; i < aNbElem; i++ )
- anArray->SetValue( i, myIDs[i] );
- aDataSet->GetPointData()->SetScalars( anArray );
- anArray->Delete();
- myPtsMaskPoints->SetInput( aDataSet );
- myPointLabels->SetVisibility( theIsActorVisible );
+ myPointsNumDataSet->ShallowCopy(myIdGrid);
+ vtkDataSet *aDataSet = myPointsNumDataSet;
+ int aNbElem = myIDs.size();
+ vtkIntArray *anArray = vtkIntArray::New();
+ anArray->SetNumberOfValues( aNbElem );
+ for ( int i = 0; i < aNbElem; i++ )
+ anArray->SetValue( i, myIDs[i] );
+ aDataSet->GetPointData()->SetScalars( anArray );
+ anArray->Delete();
+ myPtsMaskPoints->SetInput( aDataSet );
+ myPointLabels->SetVisibility( theIsActorVisible );
}
else {
- myPointLabels->SetVisibility( false );
+ myPointLabels->SetVisibility( false );
}
}
//myPtsSelectVisiblePoints->UnRegisterAllOutputs(); //vtk 5.0 porting
myPtsSelectVisiblePoints->Delete();
- //myPtsMaskPoints->UnRegisterAllOutputs(); //vtk 5.0 porting
+ //myPtsMaskPoints->UnRegisterAllOutputs(); //vtk 5.0 porting
myPtsMaskPoints->Delete();
myPointLabels->Delete();
static const char * IconFirst[] = {
"18 10 2 1",
-" g None",
-". g #000000",
+" g None",
+". g #000000",
" . . ",
" .. .. .. ",
" .. ... ... ",
// purpose :
//=================================================================================
SMESHGUI_EditMeshDlg::SMESHGUI_EditMeshDlg (SMESHGUI* theModule,
- int theAction)
+ int theAction)
: QDialog(SMESH::GetDesktop(theModule)),
mySMESHGUI(theModule),
mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
/***************************************************************/
GroupConstructors = new QGroupBox(myAction == 1 ?
- tr("SMESH_MERGE_ELEMENTS") :
- tr("SMESH_MERGE_NODES"),
- this);
+ tr("SMESH_MERGE_ELEMENTS") :
+ tr("SMESH_MERGE_NODES"),
+ this);
QButtonGroup* ButtonGroup = new QButtonGroup(this);
QHBoxLayout* GroupConstructorsLayout = new QHBoxLayout(GroupConstructors);
/***************************************************************/
// Controls for coincident elements detecting
GroupCoincident = new QGroupBox(myAction == 1 ?
- tr("COINCIDENT_ELEMENTS") :
- tr("COINCIDENT_NODES"),
- this);
+ tr("COINCIDENT_ELEMENTS") :
+ tr("COINCIDENT_NODES"),
+ this);
QGridLayout* GroupCoincidentLayout = new QGridLayout(GroupCoincident);
GroupCoincidentLayout->setSpacing(SPACING);
// purpose :
//=================================================================================
void SMESHGUI_EditMeshDlg::FindGravityCenter(TColStd_MapOfInteger & theElemsIdMap,
- std::list< gp_XYZ > & theGrCentersXYZ)
+ std::list< gp_XYZ > & theGrCentersXYZ)
{
if (!myActor)
return;
platform = "application";
#endif
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
- tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser",
- platform)).
- arg(myHelpFileName));
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser",
+ platform)).
+ arg(myHelpFileName));
}
}
switch (myAction) {
case 0 :
if(!mySubMeshOrGroup->_is_nil())
- aMeshEditor->FindCoincidentNodesOnPart(mySubMeshOrGroup, SpinBoxTolerance->GetValue(), aGroupsArray);
+ aMeshEditor->FindCoincidentNodesOnPart(mySubMeshOrGroup, SpinBoxTolerance->GetValue(), aGroupsArray);
else
- aMeshEditor->FindCoincidentNodes(SpinBoxTolerance->GetValue(), aGroupsArray);
+ aMeshEditor->FindCoincidentNodes(SpinBoxTolerance->GetValue(), aGroupsArray);
break;
case 1 :
if(!mySubMeshOrGroup->_is_nil())
- aMeshEditor->FindEqualElements(mySubMeshOrGroup, aGroupsArray);
+ aMeshEditor->FindEqualElements(mySubMeshOrGroup, aGroupsArray);
else
- aMeshEditor->FindEqualElements(myMesh, aGroupsArray);
+ aMeshEditor->FindEqualElements(myMesh, aGroupsArray);
break;
}
QStringList anIDs;
for (int j = 0; j < aGroup.length(); j++)
- anIDs.append(QString::number(aGroup[j]));
+ anIDs.append(QString::number(aGroup[j]));
ListCoincident->addItem(anIDs.join(" "));
}
if (myAction == 0) {
SMESH::SetPointRepresentation(true);
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(NodeSelection);
+ aViewWindow->SetSelectionMode(NodeSelection);
}
else
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(CellSelection);
+ aViewWindow->SetSelectionMode(CellSelection);
}
}