From: rnv Date: Tue, 16 Jan 2018 16:46:43 +0000 (+0300) Subject: Merge 'master' branch into 'V9_dev' branch. X-Git-Tag: V9_0_0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=511797ed0ce7cbc7dc52b73db37ee494d3fb837a;p=modules%2Fgeom.git Merge 'master' branch into 'V9_dev' branch. --- 001d93f1ef3a53aa9df53b3589a0c72849b22a4e diff --cc doc/salome/examples/free_boundaries.py index 3a263c816,361739a91..1ae412a8e --- a/doc/salome/examples/free_boundaries.py +++ b/doc/salome/examples/free_boundaries.py @@@ -19,8 -19,8 +19,8 @@@ for fi in range(len(faces)) fid = geompy.addToStudyInFather(cut, faces[fi], "Face %d" % (fi+1)) isSuccess, closedWires, openWires = geompy.GetFreeBoundary(faces[fi]) if isSuccess: - print("Check free boudaries in face %d: OK" % (fi+1)) - print "Check free boundaries in face %d: OK" % (fi+1) - print "-- Nb of closed boundaries = %d" % len(closedWires) ++ print("Check free boundaries in face %d: OK" % (fi+1)) + print("-- Nb of closed boundaries = %d" % len(closedWires)) for wi in range(len(closedWires)): wid = geompy.addToStudyInFather(faces[fi], closedWires[wi], "Closed wire %d" % (wi+1)) pass @@@ -30,6 -30,6 +30,6 @@@ pass pass else: - print("Check free boudaries in face %d: KO" % (fi+1)) - print "Check free boundaries in face %d: KO" % (fi+1) ++ print("Check free boundaries in face %d: KO" % (fi+1)) pass pass diff --cc src/GEOMToolsGUI/GEOMToolsGUI.cxx index 96d86599b,d79a68e10..1f5bc409d --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@@ -77,12 -77,11 +77,12 @@@ static QString getParentComponent( _PTR //===================================================================================== // function : inUse - // purpose : check if the object(s) passed as the the second arguments are used + // purpose : check if the object(s) passed as the second arguments are used // by the other objects in the study //===================================================================================== -static bool inUse( _PTR(Study) study, const QString& component, const QMap& objects ) +static bool inUse( const QString& component, const QMap& objects ) { + _PTR(Study) study = SalomeApp_Application::getStudy(); _PTR(SObject) comp = study->FindObjectID( component.toLatin1().data() ); if ( !comp ) return false; diff --cc src/GEOM_I/GEOM_Gen_i.cc index 756ebd362,fc6cee5c4..b94e8619e --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@@ -913,9 -917,9 +913,9 @@@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubS // find SObject in the study if it is already published CORBA::String_var anIORo = _orb->object_to_string(theObject); - SALOMEDS::SObject_var aSO = theStudy->FindObjectIOR(anIORo.in()); + SALOMEDS::SObject_var aSO = aStudy->FindObjectIOR(anIORo.in()); //PTv, IMP 0020001, The salome object - // is not obligatory in case of invokation from script + // is not obligatory in case of invocation from script // if (CORBA::is_nil(aSO)) // return aParts._retn(); @@@ -942,9 -947,9 +942,9 @@@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGive // find SObject in the study if it is already published CORBA::String_var anIORo = _orb->object_to_string(theObject); - SALOMEDS::SObject_var aSO = theStudy->FindObjectIOR(anIORo.in()); + SALOMEDS::SObject_var aSO = getStudyServant()->FindObjectIOR(anIORo.in()); //PTv, IMP 0020001, The salome object - // is not obligatory in case of invokation from script + // is not obligatory in case of invocation from script // if (CORBA::is_nil(aSO)) // return aParts._retn(); @@@ -1025,10 -1032,9 +1025,10 @@@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubS CORBA::Boolean theAddPrefix) { GEOM::ListOfGO_var aParts = new GEOM::ListOfGO; + SALOMEDS::Study_var aStudy = getStudyServant(); //PTv, IMP 0020001, The salome object - // is not obligatory in case of invokation from script + // is not obligatory in case of invocation from script - if (CORBA::is_nil(theStudy) || CORBA::is_nil(theObject) /*|| CORBA::is_nil(theSObject)*/) + if (CORBA::is_nil(aStudy) || CORBA::is_nil(theObject) /*|| CORBA::is_nil(theSObject)*/) return aParts._retn(); // For Dump Python (mantis issue 0020768) @@@ -1618,10 -1624,9 +1618,10 @@@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGive CORBA::Boolean theAddPrefix) { GEOM::ListOfGO_var aParts = new GEOM::ListOfGO; + SALOMEDS::Study_var aStudy = getStudyServant(); //PTv, IMP 0020001, The salome object - // is not obligatory in case of invokation from script + // is not obligatory in case of invocation from script - if (CORBA::is_nil(theStudy) || CORBA::is_nil(theObject) /*|| CORBA::is_nil(theSObject)*/) + if (CORBA::is_nil(aStudy) || CORBA::is_nil(theObject) /*|| CORBA::is_nil(theSObject)*/) return aParts._retn(); // If theArgs list is empty, nothing to do diff --cc src/MeasureGUI/MeasureGUI_ShapeStatisticsDlg.cxx index d8f8dfaef,7cf7b9792..347f2b866 --- a/src/MeasureGUI/MeasureGUI_ShapeStatisticsDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_ShapeStatisticsDlg.cxx @@@ -205,13 -206,13 +205,13 @@@ MeasureGUI_ShapeStatisticsDlg::~Measure //================================================================================= GEOM::GEOM_IOperations_ptr MeasureGUI_ShapeStatisticsDlg::createOperation() { - return getGeomEngine()->GetIGroupOperations(getStudyId()); + return getGeomEngine()->GetIGroupOperations(); } - #define RETURN_WITH_MSG(a, b) \ - if (!(a)) { \ - theMessage += (b); \ - return false; \ + #define RETURN_WITH_MSG(a, b) \ + if (!(a)) { \ + theMessage += (b); \ + return false; \ } //================================================================ @@@ -471,8 -472,9 +471,8 @@@ bool MeasureGUI_ShapeStatisticsDlg::exe int aPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 ); QString aTypePrefix = myCBTypes->currentText().replace(' ', '_'); QString objIOR, aMin, aMax, aGroupName; - //SalomeApp_Study* study = getStudy(); - GEOMUtils::Distribution aShapesDistr = + GEOMUtils::Distribution aShapesDistr = GEOMUtils::ComputeDistribution( myShapes, currentType(), myNbIntervals->value(), aRange ); int nbGroups = 0;