PathMeshLineEdit = new QLineEdit(PathGrp);
PathMeshLineEdit->setReadOnly(true);
- // Controls for path shape selection
- QLabel* PathShapeLab = new QLabel(tr("SMESH_PATH_SHAPE"), PathGrp);
-
- SelectPathShapeButton = new QToolButton(PathGrp);
- SelectPathShapeButton->setIcon(selectImage);
-
- PathShapeLineEdit = new QLineEdit(PathGrp);
- PathShapeLineEdit->setReadOnly(true);
-
// Controls for path starting point selection
QLabel* StartPointLab = new QLabel(tr("SMESH_PATH_START"), PathGrp);
PathGrpLayout->addWidget(PathMeshLab, 0, 0);
PathGrpLayout->addWidget(SelectPathMeshButton, 0, 1);
PathGrpLayout->addWidget(PathMeshLineEdit, 0, 2);
- PathGrpLayout->addWidget(PathShapeLab, 1, 0);
- PathGrpLayout->addWidget(SelectPathShapeButton, 1, 1);
- PathGrpLayout->addWidget(PathShapeLineEdit, 1, 2);
- PathGrpLayout->addWidget(StartPointLab, 2, 0);
- PathGrpLayout->addWidget(SelectStartPointButton, 2, 1);
- PathGrpLayout->addWidget(StartPointLineEdit, 2, 2);
+ PathGrpLayout->addWidget(StartPointLab, 1, 0);
+ PathGrpLayout->addWidget(SelectStartPointButton, 1, 1);
+ PathGrpLayout->addWidget(StartPointLineEdit, 1, 2);
BasePointGrp = new QGroupBox(tr("SMESH_BASE_POINT"), GroupArguments);
BasePointGrp->setCheckable(true);
/***************************************************************/
// Initialisations
- XSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- YSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- ZSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- AngleSpin->RangeStepAndValidator(-180.0, 180.0, 5.0, 3);
+ XSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ YSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ ZSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ AngleSpin->RangeStepAndValidator(-180.0, 180.0, 5.0, "angle_precision");
mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
if (aSmeshGroupFilter) aListOfFilters.append(aSmeshGroupFilter);
myElementsFilter = new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR);
- myPathMeshFilter = new SMESH_TypeFilter (MESH);
+ //myPathMeshFilter = new SMESH_TypeFilter (MESH);
+ myPathMeshFilter = new SMESH_TypeFilter(MESHorSUBMESH);
myHelpFileName = "extrusion_along_path_page.html";
connect(SelectElementsButton, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(SelectPathMeshButton, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
- connect(SelectPathShapeButton, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(SelectStartPointButton, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(SelectBasePointButton, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
connect(ElementsLineEdit, SIGNAL(textChanged(const QString&)),
- SLOT(onTextChange(const QString&)));
+ SLOT(onTextChange(const QString&)));
connect(StartPointLineEdit, SIGNAL(textChanged(const QString&)),
- SLOT(onTextChange(const QString&)));
+ SLOT(onTextChange(const QString&)));
connect(MeshCheck, SIGNAL(toggled(bool)), SLOT(onSelectMesh()));
myMesh = SMESH::SMESH_Mesh::_nil();
myIDSource = SMESH::SMESH_IDSource::_nil();
myMeshActor = 0;
- myPathMesh = SMESH::SMESH_Mesh::_nil();
- myPathShape = GEOM::GEOM_Object::_nil();
+ myPath = SMESH::SMESH_IDSource::_nil();
ElementsLineEdit->clear();
PathMeshLineEdit->clear();
- PathShapeLineEdit->clear();
StartPointLineEdit->clear();
if (ResetControls) {
SMESH::SetPointRepresentation(false);
if (MeshCheck->isChecked()) {
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(ActorSelection);
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myElementsFilter);
} else {
if (type == 0)
- {
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(EdgeSelection);
- }
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(EdgeSelection);
+ }
if (type == 1)
- {
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(FaceSelection);
- }
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(FaceSelection);
+ }
}
}
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
if (mySMESHGUI->isActiveStudyLocked())
return false;
- if (myMesh->_is_nil() || MeshCheck->isChecked() && myIDSource->_is_nil() ||
- !myMeshActor || myPathMesh->_is_nil() || myPathShape->_is_nil())
+ //if (myMesh->_is_nil() || MeshCheck->isChecked() && myIDSource->_is_nil() ||
+ // !myMeshActor || myPathMesh->_is_nil() || myPathShape->_is_nil())
+ if ( myMesh->_is_nil() || MeshCheck->isChecked() && myIDSource->_is_nil() ||
+ !myMeshActor || myPath->_is_nil() )
return false;
if (!isValid())
bool bOk;
int j = 0;
for (int i = 0; i < aListElementsId.count(); i++) {
- long ind = aListElementsId[ i ].toLong(&bOk);
- if (bOk) {
- const SMDS_MeshElement* e = aMesh->FindElement(ind);
- if (e) {
- bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
- Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
- if (typeMatch)
- anElementsId[ j++ ] = ind;
- }
- }
+ long ind = aListElementsId[ i ].toLong(&bOk);
+ if (bOk) {
+ const SMDS_MeshElement* e = aMesh->FindElement(ind);
+ if (e) {
+ bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
+ Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
+ if (typeMatch)
+ anElementsId[ j++ ] = ind;
+ }
+ }
}
anElementsId->length(j);
}
try {
SUIT_OverrideCursor wc;
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
- if ( LinearAnglesCheck->isChecked() )
- anAngles = aMeshEditor->LinearAnglesVariation( myPathMesh, myPathShape, anAngles );
+ //if ( LinearAnglesCheck->isChecked() ) {
+ // anAngles = aMeshEditor->LinearAnglesVariation( myPathMesh, myPathShape, anAngles );
+ //}
SMESH::SMESH_MeshEditor::Extrusion_Error retVal;
+ /*
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) {
if( MeshCheck->isChecked() ) {
- if( GetConstructorId() == 0 )
- SMESH::ListOfGroups_var groups =
- aMeshEditor->ExtrusionAlongPathObject1DMakeGroups(myIDSource, myPathMesh,
- myPathShape, aNodeStart,
- AnglesGrp->isChecked(), anAngles,
- BasePointGrp->isChecked(), aBasePoint, retVal);
- else
- SMESH::ListOfGroups_var groups =
- aMeshEditor->ExtrusionAlongPathObject2DMakeGroups(myIDSource, myPathMesh,
- myPathShape, aNodeStart,
- AnglesGrp->isChecked(), anAngles,
- BasePointGrp->isChecked(), aBasePoint, retVal);
+ if( GetConstructorId() == 0 )
+ SMESH::ListOfGroups_var groups =
+ aMeshEditor->ExtrusionAlongPathObject1DMakeGroups(myIDSource, myPathMesh,
+ myPathShape, aNodeStart,
+ AnglesGrp->isChecked(), anAngles,
+ BasePointGrp->isChecked(), aBasePoint, retVal);
+ else
+ SMESH::ListOfGroups_var groups =
+ aMeshEditor->ExtrusionAlongPathObject2DMakeGroups(myIDSource, myPathMesh,
+ myPathShape, aNodeStart,
+ AnglesGrp->isChecked(), anAngles,
+ BasePointGrp->isChecked(), aBasePoint, retVal);
}
else
- SMESH::ListOfGroups_var groups =
- aMeshEditor->ExtrusionAlongPathMakeGroups(anElementsId, myPathMesh,
- myPathShape, aNodeStart,
- AnglesGrp->isChecked(), anAngles,
- BasePointGrp->isChecked(), aBasePoint, retVal);
+ SMESH::ListOfGroups_var groups =
+ aMeshEditor->ExtrusionAlongPathMakeGroups(anElementsId, myPathMesh,
+ myPathShape, aNodeStart,
+ AnglesGrp->isChecked(), anAngles,
+ BasePointGrp->isChecked(), aBasePoint, retVal);
}
else {
if( MeshCheck->isChecked() ) {
- if( GetConstructorId() == 0 )
- retVal = aMeshEditor->ExtrusionAlongPathObject1D(myIDSource, myPathMesh,
- myPathShape, aNodeStart,
- AnglesGrp->isChecked(), anAngles,
- BasePointGrp->isChecked(), aBasePoint);
- else
- retVal = aMeshEditor->ExtrusionAlongPathObject2D(myIDSource, myPathMesh,
- myPathShape, aNodeStart,
- AnglesGrp->isChecked(), anAngles,
- BasePointGrp->isChecked(), aBasePoint);
+ if( GetConstructorId() == 0 )
+ retVal = aMeshEditor->ExtrusionAlongPathObject1D(myIDSource, myPathMesh,
+ myPathShape, aNodeStart,
+ AnglesGrp->isChecked(), anAngles,
+ BasePointGrp->isChecked(), aBasePoint);
+ else
+ retVal = aMeshEditor->ExtrusionAlongPathObject2D(myIDSource, myPathMesh,
+ myPathShape, aNodeStart,
+ AnglesGrp->isChecked(), anAngles,
+ BasePointGrp->isChecked(), aBasePoint);
}
else
- retVal = aMeshEditor->ExtrusionAlongPath(anElementsId, myPathMesh,
- myPathShape, aNodeStart,
- AnglesGrp->isChecked(), anAngles,
- BasePointGrp->isChecked(), aBasePoint);
+ retVal = aMeshEditor->ExtrusionAlongPath(anElementsId, myPathMesh,
+ myPathShape, aNodeStart,
+ AnglesGrp->isChecked(), anAngles,
+ BasePointGrp->isChecked(), aBasePoint);
}
+ */
+
+ bool NeedGroups = ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() );
+ SMESH::ElementType ElemType = SMESH::FACE;
+ if( GetConstructorId() == 0 )
+ ElemType = SMESH::EDGE;
+ if( !MeshCheck->isChecked() ) {
+ SMESH::ListOfGroups_var groups =
+ aMeshEditor->ExtrusionAlongPathX(anElementsId, myPath, aNodeStart, AnglesGrp->isChecked(),
+ anAngles, LinearAnglesCheck->isChecked(),
+ BasePointGrp->isChecked(), aBasePoint,
+ NeedGroups, ElemType, retVal);
+ }
+ else {
+ SMESH::ListOfGroups_var groups =
+ aMeshEditor->ExtrusionAlongPathObjX(myIDSource, myPath, aNodeStart, AnglesGrp->isChecked(),
+ anAngles, LinearAnglesCheck->isChecked(),
+ BasePointGrp->isChecked(), aBasePoint,
+ NeedGroups, ElemType, retVal);
+ }
+
if( retVal == SMESH::SMESH_MeshEditor::EXTR_OK )
- myMesh->SetParameters( SMESHGUI::JoinObjectParameters(aParameters) );
+ myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
//wc.stop();
wc.suspend();
switch (retVal) {
case SMESH::SMESH_MeshEditor::EXTR_NO_ELEMENTS:
SUIT_MessageBox::warning(this,
- tr("SMESH_ERROR"),
- tr("NO_ELEMENTS_SELECTED"));
+ tr("SMESH_ERROR"),
+ tr("NO_ELEMENTS_SELECTED"));
return false; break;
case SMESH::SMESH_MeshEditor::EXTR_PATH_NOT_EDGE:
SUIT_MessageBox::warning(this,
- tr("SMESH_ERROR"),
- tr("SELECTED_PATH_IS_NOT_EDGE"));
+ tr("SMESH_ERROR"),
+ tr("SELECTED_PATH_IS_NOT_EDGE"));
return false; break;
case SMESH::SMESH_MeshEditor::EXTR_BAD_PATH_SHAPE:
SUIT_MessageBox::warning(this,
- tr("SMESH_ERROR"),
- tr("BAD_SHAPE_TYPE"));
+ tr("SMESH_ERROR"),
+ tr("BAD_SHAPE_TYPE"));
return false; break;
case SMESH::SMESH_MeshEditor::EXTR_BAD_STARTING_NODE:
SUIT_MessageBox::warning(this,
- tr("SMESH_ERROR"),
- tr("EXTR_BAD_STARTING_NODE"));
+ tr("SMESH_ERROR"),
+ tr("EXTR_BAD_STARTING_NODE"));
return false; break;
case SMESH::SMESH_MeshEditor::EXTR_BAD_ANGLES_NUMBER:
SUIT_MessageBox::warning(this,
- tr("SMESH_ERROR"),
- tr("WRONG_ANGLES_NUMBER"));
+ tr("SMESH_ERROR"),
+ tr("WRONG_ANGLES_NUMBER"));
return false; break;
case SMESH::SMESH_MeshEditor::EXTR_CANT_GET_TANGENT:
SUIT_MessageBox::warning(this,
- tr("SMESH_ERROR"),
- tr("CANT_GET_TANGENT"));
+ tr("SMESH_ERROR"),
+ tr("CANT_GET_TANGENT"));
return false; break;
case SMESH::SMESH_MeshEditor::EXTR_OK:
break;
platform = "application";
#endif
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
- tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser",
- platform)).
- arg(myHelpFileName));
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser",
+ platform)).
+ arg(myHelpFileName));
}
}
const Handle(SALOME_InteractiveObject)& anIO = myMeshActor->getIO();
TColStd_MapOfInteger newIndices;
for (int i = 0; i < aListId.count(); i++) {
- long ind = aListId[ i ].toLong(&bOk);
- if (bOk) {
- const SMDS_MeshElement* e = aMesh->FindElement(ind);
- if (e) {
- // check also type of element
- bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
- Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
- if (typeMatch)
- newIndices.Add(e->GetID());
- }
- }
+ long ind = aListId[ i ].toLong(&bOk);
+ if (bOk) {
+ const SMDS_MeshElement* e = aMesh->FindElement(ind);
+ if (e) {
+ // check also type of element
+ bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
+ Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
+ if (typeMatch)
+ newIndices.Add(e->GetID());
+ }
+ }
}
mySelector->AddOrRemoveIndex(anIO, newIndices, false);
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->highlight( anIO, true, true );
+ aViewWindow->highlight( anIO, true, true );
}
- } else if (send == StartPointLineEdit &&
+ }
+ else if (send == StartPointLineEdit &&
myEditCurrentArgument == StartPointLineEdit) {
- if (!myPathMesh->_is_nil()) {
- SMESH_Actor* aPathActor = SMESH::FindActorByObject(myPathMesh);
+ if (!myPath->_is_nil()) {
+ SMESH_Actor* aPathActor = SMESH::FindActorByObject(myPath);
SMDS_Mesh* aMesh = 0;
if (aPathActor)
- aMesh = aPathActor->GetObject()->GetMesh();
+ aMesh = aPathActor->GetObject()->GetMesh();
if (aMesh) {
- //mySelectionMgr->clearSelected();
- //mySelectionMgr->AddIObject(aPathActor->getIO());
+ //mySelectionMgr->clearSelected();
+ //mySelectionMgr->AddIObject(aPathActor->getIO());
SALOME_ListIO aList;
aList.Append(aPathActor->getIO());
mySelectionMgr->setSelectedObjects(aList, false);
- bool bOk;
- long ind = theNewText.toLong(&bOk);
- if (bOk) {
- const SMDS_MeshNode* n = aMesh->FindNode(ind);
- if (n) {
- //if (!mySelectionMgr->IsIndexSelected(aPathActor->getIO(), n->GetID())) {
+ bool bOk;
+ long ind = theNewText.toLong(&bOk);
+ if (bOk) {
+ const SMDS_MeshNode* n = aMesh->FindNode(ind);
+ if (n) {
+ //if (!mySelectionMgr->IsIndexSelected(aPathActor->getIO(), n->GetID())) {
TColStd_MapOfInteger newIndices;
- newIndices.Add(n->GetID());
- mySelector->AddOrRemoveIndex( aPathActor->getIO(), newIndices, false );
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->highlight( aPathActor->getIO(), true, true );
- }
- }
+ newIndices.Add(n->GetID());
+ mySelector->AddOrRemoveIndex( aPathActor->getIO(), newIndices, false );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( aPathActor->getIO(), true, true );
+ }
+ }
}
}
}
SMESH::GetNameOfSelectedElements(mySelector, IO, aString);
ElementsLineEdit->setText(aString);
}
- } else if (myEditCurrentArgument == PathMeshLineEdit) {
+ }
+ else if (myEditCurrentArgument == PathMeshLineEdit) {
// we are now selecting path mesh
// reset
PathMeshLineEdit->clear();
- myPathMesh = SMESH::SMESH_Mesh::_nil();
- PathShapeLineEdit->clear();
- myPathShape = GEOM::GEOM_Object::_nil();
+ myPath = SMESH::SMESH_IDSource::_nil();
StartPointLineEdit->clear();
-
+
// try to get mesh from selection
Handle(SALOME_InteractiveObject) IO = aList.First();
- myPathMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(IO);
- if(myPathMesh->_is_nil())
+ myPath = SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(IO);
+ if( myPath->_is_nil() )
return;
-
+
QString aString;
SMESH::GetNameOfSelectedIObjects(mySelectionMgr, aString);
PathMeshLineEdit->setText(aString);
- } else if (myEditCurrentArgument == PathShapeLineEdit) {
- // we are now selecting path mesh
- // reset
- PathShapeLineEdit->clear();
- myPathShape = GEOM::GEOM_Object::_nil();
- StartPointLineEdit->clear();
-
- // return if path mesh is not yet selected
- if (myPathMesh->_is_nil())
- return;
-
- // try to get shape from selection
- Handle(SALOME_InteractiveObject) IO = aList.First();
- myPathShape = SMESH::IObjectToInterface<GEOM::GEOM_Object>(IO);
- if (myPathShape->_is_nil())
- return;
-
- QString aString;
- SMESH::GetNameOfSelectedIObjects(mySelectionMgr, aString);
- PathShapeLineEdit->setText(aString);
- } else if (myEditCurrentArgument == StartPointLineEdit) {
+ }
+ else if (myEditCurrentArgument == StartPointLineEdit) {
// we are now selecting start point of path
// reset
StartPointLineEdit->clear();
// return if path mesh or path shape is not yet selected
- if (myPathMesh->_is_nil() || myPathShape->_is_nil())
+ if( myPath->_is_nil() )
return;
// try to get shape from selection
Handle(SALOME_InteractiveObject) IO = aList.First();
- SMESH_Actor* aPathActor = SMESH::FindActorByObject(myPathMesh);
+ SMESH_Actor* aPathActor = SMESH::FindActorByObject(myPath);
if ( !aPathActor )
return;
TopoDS_Vertex aVertex;
if (!aGeomObj->_is_nil()) {
if (aGeomObj->IsShape() && GEOMBase::GetShape(aGeomObj, aVertex) && !aVertex.IsNull()) {
- gp_Pnt aPnt = BRep_Tool::Pnt(aVertex);
- XSpin->SetValue(aPnt.X());
- YSpin->SetValue(aPnt.Y());
- ZSpin->SetValue(aPnt.Z());
+ gp_Pnt aPnt = BRep_Tool::Pnt(aVertex);
+ XSpin->SetValue(aPnt.X());
+ YSpin->SetValue(aPnt.Y());
+ ZSpin->SetValue(aPnt.Z());
}
return;
}
QToolButton* send = (QToolButton*)sender();
if (send != SelectElementsButton &&
send != SelectPathMeshButton &&
- send != SelectPathShapeButton &&
send != SelectStartPointButton &&
send != SelectBasePointButton)
return;
SMESH::SetPointRepresentation(false);
if (MeshCheck->isChecked()) {
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(ActorSelection);
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myElementsFilter);
} else {
if (Elements1dRB->isChecked())
- {
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(EdgeSelection);
- }
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(EdgeSelection);
+ }
else if (Elements2dRB->isChecked())
- {
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(FaceSelection);
- }
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(FaceSelection);
+ }
}
} else if (button == SelectPathMeshButton) {
myEditCurrentArgument = PathMeshLineEdit;
aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myPathMeshFilter);
}
- else if (button == SelectPathShapeButton) {
- myEditCurrentArgument = PathShapeLineEdit;
- SMESH::SetPointRepresentation(false);
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(ActorSelection);
-
- if (!myPathMesh->_is_nil()) {
- GEOM::GEOM_Object_var aMainShape = myPathMesh->GetShapeToMesh();
- SMESH_Actor* aPathActor = SMESH::FindActorByObject(myPathMesh);
-
- if (!aMainShape->_is_nil() && aPathActor)
- mySelectionMgr->installFilter(new SMESH_NumberFilter ("GEOM", TopAbs_SHAPE, -1,
- TopAbs_EDGE, aMainShape));
- //SMESH::SetPickable(aPathActor);
- }
- }
else if (button == SelectStartPointButton) {
myEditCurrentArgument = StartPointLineEdit;
- if (!myPathMesh->_is_nil()) {
- SMESH_Actor* aPathActor = SMESH::FindActorByObject(myPathMesh);
+ //if (!myPathMesh->_is_nil()) {
+ if (!myPath->_is_nil()) {
+ SMESH_Actor* aPathActor = SMESH::FindActorByObject(myPath);
if (aPathActor) {
- SMESH::SetPointRepresentation(true);
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(NodeSelection);
- SMESH::SetPickable(aPathActor);
+ SMESH::SetPointRepresentation(true);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
+ SMESH::SetPickable(aPathActor);
}
}
}
QKeyEvent* ke = (QKeyEvent*)event;
if (object == AnglesList) {
if (ke->key() == Qt::Key_Delete)
- OnAngleRemoved();
+ OnAngleRemoved();
}
}
else if (event->type() == QEvent::FocusIn) {
if (object == ElementsLineEdit) {
if (myEditCurrentArgument != ElementsLineEdit)
- SetEditCurrentArgument(SelectElementsButton);
+ SetEditCurrentArgument(SelectElementsButton);
}
else if (object == StartPointLineEdit) {
if (myEditCurrentArgument != StartPointLineEdit)
- SetEditCurrentArgument(SelectStartPointButton);
+ SetEditCurrentArgument(SelectStartPointButton);
}
else if (object == XSpin->editor() || object == YSpin->editor() || object == ZSpin->editor()) {
if (myEditCurrentArgument != XSpin)
- SetEditCurrentArgument(SelectBasePointButton);
+ SetEditCurrentArgument(SelectBasePointButton);
}
}
return QDialog::eventFilter(object, event);
{
if(myMesh->_is_nil()) {
SUIT_MessageBox::critical(this,
- tr("SMESH_ERROR"),
- tr("NO_MESH_SELECTED"));
+ tr("SMESH_ERROR"),
+ tr("NO_MESH_SELECTED"));
return;
}
if ( !myFilterDlg )
enableLinear = false;
anItem->text().toDouble(&enableLinear);
if( !enableLinear )
- break;
+ break;
}
}
if( !enableLinear )