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