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
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
//=====================================================================================
// 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<QString,QString>& objects )
+static bool inUse( const QString& component, const QMap<QString,QString>& objects )
{
+ _PTR(Study) study = SalomeApp_Application::getStudy();
_PTR(SObject) comp = study->FindObjectID( component.toLatin1().data() );
if ( !comp )
return false;
// 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 <aSO>
- // 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();
// 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 <aSO>
- // 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();
CORBA::Boolean theAddPrefix)
{
GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
+ SALOMEDS::Study_var aStudy = getStudyServant();
//PTv, IMP 0020001, The salome object <theSObject>
- // 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)
CORBA::Boolean theAddPrefix)
{
GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
+ SALOMEDS::Study_var aStudy = getStudyServant();
//PTv, IMP 0020001, The salome object <theSObject>
- // 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
//=================================================================================
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; \
}
//================================================================
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;