mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-14 17:48:34 +05:00
untabify
This commit is contained in:
parent
e2a012b355
commit
a02de3dacc
@ -1461,13 +1461,13 @@
|
||||
std::string anEntry = SO->GetID();
|
||||
|
||||
/** Erase graphical object **/
|
||||
if(SO->FindAttribute(anAttr, "AttributeIOR")){
|
||||
ViewManagerList aViewMenegers = anApp->viewManagers();
|
||||
ViewManagerList::const_iterator it = aViewMenegers.begin();
|
||||
for( ; it != aViewMenegers.end(); it++) {
|
||||
SUIT_ViewManager* vm = *it;
|
||||
int nbSf = vm ? vm->getViewsCount() : 0;
|
||||
if(vm) {
|
||||
if(SO->FindAttribute(anAttr, "AttributeIOR")){
|
||||
ViewManagerList aViewMenegers = anApp->viewManagers();
|
||||
ViewManagerList::const_iterator it = aViewMenegers.begin();
|
||||
for( ; it != aViewMenegers.end(); it++) {
|
||||
SUIT_ViewManager* vm = *it;
|
||||
int nbSf = vm ? vm->getViewsCount() : 0;
|
||||
if(vm) {
|
||||
QVector<SUIT_ViewWindow*> aViews = vm->getViews();
|
||||
for(int i = 0; i < nbSf; i++){
|
||||
SUIT_ViewWindow *sf = aViews[i];
|
||||
@ -1476,8 +1476,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/** Remove an object from data structures **/
|
||||
SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( SMESH::SObjectToObject( SO ));
|
||||
SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( SMESH::SObjectToObject( SO ));
|
||||
@ -2879,7 +2879,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
for ( anIter->InitEx(true); anIter->More(); anIter->Next() )
|
||||
{
|
||||
_PTR(SObject) so = anIter->Value();
|
||||
SMESH::RemoveVisualObjectWithActors(so->GetID().c_str(), true);
|
||||
SMESH::RemoveVisualObjectWithActors(so->GetID().c_str(), true);
|
||||
}
|
||||
}
|
||||
catch (const SALOME::SALOME_Exception& S_ex){
|
||||
|
@ -1311,50 +1311,50 @@ void SMESHGUI_ExtrusionAlongPathDlg::onDisplaySimulation( bool toDisplayPreview
|
||||
// get base point
|
||||
SMESH::PointStruct aBasePoint;
|
||||
if (BasePointGrp->isChecked()) {
|
||||
aBasePoint.x = XSpin->GetValue();
|
||||
aBasePoint.y = YSpin->GetValue();
|
||||
aBasePoint.z = ZSpin->GetValue();
|
||||
aBasePoint.x = XSpin->GetValue();
|
||||
aBasePoint.y = YSpin->GetValue();
|
||||
aBasePoint.z = ZSpin->GetValue();
|
||||
}
|
||||
bool bOk;
|
||||
long aNodeStart = StartPointLineEdit->text().toLong(&bOk);
|
||||
if (bOk) {
|
||||
|
||||
try {
|
||||
SUIT_OverrideCursor wc;
|
||||
try {
|
||||
SUIT_OverrideCursor wc;
|
||||
|
||||
SMESH::SMESH_MeshEditor::Extrusion_Error retVal;
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
|
||||
bool NeedGroups = false;
|
||||
SMESH::ElementType ElemType = SMESH::FACE;
|
||||
if( GetConstructorId() == 0 )
|
||||
ElemType = SMESH::EDGE;
|
||||
if( !MeshCheck->isChecked() ) {
|
||||
aMeshEditor->ExtrusionAlongPathX(anElementsId, myPath, aNodeStart, AnglesGrp->isChecked(),
|
||||
anAngles, LinearAnglesCheck->isChecked(),
|
||||
BasePointGrp->isChecked(), aBasePoint,
|
||||
NeedGroups, ElemType, retVal);
|
||||
}
|
||||
else {
|
||||
SMESH::ListOfGroups_var groups =
|
||||
aMeshEditor->ExtrusionAlongPathObjX(myIDSource, myPath, aNodeStart, AnglesGrp->isChecked(),
|
||||
anAngles, LinearAnglesCheck->isChecked(),
|
||||
BasePointGrp->isChecked(), aBasePoint,
|
||||
NeedGroups, ElemType, retVal);
|
||||
}
|
||||
SMESH::SMESH_MeshEditor::Extrusion_Error retVal;
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
|
||||
bool NeedGroups = false;
|
||||
SMESH::ElementType ElemType = SMESH::FACE;
|
||||
if( GetConstructorId() == 0 )
|
||||
ElemType = SMESH::EDGE;
|
||||
if( !MeshCheck->isChecked() ) {
|
||||
aMeshEditor->ExtrusionAlongPathX(anElementsId, myPath, aNodeStart, AnglesGrp->isChecked(),
|
||||
anAngles, LinearAnglesCheck->isChecked(),
|
||||
BasePointGrp->isChecked(), aBasePoint,
|
||||
NeedGroups, ElemType, retVal);
|
||||
}
|
||||
else {
|
||||
SMESH::ListOfGroups_var groups =
|
||||
aMeshEditor->ExtrusionAlongPathObjX(myIDSource, myPath, aNodeStart, AnglesGrp->isChecked(),
|
||||
anAngles, LinearAnglesCheck->isChecked(),
|
||||
BasePointGrp->isChecked(), aBasePoint,
|
||||
NeedGroups, ElemType, retVal);
|
||||
}
|
||||
|
||||
wc.suspend();
|
||||
if( retVal == SMESH::SMESH_MeshEditor::EXTR_OK ) {
|
||||
SMESH::MeshPreviewStruct_var aMeshPreviewStruct = aMeshEditor->GetPreviewData();
|
||||
mySimulation->SetData(aMeshPreviewStruct._retn());
|
||||
} else {
|
||||
hidePreview();
|
||||
}
|
||||
wc.suspend();
|
||||
if( retVal == SMESH::SMESH_MeshEditor::EXTR_OK ) {
|
||||
SMESH::MeshPreviewStruct_var aMeshPreviewStruct = aMeshEditor->GetPreviewData();
|
||||
mySimulation->SetData(aMeshPreviewStruct._retn());
|
||||
} else {
|
||||
hidePreview();
|
||||
}
|
||||
|
||||
} catch (...) {
|
||||
hidePreview();
|
||||
}
|
||||
} catch (...) {
|
||||
hidePreview();
|
||||
}
|
||||
} else {
|
||||
hidePreview();
|
||||
hidePreview();
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -1388,16 +1388,16 @@ SMESH::long_array_var SMESHGUI_ExtrusionAlongPathDlg::getSelectedElements() {
|
||||
bool bOk;
|
||||
int j = 0;
|
||||
for (int i = 0; i < aListElementsId.count(); i++) {
|
||||
long ind = aListElementsId[ i ].toLong(&bOk);
|
||||
if (bOk) {
|
||||
const SMDS_MeshElement* e = aMesh->FindElement(ind);
|
||||
if (e) {
|
||||
bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
|
||||
Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
|
||||
if (typeMatch)
|
||||
anElementsId[ j++ ] = ind;
|
||||
}
|
||||
}
|
||||
long ind = aListElementsId[ i ].toLong(&bOk);
|
||||
if (bOk) {
|
||||
const SMDS_MeshElement* e = aMesh->FindElement(ind);
|
||||
if (e) {
|
||||
bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
|
||||
Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
|
||||
if (typeMatch)
|
||||
anElementsId[ j++ ] = ind;
|
||||
}
|
||||
}
|
||||
}
|
||||
anElementsId->length(j);
|
||||
}
|
||||
|
@ -1069,8 +1069,8 @@ void SMESHGUI_ExtrusionDlg::onDisplaySimulation( bool toDisplayPreview ) {
|
||||
long aNbSteps = (long)SpinBox_NbSteps->value();
|
||||
|
||||
try {
|
||||
SUIT_OverrideCursor aWaitCursor;
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
|
||||
SUIT_OverrideCursor aWaitCursor;
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
|
||||
if( CheckBoxMesh->isChecked() ) {
|
||||
if( GetConstructorId() == 0 )
|
||||
aMeshEditor->ExtrusionSweepObject1D(mySelectedObject, aVector, aNbSteps);
|
||||
@ -1083,7 +1083,7 @@ void SMESHGUI_ExtrusionDlg::onDisplaySimulation( bool toDisplayPreview ) {
|
||||
SMESH::MeshPreviewStruct_var aMeshPreviewStruct = aMeshEditor->GetPreviewData();
|
||||
mySimulation->SetData(aMeshPreviewStruct._retn());
|
||||
} catch (...) {
|
||||
hidePreview();
|
||||
hidePreview();
|
||||
}
|
||||
} else {
|
||||
hidePreview();
|
||||
@ -1104,8 +1104,8 @@ void SMESHGUI_ExtrusionDlg::getExtrusionVector(SMESH::DirStruct& aVector) {
|
||||
aVector.PS.z = SpinBox_Dz->GetValue();
|
||||
} else if ( RadioButton4->isChecked() ) {
|
||||
gp_XYZ aNormale(SpinBox_Vx->GetValue(),
|
||||
SpinBox_Vy->GetValue(),
|
||||
SpinBox_Vz->GetValue());
|
||||
SpinBox_Vy->GetValue(),
|
||||
SpinBox_Vz->GetValue());
|
||||
|
||||
|
||||
aNormale /= aNormale.Modulus();
|
||||
|
@ -540,7 +540,7 @@ bool SMESHGUI_Preferences_ScalarBarDlg::onApply()
|
||||
myScalarBarActor->GetDistributionColor(oldRgb);
|
||||
colorChanged = (rgb[0] != oldRgb[0] || rgb[1] != oldRgb[1] || rgb[2] != oldRgb[2]);
|
||||
if(colorChanged)
|
||||
myScalarBarActor->SetDistributionColor(rgb);
|
||||
myScalarBarActor->SetDistributionColor(rgb);
|
||||
}
|
||||
}
|
||||
|
||||
@ -682,13 +682,13 @@ void SMESHGUI_Preferences_ScalarBarDlg::onSelectionChanged()
|
||||
myMonoColorBtn->setColor( QColor( (int)( aTColor[0]*255 ), (int)( aTColor[1]*255 ), (int)( aTColor[2]*255 ) ) );
|
||||
if ( coloringType == SMESH_MONOCOLOR_TYPE ) {
|
||||
myDMonoColor->setChecked(true);
|
||||
onDistributionChanged(myDistribColorGrp->id(myDMonoColor));
|
||||
onDistributionChanged(myDistribColorGrp->id(myDMonoColor));
|
||||
} else {
|
||||
myDMultiColor->setChecked(true);
|
||||
onDistributionChanged(myDistribColorGrp->id(myDMultiColor));
|
||||
}
|
||||
myDistributionGrp->setChecked((bool)myScalarBarActor->GetDistributionVisibility());
|
||||
onDistributionActivated(myScalarBarActor->GetDistributionVisibility());
|
||||
onDistributionActivated(myScalarBarActor->GetDistributionVisibility());
|
||||
|
||||
|
||||
myRangeGrp->setEnabled( true );
|
||||
@ -698,7 +698,7 @@ void SMESHGUI_Preferences_ScalarBarDlg::onSelectionChanged()
|
||||
myOriginDimGrp->setEnabled( true );
|
||||
myOkBtn->setEnabled( true );
|
||||
myApplyBtn->setEnabled( true );
|
||||
myDistributionGrp->setEnabled( true );
|
||||
myDistributionGrp->setEnabled( true );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1069,7 +1069,7 @@ void SMESHGUI_RotationDlg::onDisplaySimulation( bool toDisplayPreview ) {
|
||||
|
||||
anElementsId->length(aListElementsId.count());
|
||||
for (int i = 0; i < aListElementsId.count(); i++)
|
||||
anElementsId[i] = aListElementsId[i].toInt();
|
||||
anElementsId[i] = aListElementsId[i].toInt();
|
||||
|
||||
SMESH::AxisStruct anAxis;
|
||||
|
||||
@ -1082,18 +1082,18 @@ void SMESHGUI_RotationDlg::onDisplaySimulation( bool toDisplayPreview ) {
|
||||
double anAngle = (SpinBox_Angle->GetValue())*PI/180;
|
||||
|
||||
try {
|
||||
SUIT_OverrideCursor aWaitCursor;
|
||||
bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON;
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
|
||||
if(CheckBoxMesh->isChecked())
|
||||
aMeshEditor->RotateObject(mySelectedObject, anAxis, anAngle, copy);
|
||||
else
|
||||
aMeshEditor->Rotate(anElementsId, anAxis, anAngle, copy);
|
||||
SUIT_OverrideCursor aWaitCursor;
|
||||
bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON;
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
|
||||
if(CheckBoxMesh->isChecked())
|
||||
aMeshEditor->RotateObject(mySelectedObject, anAxis, anAngle, copy);
|
||||
else
|
||||
aMeshEditor->Rotate(anElementsId, anAxis, anAngle, copy);
|
||||
|
||||
SMESH::MeshPreviewStruct_var aMeshPreviewStruct = aMeshEditor->GetPreviewData();
|
||||
mySimulation->SetData(aMeshPreviewStruct._retn());
|
||||
} catch (...) {
|
||||
hidePreview();
|
||||
hidePreview();
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -1076,28 +1076,28 @@ void SMESHGUI_ScaleDlg::onDisplaySimulation( bool toDisplayPreview ) {
|
||||
|
||||
anElementsId->length(aListElementsId.count());
|
||||
for (int i = 0; i < aListElementsId.count(); i++)
|
||||
anElementsId[i] = aListElementsId[i].toInt();
|
||||
anElementsId[i] = aListElementsId[i].toInt();
|
||||
|
||||
SMESH::PointStruct aPoint;
|
||||
SMESH::double_array_var aScaleFact = new SMESH::double_array;
|
||||
getScale(aPoint, aScaleFact);
|
||||
|
||||
try {
|
||||
bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON;
|
||||
SUIT_OverrideCursor aWaitCursor;
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
|
||||
SMESH::SMESH_IDSource_var obj;
|
||||
if ( CheckBoxMesh->isChecked() )
|
||||
obj = mySelectedObject;
|
||||
else
|
||||
obj = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
|
||||
aMeshEditor->Scale(obj, aPoint, aScaleFact, copy);
|
||||
bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON;
|
||||
SUIT_OverrideCursor aWaitCursor;
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
|
||||
SMESH::SMESH_IDSource_var obj;
|
||||
if ( CheckBoxMesh->isChecked() )
|
||||
obj = mySelectedObject;
|
||||
else
|
||||
obj = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
|
||||
aMeshEditor->Scale(obj, aPoint, aScaleFact, copy);
|
||||
|
||||
SMESH::MeshPreviewStruct_var aMeshPreviewStruct = aMeshEditor->GetPreviewData();
|
||||
mySimulation->SetData(aMeshPreviewStruct._retn());
|
||||
|
||||
} catch (...) {
|
||||
hidePreview();
|
||||
hidePreview();
|
||||
}
|
||||
} else {
|
||||
hidePreview();
|
||||
|
@ -71,7 +71,7 @@ private:
|
||||
|
||||
bool isValid();
|
||||
void getScale( SMESH::PointStruct& thePoint,
|
||||
SMESH::double_array_var& theScaleFact);
|
||||
SMESH::double_array_var& theScaleFact);
|
||||
|
||||
SMESHGUI_IdValidator* myIdValidator;
|
||||
LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
|
||||
|
@ -499,9 +499,9 @@ void SMESHGUI_SmoothingDlg::onTextChange (const QString& theNewText)
|
||||
for (int i = 0; i < aListId.count(); i++) {
|
||||
int id = aListId[ i ].toInt();
|
||||
if ( id > 0 ) {
|
||||
bool validId = aMesh ? ( aMesh->FindElement( id ) != 0 ) : ( myMesh->GetElementType( id, true ) != SMESH::EDGE );
|
||||
bool validId = aMesh ? ( aMesh->FindElement( id ) != 0 ) : ( myMesh->GetElementType( id, true ) != SMESH::EDGE );
|
||||
if ( validId )
|
||||
newIndices.Add( id );
|
||||
newIndices.Add( id );
|
||||
}
|
||||
myNbOkElements = newIndices.Extent();
|
||||
mySelector->AddOrRemoveIndex(myIO, newIndices, false);
|
||||
@ -514,9 +514,9 @@ void SMESHGUI_SmoothingDlg::onTextChange (const QString& theNewText)
|
||||
for (int i = 0; i < aListId.count(); i++) {
|
||||
int id = aListId[ i ].toInt();
|
||||
if ( id > 0 ) {
|
||||
bool validId = aMesh ? ( aMesh->FindNode( id ) != 0 ) : ( myMesh->GetElementType( id, false ) != SMESH::EDGE );
|
||||
bool validId = aMesh ? ( aMesh->FindNode( id ) != 0 ) : ( myMesh->GetElementType( id, false ) != SMESH::EDGE );
|
||||
if ( validId )
|
||||
newIndices.Add( id );
|
||||
newIndices.Add( id );
|
||||
}
|
||||
myNbOkNodes = newIndices.Extent();
|
||||
mySelector->AddOrRemoveIndex(myIO, newIndices, false);
|
||||
@ -599,7 +599,7 @@ void SMESHGUI_SmoothingDlg::SelectionIntoArgument()
|
||||
|
||||
QStringList elements;
|
||||
for ( int i = 0; i < myNbOkElements; ++i )
|
||||
elements << QString::number( aMapIndex( i+1 ) );
|
||||
elements << QString::number( aMapIndex( i+1 ) );
|
||||
aString = elements.join(" ");
|
||||
}
|
||||
} else if (myEditCurrentArgument == LineEditNodes && !myMesh->_is_nil() && myIO == IO ) {
|
||||
|
@ -1146,7 +1146,7 @@ void SMESHGUI_SymmetryDlg::onDisplaySimulation( bool toDisplayPreview ) {
|
||||
|
||||
anElementsId->length(aListElementsId.count());
|
||||
for (int i = 0; i < aListElementsId.count(); i++)
|
||||
anElementsId[i] = aListElementsId[i].toInt();
|
||||
anElementsId[i] = aListElementsId[i].toInt();
|
||||
|
||||
SMESH::AxisStruct aMirror;
|
||||
SMESH::SMESH_MeshEditor::MirrorType aMirrorType;
|
||||
@ -1154,9 +1154,9 @@ void SMESHGUI_SymmetryDlg::onDisplaySimulation( bool toDisplayPreview ) {
|
||||
getMirror(aMirror,aMirrorType);
|
||||
|
||||
try {
|
||||
bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON;
|
||||
SUIT_OverrideCursor aWaitCursor;
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
|
||||
bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON;
|
||||
SUIT_OverrideCursor aWaitCursor;
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
|
||||
if(CheckBoxMesh->isChecked())
|
||||
aMeshEditor->MirrorObject(mySelectedObject, aMirror, aMirrorType, copy );
|
||||
else
|
||||
@ -1165,7 +1165,7 @@ void SMESHGUI_SymmetryDlg::onDisplaySimulation( bool toDisplayPreview ) {
|
||||
SMESH::MeshPreviewStruct_var aMeshPreviewStruct = aMeshEditor->GetPreviewData();
|
||||
mySimulation->SetData(aMeshPreviewStruct._retn());
|
||||
} catch (...) {
|
||||
hidePreview();
|
||||
hidePreview();
|
||||
}
|
||||
} else {
|
||||
hidePreview();
|
||||
|
@ -1118,27 +1118,27 @@ void SMESHGUI_TranslationDlg::onDisplaySimulation( bool toDisplayPreview ) {
|
||||
|
||||
anElementsId->length(aListElementsId.count());
|
||||
for (int i = 0; i < aListElementsId.count(); i++)
|
||||
anElementsId[i] = aListElementsId[i].toInt();
|
||||
anElementsId[i] = aListElementsId[i].toInt();
|
||||
|
||||
SMESH::DirStruct aVector;
|
||||
if (GetConstructorId() == 0) {
|
||||
aVector.PS.x = SpinBox2_1->GetValue() - SpinBox1_1->GetValue();
|
||||
aVector.PS.y = SpinBox2_2->GetValue() - SpinBox1_2->GetValue();
|
||||
aVector.PS.z = SpinBox2_3->GetValue() - SpinBox1_3->GetValue();
|
||||
aVector.PS.x = SpinBox2_1->GetValue() - SpinBox1_1->GetValue();
|
||||
aVector.PS.y = SpinBox2_2->GetValue() - SpinBox1_2->GetValue();
|
||||
aVector.PS.z = SpinBox2_3->GetValue() - SpinBox1_3->GetValue();
|
||||
} else if (GetConstructorId() == 1) {
|
||||
aVector.PS.x = SpinBox1_1->GetValue();
|
||||
aVector.PS.y = SpinBox1_2->GetValue();
|
||||
aVector.PS.z = SpinBox1_3->GetValue();
|
||||
aVector.PS.x = SpinBox1_1->GetValue();
|
||||
aVector.PS.y = SpinBox1_2->GetValue();
|
||||
aVector.PS.z = SpinBox1_3->GetValue();
|
||||
}
|
||||
|
||||
try {
|
||||
bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON;
|
||||
SUIT_OverrideCursor aWaitCursor;
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
|
||||
if(CheckBoxMesh->isChecked())
|
||||
aMeshEditor->TranslateObject(mySelectedObject, aVector, copy);
|
||||
else
|
||||
aMeshEditor->Translate(anElementsId, aVector, copy);
|
||||
bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON;
|
||||
SUIT_OverrideCursor aWaitCursor;
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
|
||||
if(CheckBoxMesh->isChecked())
|
||||
aMeshEditor->TranslateObject(mySelectedObject, aVector, copy);
|
||||
else
|
||||
aMeshEditor->Translate(anElementsId, aVector, copy);
|
||||
|
||||
SMESH::MeshPreviewStruct_var aMeshPreviewStruct = aMeshEditor->GetPreviewData();
|
||||
mySimulation->SetData(aMeshPreviewStruct._retn());
|
||||
|
@ -118,7 +118,7 @@ namespace SMESH
|
||||
} else {
|
||||
SUIT_ViewManager* aVM = app->getViewManager(SVTK_Viewer::Type(), true);
|
||||
if(aVM)
|
||||
aList.append(aVM);
|
||||
aList.append(aVM);
|
||||
}
|
||||
bool actorRemoved = false;
|
||||
ViewManagerList::ConstIterator it = aList.begin();
|
||||
@ -127,13 +127,13 @@ namespace SMESH
|
||||
aViewManager = *it;
|
||||
QVector<SUIT_ViewWindow*> views = aViewManager->getViews();
|
||||
for ( int iV = 0; iV < views.count(); ++iV ) {
|
||||
if ( SMESH_Actor* actor = FindActorByEntry( views[iV], theEntry)) {
|
||||
if(SVTK_ViewWindow* vtkWnd = GetVtkViewWindow(views[iV])) {
|
||||
vtkWnd->RemoveActor(actor);
|
||||
actorRemoved = true;
|
||||
}
|
||||
actor->Delete();
|
||||
}
|
||||
if ( SMESH_Actor* actor = FindActorByEntry( views[iV], theEntry)) {
|
||||
if(SVTK_ViewWindow* vtkWnd = GetVtkViewWindow(views[iV])) {
|
||||
vtkWnd->RemoveActor(actor);
|
||||
actorRemoved = true;
|
||||
}
|
||||
actor->Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -142,9 +142,9 @@ namespace SMESH
|
||||
TVisualObjCont::key_type aKey(aStudyId,theEntry);
|
||||
TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.find(aKey);
|
||||
if(anIter != VISUAL_OBJ_CONT.end()) {
|
||||
// for unknown reason, object destructor is not called, so clear object manually
|
||||
anIter->second->GetUnstructuredGrid()->SetCells(0,0,0,0,0);
|
||||
anIter->second->GetUnstructuredGrid()->SetPoints(0);
|
||||
// for unknown reason, object destructor is not called, so clear object manually
|
||||
anIter->second->GetUnstructuredGrid()->SetCells(0,0,0,0,0);
|
||||
anIter->second->GetUnstructuredGrid()->SetPoints(0);
|
||||
}
|
||||
VISUAL_OBJ_CONT.erase(aKey);
|
||||
}
|
||||
@ -732,12 +732,12 @@ namespace SMESH
|
||||
MESSAGE("--- display " << anActor);
|
||||
anActor->SetVisibility(true);
|
||||
|
||||
if(anActor->hasIO()){
|
||||
Handle(SALOME_InteractiveObject) anIO = anActor->getIO();
|
||||
if(anIO->hasEntry()){
|
||||
aStudy->setVisibilityState(anIO->getEntry(), Qtx::ShownState);
|
||||
}
|
||||
}
|
||||
if(anActor->hasIO()){
|
||||
Handle(SALOME_InteractiveObject) anIO = anActor->getIO();
|
||||
if(anIO->hasEntry()){
|
||||
aStudy->setVisibilityState(anIO->getEntry(), Qtx::ShownState);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -751,7 +751,7 @@ namespace SMESH
|
||||
anActor->SetVisibility(false);
|
||||
}
|
||||
}
|
||||
aStudy->setVisibilityStateForAll(Qtx::HiddenState);
|
||||
aStudy->setVisibilityStateForAll(Qtx::HiddenState);
|
||||
}
|
||||
default: {
|
||||
if (SMESH_Actor *anActor = FindActorByEntry(theWnd,theEntry)) {
|
||||
@ -759,15 +759,15 @@ namespace SMESH
|
||||
case eDisplay:
|
||||
case eDisplayOnly:
|
||||
//MESSAGE("--- display " << anActor);
|
||||
anActor->Update();
|
||||
anActor->Update();
|
||||
anActor->SetVisibility(true);
|
||||
if (theAction == eDisplayOnly) aRenderer->ResetCameraClippingRange();
|
||||
aStudy->setVisibilityState(theEntry, Qtx::ShownState);
|
||||
aStudy->setVisibilityState(theEntry, Qtx::ShownState);
|
||||
break;
|
||||
case eErase:
|
||||
//MESSAGE("--- erase " << anActor);
|
||||
anActor->SetVisibility(false);
|
||||
aStudy->setVisibilityState(theEntry, Qtx::HiddenState);
|
||||
aStudy->setVisibilityState(theEntry, Qtx::HiddenState);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@ -786,7 +786,7 @@ namespace SMESH
|
||||
if ((anActor = CreateActor(aDocument,theEntry,true))) {
|
||||
bool needFitAll = noSmeshActors(theWnd); // fit for the first object only
|
||||
DisplayActor(theWnd,anActor);
|
||||
aStudy->setVisibilityState(theEntry, Qtx::ShownState);
|
||||
aStudy->setVisibilityState(theEntry, Qtx::ShownState);
|
||||
// FitAll(); - PAL16770(Display of a group performs an automatic fit all)
|
||||
if (needFitAll) FitAll();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user