+ else // getConstructorId()==1 - extrusion using 2 points
+ {
+ if (IObjectCount() != 1) {
+ if (myEditCurrentArgument == GroupPoints2->LineEdit1)
+ myOkBase = false;
+ else if (myEditCurrentArgument == GroupPoints2->LineEdit2) {
+ myPoint1 = GEOM::GEOM_Object::_nil();
+ myOkPnt1 = false;
+ }
+ else if (myEditCurrentArgument == GroupPoints2->LineEdit3) {
+ myPoint2 = GEOM::GEOM_Object::_nil();
+ myOkPnt2 = false;
+ }
+ return;
+ }
+
+ // nbSel == 1
+ Standard_Boolean testResult = Standard_False;
+ GEOM::GEOM_Object_var aSelectedObject =
+ GEOMBase::ConvertIOinGEOMObject(firstIObject(), testResult );
+
+ if (!testResult || CORBA::is_nil( aSelectedObject ))
+ return;
+
+ QString aName = GEOMBase::GetName( aSelectedObject );
+ TopoDS_Shape aShape;
+ bool myOk = true;
+ if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() )
+ {
+ LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
+ TColStd_IndexedMapOfInteger aMap;
+ aSelMgr->GetIndexes( firstIObject(), aMap );
+ if (aMap.Extent() == 1)
+ {
+ int anIndex = aMap(1);
+ aName.append(":vertex_" + QString::number(anIndex));
+
+ //Find SubShape Object in Father
+ GEOM::GEOM_Object_var aFindedObject = findObjectInFather(aSelectedObject, aName);
+
+ if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
+ GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+ aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
+ }
+ else
+ aSelectedObject = aFindedObject;
+ }
+ else
+ {
+ if ((aShape.ShapeType() != TopAbs_VERTEX && myEditCurrentArgument == GroupPoints2->LineEdit2) ||
+ (aShape.ShapeType() != TopAbs_VERTEX && myEditCurrentArgument == GroupPoints2->LineEdit3))
+ {
+ aSelectedObject = GEOM::GEOM_Object::_nil();
+ aName = "";
+ myOk = false;
+ }
+ }
+ }
+
+ myEditCurrentArgument->setText(aName);
+
+ if (myEditCurrentArgument == GroupPoints2->LineEdit1) {
+ myBase = aSelectedObject;
+ myOkBase = true;
+ }
+ else if (myEditCurrentArgument == GroupPoints2->LineEdit2 && myOk) {
+ myOkPnt1 = true;
+ myPoint1 = aSelectedObject;
+ }
+ else if (myEditCurrentArgument == GroupPoints2->LineEdit3 && myOk) {
+ myOkPnt2 = true;
+ myPoint2 = aSelectedObject;
+ }