aSelMgr->selectedObjects( aList );
if ( aList.Extent() == 1 ) {
- Standard_Boolean aResult = Standard_False;
GEOM::GEOM_Object_var anObj =
- GEOMBase::ConvertIOinGEOMObject( aList.First(), aResult );
+ GEOMBase::ConvertIOinGEOMObject( aList.First() );
- if ( aResult && !CORBA::is_nil( anObj ) && anObj->GetType() == GEOM_GROUP ) {
+ if ( !CORBA::is_nil( anObj ) && anObj->GetType() == GEOM_GROUP ) {
aDlg = new GroupGUI_GroupDlg( GroupGUI_GroupDlg::EditGroup, getGeometryGUI(), parent );
break;
}
aSelMgr->selectedObjects(aSelList);
if (aSelList.Extent()) {
- Standard_Boolean aResult = Standard_False;
GEOM::GEOM_Object_var anObj =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (aResult && !CORBA::is_nil(anObj) && anObj->GetType() == GEOM_GROUP) {
+ if ( !CORBA::is_nil(anObj) && anObj->GetType() == GEOM_GROUP ) {
myGroup = anObj;
mainFrame()->ResultName->setText(GEOMBase::GetName(myGroup));
if (aSelList.Extent() != 1)
return;
- Standard_Boolean aResult = Standard_False;
GEOM::GEOM_Object_var anObj =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
- if (aResult && !anObj->_is_nil() && GEOMBase::IsShape(anObj)) {
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
+ if ( GEOMBase::IsShape(anObj) ) {
if (!anObj->_is_equivalent(myMainObj) && !anObj->_is_equivalent(myGroup)) {
SUIT_OverrideCursor wc;
myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
int nbSel = aSelList.Extent();
if (nbSel == 1) {
- Standard_Boolean aResult = Standard_False;
GEOM::GEOM_Object_var anObj =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (aResult && !anObj->_is_nil() && GEOMBase::IsShape(anObj)) {
+ if ( GEOMBase::IsShape(anObj) ) {
myMainObj = anObj;
myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
// activate subshapes selection by default
GEOM::GEOM_Object_var aSelectedObject = GEOM::GEOM_Object::_nil();
if (aSelList.Extent() > 0) {
- Standard_Boolean testResult = Standard_False;
- aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
- if (!testResult)
- aSelectedObject = GEOM::GEOM_Object::_nil();
+ aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
}
// clear selection
return;
}
- Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_var aSelectedObject =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (!testResult || aSelectedObject->_is_nil()) {
+ if ( aSelectedObject->_is_nil() ) {
processObject();
return;
}
return;
}
- Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_var aSelectedObject =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if ( !testResult || aSelectedObject->_is_nil() ) {
+ if ( aSelectedObject->_is_nil() ) {
myGrp->LineEdit1->setText( "" );
processObject();
return;
GEOM::GEOM_IBlocksOperations::BCError aErr = aErrs[aCurItem];
GEOM::ListOfLong aObjLst = aErr.incriminated;
- TopoDS_Shape aSelShape;
- TopoDS_Shape aSubShape;
- TopTools_IndexedMapOfShape anIndices;
QStringList aSubShapeList;
- QString aSubShapeName( "" );
- Standard_CString aTypeString;
+ TopoDS_Shape aSelShape;
if ( !myObj->_is_nil() && GEOMBase::GetShape( myObj, aSelShape ) ) {
- TopExp::MapShapes( aSelShape, anIndices);
+ TopTools_IndexedMapOfShape anIndices;
+ TopExp::MapShapes( aSelShape, anIndices );
for ( int i = 0, n = aObjLst.length(); i < n; i++ ) {
- aSubShapeName = "";
- aSubShape = anIndices.FindKey(aObjLst[i]);
- if ( GEOMBase::GetShapeTypeString( aSubShape, aTypeString ) )
- aSubShapeName = QString( aTypeString ) + QString( "_" ) + QString::number( aObjLst[i] );
- if ( !aSubShapeName.isEmpty() )
- aSubShapeList.append( aSubShapeName );
+ TopoDS_Shape aSubShape = anIndices.FindKey( aObjLst[i] );
+ QString aType = GEOMBase::GetShapeTypeString( aSubShape );
+ if ( !aType.isEmpty() )
+ aSubShapeList.append( QString( "%1_%2" ).arg( aType ).arg( aObjLst[i] ) );
}
}
myGrp->ListBox2->clear();
GEOM::GEOM_Object_var aSelectedObject = GEOM::GEOM_Object::_nil();
if (aSelList.Extent() > 0) {
- Standard_Boolean testResult = Standard_False;
- aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
- if (!testResult)
- aSelectedObject = GEOM::GEOM_Object::_nil();
+ aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
}
// clear selection
return;
// nbSel == 1
- Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_var aSelectedObject =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (!testResult || CORBA::is_nil(aSelectedObject))
+ if ( CORBA::is_nil(aSelectedObject) )
return;
QString aName = GEOMBase::GetName(aSelectedObject);
if (aSelList.Extent() < 1)
return;
- Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_var aSelectedObject =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (!testResult || aSelectedObject->_is_nil())
+ if ( aSelectedObject->_is_nil() )
return;
myObj = aSelectedObject;
//=================================================================================
SALOME_Prs* MeasureGUI_PropertiesDlg::buildPrs()
{
- TopoDS_Shape aShape, aResult;
-
- if ( myObj->_is_nil() ||
- !GEOMBase::GetShape( myObj, aShape ) ||
- aShape.IsNull() ||
- aShape.ShapeType() != TopAbs_EDGE ||
- !GEOMBase::CreateArrowForLinearEdge( aShape, aResult ) ||
- aResult.IsNull() )
- return 0;
-
- return getDisplayer()->BuildPrs( aResult );
+ SALOME_Prs* prs = 0;
+ TopoDS_Shape shape;
+ if ( GEOMBase::GetShape( myObj, shape, TopAbs_EDGE ) ) {
+ shape = GEOMBase::CreateArrowForLinearEdge( shape );
+ if ( !shape.IsNull() )
+ prs = getDisplayer()->BuildPrs( shape );
+ }
+ return prs;
}
GEOM::GEOM_Object_var aSelectedObject = GEOM::GEOM_Object::_nil();
if (aSelList.Extent() > 0) {
- Standard_Boolean testResult = Standard_False;
- aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
- if (!testResult)
- aSelectedObject = GEOM::GEOM_Object::_nil();
+ aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
}
if (aSelectedObject->_is_nil()) {
if (aSelList.Extent() != 1)
return;
- Standard_Boolean testResult = Standard_False;
- myShape = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ myShape = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (!testResult || myShape->_is_nil() || !GEOMBase::IsShape(myShape)) {
+ if ( !GEOMBase::IsShape(myShape) ) {
myShape = GEOM::GEOM_Object::_nil();
return;
}
{
myShape = GEOM::GEOM_Object::_nil();
if (aSelList.Extent() == 1) {
- Standard_Boolean aResult = Standard_False;
GEOM::GEOM_Object_var anObj =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (aResult && !anObj->_is_nil()) {
+ if ( !anObj->_is_nil() ) {
myShape = anObj;
myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
displayPreview();
{
myFace[ aCurrFocus ] = -1;
if (aSelList.Extent() == 1) {
- Standard_Boolean aResult = Standard_False;
GEOM::GEOM_Object_var anObj =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (aResult && !anObj->_is_nil()) {
+ if ( !anObj->_is_nil() ) {
TColStd_IndexedMapOfInteger anIndexes;
aSelMgr->GetIndexes(aSelList.First(), anIndexes);
if (aCurrFocus == Faces) myFaces.Clear();
else myEdges.Clear();
if (aSelList.Extent() == 1) {
- Standard_Boolean aResult = Standard_False;
GEOM::GEOM_Object_var anObj =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (aResult && !anObj->_is_nil()) {
+ if ( !anObj->_is_nil() ) {
TColStd_IndexedMapOfInteger anIndexes;
aSelMgr->GetIndexes(aSelList.First(), anIndexes);
if (myEditCurrentArgument == GroupVertexes->LineEdit1) {
myShape = GEOM::GEOM_Object::_nil();
if (aSelList.Extent() == 1) {
- Standard_Boolean aResult = Standard_False;
GEOM::GEOM_Object_var anObj =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (aResult && !anObj->_is_nil()) {
+ if ( !anObj->_is_nil() ) {
QString aName = GEOMBase::GetName( anObj );
TopoDS_Shape aShape;
if ( GEOMBase::GetShape( anObj, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) {
myVertexes.Clear();
bool isPreview = myIs1D;
if (aSelList.Extent() == 1) {
- Standard_Boolean aResult = Standard_False;
GEOM::GEOM_Object_var anObj =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (aResult && !anObj->_is_nil()) {
+ if ( !anObj->_is_nil() ) {
TColStd_IndexedMapOfInteger anIndexes;
aSelMgr->GetIndexes(aSelList.First(), anIndexes);
{
myShape = GEOM::GEOM_Object::_nil();
if (aSelList.Extent() == 1) {
- Standard_Boolean aResult = Standard_False;
GEOM::GEOM_Object_var anObj =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (aResult && !anObj->_is_nil()) {
+ if ( !anObj->_is_nil() ) {
myShape = anObj;
myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
displayPreview();
if (myEditCurrentArgument == Group2->LineEdit2) myEdges.Clear();
else myFaces.Clear();
if (aSelList.Extent() == 1) {
- Standard_Boolean aResult = Standard_False;
GEOM::GEOM_Object_var anObj =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (aResult && !anObj->_is_nil()) {
+ if ( !anObj->_is_nil() ) {
TColStd_IndexedMapOfInteger anIndexes;
aSelMgr->GetIndexes(aSelList.First(), anIndexes);
int nbSel = GEOMBase::GetNameOfSelectedIObjects(aSelList, aName, true);
if (nbSel > 0) {
- Standard_Boolean aRes = Standard_False;
- GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aRes);
- if (!CORBA::is_nil(aSelectedObject) && aRes && GEOMBase::IsShape(aSelectedObject)) {
+ GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
+ if ( GEOMBase::IsShape(aSelectedObject) ) {
myEditCurrentArgument->setText(aName);
// clear selection
bool OperationGUI_GetShapesOnShapeDlg::isValid(QString&)
{
//Handle(SALOME_InteractiveObject) IO = firstIObject();
- //Standard_Boolean testResult;
- //GEOM::GEOM_Object_var anObject = GEOMBase::ConvertIOinGEOMObject(IO, testResult);
- //if (!testResult || anObject->_is_nil())
+ //GEOM::GEOM_Object_var anObject = GEOMBase::ConvertIOinGEOMObject( IO );
+ //if ( anObject->_is_nil() )
// return false;
return !CORBA::is_nil(myObject1) && !CORBA::is_nil(myObject2);
}
// nbSel == 1
- Standard_Boolean testResult = Standard_False;
- GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (!testResult || CORBA::is_nil(aSelectedObject))
+ if ( CORBA::is_nil(aSelectedObject) )
return;
QString aName = GEOMBase::GetName(aSelectedObject);
}
// nbSel == 1
- Standard_Boolean testResult = Standard_False;
- GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (!testResult || CORBA::is_nil(aSelectedObject))
+ if ( CORBA::is_nil(aSelectedObject) )
return;
QString aName = GEOMBase::GetName(aSelectedObject);
}
// nbSel == 1
- Standard_Boolean testResult = Standard_False;
- GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (!testResult || CORBA::is_nil(aSelectedObject))
+ if (CORBA::is_nil(aSelectedObject))
return;
QString aName = GEOMBase::GetName(aSelectedObject);
// nbSel == 1
Handle(SALOME_InteractiveObject) anIO = aSelList.First();
- Standard_Boolean testResult = Standard_False;
- GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(anIO, testResult);
+ GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIO );
- if (!testResult || CORBA::is_nil(aSelectedObject))
+ if ( CORBA::is_nil(aSelectedObject) )
return;
QString aName = GEOMBase::GetName(aSelectedObject);
}
// nbSel == 1
- Standard_Boolean aRes = Standard_False;
TopAbs_ShapeEnum aNeedType = TopAbs_EDGE;
- GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First(), aRes );
- if ( !CORBA::is_nil( aSelectedObject ) && aRes ) {
+ GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
+ if ( !CORBA::is_nil( aSelectedObject ) ) {
QString aName = GEOMBase::GetName( aSelectedObject );
TopoDS_Shape aShape;
}
/* nbSel == 1 ! */
- Standard_Boolean testResult = Standard_False;
- GEOM::GEOM_Object_ptr aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ GEOM::GEOM_Object_ptr aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if ( !testResult || CORBA::is_nil( aSelectedObject ) )
+ if ( CORBA::is_nil( aSelectedObject ) )
return;
QString aName = GEOMBase::GetName( aSelectedObject );
return;
// nbSel == 1
- Standard_Boolean testResult = Standard_False;
- GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (!testResult || CORBA::is_nil(aSelectedObject))
+ if ( CORBA::is_nil(aSelectedObject) )
return;
QString aName = GEOMBase::GetName(aSelectedObject);
}
// nbSel == 1
- Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_ptr aSelectedObject =
- GEOMBase::ConvertIOinGEOMObject( aSelList.First(), testResult );
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if ( !testResult )
+ if ( CORBA::is_nil( aSelectedObject ) )
return;
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
Handle(SALOME_InteractiveObject) anIO = aSelList.First();
if (myEditCurrentArgument == GroupPoints->LineEdit1) { // face selection
- Standard_Boolean aRes;
- myObject = GEOMBase::ConvertIOinGEOMObject(anIO, aRes);
- if (aRes && GEOMBase::IsShape(myObject)) {
+ myObject = GEOMBase::ConvertIOinGEOMObject( anIO );
+ if ( GEOMBase::IsShape(myObject) ) {
myEditCurrentArgument->setText(GEOMBase::GetName(myObject));
TopoDS_Shape aShape;
if (GEOMBase::GetShape(myObject, aShape, TopAbs_WIRE))
if ( aSelList.Extent() == 1 ) {
Handle(SALOME_InteractiveObject) anIO = aSelList.First();
- Standard_Boolean aRes;
- GEOM::GEOM_Object_var aSelectedObj = GEOMBase::ConvertIOinGEOMObject( anIO, aRes );
- if ( !CORBA::is_nil( aSelectedObj ) && aRes )
+ GEOM::GEOM_Object_var aSelectedObj = GEOMBase::ConvertIOinGEOMObject( anIO );
+ if ( !CORBA::is_nil( aSelectedObj ) )
{
TopoDS_Shape aShape;
QString aName = GEOMBase::GetName( aSelectedObj );
if ( aSelList.Extent() != 1 )
return;
- Standard_Boolean isOk = Standard_False;
GEOM::GEOM_Object_var anObj =
- GEOMBase::ConvertIOinGEOMObject( aSelList.First(), isOk );
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if ( !isOk || anObj->_is_nil() || !GEOMBase::IsShape( anObj ) )
+ if ( !GEOMBase::IsShape( anObj ) )
return;
else {
myObj = anObj;
return;
}
- Standard_Boolean isOk = Standard_False;
GEOM::GEOM_Object_var anObj =
- GEOMBase::ConvertIOinGEOMObject( aSelList.First(), isOk );
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if ( !isOk || anObj->_is_nil() || !GEOMBase::IsShape( anObj ) ) {
+ if ( !GEOMBase::IsShape( anObj ) ) {
myEdit->setText( "" );
return;
}
if ( aSelList.Extent() == 1 ) {
Handle(SALOME_InteractiveObject) anIO = aSelList.First();
- Standard_Boolean aRes;
- myObject = GEOMBase::ConvertIOinGEOMObject( anIO, aRes );
- if ( aRes )
+ myObject = GEOMBase::ConvertIOinGEOMObject( anIO );
+ if ( !CORBA::is_nil( myObject ) )
myEditCurrentArgument->setText( GEOMBase::GetName( myObject ) );
}
updateButtonState();
if (aSelList.Extent() == 1) {
Handle(SALOME_InteractiveObject) anIO = aSelList.First();
- Standard_Boolean aRes;
- myObject = GEOMBase::ConvertIOinGEOMObject(anIO, aRes);
- if (aRes)
+ myObject = GEOMBase::ConvertIOinGEOMObject( anIO );
+ if ( !CORBA::is_nil( myObject ) )
myEditCurrentArgument->setText(GEOMBase::GetName(myObject));
}
updateButtonState();
}
// nbSel == 1
- Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_ptr aSelectedObject =
- GEOMBase::ConvertIOinGEOMObject( aSelList.First(), testResult );
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if ( !testResult )
+ if ( CORBA::is_nil( aSelectedObject ) )
return;
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
Handle(SALOME_InteractiveObject) anIO = aSelList.First();
if (myEditCurrentArgument == GroupPoints->LineEdit1) { // face selection
- Standard_Boolean aRes;
- myObject = GEOMBase::ConvertIOinGEOMObject(anIO, aRes);
- if (aRes && GEOMBase::IsShape(myObject)) {
+ myObject = GEOMBase::ConvertIOinGEOMObject( anIO );
+ if ( GEOMBase::IsShape(myObject) ) {
myEditCurrentArgument->setText(GEOMBase::GetName(myObject));
// clear selection
Handle(SALOME_InteractiveObject) anIO = aSelList.First();
if (myEditCurrentArgument == GroupPoints->LineEdit1) { // face selection
- Standard_Boolean aRes;
- myObject = GEOMBase::ConvertIOinGEOMObject(anIO, aRes);
- if (aRes && GEOMBase::IsShape(myObject)) {
+ myObject = GEOMBase::ConvertIOinGEOMObject( anIO );
+ if ( GEOMBase::IsShape(myObject) ) {
myEditCurrentArgument->setText(GEOMBase::GetName(myObject));
// clear selection
if ( aSelList.Extent() == 1 ) {
Handle(SALOME_InteractiveObject) anIO = aSelList.First();
- Standard_Boolean aRes;
- myObject = GEOMBase::ConvertIOinGEOMObject( anIO, aRes );
- if ( aRes )
+ myObject = GEOMBase::ConvertIOinGEOMObject( anIO );
+ if ( !CORBA::is_nil( myObject ) )
myEditCurrentArgument->setText( GEOMBase::GetName( myObject ) );
}
}
SALOME_ListIO aSelList;
aSelMgr->selectedObjects(aSelList);
- Standard_Boolean aRes = Standard_False;
int i = 0;
myObjects->length(aSelList.Extent());
for (SALOME_ListIteratorOfListIO anIt (aSelList); anIt.More(); anIt.Next()) {
- GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIt.Value(), aRes );
- if ( !CORBA::is_nil( aSelectedObject ) && aRes )
- myObjects[i++] = aSelectedObject;
+ GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIt.Value() );
+ if ( !CORBA::is_nil( aSelectedObject ) )
+ myObjects[i++] = aSelectedObject;
}
myObjects->length( i );
if ( i == 1 )
if (aSelList.Extent() == 1) {
Handle(SALOME_InteractiveObject) anIO = aSelList.First();
- Standard_Boolean aRes;
- myObject = GEOMBase::ConvertIOinGEOMObject(anIO, aRes);
- if (aRes && GEOMBase::IsShape(myObject)) {
+ myObject = GEOMBase::ConvertIOinGEOMObject( anIO );
+ if ( GEOMBase::IsShape(myObject) ) {
myEditCurrentArgument->setText(GEOMBase::GetName(myObject));
TopoDS_Shape aShape;
if (GEOMBase::GetShape(myObject, aShape, TopAbs_FACE))
aSelMgr->clearSelected();
- Standard_Boolean isOk;
QString objIOR = GEOMBase::GetIORFromObject(myObject);
- Handle(GEOM_AISShape) aSh = GEOMBase::ConvertIORinGEOMAISShape(objIOR.toLatin1().constData(), isOk, true);
- if (!isOk || aSh.IsNull())
+ Handle(GEOM_AISShape) aSh = GEOMBase::ConvertIORinGEOMAISShape( objIOR, true );
+ if ( aSh.IsNull() )
return;
aSelMgr->AddOrRemoveIndex(aSh->getIO(), anIds, false);
SALOME_ListIteratorOfListIO aSelIt (aSelList);
for (; aSelIt.More(); aSelIt.Next()) {
Handle(SALOME_InteractiveObject) io = aSelIt.Value();
- Standard_Boolean testResult = Standard_False;
- GEOM::GEOM_Object_var aGeomObj = GEOMBase::ConvertIOinGEOMObject(io, testResult);
- if (testResult) {
+ GEOM::GEOM_Object_var aGeomObj = GEOMBase::ConvertIOinGEOMObject( io );
+ if ( !CORBA::is_nil( aGeomObj ) ) {
anOp->RecomputeObject(aGeomObj);
SUIT_ViewWindow* wnd;
return;
// nbSel == 1
- Standard_Boolean testResult = Standard_False;
- myArgument = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
- if (!testResult || CORBA::is_nil(myArgument))
+ myArgument = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
+ if ( CORBA::is_nil(myArgument) )
return;
aName = GEOMBase::GetName(myArgument);
- if (testResult && !myArgument->_is_nil()) {
- TopoDS_Shape aShape;
- if (GEOMBase::GetShape(myArgument, aShape, TopAbs_SHAPE) && !aShape.IsNull()) {
- TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX;
- if (getConstructorId() == 1)
- aNeedType = TopAbs_EDGE;
- else if (getConstructorId() == 2)
- aNeedType = TopAbs_FACE;
-
- TColStd_IndexedMapOfInteger aMap;
- aSelMgr->GetIndexes(aSelList.First(), aMap);
- if (aMap.Extent() == 1) {
- int anIndex = aMap(1);
- if (aNeedType == TopAbs_VERTEX)
- aName += QString(":vertex_%1").arg(anIndex);
- else
- aName += QString(":edge_%1").arg(anIndex);
-
- //Find SubShape Object in Father
- GEOM::GEOM_Object_var aFindedObject = findObjectInFather(myArgument, aName);
-
- if (aFindedObject->_is_nil()) { // Object not found in study
- GEOM::GEOM_IShapesOperations_var aShapesOp =
- getGeomEngine()->GetIShapesOperations(getStudyId());
- myArgument = aShapesOp->GetSubShape(myArgument, anIndex);
- }
- else {
- myArgument = aFindedObject; // get Object from study
- }
- }
- else {
- if (aShape.ShapeType() != aNeedType) {
- myArgument = GEOM::GEOM_Object::_nil();
- aName = "";
- }
- }
+ TopoDS_Shape aShape;
+ if (GEOMBase::GetShape(myArgument, aShape, TopAbs_SHAPE) && !aShape.IsNull()) {
+ TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX;
+ if (getConstructorId() == 1)
+ aNeedType = TopAbs_EDGE;
+ else if (getConstructorId() == 2)
+ aNeedType = TopAbs_FACE;
+
+ TColStd_IndexedMapOfInteger aMap;
+ aSelMgr->GetIndexes(aSelList.First(), aMap);
+ if (aMap.Extent() == 1) {
+ int anIndex = aMap(1);
+ if (aNeedType == TopAbs_VERTEX)
+ aName += QString(":vertex_%1").arg(anIndex);
+ else
+ aName += QString(":edge_%1").arg(anIndex);
+
+ //Find SubShape Object in Father
+ GEOM::GEOM_Object_var aFindedObject = findObjectInFather(myArgument, aName);
+
+ if (aFindedObject->_is_nil()) { // Object not found in study
+ GEOM::GEOM_IShapesOperations_var aShapesOp =
+ getGeomEngine()->GetIShapesOperations(getStudyId());
+ myArgument = aShapesOp->GetSubShape(myArgument, anIndex);
+ }
+ else {
+ myArgument = aFindedObject; // get Object from study
+ }
+ }
+ else {
+ if (aShape.ShapeType() != aNeedType) {
+ myArgument = GEOM::GEOM_Object::_nil();
+ aName = "";
+ }
}
}
myEditCurrentArgument->setText(aName);
return;
// nbSel == 1
- Standard_Boolean testResult = Standard_False;;
GEOM::GEOM_Object_var aSelectedObject =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (!testResult || CORBA::is_nil(aSelectedObject) || !GEOMBase::IsShape(aSelectedObject))
+ if ( !GEOMBase::IsShape(aSelectedObject) )
return;
QString aName = GEOMBase::GetName(aSelectedObject);
return;
// nbSel == 1
- Standard_Boolean testResult = Standard_False;;
- GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (!testResult || CORBA::is_nil(aSelectedObject) || !GEOMBase::IsShape(aSelectedObject))
+ if ( !GEOMBase::IsShape(aSelectedObject) )
return;
QString aName = GEOMBase::GetName(aSelectedObject);
return;
// nbSel == 1
- Standard_Boolean testResult = Standard_False;
- myStartLCS = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
- if (!testResult || CORBA::is_nil(myStartLCS))
+ myStartLCS = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
+ if ( CORBA::is_nil(myStartLCS) )
return;
aName = GEOMBase::GetName(myStartLCS);
if (aSelList.Extent() != 1)
return;
- Standard_Boolean testResult = Standard_False;
- myEndLCS = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
- if (!testResult || CORBA::is_nil(myEndLCS))
+ myEndLCS = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
+ if ( CORBA::is_nil(myEndLCS) )
return;
aName = GEOMBase::GetName(myEndLCS);
if (aSelList.Extent() != 1)
return;
- Standard_Boolean testResult = Standard_False;
- GEOM::GEOM_Object_ptr aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
- if (!testResult || aSelectedObject->_is_nil())
+ GEOM::GEOM_Object_ptr aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
+ if ( aSelectedObject->_is_nil() )
return;
aName = GEOMBase::GetName(myPath);
return;
// nbSel == 1
- Standard_Boolean testResult = Standard_False;
- aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (!testResult || CORBA::is_nil(aSelectedObject))
+ if ( CORBA::is_nil(aSelectedObject) )
return;
aName = GEOMBase::GetName(aSelectedObject);
GEOM::GEOM_Object_var aSelectedObject = GEOM::GEOM_Object::_nil();
if (aSelList.Extent() == 1)
{
- Standard_Boolean testResult = Standard_False;
- aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
- if (testResult)
+ aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
+ if ( !CORBA::is_nil( aSelectedObject ) )
{
aName = GEOMBase::GetName(aSelectedObject);
return;
// nbSel == 1
- Standard_Boolean testResult = Standard_False;
- GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (!testResult || CORBA::is_nil(aSelectedObject))
+ if ( CORBA::is_nil(aSelectedObject) )
return;
aName = GEOMBase::GetName(aSelectedObject);