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