GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIO, aRes );
if ( !CORBA::is_nil( aSelectedObject ) && aRes ) {
QString aName = GEOMBase::GetName(aSelectedObject);
-
+ TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX;
TopoDS_Shape aShape;
if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) {
- TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX;
if ( id == 2 || id == 3 )
aNeedType = TopAbs_EDGE;
else if ( id == 4 )
else {
aSelectedObject = aFindedObject; // get Object from study
}
+ GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE );
}
else { // Global Selection
if ( aShape.ShapeType() != aNeedType ) {
}
}
+ if ( aShape.IsNull() || aShape.ShapeType() != aNeedType)
+ return;
+
if ( id == 0 ) {
- if ( aShape.IsNull() ) return;
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
GroupXYZ->SpinBox_DX->setValue( aPnt.X() );
GroupXYZ->SpinBox_DY->setValue( aPnt.Y() );