mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-04 03:30:37 +05:00
untabify
This commit is contained in:
parent
5cdebf6f36
commit
db4fd22d08
@ -281,8 +281,8 @@ void SMESH_VisualObjDef::buildPrs(bool buildGrid)
|
||||
//MESSAGE( "Update - myGrid->GetNumberOfCells() = "<<myGrid->GetNumberOfCells() );
|
||||
//MESSAGE( "Update - myGrid->GetNumberOfPoints() = "<<myGrid->GetNumberOfPoints() );
|
||||
if( MYDEBUGWITHFILES ) {
|
||||
SMESH::WriteUnstructuredGrid( myGrid,"myPrs.vtu" );
|
||||
}
|
||||
SMESH::WriteUnstructuredGrid( myGrid,"myPrs.vtu" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -486,17 +486,17 @@ void SMESH_VisualObjDef::buildElemPrs()
|
||||
}
|
||||
vtkIdType aCurId = aConnectivity->InsertNextCell( anIdList );
|
||||
aCellTypesArray->InsertNextValue( vtkElemType );
|
||||
|
||||
//Store diameters of the balls
|
||||
if(aScalars) {
|
||||
double aDiam = 0;
|
||||
if(aType == SMDSAbs_Ball) {
|
||||
if (const SMDS_BallElement* ball = dynamic_cast<const SMDS_BallElement*>(anElem) ) {
|
||||
aDiam = ball->GetDiameter();
|
||||
}
|
||||
}
|
||||
aScalars->SetTuple(aCurId,&aDiam);
|
||||
}
|
||||
|
||||
//Store diameters of the balls
|
||||
if(aScalars) {
|
||||
double aDiam = 0;
|
||||
if(aType == SMDSAbs_Ball) {
|
||||
if (const SMDS_BallElement* ball = dynamic_cast<const SMDS_BallElement*>(anElem) ) {
|
||||
aDiam = ball->GetDiameter();
|
||||
}
|
||||
}
|
||||
aScalars->SetTuple(aCurId,&aDiam);
|
||||
}
|
||||
|
||||
iElem++;
|
||||
}
|
||||
|
@ -144,10 +144,10 @@ SMESH_SVTKActor
|
||||
if(aCell->GetCellType() == VTK_VERTEX ) {
|
||||
my0DGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
|
||||
} else if(aCell->GetCellType() == VTK_POLY_VERTEX ) {
|
||||
vtkIdType newCellId = myBallGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
|
||||
if(myVisualObj) {
|
||||
outputCD->CopyData(cd, myVisualObj->GetElemVTKId(aPartId), newCellId);
|
||||
}
|
||||
vtkIdType newCellId = myBallGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
|
||||
if(myVisualObj) {
|
||||
outputCD->CopyData(cd, myVisualObj->GetElemVTKId(aPartId), newCellId);
|
||||
}
|
||||
} else {
|
||||
myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
|
||||
}
|
||||
|
@ -2018,7 +2018,7 @@ bool SMESHGUI::automaticUpdate( SMESH::SMESH_Mesh_ptr theMesh,
|
||||
if ( nbOdElems > 0 ) {
|
||||
if ( total + nbOdElems > updateLimit ) {
|
||||
*entities = *entities & ~SMESH_Actor::e0DElements;
|
||||
*hidden = *hidden | SMESH_Actor::e0DElements;
|
||||
*hidden = *hidden | SMESH_Actor::e0DElements;
|
||||
}
|
||||
else
|
||||
exceeded = false;
|
||||
@ -2028,7 +2028,7 @@ bool SMESHGUI::automaticUpdate( SMESH::SMESH_Mesh_ptr theMesh,
|
||||
if ( nbEdges > 0 ) {
|
||||
if ( total + nbEdges > updateLimit ) {
|
||||
*entities = *entities & ~SMESH_Actor::eEdges;
|
||||
*hidden = *hidden | SMESH_Actor::eEdges;
|
||||
*hidden = *hidden | SMESH_Actor::eEdges;
|
||||
}
|
||||
else
|
||||
exceeded = false;
|
||||
@ -2038,7 +2038,7 @@ bool SMESHGUI::automaticUpdate( SMESH::SMESH_Mesh_ptr theMesh,
|
||||
if ( nbFaces > 0 ) {
|
||||
if ( total + nbFaces > updateLimit ) {
|
||||
*entities = *entities & ~SMESH_Actor::eFaces;
|
||||
*hidden = *hidden | SMESH_Actor::eFaces;
|
||||
*hidden = *hidden | SMESH_Actor::eFaces;
|
||||
}
|
||||
else
|
||||
exceeded = false;
|
||||
@ -2048,7 +2048,7 @@ bool SMESHGUI::automaticUpdate( SMESH::SMESH_Mesh_ptr theMesh,
|
||||
if ( nbVolumes > 0 ) {
|
||||
if ( total + nbVolumes > updateLimit ) {
|
||||
*entities = *entities & ~SMESH_Actor::eVolumes;
|
||||
*hidden = *hidden | SMESH_Actor::eVolumes;
|
||||
*hidden = *hidden | SMESH_Actor::eVolumes;
|
||||
}
|
||||
else
|
||||
exceeded = false;
|
||||
@ -2058,7 +2058,7 @@ bool SMESHGUI::automaticUpdate( SMESH::SMESH_Mesh_ptr theMesh,
|
||||
if ( nbBalls > 0 ) {
|
||||
if ( total + nbBalls > updateLimit ) {
|
||||
*entities = *entities & ~SMESH_Actor::eBallElem;
|
||||
*hidden = *hidden | SMESH_Actor::eBallElem;
|
||||
*hidden = *hidden | SMESH_Actor::eBallElem;
|
||||
}
|
||||
else
|
||||
exceeded = false;
|
||||
@ -3549,13 +3549,13 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
{
|
||||
int page = SMESHGUI_MeasureDlg::MinDistance;
|
||||
if ( theCommandID == 502 )
|
||||
page = SMESHGUI_MeasureDlg::BoundingBox;
|
||||
page = SMESHGUI_MeasureDlg::BoundingBox;
|
||||
else if ( theCommandID == 503 )
|
||||
page = SMESHGUI_MeasureDlg::Length;
|
||||
page = SMESHGUI_MeasureDlg::Length;
|
||||
else if ( theCommandID == 504 )
|
||||
page = SMESHGUI_MeasureDlg::Area;
|
||||
page = SMESHGUI_MeasureDlg::Area;
|
||||
else if ( theCommandID == 505 )
|
||||
page = SMESHGUI_MeasureDlg::Volume;
|
||||
page = SMESHGUI_MeasureDlg::Volume;
|
||||
|
||||
EmitSignalDeactivateDialog();
|
||||
SMESHGUI_MeasureDlg* dlg = new SMESHGUI_MeasureDlg( SMESHGUI::desktop(), page );
|
||||
|
@ -229,10 +229,10 @@ namespace SMESH
|
||||
anIds->SetNumberOfIds(1);
|
||||
for (int i = 0, iEnd = theIds.size(); i < iEnd; i++){
|
||||
anIds->InsertId(0,theIds[i]);
|
||||
vtkIdType anId = myBallPolyData->InsertNextCell(VTK_POLY_VERTEX,anIds);
|
||||
double d = theDiameter;
|
||||
aScalars->SetTuple(anId,&d);
|
||||
anIds->Reset();
|
||||
vtkIdType anId = myBallPolyData->InsertNextCell(VTK_POLY_VERTEX,anIds);
|
||||
double d = theDiameter;
|
||||
aScalars->SetTuple(anId,&d);
|
||||
anIds->Reset();
|
||||
}
|
||||
|
||||
anIds->Delete();
|
||||
@ -258,7 +258,7 @@ namespace SMESH
|
||||
if (FindVtkViewWindow(myApplication->activeViewManager(), myViewWindow)) {
|
||||
myVTKViewWindow->RemoveActor(myPreviewActor,false,false);
|
||||
myVTKViewWindow->RemoveActor(myFaceOrientation,false,false);
|
||||
myVTKViewWindow->RemoveActor(myBallActor,false,false);
|
||||
myVTKViewWindow->RemoveActor(myBallActor,false,false);
|
||||
}
|
||||
|
||||
myMapper->Delete();
|
||||
|
@ -915,12 +915,12 @@ void SMESHGUI_BaseComputeOp::computeMesh()
|
||||
|
||||
if ( limitExceeded )
|
||||
{
|
||||
QStringList hiddenMsg;
|
||||
if ( hidden & SMESH_Actor::e0DElements ) hiddenMsg << tr( "SMESH_ELEMS0D" );
|
||||
if ( hidden & SMESH_Actor::eEdges ) hiddenMsg << tr( "SMESH_EDGES" );
|
||||
if ( hidden & SMESH_Actor::eFaces ) hiddenMsg << tr( "SMESH_FACES" );
|
||||
if ( hidden & SMESH_Actor::eVolumes ) hiddenMsg << tr( "SMESH_VOLUMES" );
|
||||
if ( hidden & SMESH_Actor::eBallElem ) hiddenMsg << tr( "SMESH_BALLS" );
|
||||
QStringList hiddenMsg;
|
||||
if ( hidden & SMESH_Actor::e0DElements ) hiddenMsg << tr( "SMESH_ELEMS0D" );
|
||||
if ( hidden & SMESH_Actor::eEdges ) hiddenMsg << tr( "SMESH_EDGES" );
|
||||
if ( hidden & SMESH_Actor::eFaces ) hiddenMsg << tr( "SMESH_FACES" );
|
||||
if ( hidden & SMESH_Actor::eVolumes ) hiddenMsg << tr( "SMESH_VOLUMES" );
|
||||
if ( hidden & SMESH_Actor::eBallElem ) hiddenMsg << tr( "SMESH_BALLS" );
|
||||
SUIT_MessageBox::warning( desktop(),
|
||||
tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "SMESH_WRN_SIZE_INC_LIMIT_EXCEEDED" ).arg( myMesh->NbElements() ).arg( limitSize ).arg( hiddenMsg.join(", ") ) );
|
||||
|
@ -685,13 +685,13 @@ void SMESHGUI_MakeNodeAtPointOp::redisplayPreview()
|
||||
double y = aXYZ->operator[](1);
|
||||
double z = aXYZ->operator[](2);
|
||||
|
||||
if ( myUpdateDestination ) {
|
||||
myDlg->myX->SetValue(x);
|
||||
myDlg->myY->SetValue(y);
|
||||
myDlg->myZ->SetValue(z);
|
||||
}
|
||||
if ( myUpdateDestination ) {
|
||||
myDlg->myX->SetValue(x);
|
||||
myDlg->myY->SetValue(y);
|
||||
myDlg->myZ->SetValue(z);
|
||||
}
|
||||
|
||||
double dx = myDlg->myX->GetValue() - x;
|
||||
double dx = myDlg->myX->GetValue() - x;
|
||||
double dy = myDlg->myY->GetValue() - y;
|
||||
double dz = myDlg->myZ->GetValue() - z;
|
||||
myDlg->myCurrentX->SetValue(x);
|
||||
|
@ -436,74 +436,74 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
|
||||
switch ( actionButton ) {
|
||||
case MOVE_ELEMS_BUTTON:
|
||||
if(CheckBoxMesh->isChecked()) {
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->RotateObject(myObjects[i], anAxis, anAngle, false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->Rotate(anElementsId, anAxis, anAngle, false);
|
||||
}
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->RotateObject(myObjects[i], anAxis, anAngle, false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->Rotate(anElementsId, anAxis, anAngle, false);
|
||||
}
|
||||
break;
|
||||
case COPY_ELEMS_BUTTON:
|
||||
if ( makeGroups ) {
|
||||
SMESH::ListOfGroups_var groups;
|
||||
if(CheckBoxMesh->isChecked()) {
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
groups = aMeshEditor->RotateObjectMakeGroups(myObjects[i], anAxis, anAngle);
|
||||
}
|
||||
}
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
groups = aMeshEditor->RotateObjectMakeGroups(myObjects[i], anAxis, anAngle);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
groups = aMeshEditor->RotateMakeGroups(anElementsId, anAxis, anAngle);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(CheckBoxMesh->isChecked()) {
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->RotateObject(myObjects[i], anAxis, anAngle, true);
|
||||
}
|
||||
}
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->RotateObject(myObjects[i], anAxis, anAngle, true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->Rotate(anElementsId, anAxis, anAngle, true);
|
||||
}
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->Rotate(anElementsId, anAxis, anAngle, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MAKE_MESH_BUTTON: {
|
||||
SMESH::SMESH_Mesh_var mesh;
|
||||
if (CheckBoxMesh->isChecked()) {
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) );
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
mesh = aMeshEditor->RotateObjectMakeMesh(myObjects[i], anAxis, anAngle, makeGroups,
|
||||
aName.toLatin1().data());
|
||||
if (!mesh->_is_nil()) {
|
||||
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
|
||||
anEntryList.append( aSObject->GetID().c_str() );
|
||||
}
|
||||
}
|
||||
}
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) );
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
mesh = aMeshEditor->RotateObjectMakeMesh(myObjects[i], anAxis, anAngle, makeGroups,
|
||||
aName.toLatin1().data());
|
||||
if (!mesh->_is_nil()) {
|
||||
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
|
||||
anEntryList.append( aSObject->GetID().c_str() );
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
mesh = aMeshEditor->RotateMakeMesh(anElementsId, anAxis, anAngle, makeGroups,
|
||||
LineEditNewMesh->text().toLatin1().data());
|
||||
if (!mesh->_is_nil()) {
|
||||
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
|
||||
anEntryList.append( aSObject->GetID().c_str() );
|
||||
}
|
||||
}
|
||||
if (!mesh->_is_nil()) {
|
||||
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
|
||||
anEntryList.append( aSObject->GetID().c_str() );
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -682,25 +682,25 @@ void SMESHGUI_RotationDlg::SelectionIntoArgument()
|
||||
Handle(SALOME_InteractiveObject) IO = it.Value();
|
||||
SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO( IO );
|
||||
if ( aMesh->_is_nil() )
|
||||
return;
|
||||
return;
|
||||
|
||||
myActor = SMESH::FindActorByObject( aMesh );
|
||||
if ( !myActor )
|
||||
myActor = SMESH::FindActorByEntry( IO->getEntry() );
|
||||
myActor = SMESH::FindActorByEntry( IO->getEntry() );
|
||||
if ( !myActor && !CheckBoxMesh->isChecked() )
|
||||
return;
|
||||
return;
|
||||
|
||||
if ( !SMESH::IObjectToInterface<SMESH::SMESH_IDSource>( IO )->_is_nil() ) {
|
||||
if ( _PTR(Study) aStudy = SMESH::GetActiveStudyDocument() ) {
|
||||
_PTR(SObject) obj = aStudy->FindObjectID( qPrintable( QString( IO->getEntry() ) ) );
|
||||
_PTR(GenericAttribute) anAttr;
|
||||
if ( obj && obj->FindAttribute( anAttr, "AttributeName" ) ) {
|
||||
_PTR(AttributeName) aNameAttr( anAttr );
|
||||
myObjects << SMESH::IObjectToInterface<SMESH::SMESH_IDSource>( IO );
|
||||
myObjectsNames << aNameAttr->Value().c_str();
|
||||
myMeshes << aMesh;
|
||||
}
|
||||
}
|
||||
if ( _PTR(Study) aStudy = SMESH::GetActiveStudyDocument() ) {
|
||||
_PTR(SObject) obj = aStudy->FindObjectID( qPrintable( QString( IO->getEntry() ) ) );
|
||||
_PTR(GenericAttribute) anAttr;
|
||||
if ( obj && obj->FindAttribute( anAttr, "AttributeName" ) ) {
|
||||
_PTR(AttributeName) aNameAttr( anAttr );
|
||||
myObjects << SMESH::IObjectToInterface<SMESH::SMESH_IDSource>( IO );
|
||||
myObjectsNames << aNameAttr->Value().c_str();
|
||||
myMeshes << aMesh;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -719,7 +719,7 @@ void SMESHGUI_RotationDlg::SelectionIntoArgument()
|
||||
SMESH::GetNameOfSelectedIObjects(mySelectionMgr, aString);
|
||||
|
||||
if ( myMeshes.isEmpty() )
|
||||
return;
|
||||
return;
|
||||
// get IDs from mesh
|
||||
/*
|
||||
SMDS_Mesh* aSMDSMesh = myActor->GetObject()->GetMesh();
|
||||
@ -1129,19 +1129,19 @@ void SMESHGUI_RotationDlg::onDisplaySimulation( bool toDisplayPreview ) {
|
||||
SUIT_OverrideCursor aWaitCursor;
|
||||
bool copy = ( ActionGroup->checkedId() == COPY_ELEMS_BUTTON ||
|
||||
ActionGroup->checkedId() == MAKE_MESH_BUTTON );
|
||||
QList<SMESH::MeshPreviewStruct_var> aMeshPreviewStruct;
|
||||
QList<SMESH::MeshPreviewStruct_var> aMeshPreviewStruct;
|
||||
if(CheckBoxMesh->isChecked())
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditPreviewer();
|
||||
aMeshEditor->RotateObject(myObjects[i], anAxis, anAngle, copy);
|
||||
aMeshPreviewStruct << aMeshEditor->GetPreviewData();
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditPreviewer();
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditPreviewer();
|
||||
aMeshEditor->RotateObject(myObjects[i], anAxis, anAngle, copy);
|
||||
aMeshPreviewStruct << aMeshEditor->GetPreviewData();
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditPreviewer();
|
||||
aMeshEditor->Rotate(anElementsId, anAxis, anAngle, copy);
|
||||
aMeshPreviewStruct << aMeshEditor->GetPreviewData();
|
||||
}
|
||||
setSimulationPreview( aMeshPreviewStruct );
|
||||
aMeshPreviewStruct << aMeshEditor->GetPreviewData();
|
||||
}
|
||||
setSimulationPreview( aMeshPreviewStruct );
|
||||
} catch (...) {
|
||||
hidePreview();
|
||||
}
|
||||
|
@ -477,71 +477,71 @@ bool SMESHGUI_ScaleDlg::ClickOnApply()
|
||||
switch ( actionButton ) {
|
||||
|
||||
case MOVE_ELEMS_BUTTON:
|
||||
if ( CheckBoxMesh->isChecked() )
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters( aParameters.join( ":" ).toLatin1().constData() );
|
||||
aMeshEditor->Scale(myObjects[i], aPoint, aScaleFact, false);
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
if ( CheckBoxMesh->isChecked() )
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters( aParameters.join( ":" ).toLatin1().constData() );
|
||||
aMeshEditor->Scale(myObjects[i], aPoint, aScaleFact, false);
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
SMESH::SMESH_IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
|
||||
myMeshes[0]->SetParameters( aParameters.join( ":" ).toLatin1().constData() );
|
||||
aMeshEditor->Scale( src, aPoint, aScaleFact, false);
|
||||
}
|
||||
myMeshes[0]->SetParameters( aParameters.join( ":" ).toLatin1().constData() );
|
||||
aMeshEditor->Scale( src, aPoint, aScaleFact, false);
|
||||
}
|
||||
break;
|
||||
|
||||
case COPY_ELEMS_BUTTON:
|
||||
if ( makeGroups ) {
|
||||
SMESH::ListOfGroups_var groups;
|
||||
if(CheckBoxMesh->isChecked())
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
groups = aMeshEditor->ScaleMakeGroups(myObjects[i], aPoint, aScaleFact);
|
||||
}
|
||||
SMESH::ListOfGroups_var groups;
|
||||
if(CheckBoxMesh->isChecked())
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
groups = aMeshEditor->ScaleMakeGroups(myObjects[i], aPoint, aScaleFact);
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
SMESH::SMESH_IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
groups = aMeshEditor->ScaleMakeGroups( src, aPoint, aScaleFact);
|
||||
}
|
||||
}
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
groups = aMeshEditor->ScaleMakeGroups( src, aPoint, aScaleFact);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(CheckBoxMesh->isChecked()) {
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->Scale(myObjects[i], aPoint, aScaleFact, true);
|
||||
}
|
||||
}
|
||||
if(CheckBoxMesh->isChecked()) {
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->Scale(myObjects[i], aPoint, aScaleFact, true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
SMESH::SMESH_IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->Scale( src, aPoint, aScaleFact, true);
|
||||
}
|
||||
}
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->Scale( src, aPoint, aScaleFact, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case MAKE_MESH_BUTTON: {
|
||||
SMESH::SMESH_Mesh_var mesh;
|
||||
if (CheckBoxMesh->isChecked()) {
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) );
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
mesh = aMeshEditor->ScaleMakeMesh(myObjects[i], aPoint, aScaleFact, makeGroups,
|
||||
aName.toLatin1().data());
|
||||
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
|
||||
anEntryList.append( aSObject->GetID().c_str() );
|
||||
}
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
SMESH::SMESH_Mesh_var mesh;
|
||||
if (CheckBoxMesh->isChecked()) {
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) );
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
mesh = aMeshEditor->ScaleMakeMesh(myObjects[i], aPoint, aScaleFact, makeGroups,
|
||||
aName.toLatin1().data());
|
||||
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
|
||||
anEntryList.append( aSObject->GetID().c_str() );
|
||||
}
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
SMESH::SMESH_IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
|
||||
mesh = aMeshEditor->ScaleMakeMesh( src, aPoint, aScaleFact, makeGroups,
|
||||
mesh = aMeshEditor->ScaleMakeMesh( src, aPoint, aScaleFact, makeGroups,
|
||||
LineEditNewMesh->text().toLatin1().data());
|
||||
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
|
||||
anEntryList.append( aSObject->GetID().c_str() );
|
||||
@ -722,25 +722,25 @@ void SMESHGUI_ScaleDlg::SelectionIntoArgument()
|
||||
Handle(SALOME_InteractiveObject) IO = it.Value();
|
||||
SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO( IO );
|
||||
if ( aMesh->_is_nil() )
|
||||
return;
|
||||
return;
|
||||
|
||||
myActor = SMESH::FindActorByObject( aMesh );
|
||||
if ( !myActor )
|
||||
myActor = SMESH::FindActorByEntry( IO->getEntry() );
|
||||
myActor = SMESH::FindActorByEntry( IO->getEntry() );
|
||||
if ( !myActor && !CheckBoxMesh->isChecked() )
|
||||
return;
|
||||
return;
|
||||
|
||||
if ( !SMESH::IObjectToInterface<SMESH::SMESH_IDSource>( IO )->_is_nil() ) {
|
||||
if ( _PTR(Study) aStudy = SMESH::GetActiveStudyDocument() ) {
|
||||
_PTR(SObject) obj = aStudy->FindObjectID( qPrintable( QString( IO->getEntry() ) ) );
|
||||
_PTR(GenericAttribute) anAttr;
|
||||
if ( obj && obj->FindAttribute( anAttr, "AttributeName" ) ) {
|
||||
_PTR(AttributeName) aNameAttr( anAttr );
|
||||
myObjects << SMESH::IObjectToInterface<SMESH::SMESH_IDSource>( IO );
|
||||
myObjectsNames << aNameAttr->Value().c_str();
|
||||
myMeshes << aMesh;
|
||||
}
|
||||
}
|
||||
if ( _PTR(Study) aStudy = SMESH::GetActiveStudyDocument() ) {
|
||||
_PTR(SObject) obj = aStudy->FindObjectID( qPrintable( QString( IO->getEntry() ) ) );
|
||||
_PTR(GenericAttribute) anAttr;
|
||||
if ( obj && obj->FindAttribute( anAttr, "AttributeName" ) ) {
|
||||
_PTR(AttributeName) aNameAttr( anAttr );
|
||||
myObjects << SMESH::IObjectToInterface<SMESH::SMESH_IDSource>( IO );
|
||||
myObjectsNames << aNameAttr->Value().c_str();
|
||||
myMeshes << aMesh;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -760,7 +760,7 @@ void SMESHGUI_ScaleDlg::SelectionIntoArgument()
|
||||
if (CheckBoxMesh->isChecked()) {
|
||||
SMESH::GetNameOfSelectedIObjects( mySelectionMgr, aString );
|
||||
if (myMeshes.isEmpty())
|
||||
return;
|
||||
return;
|
||||
// get IDs from mesh
|
||||
/*
|
||||
SMDS_Mesh* aSMDSMesh = myActor->GetObject()->GetMesh();
|
||||
@ -1136,21 +1136,21 @@ void SMESHGUI_ScaleDlg::onDisplaySimulation( bool toDisplayPreview ) {
|
||||
bool copy = ( ActionGroup->checkedId() == COPY_ELEMS_BUTTON ||
|
||||
ActionGroup->checkedId() == MAKE_MESH_BUTTON );
|
||||
SUIT_OverrideCursor aWaitCursor;
|
||||
QList<SMESH::MeshPreviewStruct_var> aMeshPreviewStruct;
|
||||
QList<SMESH::MeshPreviewStruct_var> aMeshPreviewStruct;
|
||||
|
||||
if(CheckBoxMesh->isChecked())
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditPreviewer();
|
||||
aMeshEditor->Scale(myObjects[i], aPoint, aScaleFact, copy);
|
||||
aMeshPreviewStruct << aMeshEditor->GetPreviewData();
|
||||
}
|
||||
if(CheckBoxMesh->isChecked())
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditPreviewer();
|
||||
aMeshEditor->Scale(myObjects[i], aPoint, aScaleFact, copy);
|
||||
aMeshPreviewStruct << aMeshEditor->GetPreviewData();
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditPreviewer();
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditPreviewer();
|
||||
SMESH::SMESH_IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
|
||||
aMeshEditor->Scale( src, aPoint, aScaleFact, copy);
|
||||
aMeshPreviewStruct << aMeshEditor->GetPreviewData();
|
||||
}
|
||||
setSimulationPreview(aMeshPreviewStruct);
|
||||
aMeshEditor->Scale( src, aPoint, aScaleFact, copy);
|
||||
aMeshPreviewStruct << aMeshEditor->GetPreviewData();
|
||||
}
|
||||
setSimulationPreview(aMeshPreviewStruct);
|
||||
} catch (...) {
|
||||
hidePreview();
|
||||
}
|
||||
|
@ -499,68 +499,68 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply()
|
||||
switch ( actionButton ) {
|
||||
case MOVE_ELEMS_BUTTON: {
|
||||
if(CheckBoxMesh->isChecked())
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->MirrorObject(myObjects[i], aMirror, aMirrorType, false );
|
||||
}
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->MirrorObject(myObjects[i], aMirror, aMirrorType, false );
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, false );
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case COPY_ELEMS_BUTTON: {
|
||||
SMESH::ListOfGroups_var groups;
|
||||
if ( makeGroups ) {
|
||||
if(CheckBoxMesh->isChecked())
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
groups = aMeshEditor->MirrorObjectMakeGroups(myObjects[i], aMirror, aMirrorType);
|
||||
}
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
groups = aMeshEditor->MirrorObjectMakeGroups(myObjects[i], aMirror, aMirrorType);
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
groups = aMeshEditor->MirrorMakeGroups(anElementsId, aMirror, aMirrorType);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(CheckBoxMesh->isChecked())
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->MirrorObject(myObjects[i], aMirror, aMirrorType, true);
|
||||
}
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->MirrorObject(myObjects[i], aMirror, aMirrorType, true);
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MAKE_MESH_BUTTON: {
|
||||
SMESH::SMESH_Mesh_var mesh;
|
||||
if (CheckBoxMesh->isChecked())
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) );
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
mesh = aMeshEditor->MirrorObjectMakeMesh(myObjects[i], aMirror, aMirrorType, makeGroups,
|
||||
aName.toLatin1().data());
|
||||
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
|
||||
anEntryList.append( aSObject->GetID().c_str() );
|
||||
}
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) );
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
|
||||
myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
mesh = aMeshEditor->MirrorObjectMakeMesh(myObjects[i], aMirror, aMirrorType, makeGroups,
|
||||
aName.toLatin1().data());
|
||||
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
|
||||
anEntryList.append( aSObject->GetID().c_str() );
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
|
||||
myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
|
||||
mesh = aMeshEditor->MirrorMakeMesh(anElementsId, aMirror, aMirrorType, makeGroups,
|
||||
LineEditNewMesh->text().toLatin1().data());
|
||||
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
|
||||
anEntryList.append( aSObject->GetID().c_str() );
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -741,32 +741,32 @@ void SMESHGUI_SymmetryDlg::SelectionIntoArgument()
|
||||
|
||||
SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO( IO );
|
||||
if( aMesh->_is_nil() )
|
||||
return;
|
||||
return;
|
||||
|
||||
myActor = SMESH::FindActorByObject( aMesh );
|
||||
if ( !myActor )
|
||||
myActor = SMESH::FindActorByEntry( IO->getEntry() );
|
||||
myActor = SMESH::FindActorByEntry( IO->getEntry() );
|
||||
if ( !myActor && !CheckBoxMesh->isChecked() )
|
||||
return;
|
||||
return;
|
||||
|
||||
if ( !SMESH::IObjectToInterface<SMESH::SMESH_IDSource>( IO )->_is_nil() ) {
|
||||
if ( _PTR(Study) aStudy = SMESH::GetActiveStudyDocument() ) {
|
||||
_PTR(SObject) obj = aStudy->FindObjectID( qPrintable( QString( IO->getEntry() ) ) );
|
||||
_PTR(GenericAttribute) anAttr;
|
||||
if ( obj && obj->FindAttribute( anAttr, "AttributeName" ) ) {
|
||||
_PTR(AttributeName) aNameAttr( anAttr );
|
||||
myObjects << SMESH::IObjectToInterface<SMESH::SMESH_IDSource>( IO );
|
||||
myObjectsNames << aNameAttr->Value().c_str();
|
||||
myMeshes << aMesh;
|
||||
}
|
||||
}
|
||||
if ( _PTR(Study) aStudy = SMESH::GetActiveStudyDocument() ) {
|
||||
_PTR(SObject) obj = aStudy->FindObjectID( qPrintable( QString( IO->getEntry() ) ) );
|
||||
_PTR(GenericAttribute) anAttr;
|
||||
if ( obj && obj->FindAttribute( anAttr, "AttributeName" ) ) {
|
||||
_PTR(AttributeName) aNameAttr( anAttr );
|
||||
myObjects << SMESH::IObjectToInterface<SMESH::SMESH_IDSource>( IO );
|
||||
myObjectsNames << aNameAttr->Value().c_str();
|
||||
myMeshes << aMesh;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MakeGroups is available if there are groups and "Copy"
|
||||
int aNbGroups = 0;
|
||||
for ( int i = 0; i < myMeshes.count(); i++ )
|
||||
aNbGroups += myMeshes[i]->NbGroups();
|
||||
aNbGroups += myMeshes[i]->NbGroups();
|
||||
|
||||
if ( aNbGroups == 0 ) {
|
||||
MakeGroupsCheck->setChecked(false);
|
||||
@ -779,7 +779,7 @@ void SMESHGUI_SymmetryDlg::SelectionIntoArgument()
|
||||
SMESH::GetNameOfSelectedIObjects(mySelectionMgr, aString);
|
||||
|
||||
if ( myObjects.isEmpty() )
|
||||
return;
|
||||
return;
|
||||
// get IDs from mesh
|
||||
/*
|
||||
SMDS_Mesh* aSMDSMesh = myActor->GetObject()->GetMesh();
|
||||
@ -1191,19 +1191,19 @@ void SMESHGUI_SymmetryDlg::onDisplaySimulation( bool toDisplayPreview ) {
|
||||
bool copy = ( ActionGroup->checkedId() == COPY_ELEMS_BUTTON ||
|
||||
ActionGroup->checkedId() == MAKE_MESH_BUTTON );
|
||||
SUIT_OverrideCursor aWaitCursor;
|
||||
QList<SMESH::MeshPreviewStruct_var> aMeshPreviewStruct;
|
||||
QList<SMESH::MeshPreviewStruct_var> aMeshPreviewStruct;
|
||||
if(CheckBoxMesh->isChecked())
|
||||
for ( int i = 0; i < myMeshes.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditPreviewer();
|
||||
aMeshEditor->MirrorObject(myObjects[i], aMirror, aMirrorType, copy );
|
||||
aMeshPreviewStruct << aMeshEditor->GetPreviewData();
|
||||
}
|
||||
for ( int i = 0; i < myMeshes.count(); i++ ) {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditPreviewer();
|
||||
aMeshEditor->MirrorObject(myObjects[i], aMirror, aMirrorType, copy );
|
||||
aMeshPreviewStruct << aMeshEditor->GetPreviewData();
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditPreviewer();
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditPreviewer();
|
||||
aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, copy );
|
||||
aMeshPreviewStruct << aMeshEditor->GetPreviewData();
|
||||
}
|
||||
setSimulationPreview(aMeshPreviewStruct);
|
||||
aMeshPreviewStruct << aMeshEditor->GetPreviewData();
|
||||
}
|
||||
setSimulationPreview(aMeshPreviewStruct);
|
||||
} catch (...) {
|
||||
hidePreview();
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ static double getNumericalValue(SMESH::SMESH_IDSource_ptr theSource, SMESH::Cont
|
||||
|
||||
SMESH::long_array_var anElementsId = theSource->GetIDs();
|
||||
for (int i = 0; i < anElementsId->length(); i++) {
|
||||
value += theFunctor->GetValue( anElementsId[i] );
|
||||
value += theFunctor->GetValue( anElementsId[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -380,9 +380,9 @@ SMESH_Swig::Init(int theStudyID)
|
||||
aPixmap->SetPixMap( "ICON_OBJBROWSER_SMESH" );
|
||||
aPixmap->UnRegister();
|
||||
|
||||
SALOMEDS::UseCaseBuilder_var useCaseBuilder = myStudy->GetUseCaseBuilder();
|
||||
useCaseBuilder->SetRootCurrent();
|
||||
useCaseBuilder->Append( aSComponent.in() );
|
||||
SALOMEDS::UseCaseBuilder_var useCaseBuilder = myStudy->GetUseCaseBuilder();
|
||||
useCaseBuilder->SetRootCurrent();
|
||||
useCaseBuilder->Append( aSComponent.in() );
|
||||
|
||||
myStudyBuilder->DefineComponentInstance(aSComponent,aSMESHGen);
|
||||
if (aLocked)
|
||||
|
Loading…
Reference in New Issue
Block a user