- delete dependency from study id

This commit is contained in:
mpa 2016-10-10 17:09:43 +03:00
parent 58df7626e7
commit bac1427e5d
152 changed files with 851 additions and 1186 deletions

View File

@ -214,11 +214,6 @@
<service-comment>unknown</service-comment>
<service-by-default>0</service-by-default>
<inParameter-list>
<inParameter>
<inParameter-name>theStudy</inParameter-name>
<inParameter-type>Study</inParameter-type>
<inParameter-comment>unknown</inParameter-comment>
</inParameter>
<inParameter>
<inParameter-name>theObject</inParameter-name>
<inParameter-type>GEOM/GEOM_BaseObject</inParameter-type>
@ -251,11 +246,6 @@
<service-comment>unknown</service-comment>
<service-by-default>0</service-by-default>
<inParameter-list>
<inParameter>
<inParameter-name>theStudy</inParameter-name>
<inParameter-type>Study</inParameter-type>
<inParameter-comment>unknown</inParameter-comment>
</inParameter>
<inParameter>
<inParameter-name>theObject</inParameter-name>
<inParameter-type>GEOM/GEOM_Object</inParameter-type>
@ -298,11 +288,6 @@
<service-comment>unknown</service-comment>
<service-by-default>0</service-by-default>
<inParameter-list>
<inParameter>
<inParameter-name>theStudy</inParameter-name>
<inParameter-type>Study</inParameter-type>
<inParameter-comment>unknown</inParameter-comment>
</inParameter>
<inParameter>
<inParameter-name>theObject</inParameter-name>
<inParameter-type>GEOM/GEOM_Object</inParameter-type>
@ -345,11 +330,6 @@
<service-comment>unknown</service-comment>
<service-by-default>0</service-by-default>
<inParameter-list>
<inParameter>
<inParameter-name>theStudy</inParameter-name>
<inParameter-type>Study</inParameter-type>
<inParameter-comment>unknown</inParameter-comment>
</inParameter>
<inParameter>
<inParameter-name>theSObject</inParameter-name>
<inParameter-type>SObject</inParameter-type>
@ -730,13 +710,7 @@
<service-version>@SALOMEGEOM_VERSION@</service-version>
<service-comment>unknown</service-comment>
<service-by-default>0</service-by-default>
<inParameter-list>
<inParameter>
<inParameter-name>theStudyEntry</inParameter-name>
<inParameter-type>string</inParameter-type>
<inParameter-comment>unknown</inParameter-comment>
</inParameter>
</inParameter-list>
<inParameter-list></inParameter-list>
<outParameter-list>
<outParameter>
<outParameter-name>return</outParameter-name>
@ -769,11 +743,6 @@
<service-comment>unknown</service-comment>
<service-by-default>0</service-by-default>
<inParameter-list>
<inParameter>
<inParameter-name>theStudy</inParameter-name>
<inParameter-type>Study</inParameter-type>
<inParameter-comment>unknown</inParameter-comment>
</inParameter>
<inParameter>
<inParameter-name>theObject</inParameter-name>
<inParameter-type>CORBA/Object</inParameter-type>

View File

@ -118,19 +118,19 @@
* Constructor
*/
//=============================================================================
AdvancedEngine_IOperations::AdvancedEngine_IOperations(GEOM_Engine* theEngine, int theDocID) :
GEOM_IOperations(theEngine, theDocID)
AdvancedEngine_IOperations::AdvancedEngine_IOperations(GEOM_Engine* theEngine) :
GEOM_IOperations(theEngine)
{
MESSAGE("AdvancedEngine_IOperations::AdvancedEngine_IOperations");
myBasicOperations = new GEOMImpl_IBasicOperations(GetEngine(), GetDocID());
myBooleanOperations = new GEOMImpl_IBooleanOperations(GetEngine(), GetDocID());
myShapesOperations = new GEOMImpl_IShapesOperations(GetEngine(), GetDocID());
myTransformOperations = new GEOMImpl_ITransformOperations(GetEngine(), GetDocID());
myBlocksOperations = new GEOMImpl_IBlocksOperations(GetEngine(), GetDocID());
my3DPrimOperations = new GEOMImpl_I3DPrimOperations(GetEngine(), GetDocID());
myLocalOperations = new GEOMImpl_ILocalOperations(GetEngine(), GetDocID());
myHealingOperations = new GEOMImpl_IHealingOperations(GetEngine(), GetDocID());
myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine(), GetDocID());
myBasicOperations = new GEOMImpl_IBasicOperations(GetEngine());
myBooleanOperations = new GEOMImpl_IBooleanOperations(GetEngine());
myShapesOperations = new GEOMImpl_IShapesOperations(GetEngine());
myTransformOperations = new GEOMImpl_ITransformOperations(GetEngine());
myBlocksOperations = new GEOMImpl_IBlocksOperations(GetEngine());
my3DPrimOperations = new GEOMImpl_I3DPrimOperations(GetEngine());
myLocalOperations = new GEOMImpl_ILocalOperations(GetEngine());
myHealingOperations = new GEOMImpl_IHealingOperations(GetEngine());
myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine());
}
//=============================================================================
@ -1076,7 +1076,7 @@ bool AdvancedEngine_IOperations::MakeInternalGroup
// Get faces that are laying on conical faces.
if (aConicalFaces.IsEmpty() == Standard_False) {
Handle(GEOM_Object) aCone =
GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
GetEngine()->AddObject(GEOM_TSHAPE);
Handle(GEOM_Function) aFunction =
aCone->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
TopTools_ListIteratorOfListOfShape aFIter(aConicalFaces);
@ -1915,7 +1915,7 @@ Handle(TColStd_HSequenceOfTransient)
MESSAGE("AdvancedEngine_IOperations::MakePipeTShape");
SetErrorCode(KO);
//Add a new object
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
//Add a new shape function with parameters
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
@ -2070,7 +2070,7 @@ AdvancedEngine_IOperations::MakePipeTShapeWithPosition
{
SetErrorCode(KO);
//Add a new object
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
/////////////////
// TSHAPE CODE
/////////////////
@ -2238,7 +2238,7 @@ AdvancedEngine_IOperations::MakePipeTShapeChamfer
{
SetErrorCode(KO);
//Add a new object
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
//Add a new shape function with parameters
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
if (aFunction.IsNull()) return NULL;
@ -2468,7 +2468,7 @@ AdvancedEngine_IOperations::MakePipeTShapeChamferWithPosition
{
SetErrorCode(KO);
//Add a new object
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
//Add a new shape function with parameters
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
if (aFunction.IsNull()) return NULL;
@ -2699,7 +2699,7 @@ AdvancedEngine_IOperations::MakePipeTShapeFillet
{
SetErrorCode(KO);
//Add a new object
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
//Add a new shape function with parameters
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
if (aFunction.IsNull()) return NULL;
@ -2951,7 +2951,7 @@ AdvancedEngine_IOperations::MakePipeTShapeFilletWithPosition
{
SetErrorCode(KO);
//Add a new object
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
//Add a new shape function with parameters
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
if (aFunction.IsNull()) return NULL;
@ -3202,7 +3202,7 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDisk (double theR, do
return NULL;
}
//Add a new object
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_DIVIDEDDISK);
//Add a new shape function with parameters
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_DividedDiskDriver::GetID(), DIVIDEDDISK_R_RATIO);
@ -3270,7 +3270,7 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDiskPntVecR (Handle(G
SetErrorCode(KO);
//Add a new object
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_DIVIDEDDISK);
//Add a new shape function with parameters
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_DividedDiskDriver::GetID(), DIVIDEDDISK_R_VECTOR_PNT);
@ -3343,7 +3343,7 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedCylinder (double theR
SetErrorCode(KO);
//Add a new object
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDCYLINDER);
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_DIVIDEDCYLINDER);
Handle(GEOM_Object) aBaseShape = MakeDividedDisk(theR, 67.0, 1, thePattern);
aBaseShape->GetLastFunction()->SetDescription(""); // Erase dump of MakeDividedDisk
@ -3391,7 +3391,7 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeSmoothingSurface (std::list<
SetErrorCode(KO);
//Add a new object
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_SMOOTHINGSURFACE);
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_SMOOTHINGSURFACE);
//Add a new shape function with parameters
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_SmoothingSurfaceDriver::GetID(), SMOOTHINGSURFACE_LPOINTS);

View File

@ -165,7 +165,7 @@ public:
bool fuse);
public:
AdvancedEngine_IOperations(GEOM_Engine* theEngine, int theDocID);
AdvancedEngine_IOperations(GEOM_Engine* theEngine);
~AdvancedEngine_IOperations();
Handle(TColStd_HSequenceOfTransient)

View File

@ -56,11 +56,12 @@ GEOM_IOperations_i* AdvancedEngine_OperationsCreator::Create (PortableServer::PO
{
Unexpect aCatch(SALOME_SalomeException);
MESSAGE( "AdvancedEngine_OperationsCreator::Create" );
_operation = new AdvancedEngine_IOperations( theGenImpl );
return new AdvancedEngine_IOperations_i( thePOA, theEngine, _operation );
return new AdvancedEngine_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
}
AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get()
AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
{
if( !_operation )
_operation = new AdvancedEngine_IOperations( theGenImpl );
return _operation;
}

View File

@ -45,9 +45,9 @@ public:
::GEOMImpl_Gen* theGenImpl);
private:
static AdvancedEngine_IOperations* get();
static AdvancedEngine_IOperations* get(::GEOMImpl_Gen* theGenImpl);
private:
static AdvancedEngine_IOperations*_operation;
static AdvancedEngine_IOperations* _operation;
};
#endif

View File

@ -1217,8 +1217,7 @@ bool AdvancedGUI_PipeTShapeDlg::executeNoCheck (ObjectList& objects)
// function : restoreSubShapes
// purpose :
//=================================================================================
void AdvancedGUI_PipeTShapeDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
SALOMEDS::SObject_ptr theSObject)
void AdvancedGUI_PipeTShapeDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
{
SALOMEDS::GenericAttribute_var anAttr;
if (!theSObject->FindAttribute(anAttr, "AttributeIOR"))
@ -1236,7 +1235,7 @@ void AdvancedGUI_PipeTShapeDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
ObjectList::iterator it = pipeTShapeGroupObjects.begin();
for (int i = 0; it != pipeTShapeGroupObjects.end(); it++, i++) {
getGeomEngine()->AddInStudy(theStudy, (*it), tr((*it)->GetName()).toStdString().c_str(), theFather);
getGeomEngine()->AddInStudy((*it), tr((*it)->GetName()).toStdString().c_str(), theFather);
}
}

View File

@ -78,7 +78,7 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid (QString&);
virtual bool execute (ObjectList&);
virtual void restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
virtual void restoreSubShapes (SALOMEDS::SObject_ptr);
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:

View File

@ -143,7 +143,7 @@ bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
entryList.append( so->GetID() );
transaction.commit();
GEOM_Displayer( study ).Display( main.in() );
GEOM_Displayer().Display( main.in() );
main->UnRegister();
}
else

View File

@ -46,12 +46,11 @@ BREPPlugin_IECallBack::~BREPPlugin_IECallBack()
*/
//=============================================================================
bool
BREPPlugin_IECallBack::Export( int theDocId,
const Handle(GEOM_Object) theOriginal,
const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& theFormatName )
BREPPlugin_IECallBack::Export( const Handle(GEOM_Object) theOriginal,
const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& theFormatName )
{
BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine(), theDocId );
BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine() );
aPluginOperations->ExportBREP( theOriginal, theFileName );
return true;
}
@ -62,11 +61,10 @@ BREPPlugin_IECallBack::Export( int theDocId,
*/
//=============================================================================
Handle(TColStd_HSequenceOfTransient)
BREPPlugin_IECallBack::Import( int theDocId,
const TCollection_AsciiString& theFormatName,
const TCollection_AsciiString& theFileName )
BREPPlugin_IECallBack::Import( const TCollection_AsciiString& theFormatName,
const TCollection_AsciiString& theFileName )
{
BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine(), theDocId );
BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine() );
return aPluginOperations->ImportBREP( theFileName );
}

View File

@ -36,14 +36,12 @@ public:
BREPPlugin_IECallBack();
~BREPPlugin_IECallBack();
bool Export( int theDocId,
const Handle(GEOM_Object) theOriginal,
const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& theFormatName );
bool Export( const Handle(GEOM_Object) theOriginal,
const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& theFormatName );
Handle(TColStd_HSequenceOfTransient) Import( int theDocId,
const TCollection_AsciiString& theFormatName,
const TCollection_AsciiString& theFileName );
Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
const TCollection_AsciiString& theFileName );
};
#endif

View File

@ -38,8 +38,8 @@
* Constructor
*/
//=============================================================================
BREPPlugin_IOperations::BREPPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
BREPPlugin_IOperations::BREPPlugin_IOperations( GEOM_Engine* theEngine )
: GEOMImpl_IBaseIEOperations( theEngine )
{
MESSAGE( "BREPPlugin_IOperations::BREPPlugin_IOperations" );
}
@ -74,7 +74,7 @@ void BREPPlugin_IOperations::ExportBREP( const Handle(GEOM_Object) theOrigi
if( aRefFunction.IsNull() ) return; //There is no function which creates an object to be exported
//Add a new result object
Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
Handle(GEOM_Object) result = GetEngine()->AddObject( GEOM_IMPORT);
//Add an Export function
Handle(GEOM_Function) aFunction = result->AddFunction( BREPPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
@ -124,7 +124,7 @@ BREPPlugin_IOperations::ImportBREP( const TCollection_AsciiString& theFileName )
if( theFileName.IsEmpty() ) return NULL;
//Add a new result object
Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
Handle(GEOM_Object) anImported = GetEngine()->AddObject( GEOM_IMPORT );
//Add an Import function
Handle(GEOM_Function) aFunction =

View File

@ -30,7 +30,7 @@
class BREPPLUGINENGINE_EXPORT BREPPlugin_IOperations: public GEOMImpl_IBaseIEOperations
{
public:
BREPPlugin_IOperations( GEOM_Engine*, int );
BREPPlugin_IOperations( GEOM_Engine* );
~BREPPlugin_IOperations();
void ExportBREP( const Handle(GEOM_Object),

View File

@ -56,11 +56,12 @@ GEOM_IOperations_i* BREPPlugin_OperationsCreator::Create( PortableServer::POA_pt
{
Unexpect aCatch( SALOME_SalomeException );
MESSAGE( "BREPPlugin_OperationsCreator::Create" );
_operation = new BREPPlugin_IOperations( theGenImpl );
return new BREPPlugin_IOperations_i( thePOA, theEngine, _operation );
return new BREPPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
}
BREPPlugin_IOperations* BREPPlugin_OperationsCreator::get()
BREPPlugin_IOperations* BREPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
{
if( !_operation )
_operation = new BREPPlugin_IOperations( theGenImpl );
return _operation;
}

View File

@ -44,10 +44,10 @@ public:
GEOM::GEOM_Gen_ptr theEngine,
::GEOMImpl_Gen* theGenImpl );
private:
static BREPPlugin_IOperations* get();
static BREPPlugin_IOperations* get(::GEOMImpl_Gen* theGenImpl);
private:
static BREPPlugin_IOperations* _operation;
static BREPPlugin_IOperations* _operation;
friend class BREPPlugin_IECallBack;
};

View File

@ -457,12 +457,11 @@ bool BooleanGUI_Dialog::execute (ObjectList& objects)
// function : restoreSubShapes
// purpose :
//=================================================================================
void BooleanGUI_Dialog::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
SALOMEDS::SObject_ptr theSObject)
void BooleanGUI_Dialog::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
{
if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
// empty list of arguments means that all arguments should be restored
getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
/*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame
/*theInheritFirstArg=*/myOperation == BooleanGUI::CUT,
mainFrame()->CheckBoxAddPrefix->isChecked()); // ? false

View File

@ -50,7 +50,7 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
virtual void restoreSubShapes( SALOMEDS::SObject_ptr );
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();

View File

@ -244,12 +244,11 @@ bool BuildGUI_CompoundDlg::execute( ObjectList& objects )
// function : restoreSubShapes
// purpose :
//=================================================================================
void BuildGUI_CompoundDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy,
SALOMEDS::SObject_ptr theSObject )
void BuildGUI_CompoundDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject )
{
if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
// empty list of arguments means that all arguments should be restored
getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
/*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame
/*theInheritFirstArg=*/false,
mainFrame()->CheckBoxAddPrefix->isChecked() );

View File

@ -49,7 +49,7 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
virtual void restoreSubShapes( SALOMEDS::SObject_ptr );
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:

View File

@ -66,8 +66,7 @@ void DependencyTree_ViewModel::onShowSelected()
SALOME_ListIO aSelList;
aSelMgr->selectedObjects(aSelList);
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
GEOM_Displayer disp( appStudy );
GEOM_Displayer disp;
OCCViewer_ViewManager* anOCCVM = ( OCCViewer_ViewManager* ) app->getViewManager( OCCViewer_Viewer::Type(), /*create=*/ true );
@ -96,8 +95,7 @@ void DependencyTree_ViewModel::onShowOnlySelected()
SALOME_ListIO aSelList;
aSelMgr->selectedObjects( aSelList );
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
GEOM_Displayer disp( appStudy );
GEOM_Displayer disp;
OCCViewer_ViewManager* anOCCVM = (OCCViewer_ViewManager*) app->getViewManager( OCCViewer_Viewer::Type(), /*create=*/ true );

View File

@ -87,9 +87,6 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
SalomeApp_Application* app = getGeometryGUI()->getApp();
if (!app) return false;
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
if ( !appStudy ) return false;
LightApp_SelectionMgr *Sel = app->selectionMgr();
SALOME_ListIO selected;
Sel->selectedObjects( selected );
@ -173,7 +170,7 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
break;
}
Sel->setSelectedObjects( selected );
GEOM_Displayer( appStudy ).UpdateColorScale();
GEOM_Displayer().UpdateColorScale();
return true;
}
@ -210,7 +207,7 @@ void DisplayGUI::DisplayAll()
}
anIter->Next();
}
GEOM_Displayer( appStudy ).Display( listIO, true );
GEOM_Displayer().Display( listIO, true );
}
//=====================================================================================
@ -225,11 +222,10 @@ void DisplayGUI::EraseAll()
if ( app ) {
SUIT_ViewWindow* vw = app->desktop()->activeWindow();
if ( vw ) {
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
SUIT_ViewManager* vman = vw->getViewManager();
if ( vman->getType() == OCCViewer_Viewer::Type() ||
vman->getType() == SVTK_Viewer::Type() ) {
GEOM_Displayer( appStudy ).EraseAll(true);
GEOM_Displayer().EraseAll(true);
}
}
}
@ -258,8 +254,8 @@ void DisplayGUI::DisplayOnlyChildren()
SalomeApp_Application* app = getGeometryGUI()->getApp();
if (!app) return;
SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
if (!anActiveStudy) return;
SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
if (!aStudy) return;
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
if (!aSelMgr) return;
@ -275,14 +271,14 @@ void DisplayGUI::DisplayOnlyChildren()
for (; It.More(); It.Next()) {
Handle(SALOME_InteractiveObject) anIObject = It.Value();
if (anIObject->hasEntry()) {
_PTR(SObject) SO (anActiveStudy->studyDS()->FindObjectID(anIObject->getEntry()));
_PTR(SObject) SO (aStudy->studyDS()->FindObjectID(anIObject->getEntry()));
if (SO) {
_PTR(SComponent) SC (SO->GetFatherComponent());
if (QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str())) {
// if component is selected, pass it
}
else {
_PTR(ChildIterator) anIter (anActiveStudy->studyDS()->NewChildIterator(SO));
_PTR(ChildIterator) anIter (aStudy->studyDS()->NewChildIterator(SO));
anIter->InitEx(true);
while (anIter->More()) {
_PTR(SObject) valSO (anIter->Value());
@ -298,7 +294,7 @@ void DisplayGUI::DisplayOnlyChildren()
}
}
}
GEOM_Displayer(anActiveStudy).Display(listIO, true);
GEOM_Displayer().Display(listIO, true);
}
//=====================================================================================
@ -312,8 +308,8 @@ void DisplayGUI::Display()
SalomeApp_Application* app = getGeometryGUI()->getApp();
if ( !app ) return;
SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
if ( !anActiveStudy ) return;
SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
if ( !aStudy ) return;
//get SalomeApp selection manager
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
@ -328,12 +324,12 @@ void DisplayGUI::Display()
for( ;It.More();It.Next() ) {
Handle(SALOME_InteractiveObject) anIObject = It.Value();
if ( anIObject->hasEntry() ) {
_PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
_PTR(SObject) SO ( aStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
_PTR(SComponent) SC ( SO->GetFatherComponent() );
// if component is selected
listIO.Clear();
_PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
_PTR(ChildIterator) anIter ( aStudy->studyDS()->NewChildIterator( SO ) );
anIter->InitEx( true );
while( anIter->More() ) {
_PTR(SObject) valSO ( anIter->Value() );
@ -355,7 +351,7 @@ void DisplayGUI::Display()
listIO.Append( anIObject );
}
}
GEOM_Displayer( anActiveStudy ).Display( listIO, true );
GEOM_Displayer().Display( listIO, true );
}
@ -370,8 +366,8 @@ void DisplayGUI::Erase()
SalomeApp_Application* app = getGeometryGUI()->getApp();
if ( !app ) return;
SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
if ( !anActiveStudy ) return;
SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
if ( !aStudy ) return;
//get SalomeApp selection manager
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
@ -386,12 +382,12 @@ void DisplayGUI::Erase()
for( ; It.More(); It.Next() ) {
Handle(SALOME_InteractiveObject) anIObject = It.Value();
if ( anIObject->hasEntry() ) {
_PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
_PTR(SObject) SO ( aStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
_PTR(SComponent) SC ( SO->GetFatherComponent() );
// if component is selected
listIO.Clear();
_PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
_PTR(ChildIterator) anIter ( aStudy->studyDS()->NewChildIterator( SO ) );
anIter->InitEx( true );
while( anIter->More() ) {
_PTR(SObject) valSO ( anIter->Value() );
@ -419,7 +415,7 @@ void DisplayGUI::Erase()
if(viewWindow->getViewManager()->getType() == SVTK_Viewer::Type())
aIsForced = false;
GEOM_Displayer(anActiveStudy).Erase( listIO, aIsForced);
GEOM_Displayer().Erase( listIO, aIsForced);
getGeometryGUI()->getApp()->selectionMgr()->clearSelected();
}
@ -440,7 +436,7 @@ void DisplayGUI::SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
if ( !aStudy ) return;
GEOM_Displayer displayer( aStudy );
GEOM_Displayer displayer;
int mgrId = viewWindow->getViewManager()->getGlobalId();
@ -476,7 +472,7 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow )
if ( !viewWindow )
viewWindow = app->desktop()->activeWindow();
GEOM_Displayer displayer( aStudy );
GEOM_Displayer displayer;
viewWindow->setProperty( "VectorsMode", mode );
@ -525,7 +521,7 @@ void DisplayGUI::SetVerticesMode( const bool mode, SUIT_ViewWindow* viewWindow )
if ( !viewWindow )
viewWindow = app->desktop()->activeWindow();
GEOM_Displayer displayer( aStudy );
GEOM_Displayer displayer;
viewWindow->setProperty( "VerticesMode", mode );
@ -576,7 +572,7 @@ void DisplayGUI::SetNameMode( const bool mode, SUIT_ViewWindow* viewWindow )
viewWindow->setProperty( "NameMode", mode );
GEOM_Displayer displayer( aStudy );
GEOM_Displayer displayer;
int aMgrId = viewWindow->getViewManager()->getGlobalId();
@ -631,7 +627,7 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
GEOM_Displayer displayer( aStudy );
GEOM_Displayer displayer;
int mgrId = viewWindow->getViewManager()->getGlobalId();

View File

@ -35,21 +35,6 @@
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver);
//================================================================================
/*!
* Returns document id
*/
//================================================================================
int GEOM_BaseDriver::GetDocID() const
{
int docId = 0;
if (!Label().IsNull()) {
Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(Label().Data());
docId = GEOM_Engine::GetEngine()->GetDocID(aDoc);
}
return docId;
}
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters

View File

@ -76,8 +76,6 @@ struct GEOM_Param
class GEOM_BaseDriver : public TFunction_Driver
{
public:
// Returns document id
Standard_EXPORT int GetDocID() const;
// Returns a name of creation operation and names and values of creation parameters
// (Use AddParam() methods declared below to fill params vector while implementing

View File

@ -85,15 +85,9 @@ Handle(GEOM_BaseObject) GEOM_BaseObject::GetObject(const TDF_Label& theLabel)
TCollection_AsciiString anEntry;
TDF_Tool::Entry(theLabel, anEntry);
Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(theLabel.Data());
if(aDoc.IsNull()) return NULL;
Handle(TDataStd_Integer) anID;
if(!aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) return NULL;
GEOM_Engine* anEngine = GEOM_Engine::GetEngine();
if(anEngine == NULL) return NULL;
return anEngine->GetObject(anID->Get(), anEntry.ToCString());
return anEngine->GetObject(anEntry.ToCString());
}
//=============================================================================
@ -167,14 +161,8 @@ int GEOM_BaseObject::GetType(const TDF_Label& theLabel)
*/
//=============================================================================
GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry)
: _label(theEntry), _ior(""), _docID(-1)
: _label(theEntry), _ior("")
{
Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(_label.Data());
if(!aDoc.IsNull()) {
Handle(TDataStd_Integer) anID;
if(aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) _docID = anID->Get();
}
if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
_root = TDataStd_TreeNode::Set(theEntry);
}
@ -185,14 +173,8 @@ GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry)
*/
//=============================================================================
GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry, int theType)
: _label(theEntry), _ior(""), _docID(-1)
: _label(theEntry), _ior("")
{
Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(_label.Data());
if(!aDoc.IsNull()) {
Handle(TDataStd_Integer) anID;
if(aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) _docID = anID->Get();
}
theEntry.ForgetAllAttributes(Standard_True);
if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
@ -288,17 +270,6 @@ void GEOM_BaseObject::IncrementTic()
TDataStd_Integer::Set(aTicLabel, aTic + 1);
}
//=============================================================================
/*!
* GetDocID
*/
//=============================================================================
int GEOM_BaseObject::GetDocID()
{
return _docID;
}
//=============================================================================
/*!
* SetName

View File

@ -92,9 +92,6 @@ public:
Standard_EXPORT void SetTic(int theTic);
Standard_EXPORT void IncrementTic();
//Returns an ID of the OCAF document where this GEOM_BaseObject is stored
Standard_EXPORT int GetDocID();
//Sets a name of this GEOM_BaseObject
Standard_EXPORT void SetName(const char* theName);
@ -163,7 +160,6 @@ public:
TDF_Label _label;
TCollection_AsciiString _ior;
TCollection_AsciiString _parameters;
int _docID;
public:
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_BaseObject,Standard_Transient)

View File

@ -100,24 +100,9 @@ static GEOM_Engine* TheEngine = NULL;
static TCollection_AsciiString BuildIDFromObject(Handle(GEOM_BaseObject)& theObject)
{
TCollection_AsciiString anID(theObject->GetDocID()), anEntry;
TCollection_AsciiString anEntry;
TDF_Tool::Entry(theObject->GetEntry(), anEntry);
anID+=(TCollection_AsciiString("_")+anEntry);
return anID;
}
static TCollection_AsciiString BuildID(Standard_Integer theDocID, const char* theEntry)
{
TCollection_AsciiString anID(theDocID);
anID+=(TCollection_AsciiString("_")+theEntry);
return anID;
}
static Standard_Integer ExtractDocID(TCollection_AsciiString& theID)
{
TCollection_AsciiString aDocID = theID.Token("_");
if(aDocID.Length() < 1) return -1;
return aDocID.IntegerValue();
return anEntry;
}
bool ProcessFunction(Handle(GEOM_Function)& theFunction,
@ -146,11 +131,10 @@ void ReplaceEntriesByNames (TCollection_AsciiString& theScript,
Standard_Integer& objectCounter,
Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
void AddObjectColors (int theDocID,
TCollection_AsciiString& theScript,
void AddObjectColors (TCollection_AsciiString& theScript,
const TSting2ObjDataMap& theEntry2ObjData);
void AddTextures (int theDocID, TCollection_AsciiString& theScript);
void AddTextures (TCollection_AsciiString& theScript);
void PublishObject (TObjectData& theObjectData,
TSting2ObjDataMap& theEntry2ObjData,
@ -252,14 +236,8 @@ GEOM_Engine::~GEOM_Engine()
for(objit = objs.begin(); objit != objs.end(); ++objit)
RemoveObject(*objit);
//Close all documents not closed
TColStd_DataMapIteratorOfDataMapOfIntegerTransient anItr (_mapIDDocument);
for (; anItr.More(); anItr.Next())
{
Close(anItr.Key());
anItr.Initialize( _mapIDDocument ); // anItr becomes invalid at _mapIDDocument.UnBind(docId)
}
_mapIDDocument.Clear();
//Close document
Close();
_objects.Clear();
}
@ -268,11 +246,11 @@ GEOM_Engine::~GEOM_Engine()
* GetDocument
*/
//=============================================================================
Handle(TDocStd_Document) GEOM_Engine::GetDocument(int theDocID, bool force)
Handle(TDocStd_Document) GEOM_Engine::GetDocument(bool force)
{
Handle(TDocStd_Document) aDoc;
if(_mapIDDocument.IsBound(theDocID)) {
aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID));
if (_document) {
aDoc = _document;
}
else if (force) {
#if OCC_VERSION_MAJOR > 6
@ -281,44 +259,26 @@ Handle(TDocStd_Document) GEOM_Engine::GetDocument(int theDocID, bool force)
_OCAFApp->NewDocument("SALOME_GEOM", aDoc);
#endif
aDoc->SetUndoLimit(_UndoLimit);
_mapIDDocument.Bind(theDocID, aDoc);
TDataStd_Integer::Set(aDoc->Main(), theDocID);
_document = aDoc;
}
return aDoc;
}
//=============================================================================
/*!
* GetDocID
*/
//=============================================================================
int GEOM_Engine::GetDocID(Handle(TDocStd_Document) theDocument)
{
if (theDocument.IsNull()) return -1;
TColStd_DataMapIteratorOfDataMapOfIntegerTransient anItr (_mapIDDocument);
for (; anItr.More(); anItr.Next())
if (anItr.Value() == theDocument) return anItr.Key();
return -1;
}
//=============================================================================
/*!
* GetObject
*/
//=============================================================================
Handle(GEOM_BaseObject) GEOM_Engine::GetObject(int theDocID, const char* theEntry, bool force)
Handle(GEOM_BaseObject) GEOM_Engine::GetObject(const char* theEntry, bool force)
{
Handle(GEOM_BaseObject) anObject;
TCollection_AsciiString anID = BuildID(theDocID, theEntry);
if (_objects.IsBound(anID)) {
anObject = Handle(GEOM_BaseObject)::DownCast(_objects(anID));
if (_objects.IsBound(theEntry)) {
anObject = Handle(GEOM_BaseObject)::DownCast(_objects(theEntry));
}
else if (force) {
Handle(TDocStd_Document) aDoc = GetDocument(theDocID, force);
Handle(TDocStd_Document) aDoc = GetDocument(force);
if ( !aDoc.IsNull()) {
TDF_Label aLabel;
TDF_Tool::Label(aDoc->Main().Data(), theEntry, aLabel, Standard_True);
@ -329,7 +289,7 @@ Handle(GEOM_BaseObject) GEOM_Engine::GetObject(int theDocID, const char* theEntr
case GEOM_FIELD_STEP_OBJTYPE: anObject = new GEOM_FieldStep(aLabel); break;
default: anObject = new GEOM_Object (aLabel);
}
_objects.Bind(anID, anObject);
_objects.Bind(theEntry, anObject);
}
}
}
@ -343,22 +303,19 @@ Handle(GEOM_BaseObject) GEOM_Engine::GetObject(int theDocID, const char* theEntr
*/
//=============================================================================
Handle(GEOM_BaseObject) GEOM_Engine::AddBaseObject(int theDocID, int theType)
Handle(GEOM_BaseObject) GEOM_Engine::AddBaseObject(int theType)
{
Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
Handle(TDocStd_Document) aDoc = GetDocument();
Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
// NPAL18604: use existing label to decrease memory usage,
// if this label has been freed (object deleted)
bool useExisting = false;
TDF_Label aChild;
if (_freeLabels.find(theDocID) != _freeLabels.end()) {
std::list<TDF_Label>& aFreeLabels = _freeLabels[theDocID];
if (!aFreeLabels.empty()) {
useExisting = true;
aChild = aFreeLabels.front();
aFreeLabels.pop_front();
}
if (!_freeLabels.empty()) {
useExisting = true;
aChild = _freeLabels.front();
_freeLabels.pop_front();
}
if (!useExisting) {
// create new label
@ -386,9 +343,9 @@ Handle(GEOM_BaseObject) GEOM_Engine::AddBaseObject(int theDocID, int theType)
*/
//================================================================================
Handle(GEOM_Object) GEOM_Engine::AddObject(int theDocID, int theType)
Handle(GEOM_Object) GEOM_Engine::AddObject(int theType)
{
return Handle(GEOM_Object)::DownCast( AddBaseObject(theDocID, theType) );
return Handle(GEOM_Object)::DownCast( AddBaseObject(theType) );
}
//=============================================================================
@ -403,21 +360,17 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) th
{
if (theMainShape.IsNull() || theIndices.IsNull()) return NULL;
Handle(TDocStd_Document) aDoc = GetDocument(theMainShape->GetDocID());
Handle(TDocStd_Document) aDoc = GetDocument();
Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
// NPAL18604: use existing label to decrease memory usage,
// if this label has been freed (object deleted)
bool useExisting = false;
TDF_Label aChild;
int aDocID = theMainShape->GetDocID();
if (_freeLabels.find(aDocID) != _freeLabels.end()) {
std::list<TDF_Label>& aFreeLabels = _freeLabels[aDocID];
if (!aFreeLabels.empty()) {
useExisting = true;
aChild = aFreeLabels.front();
aFreeLabels.pop_front();
}
TDF_Label aChild;;
if (!_freeLabels.empty()) {
useExisting = true;
aChild = _freeLabels.front();
_freeLabels.pop_front();
}
if (!useExisting) {
// create new label
@ -479,8 +432,7 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject)
{
if (theObject.IsNull()) return false;
int aDocID = theObject->GetDocID();
if(!_mapIDDocument.IsBound(aDocID))
if(!_document)
return false; // document is closed...
//Remove an object from the map of available objects
@ -515,16 +467,14 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject)
aLabel.ForgetAllAttributes(Standard_True);
// Remember the label to reuse it then
std::list<TDF_Label>& aFreeLabels = _freeLabels[aDocID];
if ( aFreeLabels.empty() || aFreeLabels.back() != aLabel )
aFreeLabels.push_back(aLabel);
if ( _freeLabels.empty() || _freeLabels.back() != aLabel )
_freeLabels.push_back(aLabel);
// we can't explicitely delete theObject. At least prevent its functioning
// as an alive object when aLabel is reused for a new object
theObject->_label = aLabel.Root();
theObject->_ior.Clear();
theObject->_parameters.Clear();
theObject->_docID = -1;
theObject->_parameters.Clear();;
theObject.Nullify();
@ -536,9 +486,9 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject)
* Undo
*/
//=============================================================================
void GEOM_Engine::Undo(int theDocID)
void GEOM_Engine::Undo()
{
GetDocument(theDocID)->Undo();
GetDocument()->Undo();
}
//=============================================================================
@ -546,9 +496,9 @@ void GEOM_Engine::Undo(int theDocID)
* Redo
*/
//=============================================================================
void GEOM_Engine::Redo(int theDocID)
void GEOM_Engine::Redo()
{
GetDocument(theDocID)->Redo();
GetDocument()->Redo();
}
//=============================================================================
@ -556,12 +506,11 @@ void GEOM_Engine::Redo(int theDocID)
* Save
*/
//=============================================================================
bool GEOM_Engine::Save(int theDocID, const char* theFileName)
bool GEOM_Engine::Save(const char* theFileName)
{
if(!_mapIDDocument.IsBound(theDocID)) return false;
Handle(TDocStd_Document) aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID));
if(!_document) return false;
_OCAFApp->SaveAs(aDoc, theFileName);
_OCAFApp->SaveAs(_document, theFileName);
return true;
}
@ -571,7 +520,7 @@ bool GEOM_Engine::Save(int theDocID, const char* theFileName)
* Load
*/
//=============================================================================
bool GEOM_Engine::Load(int theDocID, const char* theFileName)
bool GEOM_Engine::Load(const char* theFileName)
{
Handle(TDocStd_Document) aDoc;
if (_OCAFApp->Open(theFileName, aDoc) != PCDM_RS_OK) {
@ -587,10 +536,7 @@ bool GEOM_Engine::Load(int theDocID, const char* theFileName)
aDoc->SetUndoLimit(_UndoLimit);
if(_mapIDDocument.IsBound(theDocID)) _mapIDDocument.UnBind(theDocID);
_mapIDDocument.Bind(theDocID, aDoc);
TDataStd_Integer::Set(aDoc->Main(), theDocID);
_document = aDoc;
return true;
}
@ -600,30 +546,19 @@ bool GEOM_Engine::Load(int theDocID, const char* theFileName)
* Close
*/
//=============================================================================
void GEOM_Engine::Close(int theDocID)
void GEOM_Engine::Close()
{
if (_mapIDDocument.IsBound(theDocID)) {
Handle(TDocStd_Document) aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID));
//Remove all GEOM Objects associated to the given document
TColStd_SequenceOfAsciiString aSeq;
if (_document) {
//Remove all GEOM Objects associated to the document
GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It (_objects);
for (; It.More(); It.Next()) {
TCollection_AsciiString anObjID (It.Key());
Standard_Integer anID = ExtractDocID(anObjID);
if (theDocID == anID) aSeq.Append(It.Key());
}
for (Standard_Integer i=1; i<=aSeq.Length(); i++) _objects.UnBind(aSeq.Value(i));
for (; It.More(); It.Next())
_objects.UnBind(It.Key());
// Forget free labels for this document
TFreeLabelsList::iterator anIt = _freeLabels.find(theDocID);
if (anIt != _freeLabels.end()) {
_freeLabels.erase(anIt);
}
// Forget free labels for document
_freeLabels.clear();
_mapIDDocument.UnBind(theDocID);
_OCAFApp->Close(aDoc);
aDoc.Nullify();
_OCAFApp->Close(_document);
_document.Nullify();
}
}
@ -632,8 +567,7 @@ void GEOM_Engine::Close(int theDocID)
* DumpPython
*/
//=============================================================================
TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
std::vector<TObjectData>& theObjectData,
TCollection_AsciiString GEOM_Engine::DumpPython(std::vector<TObjectData>& theObjectData,
TVariablesList theVariables,
bool isPublished,
bool isMultiFile,
@ -643,7 +577,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
Kernel_Utils::Localizer loc;
TCollection_AsciiString aScript;
Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
Handle(TDocStd_Document) aDoc = GetDocument();
if (aDoc.IsNull())
{
@ -662,7 +596,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
aScript += "\n\tgeompy = geomBuilder.New(theStudy)\n";
AddTextures(theDocID, aScript);
AddTextures(aScript);
Standard_Integer posToInsertGlobalVars = aScript.Length() + 1;
@ -798,7 +732,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
aScript += aFuncScript;
// ouv : NPAL12872
AddObjectColors( theDocID, aScript, aEntry2ObjData );
AddObjectColors(aScript, aEntry2ObjData );
// Make script to publish in study
TSting2ObjDataPtrMap::iterator aStEntry2ObjDataPtrIt;
@ -908,24 +842,21 @@ Handle(TColStd_HSequenceOfAsciiString) GEOM_Engine::GetAllDumpNames() const
#define TEXTURE_LABEL_HEIGHT 4
#define TEXTURE_LABEL_DATA 5
int GEOM_Engine::addTexture(int theDocID, int theWidth, int theHeight,
int GEOM_Engine::addTexture(int theWidth, int theHeight,
const Handle(TColStd_HArray1OfByte)& theTexture,
const TCollection_AsciiString& theFileName)
{
Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
Handle(TDocStd_Document) aDoc = GetDocument();
Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
// NPAL18604: use existing label to decrease memory usage,
// if this label has been freed (object deleted)
bool useExisting = false;
TDF_Label aChild;
if (_freeLabels.find(theDocID) != _freeLabels.end()) {
std::list<TDF_Label>& aFreeLabels = _freeLabels[theDocID];
if (!aFreeLabels.empty()) {
useExisting = true;
aChild = aFreeLabels.front();
aFreeLabels.pop_front();
}
if (!_freeLabels.empty()) {
useExisting = true;
aChild = _freeLabels.front();
_freeLabels.pop_front();
}
if (!useExisting) {
// create new label
@ -954,14 +885,14 @@ int GEOM_Engine::addTexture(int theDocID, int theWidth, int theHeight,
return aTextureID;
}
Handle(TColStd_HArray1OfByte) GEOM_Engine::getTexture(int theDocID, int theTextureID,
Handle(TColStd_HArray1OfByte) GEOM_Engine::getTexture(int theTextureID,
int& theWidth, int& theHeight,
TCollection_AsciiString& theFileName)
{
Handle(TColStd_HArray1OfByte) anArray;
theWidth = theHeight = 0;
Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
Handle(TDocStd_Document) aDoc = GetDocument();
TDF_ChildIterator anIterator(aDoc->Main(), Standard_True);
bool found = false;
@ -995,11 +926,11 @@ Handle(TColStd_HArray1OfByte) GEOM_Engine::getTexture(int theDocID, int theTextu
return anArray;
}
std::list<int> GEOM_Engine::getAllTextures(int theDocID)
std::list<int> GEOM_Engine::getAllTextures()
{
std::list<int> id_list;
Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
Handle(TDocStd_Document) aDoc = GetDocument();
TDF_ChildIterator anIterator(aDoc->Main(), Standard_True);
for (; anIterator.More(); anIterator.Next()) {
@ -1014,17 +945,6 @@ std::list<int> GEOM_Engine::getAllTextures(int theDocID)
return id_list;
}
void GEOM_Engine::DocumentModified(const int theDocId, const bool isModified)
{
if (isModified) _mapModifiedDocs.Add(theDocId);
else _mapModifiedDocs.Remove(theDocId);
}
bool GEOM_Engine::DocumentModified(const int theDocId)
{
return _mapModifiedDocs.Contains(theDocId);
}
//===========================================================================
// Internal functions
//===========================================================================
@ -1665,12 +1585,11 @@ void ReplaceEntriesByNames (TCollection_AsciiString& theScript,
* AddObjectColors: Add color to objects
*/
//=============================================================================
void AddObjectColors (int theDocID,
TCollection_AsciiString& theScript,
void AddObjectColors (TCollection_AsciiString& theScript,
const TSting2ObjDataMap& theEntry2ObjData)
{
GEOM_Engine* engine = GEOM_Engine::GetEngine();
Handle(TDocStd_Document) aDoc = engine->GetDocument(theDocID);
Handle(TDocStd_Document) aDoc = engine->GetDocument();
TSting2ObjDataMap::const_iterator anEntryToNameIt;
for (anEntryToNameIt = theEntry2ObjData.begin();
@ -1774,10 +1693,10 @@ static TCollection_AsciiString pack_data (const Handle(TColStd_HArray1OfByte)& a
return stream;
}
void AddTextures (int theDocID, TCollection_AsciiString& theScript)
void AddTextures (TCollection_AsciiString& theScript)
{
GEOM_Engine* engine = GEOM_Engine::GetEngine();
std::list<int> allTextures = engine->getAllTextures(theDocID);
std::list<int> allTextures = engine->getAllTextures();
std::list<int>::const_iterator it;
if (allTextures.size() > 0) {
@ -1788,7 +1707,7 @@ void AddTextures (int theDocID, TCollection_AsciiString& theScript)
Standard_Integer aWidth, aHeight;
TCollection_AsciiString aFileName;
Handle(TColStd_HArray1OfByte) aTexture =
engine->getTexture(theDocID, *it, aWidth, aHeight, aFileName);
engine->getTexture(*it, aWidth, aHeight, aFileName);
if (aWidth > 0 && aHeight > 0 && !aTexture.IsNull() && aTexture->Length() > 0 ) {
TCollection_AsciiString aCommand = "\n\t";
aCommand += "texture_map["; aCommand += *it; aCommand += "] = ";

View File

@ -99,53 +99,48 @@ class GEOM_Engine
Standard_EXPORT static GEOM_Engine* GetEngine();
//Returns the OCAF document by its ID, if document doesn't exists it will be created
Standard_EXPORT Handle(TDocStd_Document) GetDocument(int theDocID, bool force=true);
//Returns the ID of the given OCAF document
Standard_EXPORT int GetDocID(Handle(TDocStd_Document) theDocument);
Standard_EXPORT Handle(TDocStd_Document) GetDocument(bool force=true);
//Returns the OCAF appliaction
Standard_EXPORT Handle(TDocStd_Application) GetApplication() { return _OCAFApp; }
//Returns a pointer to GEOM_BaseObject defined by a document and the entry
Standard_EXPORT Handle(GEOM_BaseObject) GetObject(int theDocID,
const char* theEntry,
Standard_EXPORT Handle(GEOM_BaseObject) GetObject(const char* theEntry,
bool force=true);
//Adds a new object of the type theType in the OCAF document
Standard_EXPORT Handle(GEOM_BaseObject) AddBaseObject(int theDocID, int theType);
Standard_EXPORT Handle(GEOM_BaseObject) AddBaseObject(int theType);
//Adds a new object of the type theType in the OCAF document
Standard_EXPORT Handle(GEOM_Object) AddObject(int theDocID, int theType);
Standard_EXPORT Handle(GEOM_Object) AddObject(int theType);
//Removes the object from the OCAF document
Standard_EXPORT bool RemoveObject(Handle(GEOM_BaseObject)& theObject);
//Saves the OCAF document with ID = theDocID with file with name theFileName
Standard_EXPORT bool Save(int theDocID, const char* theFileName);
//Saves the OCAF document with file with name theFileName
Standard_EXPORT bool Save(const char* theFileName);
//Loads the OCAF document into the application and assigns to it an ID = theDocID
Standard_EXPORT bool Load(int theDocID, const char* theFileName);
//Loads the OCAF document into the application
Standard_EXPORT bool Load(const char* theFileName);
//Closes the document with ID = theDocID
Standard_EXPORT void Close(int theDocID);
//Closes the document
Standard_EXPORT void Close();
//Sets the number of Undos (default value = 10)
Standard_EXPORT void SetUndoLimit(int theLimit) { _UndoLimit = theLimit; }
//Applies an Undo to document with ID = theDocID
Standard_EXPORT void Undo(int theDocID);
//Applies an Undo to document
Standard_EXPORT void Undo();
//Applies an Redo to document with ID = theDocID
Standard_EXPORT void Redo(int theDocID);
//Applies an Redo to document
Standard_EXPORT void Redo();
//Adds a new sub-shape object of the MainShape object
Standard_EXPORT Handle(GEOM_Object) AddSubShape(Handle(GEOM_Object) theMainShape,
Handle(TColStd_HArray1OfInteger) theIndices,
bool isStandaloneOperation = false);
Standard_EXPORT TCollection_AsciiString DumpPython(int theDocID,
std::vector<TObjectData>& theObjectData,
Standard_EXPORT TCollection_AsciiString DumpPython(std::vector<TObjectData>& theObjectData,
TVariablesList theVariables,
bool isPublished,
bool isMultiFile,
@ -155,15 +150,15 @@ class GEOM_Engine
Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) GetAllDumpNames() const;
Standard_EXPORT int addTexture(int theDocID, int theWidth, int theHeight,
Standard_EXPORT int addTexture(int theWidth, int theHeight,
const Handle(TColStd_HArray1OfByte)& theTexture,
const TCollection_AsciiString& theFileName = "");
Standard_EXPORT Handle(TColStd_HArray1OfByte) getTexture(int theDocID, int theTextureID,
Standard_EXPORT Handle(TColStd_HArray1OfByte) getTexture(int theTextureID,
int& theWidth, int& theHeight,
TCollection_AsciiString& theFileName);
Standard_EXPORT std::list<int> getAllTextures(int theDocID);
Standard_EXPORT std::list<int> getAllTextures();
static const Standard_GUID& GetTextureGUID();
@ -171,25 +166,20 @@ class GEOM_Engine
const TCollection_AsciiString& anEntry,
Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
Standard_EXPORT void DocumentModified(const int theDocId, const bool isModified);
Standard_EXPORT bool DocumentModified(const int theDocId);
protected:
Standard_EXPORT static void SetEngine(GEOM_Engine* theEngine);
private:
Handle(GEOM_Application) _OCAFApp;
TColStd_DataMapOfIntegerTransient _mapIDDocument;
TColStd_MapOfInteger _mapModifiedDocs; // keeps the identifiers of the modified document ids
Handle(TDocStd_Document) _document;
int _UndoLimit;
GEOM_DataMapOfAsciiStringTransient _objects;
Resource_DataMapOfAsciiStringAsciiString _studyEntry2NameMap;
TFreeLabelsList _freeLabels;
std::list<TDF_Label> _freeLabels;
};
#endif

View File

@ -364,7 +364,7 @@ Handle(GEOM_FieldStep) GEOM_Field::AddStep(const int stepID, const int stamp)
if(anEngine == NULL) return NULL;
step = Handle(GEOM_FieldStep)::DownCast
( anEngine->AddBaseObject( GetDocID(),GEOM_FIELD_STEP_OBJTYPE ));
( anEngine->AddBaseObject( GEOM_FIELD_STEP_OBJTYPE ));
if ( step.IsNull())
return step;

View File

@ -38,8 +38,8 @@
*/
//=============================================================================
GEOM_IOperations::GEOM_IOperations(GEOM_Engine* theEngine, int theDocID)
: _engine(theEngine), _docID(theDocID)
GEOM_IOperations::GEOM_IOperations(GEOM_Engine* theEngine)
: _engine(theEngine)
{
_solver = new GEOM_Solver(theEngine);
}
@ -64,7 +64,7 @@ GEOM_IOperations::~GEOM_IOperations()
//=============================================================================
void GEOM_IOperations::StartOperation()
{
Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID);
Handle(TDocStd_Document) aDoc = _engine->GetDocument();
if(aDoc->GetUndoLimit() > 0)
aDoc->NewCommand();
}
@ -76,10 +76,9 @@ void GEOM_IOperations::StartOperation()
//=============================================================================
void GEOM_IOperations::FinishOperation()
{
Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID);
Handle(TDocStd_Document) aDoc = _engine->GetDocument();
if(aDoc->GetUndoLimit() > 0)
aDoc->CommitCommand();
_engine->DocumentModified(_docID, true);
}
//=============================================================================
@ -89,7 +88,7 @@ void GEOM_IOperations::FinishOperation()
//=============================================================================
void GEOM_IOperations::AbortOperation()
{
Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID);
Handle(TDocStd_Document) aDoc = _engine->GetDocument();
aDoc->AbortCommand();
}

View File

@ -39,7 +39,7 @@
class GEOM_IOperations
{
public:
Standard_EXPORT GEOM_IOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT GEOM_IOperations(GEOM_Engine* theEngine);
Standard_EXPORT ~GEOM_IOperations();
//Starts a new operation (opens a tansaction)
@ -73,15 +73,11 @@ class GEOM_IOperations
//Return a pointer to Solver associated with this operation interface
Standard_EXPORT GEOM_Solver* GetSolver() { return _solver; }
//Returns an ID of the OCAF document where this operation stores the data
Standard_EXPORT int GetDocID() { return _docID; }
private:
TCollection_AsciiString _errorCode;
GEOM_Engine* _engine;
GEOM_Solver* _solver;
int _docID;
};

View File

@ -34,7 +34,7 @@
* Update
*/
//=============================================================================
bool GEOM_Solver::Update(int theDocID, TDF_LabelSequence& theSeq)
bool GEOM_Solver::Update(TDF_LabelSequence& theSeq)
{
return false;
}

View File

@ -35,9 +35,9 @@ class GEOM_Solver
Standard_EXPORT GEOM_Solver(GEOM_Engine* theEngine) :_engine(theEngine) {}
Standard_EXPORT ~GEOM_Solver() {}
//Update the values of all GEOM_Object in the document theDocID, theSeq will contain a list of touched labels
//Update the values of all GEOM_Object in the document, theSeq will contain a list of touched labels
//Note: not Implemented
Standard_EXPORT bool Update(int theDocID, TDF_LabelSequence& theSeq);
Standard_EXPORT bool Update(TDF_LabelSequence& theSeq);
//Updates a value of theObject, theSeq will contain a list of touched labels
//Note: not implemented

View File

@ -704,7 +704,7 @@ QString GEOMBase_Helper::getEntry( GEOM::GEOM_Object_ptr object ) const
GEOM_Displayer* GEOMBase_Helper::getDisplayer()
{
if ( !myDisplayer )
myDisplayer = new GEOM_Displayer( getStudy() );
myDisplayer = new GEOM_Displayer();
return myDisplayer;
}

View File

@ -50,10 +50,9 @@
#include <QHash>
GEOMGUI_TextTreeWdg::GEOMGUI_TextTreeWdg( SalomeApp_Application* app )
: myDisplayer(NULL)
{
myStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
myDisplayer = GEOM_Displayer( myStudy );
myDisplayer = GEOM_Displayer();
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
myVisibleIcon = QIcon( resMgr->loadPixmap( "SUIT", tr( "ICON_DATAOBJ_VISIBLE" ) ) );

View File

@ -459,15 +459,12 @@ static std::string getName( GEOM::GEOM_BaseObject_ptr object )
* Constructor
*/
//=================================================================
GEOM_Displayer::GEOM_Displayer( SalomeApp_Study* st )
GEOM_Displayer::GEOM_Displayer()
{
if( st )
myApp = dynamic_cast<SalomeApp_Application*>( st->application() );
else
myApp = 0;
SUIT_Session* session = SUIT_Session::session();
myApp = dynamic_cast<SalomeApp_Application*>( session->activeApplication() );
/* Shading Color */
SUIT_Session* session = SUIT_Session::session();
SUIT_ResourceMgr* resMgr = session->resourceMgr();
QColor col = resMgr->colorValue( "Geometry", "shading_color", QColor( 255, 0, 0 ) );
@ -779,7 +776,7 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
int aMgrId = !anIO.IsNull() ? getViewManagerId( myViewFrame ) : -1;
// get presentation properties
PropMap propMap = getObjectProperties( study, entry, myViewFrame );
PropMap propMap = getObjectProperties( entry, myViewFrame );
// Temporary staff: vertex must be infinite for correct visualization
AISShape->SetInfiniteState( myShape.Infinite() ); // || myShape.ShapeType() == TopAbs_VERTEX // VSR: 05/04/2010: Fix 20668 (Fit All for points & lines)
@ -921,14 +918,14 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
aImagePath = GetTexture().c_str();
if ( ! entry.isEmpty() ) {
// check that study is active
SalomeApp_Study* study = getActiveStudy();
SalomeApp_Study* study = getStudy();
if ( study ) {
// Store the texture in object properties for next displays
study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::Texture ), QString( GetTexture().c_str() ) );
study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::DisplayMode ), 3 );
// Update propeties map
propMap = getObjectProperties( study, entry, myViewFrame );
propMap = getObjectProperties( entry, myViewFrame );
}
}
}
@ -986,7 +983,7 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
int textureId = aList[0].toInt();
Standard_Integer aWidth, aHeight;
Handle(TColStd_HArray1OfByte) aTexture =
GeometryGUI::getTexture( study, textureId, aWidth, aHeight );
GeometryGUI::getTexture( textureId, aWidth, aHeight );
if ( !aTexture.IsNull() ) {
Handle(Prs3d_PointAspect) aTextureAspect =
new Prs3d_PointAspect( HasColor() ?
@ -1049,7 +1046,7 @@ void GEOM_Displayer::updateActorProperties( GEOM_Actor* actor, bool create )
int aMgrId = !anIO.IsNull() ? getViewManagerId( myViewFrame ) : -1;
// get presentation properties
PropMap propMap = getObjectProperties( study, entry, myViewFrame );
PropMap propMap = getObjectProperties( entry, myViewFrame );
QColor c;
/////////////////////////////////////////////////////////////////////////
@ -1738,49 +1735,43 @@ SALOME_Prs* GEOM_Displayer::buildPresentation( const QString& entry,
// set interactive object
setIO( theIO );
// Find SOBject (because shape should be published previously)
SUIT_Session* session = SUIT_Session::session();
SUIT_Application* app = session->activeApplication();
if ( app )
if ( getStudy() )
{
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
if ( study )
_PTR(SObject) SO ( getStudy()->studyDS()->FindObjectID( theIO->getEntry() ) );
if ( SO )
{
_PTR(SObject) SO ( study->studyDS()->FindObjectID( theIO->getEntry() ) );
if ( SO )
// get CORBA reference to data object
CORBA::Object_var object = GeometryGUI::ClientSObjectToObject(SO);
if ( !CORBA::is_nil( object ) )
{
// get CORBA reference to data object
CORBA::Object_var object = GeometryGUI::ClientSObjectToObject(SO);
if ( !CORBA::is_nil( object ) )
// downcast to GEOM base object
GEOM::GEOM_BaseObject_var GeomBaseObject = GEOM::GEOM_BaseObject::_narrow( object );
if ( !GeomBaseObject->_is_nil() )
{
// downcast to GEOM base object
GEOM::GEOM_BaseObject_var GeomBaseObject = GEOM::GEOM_BaseObject::_narrow( object );
if ( !GeomBaseObject->_is_nil() )
myType = GeomBaseObject->GetType();
// downcast to GEOM object
GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( GeomBaseObject );
if ( myType == GEOM_FIELD_STEP )
{
myType = GeomBaseObject->GetType();
// downcast to GEOM object
GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( GeomBaseObject );
if ( myType == GEOM_FIELD_STEP )
// get the GEOM object from the field's shape
GEOM::GEOM_FieldStep_var GeomFieldStep = GEOM::GEOM_FieldStep::_narrow( GeomBaseObject );
if ( !GeomFieldStep->_is_nil() )
{
// get the GEOM object from the field's shape
GEOM::GEOM_FieldStep_var GeomFieldStep = GEOM::GEOM_FieldStep::_narrow( GeomBaseObject );
if ( !GeomFieldStep->_is_nil() )
{
GEOM::GEOM_Field_var GeomField = GeomFieldStep->GetField();
if ( !GeomField->_is_nil() )
GeomObject = GeomField->GetShape();
}
// read the field step information
readFieldStepInfo( GeomFieldStep );
GEOM::GEOM_Field_var GeomField = GeomFieldStep->GetField();
if ( !GeomField->_is_nil() )
GeomObject = GeomField->GetShape();
}
if ( !GeomObject->_is_nil() )
{
theIO->setName( GeomObject->GetName() );
// finally set shape
setShape( GEOM_Client::get_client().GetShape( GeometryGUI::GetGeomGen(), GeomObject ) );
}
// read the field step information
readFieldStepInfo( GeomFieldStep );
}
if ( !GeomObject->_is_nil() )
{
theIO->setName( GeomObject->GetName() );
// finally set shape
setShape( GEOM_Client::get_client().GetShape( GeometryGUI::GetGeomGen(), GeomObject ) );
}
}
}
@ -2459,21 +2450,20 @@ SALOMEDS::Color GEOM_Displayer::getUniqueColor( const QList<SALOMEDS::Color>& th
return aSColor;
}
PropMap GEOM_Displayer::getObjectProperties( SalomeApp_Study* study,
const QString& entry,
PropMap GEOM_Displayer::getObjectProperties( const QString& entry,
SALOME_View* view )
{
// get default properties for the explicitly specified default view type
PropMap propMap = GEOM_Displayer::getDefaultPropertyMap();
if ( study && view ) {
if ( getStudy() && view ) {
SUIT_ViewModel* viewModel = dynamic_cast<SUIT_ViewModel*>( view );
SUIT_ViewManager* viewMgr = ( viewModel != 0 ) ? viewModel->getViewManager() : 0;
int viewId = ( viewMgr != 0 ) ? viewMgr->getGlobalId() : -1;
if ( viewModel && viewId != -1 ) {
// get properties from the study
PropMap storedMap = study->getObjectProperties( viewId, entry );
PropMap storedMap = getStudy()->getObjectProperties( viewId, entry );
// overwrite default properties from stored ones (that are specified)
for ( int prop = GEOM::Visibility; prop <= GEOM::LastProperty; prop++ ) {
if ( storedMap.contains( GEOM::propertyName( (GEOM::Property)prop ) ) )
@ -2493,7 +2483,7 @@ PropMap GEOM_Displayer::getObjectProperties( SalomeApp_Study* study,
if ( !entry.isEmpty() ) {
// get CORBA reference to geom object
_PTR(SObject) SO( study->studyDS()->FindObjectID( entry.toStdString() ) );
_PTR(SObject) SO( getStudy()->studyDS()->FindObjectID( entry.toStdString() ) );
if ( SO ) {
CORBA::Object_var object = GeometryGUI::ClientSObjectToObject( SO );
if ( !CORBA::is_nil( object ) ) {
@ -2691,16 +2681,9 @@ SALOMEDS::Color GEOM_Displayer::getColor(GEOM::GEOM_Object_var theGeomObject, bo
void GEOM_Displayer::EraseWithChildren(const Handle(SALOME_InteractiveObject)& theIO,
const bool eraseOnlyChildren) {
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
if ( !app )
return;
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
if ( !appStudy )
return;
LightApp_DataObject* parent = appStudy->findObjectByEntry(theIO->getEntry());
const bool eraseOnlyChildren)
{
LightApp_DataObject* parent = getStudy()->findObjectByEntry(theIO->getEntry());
if( !parent)
return;
@ -2708,7 +2691,7 @@ void GEOM_Displayer::EraseWithChildren(const Handle(SALOME_InteractiveObject)& t
// Erase from all views
QList<SALOME_View*> views;
SALOME_View* view;
ViewManagerList vmans = app->viewManagers();
ViewManagerList vmans = myApp->viewManagers();
SUIT_ViewManager* vman;
foreach ( vman, vmans ) {
SUIT_ViewModel* vmod = vman->getViewModel();
@ -2974,10 +2957,6 @@ Standard_Boolean GEOM_Displayer::FindColor( const Standard_Real aValue,
void GEOM_Displayer::UpdateColorScale( const bool theIsRedisplayFieldSteps, const bool updateViewer )
{
SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
if( !aStudy )
return;
SOCC_Viewer* aViewModel = dynamic_cast<SOCC_Viewer*>( GetActiveView() );
if( !aViewModel )
return;
@ -3092,14 +3071,14 @@ void GEOM_Displayer::UpdateColorScale( const bool theIsRedisplayFieldSteps, cons
if( theIsRedisplayFieldSteps )
{
_PTR(Study) aStudyDS = aStudy->studyDS();
_PTR(Study) aStudyDS = getStudy()->studyDS();
QList<SUIT_ViewManager*> vmList;
myApp->viewManagers( vmList );
for( QList<SUIT_ViewManager*>::Iterator vmIt = vmList.begin(); vmIt != vmList.end(); vmIt++ )
{
if( SUIT_ViewManager* aViewManager = *vmIt )
{
const ObjMap& anObjects = aStudy->getObjectProperties( aViewManager->getGlobalId() );
const ObjMap& anObjects = getStudy()->getObjectProperties( aViewManager->getGlobalId() );
for( ObjMap::ConstIterator objIt = anObjects.begin(); objIt != anObjects.end(); objIt++ )
{
_PTR(SObject) aSObj( aStudyDS->FindObjectID( objIt.key().toLatin1().constData() ) );

View File

@ -76,7 +76,7 @@ class GEOMGUI_EXPORT GEOM_Displayer : public LightApp_Displayer
public:
/* Constructor */
GEOM_Displayer( SalomeApp_Study* app );
GEOM_Displayer();
/* Destructor */
virtual ~GEOM_Displayer();
@ -264,7 +264,7 @@ protected:
void updateActorProperties( GEOM_Actor*, bool );
void updateDimensions( const Handle(SALOME_InteractiveObject)&, SALOME_OCCPrs*, const gp_Ax3& );
PropMap getObjectProperties( SalomeApp_Study*, const QString&, SALOME_View* = 0 );
PropMap getObjectProperties( const QString&, SALOME_View* = 0 );
PropMap getDefaultPropertyMap();
/* Methods for reading the field step information */

View File

@ -2094,7 +2094,7 @@ void GeometryGUI::onAutoBringToFront()
SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( getApp()->activeStudy() );
if (!appStudy) return;
GEOM_Displayer displayer( appStudy );
GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@ -2137,11 +2137,8 @@ void GeometryGUI::onAutoBringToFront()
void GeometryGUI::updateFieldColorScale()
{
if( SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) )
{
GEOM_Displayer aDisplayer( aStudy );
aDisplayer.UpdateColorScale();
}
GEOM_Displayer aDisplayer;
aDisplayer.UpdateColorScale();
}
QString GeometryGUI::engineIOR() const
@ -2688,12 +2685,9 @@ void GeometryGUI::preferencesChanged( const QString& section, const QString& par
param == QString("scalar_bar_height") ||
param == QString("scalar_bar_text_height") ||
param == QString("scalar_bar_nb_intervals")) {
if( SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) )
{
GEOM_Displayer aDisplayer( aStudy );
bool anIsRedisplayFieldSteps = param == QString("scalar_bar_nb_intervals");
aDisplayer.UpdateColorScale( anIsRedisplayFieldSteps, true );
}
GEOM_Displayer aDisplayer;
bool anIsRedisplayFieldSteps = param == QString("scalar_bar_nb_intervals");
aDisplayer.UpdateColorScale( anIsRedisplayFieldSteps, true );
}
else if ( param == QString("dimensions_color") ||
param == QString("dimensions_line_width") ||
@ -2711,13 +2705,7 @@ void GeometryGUI::preferencesChanged( const QString& section, const QString& par
return;
}
SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() );
if ( !aStudy )
{
return;
}
GEOM_Displayer aDisplayer( aStudy );
GEOM_Displayer aDisplayer;
ViewManagerList aVMs;
anApp->viewManagers( OCCViewer_Viewer::Type(), aVMs );
@ -2760,7 +2748,7 @@ void GeometryGUI::preferencesChanged( const QString& section, const QString& par
LightApp_Displayer* GeometryGUI::displayer()
{
if ( !myDisplayer )
myDisplayer = new GEOM_Displayer( dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) );
myDisplayer = new GEOM_Displayer();
return myDisplayer;
}
@ -3135,7 +3123,7 @@ void UpdateNameMode( SalomeApp_Application* app )
bool isMode = false;
SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
SUIT_ViewWindow* viewWindow = app->desktop()->activeWindow();
GEOM_Displayer displayer( aStudy );
GEOM_Displayer displayer;
int aMgrId = viewWindow->getViewManager()->getGlobalId();
SALOME_View* window = displayer.GetActiveView();
@ -3238,11 +3226,14 @@ void GeometryGUI::ClearShapeBuffer( GEOM::GEOM_Object_ptr theObj )
TCollection_AsciiString asciiIOR( (char *)IOR.in() );
GEOM_Client::get_client().RemoveShapeFromBuffer( asciiIOR );
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( application()->activeStudy() );
if ( !appStudy )
return;
SalomeApp_Application* app =
dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication());
SalomeApp_Study* appStudy = app ? dynamic_cast<SalomeApp_Study*>( app->activeStudy() ) : 0;
_PTR(Study) aStudy = appStudy->studyDS();
if (!appStudy)
return;
_PTR(Study) aStudy = appStudy->studyDS();
if ( !aStudy )
return;

View File

@ -85,7 +85,7 @@ Standard_Integer GEOMImpl_ExportDriver::Execute(LOGBOOK& log) const
if (aFileName.IsEmpty() || aFormatName.IsEmpty() || aLibName.IsEmpty())
return 0;
if( !GEOMImpl_IECallBack::GetCallBack( aFormatName )->Export( GetDocID(), obj, aFileName, aFormatName ) );
if( !GEOMImpl_IECallBack::GetCallBack( aFormatName )->Export( obj, aFileName, aFormatName ) );
return 0;
#if OCC_VERSION_MAJOR < 7

View File

@ -93,7 +93,6 @@
GEOMImpl_Gen::GEOMImpl_Gen()
{
MESSAGE("GEOMImpl_Gen::GEOMImpl_Gen");
_mapOfBasicOperations.clear();
// Basic elements
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PointDriver::GetID(), new GEOMImpl_PointDriver());
@ -182,57 +181,19 @@ GEOMImpl_Gen::~GEOMImpl_Gen()
{
MESSAGE("GEOMImpl_Gen::~GEOMImpl_Gen");
std::map<int, GEOMImpl_IBasicOperations*>::iterator aBasicIter = _mapOfBasicOperations.begin();
for (; aBasicIter != _mapOfBasicOperations.end(); aBasicIter++)
delete (*aBasicIter).second;
std::map<int, GEOMImpl_ITransformOperations*>::iterator aTransformIter = _mapOfTransformOperations.begin();
for (; aTransformIter != _mapOfTransformOperations.end(); aTransformIter++)
delete (*aTransformIter).second;
std::map<int, GEOMImpl_I3DPrimOperations*>::iterator a3DPrimIter = _mapOf3DPrimOperations.begin();
for (; a3DPrimIter != _mapOf3DPrimOperations.end(); a3DPrimIter++)
delete (*a3DPrimIter).second;
std::map<int, GEOMImpl_IShapesOperations*>::iterator aShapesIter = _mapOfShapesOperations.begin();
for (; aShapesIter != _mapOfShapesOperations.end(); aShapesIter++)
delete (*aShapesIter).second;
std::map<int, GEOMImpl_IBlocksOperations*>::iterator aBlocksIter = _mapOfBlocksOperations.begin();
for (; aBlocksIter != _mapOfBlocksOperations.end(); aBlocksIter++)
delete (*aBlocksIter).second;
std::map<int, GEOMImpl_IBooleanOperations*>::iterator aBooleanIter = _mapOfBooleanOperations.begin();
for (; aBooleanIter != _mapOfBooleanOperations.end(); aBooleanIter++)
delete (*aBooleanIter).second;
std::map<int, GEOMImpl_IHealingOperations*>::iterator aHealingIter = _mapOfHealingOperations.begin();
for (; aHealingIter != _mapOfHealingOperations.end(); aHealingIter++)
delete (*aHealingIter).second;
std::map<int, GEOMImpl_ICurvesOperations*>::iterator aCurvesIter = _mapOfCurvesOperations.begin();
for (; aCurvesIter != _mapOfCurvesOperations.end(); aCurvesIter++)
delete (*aCurvesIter).second;
std::map<int, GEOMImpl_ILocalOperations*>::iterator aLocalIter = _mapOfLocalOperations.begin();
for (; aLocalIter != _mapOfLocalOperations.end(); aLocalIter++)
delete (*aLocalIter).second;
std::map<int, GEOMImpl_IInsertOperations*>::iterator aInsertIter = _mapOfInsertOperations.begin();
for (; aInsertIter != _mapOfInsertOperations.end(); aInsertIter++)
delete (*aInsertIter).second;
std::map<int, GEOMImpl_IMeasureOperations*>::iterator aMeasureIter = _mapOfMeasureOperations.begin();
for (; aMeasureIter != _mapOfMeasureOperations.end(); aMeasureIter++)
delete (*aMeasureIter).second;
std::map<int, GEOMImpl_IGroupOperations*>::iterator aGroupIter = _mapOfGroupOperations.begin();
for (; aGroupIter != _mapOfGroupOperations.end(); aGroupIter++)
delete (*aGroupIter).second;
std::map<int, GEOMImpl_IFieldOperations*>::iterator aFieldIter = _mapOfFieldOperations.begin();
for (; aFieldIter != _mapOfFieldOperations.end(); aFieldIter++)
delete (*aFieldIter).second;
delete _BasicOperations;
delete _TransformOperations;
delete _3DPrimOperations;
delete _ShapesOperations;
delete _BlocksOperations;
delete _BooleanOperations;
delete _HealingOperations;
delete _CurvesOperations;
delete _LocalOperations;
delete _InsertOperations;
delete _MeasureOperations;
delete _GroupOperations;
delete _FieldOperations;
}
//=============================================================================
@ -240,13 +201,9 @@ GEOMImpl_Gen::~GEOMImpl_Gen()
* GetIBasicOperations
*/
//=============================================================================
GEOMImpl_IBasicOperations* GEOMImpl_Gen::GetIBasicOperations(int theDocID)
GEOMImpl_IBasicOperations* GEOMImpl_Gen::GetIBasicOperations()
{
if(_mapOfBasicOperations.find(theDocID) == _mapOfBasicOperations.end()) {
_mapOfBasicOperations[theDocID] = new GEOMImpl_IBasicOperations(this, theDocID);
}
return _mapOfBasicOperations[theDocID];
return _BasicOperations;
}
//=============================================================================
@ -254,13 +211,9 @@ GEOMImpl_IBasicOperations* GEOMImpl_Gen::GetIBasicOperations(int theDocID)
* GetITransformOperations
*/
//=============================================================================
GEOMImpl_ITransformOperations* GEOMImpl_Gen::GetITransformOperations(int theDocID)
GEOMImpl_ITransformOperations* GEOMImpl_Gen::GetITransformOperations()
{
if(_mapOfTransformOperations.find(theDocID) == _mapOfTransformOperations.end()) {
_mapOfTransformOperations[theDocID] = new GEOMImpl_ITransformOperations(this, theDocID);
}
return _mapOfTransformOperations[theDocID];
return _TransformOperations;
}
//=============================================================================
@ -268,13 +221,9 @@ GEOMImpl_ITransformOperations* GEOMImpl_Gen::GetITransformOperations(int theDocI
* GetIBooleanOperations
*/
//=============================================================================
GEOMImpl_IBooleanOperations* GEOMImpl_Gen::GetIBooleanOperations(int theDocID)
GEOMImpl_IBooleanOperations* GEOMImpl_Gen::GetIBooleanOperations()
{
if(_mapOfBooleanOperations.find(theDocID) == _mapOfBooleanOperations.end()) {
_mapOfBooleanOperations[theDocID] = new GEOMImpl_IBooleanOperations(this, theDocID);
}
return _mapOfBooleanOperations[theDocID];
return _BooleanOperations;
}
//=============================================================================
@ -282,13 +231,9 @@ GEOMImpl_IBooleanOperations* GEOMImpl_Gen::GetIBooleanOperations(int theDocID)
* GetIHealingOperations
*/
//=============================================================================
GEOMImpl_IHealingOperations* GEOMImpl_Gen::GetIHealingOperations(int theDocID)
GEOMImpl_IHealingOperations* GEOMImpl_Gen::GetIHealingOperations()
{
if(_mapOfHealingOperations.find(theDocID) == _mapOfHealingOperations.end()) {
_mapOfHealingOperations[theDocID] = new GEOMImpl_IHealingOperations(this, theDocID);
}
return _mapOfHealingOperations[theDocID];
return _HealingOperations;
}
//=============================================================================
@ -296,13 +241,9 @@ GEOMImpl_IHealingOperations* GEOMImpl_Gen::GetIHealingOperations(int theDocID)
* GetI3DPrimOperations
*/
//=============================================================================
GEOMImpl_I3DPrimOperations* GEOMImpl_Gen::GetI3DPrimOperations(int theDocID)
GEOMImpl_I3DPrimOperations* GEOMImpl_Gen::GetI3DPrimOperations()
{
if(_mapOf3DPrimOperations.find(theDocID) == _mapOf3DPrimOperations.end()) {
_mapOf3DPrimOperations[theDocID] = new GEOMImpl_I3DPrimOperations(this, theDocID);
}
return _mapOf3DPrimOperations[theDocID];
return _3DPrimOperations;
}
//=============================================================================
@ -310,13 +251,9 @@ GEOMImpl_I3DPrimOperations* GEOMImpl_Gen::GetI3DPrimOperations(int theDocID)
* GetIShapesOperations
*/
//=============================================================================
GEOMImpl_IShapesOperations* GEOMImpl_Gen::GetIShapesOperations(int theDocID)
GEOMImpl_IShapesOperations* GEOMImpl_Gen::GetIShapesOperations()
{
if(_mapOfShapesOperations.find(theDocID) == _mapOfShapesOperations.end()) {
_mapOfShapesOperations[theDocID] = new GEOMImpl_IShapesOperations(this, theDocID);
}
return _mapOfShapesOperations[theDocID];
return _ShapesOperations;
}
//=============================================================================
@ -324,13 +261,9 @@ GEOMImpl_IShapesOperations* GEOMImpl_Gen::GetIShapesOperations(int theDocID)
* GetIBlocksOperations
*/
//=============================================================================
GEOMImpl_IBlocksOperations* GEOMImpl_Gen::GetIBlocksOperations(int theDocID)
GEOMImpl_IBlocksOperations* GEOMImpl_Gen::GetIBlocksOperations()
{
if(_mapOfBlocksOperations.find(theDocID) == _mapOfBlocksOperations.end()) {
_mapOfBlocksOperations[theDocID] = new GEOMImpl_IBlocksOperations(this, theDocID);
}
return _mapOfBlocksOperations[theDocID];
return _BlocksOperations;
}
//=============================================================================
@ -338,13 +271,9 @@ GEOMImpl_IBlocksOperations* GEOMImpl_Gen::GetIBlocksOperations(int theDocID)
* GetICurvesOperations
*/
//=============================================================================
GEOMImpl_ICurvesOperations* GEOMImpl_Gen::GetICurvesOperations(int theDocID)
GEOMImpl_ICurvesOperations* GEOMImpl_Gen::GetICurvesOperations()
{
if(_mapOfCurvesOperations.find(theDocID) == _mapOfCurvesOperations.end()) {
_mapOfCurvesOperations[theDocID] = new GEOMImpl_ICurvesOperations(this, theDocID);
}
return _mapOfCurvesOperations[theDocID];
return _CurvesOperations;
}
//=============================================================================
@ -352,13 +281,9 @@ GEOMImpl_ICurvesOperations* GEOMImpl_Gen::GetICurvesOperations(int theDocID)
* GetILocalOperations
*/
//=============================================================================
GEOMImpl_ILocalOperations* GEOMImpl_Gen::GetILocalOperations(int theDocID)
GEOMImpl_ILocalOperations* GEOMImpl_Gen::GetILocalOperations()
{
if(_mapOfLocalOperations.find(theDocID) == _mapOfLocalOperations.end()) {
_mapOfLocalOperations[theDocID] = new GEOMImpl_ILocalOperations(this, theDocID);
}
return _mapOfLocalOperations[theDocID];
return _LocalOperations;
}
//=============================================================================
@ -366,13 +291,9 @@ GEOMImpl_ILocalOperations* GEOMImpl_Gen::GetILocalOperations(int theDocID)
* GetIInsertOperations
*/
//=============================================================================
GEOMImpl_IInsertOperations* GEOMImpl_Gen::GetIInsertOperations(int theDocID)
GEOMImpl_IInsertOperations* GEOMImpl_Gen::GetIInsertOperations()
{
if(_mapOfInsertOperations.find(theDocID) == _mapOfInsertOperations.end()) {
_mapOfInsertOperations[theDocID] = new GEOMImpl_IInsertOperations(this, theDocID);
}
return _mapOfInsertOperations[theDocID];
return _InsertOperations;
}
//=============================================================================
@ -380,13 +301,9 @@ GEOMImpl_IInsertOperations* GEOMImpl_Gen::GetIInsertOperations(int theDocID)
* GetIMeasureOperations
*/
//=============================================================================
GEOMImpl_IMeasureOperations* GEOMImpl_Gen::GetIMeasureOperations(int theDocID)
GEOMImpl_IMeasureOperations* GEOMImpl_Gen::GetIMeasureOperations()
{
if(_mapOfMeasureOperations.find(theDocID) == _mapOfMeasureOperations.end()) {
_mapOfMeasureOperations[theDocID] = new GEOMImpl_IMeasureOperations(this, theDocID);
}
return _mapOfMeasureOperations[theDocID];
return _MeasureOperations;
}
//=============================================================================
@ -394,13 +311,9 @@ GEOMImpl_IMeasureOperations* GEOMImpl_Gen::GetIMeasureOperations(int theDocID)
* GetIGroupOperations
*/
//=============================================================================
GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations(int theDocID)
GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations()
{
if(_mapOfGroupOperations.find(theDocID) == _mapOfGroupOperations.end()) {
_mapOfGroupOperations[theDocID] = new GEOMImpl_IGroupOperations(this, theDocID);
}
return _mapOfGroupOperations[theDocID];
return _GroupOperations;
}
//=============================================================================
@ -408,11 +321,7 @@ GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations(int theDocID)
* GetIFieldOperations
*/
//=============================================================================
GEOMImpl_IFieldOperations* GEOMImpl_Gen::GetIFieldOperations(int theDocID)
GEOMImpl_IFieldOperations* GEOMImpl_Gen::GetIFieldOperations()
{
if(_mapOfFieldOperations.find(theDocID) == _mapOfFieldOperations.end()) {
_mapOfFieldOperations[theDocID] = new GEOMImpl_IFieldOperations(this, theDocID);
}
return _mapOfFieldOperations[theDocID];
return _FieldOperations;
}

View File

@ -48,47 +48,47 @@ class GEOMIMPL_EXPORT GEOMImpl_Gen : public GEOM_Engine
GEOMImpl_Gen();
~GEOMImpl_Gen();
GEOMImpl_IBasicOperations* GetIBasicOperations(int theDocID);
GEOMImpl_IBasicOperations* GetIBasicOperations();
GEOMImpl_ITransformOperations* GetITransformOperations(int theDocID);
GEOMImpl_ITransformOperations* GetITransformOperations();
GEOMImpl_I3DPrimOperations* GetI3DPrimOperations(int theDocID);
GEOMImpl_I3DPrimOperations* GetI3DPrimOperations();
GEOMImpl_IShapesOperations* GetIShapesOperations(int theDocID);
GEOMImpl_IShapesOperations* GetIShapesOperations();
GEOMImpl_IBlocksOperations* GetIBlocksOperations(int theDocID);
GEOMImpl_IBlocksOperations* GetIBlocksOperations();
GEOMImpl_IMeasureOperations* GetIMeasureOperations(int theDocID);
GEOMImpl_IMeasureOperations* GetIMeasureOperations();
GEOMImpl_IBooleanOperations* GetIBooleanOperations(int theDocID);
GEOMImpl_IBooleanOperations* GetIBooleanOperations();
GEOMImpl_ICurvesOperations* GetICurvesOperations(int theDocID);
GEOMImpl_ICurvesOperations* GetICurvesOperations();
GEOMImpl_ILocalOperations* GetILocalOperations(int theDocID);
GEOMImpl_ILocalOperations* GetILocalOperations();
GEOMImpl_IInsertOperations* GetIInsertOperations(int theDocID);
GEOMImpl_IInsertOperations* GetIInsertOperations();
GEOMImpl_IHealingOperations* GetIHealingOperations(int theDocID);
GEOMImpl_IHealingOperations* GetIHealingOperations();
GEOMImpl_IGroupOperations* GetIGroupOperations(int theDocID);
GEOMImpl_IGroupOperations* GetIGroupOperations();
GEOMImpl_IFieldOperations* GetIFieldOperations(int theDocID);
GEOMImpl_IFieldOperations* GetIFieldOperations();
private:
std::map <int, GEOMImpl_IBasicOperations*> _mapOfBasicOperations;
std::map <int, GEOMImpl_ITransformOperations*> _mapOfTransformOperations;
std::map <int, GEOMImpl_I3DPrimOperations*> _mapOf3DPrimOperations;
std::map <int, GEOMImpl_IShapesOperations*> _mapOfShapesOperations;
std::map <int, GEOMImpl_IBlocksOperations*> _mapOfBlocksOperations;
std::map <int, GEOMImpl_IBooleanOperations*> _mapOfBooleanOperations;
std::map <int, GEOMImpl_IHealingOperations*> _mapOfHealingOperations;
std::map <int, GEOMImpl_ICurvesOperations*> _mapOfCurvesOperations;
std::map <int, GEOMImpl_ILocalOperations*> _mapOfLocalOperations;
std::map <int, GEOMImpl_IInsertOperations*> _mapOfInsertOperations;
std::map <int, GEOMImpl_IMeasureOperations*> _mapOfMeasureOperations;
std::map <int, GEOMImpl_IGroupOperations*> _mapOfGroupOperations;
std::map <int, GEOMImpl_IFieldOperations*> _mapOfFieldOperations;
GEOMImpl_IBasicOperations* _BasicOperations;
GEOMImpl_ITransformOperations* _TransformOperations;
GEOMImpl_I3DPrimOperations* _3DPrimOperations;
GEOMImpl_IShapesOperations* _ShapesOperations;
GEOMImpl_IBlocksOperations* _BlocksOperations;
GEOMImpl_IBooleanOperations* _BooleanOperations;
GEOMImpl_IHealingOperations* _HealingOperations;
GEOMImpl_ICurvesOperations* _CurvesOperations;
GEOMImpl_ILocalOperations* _LocalOperations;
GEOMImpl_IInsertOperations* _InsertOperations;
GEOMImpl_IMeasureOperations* _MeasureOperations;
GEOMImpl_IGroupOperations* _GroupOperations;
GEOMImpl_IFieldOperations* _FieldOperations;
};
#endif

View File

@ -85,11 +85,11 @@
* constructor:
*/
//=============================================================================
GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations (GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations (GEOM_Engine* theEngine)
: GEOM_IOperations(theEngine)
{
MESSAGE("GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations");
myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine(), GetDocID());
myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine());
}
//=============================================================================
@ -114,7 +114,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeBoxDXDYDZ (double theDX, dou
SetErrorCode(KO);
//Add a new Box object
Handle(GEOM_Object) aBox = GetEngine()->AddObject(GetDocID(), GEOM_BOX);
Handle(GEOM_Object) aBox = GetEngine()->AddObject(GEOM_BOX);
//Add a new Box function with DX_DY_DZ parameters
Handle(GEOM_Function) aFunction = aBox->AddFunction(GEOMImpl_BoxDriver::GetID(), BOX_DX_DY_DZ);
@ -165,7 +165,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeBoxTwoPnt (Handle(GEOM_Objec
if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
//Add a new Box object
Handle(GEOM_Object) aBox = GetEngine()->AddObject(GetDocID(), GEOM_BOX);
Handle(GEOM_Object) aBox = GetEngine()->AddObject(GEOM_BOX);
//Add a new Box function for creation a box relatively to two points
Handle(GEOM_Function) aFunction = aBox->AddFunction(GEOMImpl_BoxDriver::GetID(), BOX_TWO_PNT);
@ -218,7 +218,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFaceHW (double theH, double
if (theH == 0 || theW == 0) return NULL;
//Add a new Face object
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
//Add a new Box function for creation a box relatively to two points
Handle(GEOM_Function) aFunction = aFace->AddFunction(GEOMImpl_FaceDriver::GetID(), FACE_H_W);
@ -268,7 +268,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFaceObjHW (Handle(GEOM_Objec
if (theObj.IsNull()) return NULL;
//Add a new Face object
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
//Add a new Box function for creation a box relatively to two points
Handle(GEOM_Function) aFunction = aFace->AddFunction(GEOMImpl_FaceDriver::GetID(), FACE_OBJ_H_W);
@ -323,7 +323,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDiskPntVecR
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
//Add a new Disk object
Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GEOM_FACE);
//Add a new Disk function for creation a disk relatively to point and vector
Handle(GEOM_Function) aFunction =
@ -380,7 +380,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDiskThreePnt (Handle(GEOM_Ob
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
//Add a new Disk object
Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GEOM_FACE);
//Add a new Disk function for creation a disk relatively to three points
Handle(GEOM_Function) aFunction =
@ -436,7 +436,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDiskR (double theR, int theO
if (theR == 0 ) return NULL;
//Add a new Disk object
Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GEOM_FACE);
//Add a new Box function for creation a box relatively to two points
Handle(GEOM_Function) aFunction = aDisk->AddFunction(GEOMImpl_DiskDriver::GetID(), DISK_R);
@ -482,7 +482,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderRH (double theR, dou
SetErrorCode(KO);
//Add a new Cylinder object
Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
//Add a new Cylinder function with R and H parameters
Handle(GEOM_Function) aFunction = aCylinder->AddFunction(GEOMImpl_CylinderDriver::GetID(), CYLINDER_R_H);
@ -528,7 +528,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderRHA (double theR, do
SetErrorCode(KO);
//Add a new Cylinder object
Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
//Add a new Cylinder function with R and H parameters
Handle(GEOM_Function) aFunction = aCylinder->AddFunction(GEOMImpl_CylinderDriver::GetID(), CYLINDER_R_H_A);
@ -579,7 +579,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderPntVecRH (Handle(GEO
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
//Add a new Cylinder object
Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
//Add a new Cylinder function for creation a cylinder relatively to point and vector
Handle(GEOM_Function) aFunction =
@ -637,7 +637,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderPntVecRHA (Handle(GE
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
//Add a new Cylinder object
Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
//Add a new Cylinder function for creation a cylinder relatively to point and vector
Handle(GEOM_Function) aFunction =
@ -694,7 +694,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeConeR1R2H (double theR1, dou
SetErrorCode(KO);
//Add a new Cone object
Handle(GEOM_Object) aCone = GetEngine()->AddObject(GetDocID(), GEOM_CONE);
Handle(GEOM_Object) aCone = GetEngine()->AddObject(GEOM_CONE);
//Add a new Cone function with R and H parameters
Handle(GEOM_Function) aFunction =
@ -748,7 +748,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeConePntVecR1R2H (Handle(GEOM
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
//Add a new Cone object
Handle(GEOM_Object) aCone = GetEngine()->AddObject(GetDocID(), GEOM_CONE);
Handle(GEOM_Object) aCone = GetEngine()->AddObject(GEOM_CONE);
//Add a new Cone function for creation a cone relatively to point and vector
Handle(GEOM_Function) aFunction =
@ -804,7 +804,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSphereR (double theR)
SetErrorCode(KO);
//Add a new Sphere object
Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GetDocID(), GEOM_SPHERE);
Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GEOM_SPHERE);
//Add a new Sphere function with R parameter
Handle(GEOM_Function) aFunction = aSphere->AddFunction(GEOMImpl_SphereDriver::GetID(), SPHERE_R);
@ -852,7 +852,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSpherePntR (Handle(GEOM_Obje
if (thePnt.IsNull()) return NULL;
//Add a new Point object
Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GetDocID(), GEOM_SPHERE);
Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GEOM_SPHERE);
//Add a new Sphere function for creation a sphere relatively to point
Handle(GEOM_Function) aFunction = aSphere->AddFunction(GEOMImpl_SphereDriver::GetID(), SPHERE_PNT_R);
@ -904,7 +904,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeTorusRR
SetErrorCode(KO);
//Add a new Torus object
Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_TORUS);
Handle(GEOM_Object) anEll = GetEngine()->AddObject(GEOM_TORUS);
//Add a new Torus function
Handle(GEOM_Function) aFunction =
@ -955,7 +955,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeTorusPntVecRR
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
//Add a new Torus object
Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_TORUS);
Handle(GEOM_Object) anEll = GetEngine()->AddObject(GEOM_TORUS);
//Add a new Torus function
Handle(GEOM_Function) aFunction =
@ -1014,7 +1014,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismVecH (Handle(GEOM_Objec
if (theBase.IsNull() || theVec.IsNull()) return NULL;
//Add a new Prism object
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
//Add a new Prism function for creation a Prism relatively to vector
Handle(GEOM_Function) aFunction =
@ -1077,7 +1077,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismVecH2Ways (Handle(GEOM_
if (theBase.IsNull() || theVec.IsNull()) return NULL;
//Add a new Prism object
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
//Add a new Prism function for creation a Prism relatively to vector
Handle(GEOM_Function) aFunction =
@ -1136,7 +1136,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismTwoPnt
if (theBase.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL;
//Add a new Prism object
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
//Add a new Prism function for creation a Prism relatively to two points
Handle(GEOM_Function) aFunction =
@ -1200,7 +1200,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismTwoPnt2Ways
if (theBase.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL;
//Add a new Prism object
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
//Add a new Prism function for creation a Prism relatively to two points
Handle(GEOM_Function) aFunction =
@ -1259,7 +1259,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismDXDYDZ
if (theBase.IsNull()) return NULL;
//Add a new Prism object
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
//Add a new Prism function for creation a Prism by DXDYDZ
Handle(GEOM_Function) aFunction =
@ -1321,7 +1321,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismDXDYDZ2Ways
if (theBase.IsNull()) return NULL;
//Add a new Prism object
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
//Add a new Prism function for creation a Prism by DXDYDZ
Handle(GEOM_Function) aFunction =
@ -1381,12 +1381,12 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDraftPrism
if ( theFuse )
{
//Add a new Extruded Boss object
aPrism = GetEngine()->AddObject(GetDocID(), GEOM_EXTRUDED_BOSS);
aPrism = GetEngine()->AddObject(GEOM_EXTRUDED_BOSS);
}
else
{
//Add a new Extruded Cut object
aPrism = GetEngine()->AddObject(GetDocID(), GEOM_EXTRUDED_CUT);
aPrism = GetEngine()->AddObject(GEOM_EXTRUDED_CUT);
}
//Add a new Prism function for the creation of a Draft Prism feature
@ -1464,7 +1464,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_I3DPrimOperations::MakePipe
if (theBase.IsNull() || thePath.IsNull()) return NULL;
//Add a new Pipe object
Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GEOM_PIPE);
//Add a new Pipe function
Handle(GEOM_Function) aFunction =
@ -1541,7 +1541,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeRevolutionAxisAngle (Handle(
if (theBase.IsNull() || theAxis.IsNull()) return NULL;
//Add a new Revolution object
Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GetDocID(), GEOM_REVOLUTION);
Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GEOM_REVOLUTION);
//Add a new Revolution function for creation a revolution relatively to axis
Handle(GEOM_Function) aFunction =
@ -1597,7 +1597,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeRevolutionAxisAngle2Ways
if (theBase.IsNull() || theAxis.IsNull()) return NULL;
//Add a new Revolution object
Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GetDocID(), GEOM_REVOLUTION);
Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GEOM_REVOLUTION);
//Add a new Revolution function for creation a revolution relatively to axis
Handle(GEOM_Function) aFunction =
@ -1659,7 +1659,7 @@ GEOMImpl_I3DPrimOperations::MakeFilling (std::list< Handle(GEOM_Object)> & theCo
return NULL;
}
//Add a new Filling object
Handle(GEOM_Object) aFilling = GetEngine()->AddObject(GetDocID(), GEOM_FILLING);
Handle(GEOM_Object) aFilling = GetEngine()->AddObject(GEOM_FILLING);
//Add a new Filling function for creation a filling from a compound
Handle(GEOM_Function) aFunction = aFilling->AddFunction(GEOMImpl_FillingDriver::GetID(), BASIC_FILLING);
@ -1735,7 +1735,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeThruSections(
return anObj;
//Add a new ThruSections object
Handle(GEOM_Object) aThruSect = GetEngine()->AddObject(GetDocID(), GEOM_THRUSECTIONS);
Handle(GEOM_Object) aThruSect = GetEngine()->AddObject(GEOM_THRUSECTIONS);
//Add a new ThruSections function
@ -1840,7 +1840,7 @@ Handle(TColStd_HSequenceOfTransient)
Standard_Integer nbLocs = (theLocations.IsNull() ? 0 :theLocations->Length());
//Add a new Pipe object
Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GEOM_PIPE);
//Add a new Pipe function
@ -2016,7 +2016,7 @@ Handle(TColStd_HSequenceOfTransient)
Standard_Integer nbLocs = (theLocations.IsNull() ? 0 :theLocations->Length());
//Add a new Pipe object
Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GEOM_PIPE);
//Add a new Pipe function
@ -2205,7 +2205,7 @@ Handle(TColStd_HSequenceOfTransient)
Standard_Integer nbLocs = (theLocations.IsNull() ? 0 :theLocations->Length());
//Add a new Pipe object
Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GEOM_PIPE);
//Add a new Pipe function
@ -2348,7 +2348,7 @@ Handle(TColStd_HSequenceOfTransient)
if (theBase.IsNull() || thePath.IsNull() || theVec.IsNull()) return NULL;
//Add a new Pipe object
Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GEOM_PIPE);
//Add a new Pipe function
Handle(GEOM_Function) aFunction =
@ -2438,7 +2438,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeThickening
if (isCopy)
{
//Add a new Copy object
aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
aCopy = GetEngine()->AddObject(theObject->GetType());
aFunction = aCopy->AddFunction(GEOMImpl_OffsetDriver::GetID(), OFFSET_THICKENING_COPY);
}
else
@ -2521,7 +2521,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::RestorePath (Handle(GEOM_Object)
if (theShape.IsNull() || theBase1.IsNull() || theBase2.IsNull()) return NULL;
// Add a new Path object
Handle(GEOM_Object) aPath = GetEngine()->AddObject(GetDocID(), GEOM_PIPE_PATH);
Handle(GEOM_Object) aPath = GetEngine()->AddObject(GEOM_PIPE_PATH);
// Add a new Path function
Handle(GEOM_Function) aFunction =
@ -2586,7 +2586,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::RestorePath
return NULL;
// Add a new Path object
Handle(GEOM_Object) aPath = GetEngine()->AddObject(GetDocID(), GEOM_PIPE_PATH);
Handle(GEOM_Object) aPath = GetEngine()->AddObject(GEOM_PIPE_PATH);
// Add a new Path function
Handle(GEOM_Function) aFunction =

View File

@ -36,7 +36,7 @@ class GEOMImpl_IPipe;
class GEOMImpl_I3DPrimOperations : public GEOM_IOperations {
public:
Standard_EXPORT GEOMImpl_I3DPrimOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT GEOMImpl_I3DPrimOperations(GEOM_Engine* theEngine);
Standard_EXPORT ~GEOMImpl_I3DPrimOperations();
Standard_EXPORT Handle(GEOM_Object) MakeBoxDXDYDZ (double theDX, double theDY, double theDZ);

View File

@ -39,12 +39,12 @@ typedef NCollection_DataMap< TCollection_ExtendedString, NCollection_List<TopoDS
* constructor
*/
//=============================================================================
GEOMImpl_IBaseIEOperations::GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
GEOMImpl_IBaseIEOperations::GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine)
: GEOM_IOperations(theEngine)
{
myGroupOperations = new GEOMImpl_IGroupOperations( GetEngine(), GetDocID() );
myFieldOperations = new GEOMImpl_IFieldOperations( GetEngine(), GetDocID() );
myShapesOperations = new GEOMImpl_IShapesOperations( GetEngine(), GetDocID() );
myGroupOperations = new GEOMImpl_IGroupOperations( GetEngine() );
myFieldOperations = new GEOMImpl_IFieldOperations( GetEngine() );
myShapesOperations = new GEOMImpl_IShapesOperations( GetEngine() );
}
//=============================================================================

View File

@ -33,7 +33,7 @@ class GEOMImpl_IShapesOperations;
class GEOMImpl_IBaseIEOperations : public GEOM_IOperations
{
public:
Standard_EXPORT GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine);
Standard_EXPORT ~GEOMImpl_IBaseIEOperations();
protected:

View File

@ -59,8 +59,8 @@
* constructor:
*/
//=============================================================================
GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations(GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations(GEOM_Engine* theEngine)
: GEOM_IOperations(theEngine)
{
MESSAGE("GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations");
}
@ -87,7 +87,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointXYZ
SetErrorCode(KO);
//Add a new Point object
Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GEOM_POINT);
//Add a new Point function with XYZ parameters
Handle(GEOM_Function) aFunction =
@ -138,7 +138,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointWithReference
if (theReference.IsNull()) return NULL;
//Add a new Point object
Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GEOM_POINT);
//Add a new Point function for creation a point relativley another point
Handle(GEOM_Function) aFunction = aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_XYZ_REF);
@ -197,7 +197,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::makePointOnGeom
if (theGeomObj.IsNull()) return NULL;
//Add a new Point object
Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GEOM_POINT);
//Add a new Point function for creation a point relativley another point
int fType = POINT_CURVE_PAR;
@ -403,7 +403,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnLinesIntersection
if (theLine1.IsNull() || theLine2.IsNull()) return NULL;
//Add a new Point object
Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GEOM_POINT);
//Add a new Point function for creation a point relativley another point
Handle(GEOM_Function) aFunction = aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_LINES_INTERSECTION);
@ -455,7 +455,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeTangentOnCurve
if (theCurve.IsNull()) return NULL;
//Add a new Vector object
Handle(GEOM_Object) aVec = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
Handle(GEOM_Object) aVec = GetEngine()->AddObject(GEOM_VECTOR);
//Add a new Point function for creation a point relativley another point
Handle(GEOM_Function) aFunction = aVec->AddFunction(GEOMImpl_VectorDriver::GetID(), VECTOR_TANGENT_CURVE_PAR);
@ -504,7 +504,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeVectorDXDYDZ
SetErrorCode(KO);
//Add a new Vector object
Handle(GEOM_Object) aVector = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
Handle(GEOM_Object) aVector = GetEngine()->AddObject(GEOM_VECTOR);
//Add a new Vector function with DXDYDZ parameters
Handle(GEOM_Function) aFunction =
@ -555,7 +555,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeVectorTwoPnt
if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
//Add a new Vector object
Handle(GEOM_Object) aVector = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
Handle(GEOM_Object) aVector = GetEngine()->AddObject(GEOM_VECTOR);
//Add a new Vector function
Handle(GEOM_Function) aFunction =
@ -609,7 +609,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLine
if (thePnt.IsNull() || theDir.IsNull()) return NULL;
//Add a new Line object
Handle(GEOM_Object) aLine = GetEngine()->AddObject(GetDocID(), GEOM_LINE);
Handle(GEOM_Object) aLine = GetEngine()->AddObject(GEOM_LINE);
//Add a new Line function
Handle(GEOM_Function) aFunction =
@ -662,7 +662,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLineTwoPnt
if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
//Add a new Line object
Handle(GEOM_Object) aLine = GetEngine()->AddObject(GetDocID(), GEOM_LINE);
Handle(GEOM_Object) aLine = GetEngine()->AddObject(GEOM_LINE);
//Add a new Line function
Handle(GEOM_Function) aFunction =
@ -715,7 +715,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLineTwoFaces
if (theFace1.IsNull() || theFace2.IsNull()) return NULL;
//Add a new Line object
Handle(GEOM_Object) aLine = GetEngine()->AddObject(GetDocID(), GEOM_LINE);
Handle(GEOM_Object) aLine = GetEngine()->AddObject(GEOM_LINE);
//Add a new Line function
Handle(GEOM_Function) aFunction =
@ -769,7 +769,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneThreePnt
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
//Add a new Plane object
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
//Add a new Plane function
Handle(GEOM_Function) aFunction =
@ -826,7 +826,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlanePntVec
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
//Add a new Plane object
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
//Add a new Plane function
Handle(GEOM_Function) aFunction =
@ -880,7 +880,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneFace
if (theFace.IsNull()) return NULL;
//Add a new Plane object
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
//Add a new Plane function
Handle(GEOM_Function) aFunction =
@ -933,7 +933,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlane2Vec
if (theVec1.IsNull() || theVec2.IsNull()) return NULL;
//Add a new Plane object
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
//Add a new Plane function
Handle(GEOM_Function) aFunction =
@ -985,7 +985,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneLCS
SetErrorCode(KO);
//Add a new Plane object
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
//Add a new Plane function
Handle(GEOM_Function) aFunction =
@ -1040,7 +1040,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeMarker
SetErrorCode(KO);
//Add a new Marker object
Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GetDocID(), GEOM_MARKER);
Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GEOM_MARKER);
//Add a new Marker function
Handle(GEOM_Function) aFunction =
@ -1091,7 +1091,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeMarkerFromShape
SetErrorCode(KO);
//Add a new Marker object
Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GetDocID(), GEOM_MARKER);
Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GEOM_MARKER);
//Add a new Marker function
Handle(GEOM_Function) aFunction =
@ -1142,7 +1142,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeMarkerPntTwoVec
SetErrorCode(KO);
//Add a new Marker object
Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GetDocID(), GEOM_MARKER);
Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GEOM_MARKER);
//Add a new Marker function
Handle(GEOM_Function) aFunction =
@ -1201,7 +1201,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeTangentPlaneOnFace(const Hand
if (theFace.IsNull()) return NULL;
//Add a new Plane object
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
//Add a new Plane function
Handle(GEOM_Function) aFunction =

View File

@ -31,7 +31,7 @@
class GEOMImpl_IBasicOperations : public GEOM_IOperations {
public:
Standard_EXPORT GEOMImpl_IBasicOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT GEOMImpl_IBasicOperations(GEOM_Engine* theEngine);
Standard_EXPORT ~GEOMImpl_IBasicOperations();
// Point

View File

@ -249,8 +249,8 @@ static Standard_Boolean IsQuadrangle(const TopoDS_Face &theFace,
* constructor:
*/
//=============================================================================
GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations (GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations (GEOM_Engine* theEngine)
: GEOM_IOperations(theEngine)
{
MESSAGE("GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations");
}
@ -281,7 +281,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad
theEdge3.IsNull() || theEdge4.IsNull()) return NULL;
//Add a new Face object
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
//Add a new Face function
Handle(GEOM_Function) aFunction =
@ -342,7 +342,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad2Edges
if (theEdge1.IsNull() || theEdge2.IsNull()) return NULL;
//Add a new Face object
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
//Add a new Face function
Handle(GEOM_Function) aFunction =
@ -400,7 +400,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad4Vertices
thePnt3.IsNull() || thePnt4.IsNull()) return NULL;
//Add a new Face object
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
//Add a new Face function
Handle(GEOM_Function) aFunction =
@ -465,7 +465,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeHexa
theFace5.IsNull() || theFace6.IsNull()) return NULL;
//Add a new Solid object
Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GetDocID(), GEOM_BLOCK);
Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GEOM_BLOCK);
//Add a new Block function
Handle(GEOM_Function) aFunction =
@ -532,7 +532,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeHexa2Faces
if (theFace1.IsNull() || theFace2.IsNull()) return NULL;
//Add a new Solid object
Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GetDocID(), GEOM_BLOCK);
Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GEOM_BLOCK);
//Add a new Block function
Handle(GEOM_Function) aFunction =
@ -588,7 +588,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeBlockCompound
if (theCompound.IsNull()) return NULL;
//Add a new object
Handle(GEOM_Object) aBlockComp = GetEngine()->AddObject(GetDocID(), GEOM_COMPOUND);
Handle(GEOM_Object) aBlockComp = GetEngine()->AddObject(GEOM_COMPOUND);
//Add a new BlocksComp function
Handle(GEOM_Function) aFunction =
@ -2430,7 +2430,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::RemoveExtraEdges
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a function
Handle(GEOM_Function) aFunction =
@ -2482,7 +2482,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::UnionFaces
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a function
Handle(GEOM_Function) aFunction =
@ -2532,7 +2532,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::CheckAndImprove
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a function
Handle(GEOM_Function) aFunction =
@ -3091,7 +3091,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeMultiTransformation1D
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a translate function
Handle(GEOM_Function) aFunction =
@ -3150,7 +3150,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeMultiTransformation2D
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a translate function
Handle(GEOM_Function) aFunction =

View File

@ -36,7 +36,7 @@ class GEOM_Object;
class GEOMImpl_IBlocksOperations : public GEOM_IOperations {
public:
Standard_EXPORT GEOMImpl_IBlocksOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT GEOMImpl_IBlocksOperations(GEOM_Engine* theEngine);
Standard_EXPORT ~GEOMImpl_IBlocksOperations();
// Creation of blocks and block faces

View File

@ -49,8 +49,8 @@
* constructor:
*/
//=============================================================================
GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations (GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations (GEOM_Engine* theEngine)
: GEOM_IOperations(theEngine)
{
MESSAGE("GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations");
}
@ -82,7 +82,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeBoolean
if (theShape1.IsNull() || theShape2.IsNull()) return NULL;
//Add a new Boolean object
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
//Add a new Boolean function
Handle(GEOM_Function) aFunction;
@ -162,7 +162,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeFuse
if (theShape1.IsNull() || theShape2.IsNull()) return NULL;
//Add a new Boolean object
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
//Add a new Boolean function
Handle(GEOM_Function) aFunction =
@ -225,7 +225,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeFuseList
if (theShapes.IsNull()) return NULL;
//Add a new Boolean object
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
//Add a new Boolean function
Handle(GEOM_Function) aFunction =
@ -286,7 +286,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeCommonList
if (theShapes.IsNull()) return NULL;
//Add a new Boolean object
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
//Add a new Boolean function
Handle(GEOM_Function) aFunction =
@ -353,7 +353,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeCutList
if (theShapes.IsNull()) return NULL;
//Add a new Boolean object
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
//Add a new Boolean function
Handle(GEOM_Function) aFunction =
@ -429,7 +429,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition
SetErrorCode(KO);
//Add a new Partition object
Handle(GEOM_Object) aPartition = GetEngine()->AddObject(GetDocID(), GEOM_PARTITION);
Handle(GEOM_Object) aPartition = GetEngine()->AddObject(GEOM_PARTITION);
//Add a new Partition function
Handle(GEOM_Function) aFunction;
@ -565,7 +565,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeHalfPartition
if (theShape.IsNull() || thePlane.IsNull()) return NULL;
//Add a new Boolean object
Handle(GEOM_Object) aPart = GetEngine()->AddObject(GetDocID(), GEOM_PARTITION);
Handle(GEOM_Object) aPart = GetEngine()->AddObject(GEOM_PARTITION);
//Add a new Partition function
Handle(GEOM_Function) aFunction =

View File

@ -33,7 +33,7 @@ class GEOM_Object;
class GEOMImpl_IBooleanOperations : public GEOM_IOperations {
public:
Standard_EXPORT GEOMImpl_IBooleanOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT GEOMImpl_IBooleanOperations(GEOM_Engine* theEngine);
Standard_EXPORT ~GEOMImpl_IBooleanOperations();
Standard_EXPORT Handle(GEOM_Object) MakeBoolean

View File

@ -183,8 +183,8 @@ namespace
* constructor:
*/
//=============================================================================
GEOMImpl_ICurvesOperations::GEOMImpl_ICurvesOperations (GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
GEOMImpl_ICurvesOperations::GEOMImpl_ICurvesOperations (GEOM_Engine* theEngine)
: GEOM_IOperations(theEngine)
{
MESSAGE("GEOMImpl_ICurvesOperations::GEOMImpl_ICurvesOperations");
}
@ -214,7 +214,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCircleThreePnt (Handle(GEOM_
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
//Add a new Circle object
Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GetDocID(), GEOM_CIRCLE);
Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GEOM_CIRCLE);
//Add a new Circle function for creation a circle relatively to three points
Handle(GEOM_Function) aFunction =
@ -272,7 +272,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCircleCenter2Pnt (Handle(GEO
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
//Add a new Circle object
Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GetDocID(), GEOM_CIRCLE);
Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GEOM_CIRCLE);
//Add a new Circle function for creation a circle relatively to center and 2 points
Handle(GEOM_Function) aFunction =
@ -331,7 +331,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCirclePntVecR
//if (thePnt.IsNull() || theVec.IsNull()) return NULL;
//Add a new Circle object
Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GetDocID(), GEOM_CIRCLE);
Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GEOM_CIRCLE);
//Add a new Circle function for creation a circle relatively to point and vector
Handle(GEOM_Function) aFunction =
@ -397,7 +397,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeEllipse
//if (thePnt.IsNull() || theVec.IsNull()) return NULL;
//Add a new Ellipse object
Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_ELLIPSE);
Handle(GEOM_Object) anEll = GetEngine()->AddObject(GEOM_ELLIPSE);
//Add a new Ellipse function
Handle(GEOM_Function) aFunction =
@ -473,7 +473,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArc (Handle(GEOM_Object) the
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
//Add a new Circle Arc object
Handle(GEOM_Object) anArc = GetEngine()->AddObject(GetDocID(), GEOM_CIRC_ARC);
Handle(GEOM_Object) anArc = GetEngine()->AddObject(GEOM_CIRC_ARC);
//Add a new Circle Arc function
Handle(GEOM_Function) aFunction =
@ -531,7 +531,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArcCenter (Handle(GEOM_Objec
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
//Add a new Circle Arc object
Handle(GEOM_Object) anArc = GetEngine()->AddObject(GetDocID(), GEOM_CIRC_ARC);
Handle(GEOM_Object) anArc = GetEngine()->AddObject(GEOM_CIRC_ARC);
//Add a new Circle Arc function
Handle(GEOM_Function) aFunction =
@ -589,7 +589,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArcOfEllipse (Handle(GEOM_Ob
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
//Add a new Circle Arc object
Handle(GEOM_Object) anArc = GetEngine()->AddObject(GetDocID(), GEOM_ELLIPSE_ARC);
Handle(GEOM_Object) anArc = GetEngine()->AddObject(GEOM_ELLIPSE_ARC);
//Add a new Circle Arc function
Handle(GEOM_Function) aFunction =
@ -644,7 +644,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline (std::list<Handle(G
SetErrorCode(KO);
//Add a new Polyline object
Handle(GEOM_Object) aPolyline = GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE);
Handle(GEOM_Object) aPolyline = GetEngine()->AddObject(GEOM_POLYLINE);
//Add a new Polyline function for creation a polyline relatively to points set
Handle(GEOM_Function) aFunction =
@ -714,7 +714,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineBezier
SetErrorCode(KO);
//Add a new Spline object
Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GEOM_SPLINE);
//Add a new Spline function for creation a bezier curve relatively to points set
Handle(GEOM_Function) aFunction =
@ -784,7 +784,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolation
SetErrorCode(KO);
//Add a new Spline object
Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GEOM_SPLINE);
//Add a new Spline function for interpolation type
Handle(GEOM_Function) aFunction =
@ -855,7 +855,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolWithTangents
SetErrorCode(KO);
//Add a new Spline object
Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GEOM_SPLINE);
//Add a new Spline function for interpolation type
Handle(GEOM_Function) aFunction =
@ -1069,7 +1069,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCurveParametric
switch(theCurveType) {
case Polyline: {
//Add a new Polyline object
aCurve = GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE);
aCurve = GetEngine()->AddObject(GEOM_POLYLINE);
//Add a new Polyline function for creation a polyline relatively to points set
aFunction = aCurve->AddFunction(GEOMImpl_PolylineDriver::GetID(), POLYLINE_POINTS);
@ -1089,7 +1089,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCurveParametric
}
case Bezier: {
//Add a new Spline object
aCurve = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
aCurve = GetEngine()->AddObject(GEOM_SPLINE);
//Add a new Spline function for creation a bezier curve relatively to points set
aFunction =
aCurve->AddFunction(GEOMImpl_SplineDriver::GetID(), SPLINE_BEZIER);
@ -1108,7 +1108,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCurveParametric
}
case Interpolation: {
//Add a new Spline object
aCurve = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
aCurve = GetEngine()->AddObject(GEOM_SPLINE);
//Add a new Spline function for creation a bezier curve relatively to points set
aFunction = aCurve->AddFunction(GEOMImpl_SplineDriver::GetID(), SPLINE_INTERPOLATION);
@ -1185,7 +1185,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcher (const char* theCom
if (!theCommand || strcmp(theCommand, "") == 0) return NULL;
//Add a new Sketcher object
Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GetDocID(), GEOM_SKETCHER);
Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GEOM_SKETCHER);
//Add a new Sketcher function
Handle(GEOM_Function) aFunction =
@ -1248,7 +1248,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcherOnPlane
if (!theCommand || strcmp(theCommand, "") == 0) return NULL;
//Add a new Sketcher object
Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GetDocID(), GEOM_SKETCHER);
Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GEOM_SKETCHER);
//Add a new Sketcher function
Handle(GEOM_Function) aFunction =
@ -1301,7 +1301,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::Make3DSketcherCommand (const cha
if (!theCommand || strcmp(theCommand, "") == 0) return NULL;
//Add a new Sketcher object
Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GetDocID(), GEOM_3DSKETCHER);
Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GEOM_3DSKETCHER);
//Add a new Sketcher function
Handle(GEOM_Function) aFunction =
@ -1348,7 +1348,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::Make3DSketcher (std::list<double
SetErrorCode(KO);
//Add a new Sketcher object
Handle(GEOM_Object) a3DSketcher = GetEngine()->AddObject(GetDocID(), GEOM_3DSKETCHER);
Handle(GEOM_Object) a3DSketcher = GetEngine()->AddObject(GEOM_3DSKETCHER);
//Add a new Sketcher function
Handle(GEOM_Function) aFunction =
@ -1421,7 +1421,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeIsoline
//Add a new Spline object
Handle(GEOM_Object) anIsoline =
GetEngine()->AddObject(GetDocID(), GEOM_ISOLINE);
GetEngine()->AddObject(GEOM_ISOLINE);
//Add a new Spline function for interpolation type
Handle(GEOM_Function) aFunction =
@ -1490,7 +1490,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline2D
// Add a new Polyline object
Handle(GEOM_Object) aResult =
GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE2D);
GetEngine()->AddObject(GEOM_POLYLINE2D);
Handle(GEOM_Function) aFunction = aResult->AddFunction
(GEOMImpl_PolylineDriver::GetID(), POLYLINE2D_PLN_COORDS);
@ -1563,7 +1563,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline2DOnPlane
//Add a new Polyline object
Handle(GEOM_Object) aResult =
GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE2D);
GetEngine()->AddObject(GEOM_POLYLINE2D);
Handle(GEOM_Function) aFunction = aResult->AddFunction
(GEOMImpl_PolylineDriver::GetID(), POLYLINE2D_PLN_OBJECT);

View File

@ -38,7 +38,7 @@ class GEOMImpl_ICurvesOperations : public GEOM_IOperations {
enum CurveType { Polyline, Bezier, Interpolation };
Standard_EXPORT GEOMImpl_ICurvesOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT GEOMImpl_ICurvesOperations(GEOM_Engine* theEngine);
Standard_EXPORT ~GEOMImpl_ICurvesOperations();
Standard_EXPORT Handle(GEOM_Object) MakeCircleThreePnt (Handle(GEOM_Object) thePnt1,

View File

@ -56,8 +56,7 @@ GEOMImpl_Gen* GEOMImpl_IECallBack::GetEngine()
* Export
*/
//=============================================================================
bool GEOMImpl_IECallBack::Export( int /*theDocId*/,
const Handle(GEOM_Object) /*theOriginal*/,
bool GEOMImpl_IECallBack::Export( const Handle(GEOM_Object) /*theOriginal*/,
const TCollection_AsciiString& /*theFileName*/,
const TCollection_AsciiString& /*theFormatName*/ )
{
@ -70,8 +69,7 @@ bool GEOMImpl_IECallBack::Export( int /*theDocId*/,
*/
//=============================================================================
Handle(TColStd_HSequenceOfTransient)
GEOMImpl_IECallBack::Import( int /*theDocId*/,
const TCollection_AsciiString& /*theFormatName*/,
GEOMImpl_IECallBack::Import( const TCollection_AsciiString& /*theFormatName*/,
const TCollection_AsciiString& /*theFileName*/ )
{
return NULL;
@ -83,8 +81,7 @@ GEOMImpl_IECallBack::Import( int /*theDocId*/,
*/
//=============================================================================
TCollection_AsciiString
GEOMImpl_IECallBack::ReadValue( int /*theDocId*/,
const TCollection_AsciiString& /*theFileName*/,
GEOMImpl_IECallBack::ReadValue( const TCollection_AsciiString& /*theFileName*/,
const TCollection_AsciiString& /*theFormatName*/,
const TCollection_AsciiString& /*theParameterName*/ )
{

View File

@ -37,21 +37,18 @@ class GEOMImpl_IECallBack
Standard_EXPORT GEOMImpl_IECallBack();
Standard_EXPORT ~GEOMImpl_IECallBack();
Standard_EXPORT virtual bool Export( int theDocId,
const Handle(GEOM_Object) theOriginal,
Standard_EXPORT virtual bool Export( const Handle(GEOM_Object) theOriginal,
const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& theFormatName );
Standard_EXPORT virtual
Handle(TColStd_HSequenceOfTransient) Import( int theDocId,
const TCollection_AsciiString& theFormatName,
const TCollection_AsciiString& theFileName );
Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
const TCollection_AsciiString& theFileName );
Standard_EXPORT virtual
TCollection_AsciiString ReadValue( int theDocId,
const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& theFormatName,
const TCollection_AsciiString& theParameterName );
TCollection_AsciiString ReadValue( const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& theFormatName,
const TCollection_AsciiString& theParameterName );
Standard_EXPORT static void Register( const TCollection_AsciiString& theFormatName, GEOMImpl_IECallBack* theCallBack );

View File

@ -39,8 +39,8 @@
* constructor:
*/
//=============================================================================
GEOMImpl_IFieldOperations::GEOMImpl_IFieldOperations (GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
GEOMImpl_IFieldOperations::GEOMImpl_IFieldOperations (GEOM_Engine* theEngine)
: GEOM_IOperations(theEngine)
{
MESSAGE("GEOMImpl_IFieldOperations::GEOMImpl_IFieldOperations");
}
@ -96,7 +96,7 @@ CreateField( const Handle(GEOM_Object)& theShape,
// make a field
Handle(GEOM_Field) aField = Handle(GEOM_Field)::DownCast
( GetEngine()->AddBaseObject( GetDocID(), GEOM_FIELD ));
( GetEngine()->AddBaseObject( GEOM_FIELD ));
// set field data
aField->Init( theShape, theName, theType, theDimension, theComponentNames );
@ -142,7 +142,7 @@ int GEOMImpl_IFieldOperations::CountFields( const Handle(GEOM_Object)& theShape
for (; anIt.More(); anIt.Next()) {
TCollection_ExtendedString& anEntry = anIt.Value();
anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(GetDocID(), entry, false);
Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(entry, false);
nbFields += ( !anObj.IsNull() && anObj->IsKind(STANDARD_TYPE(GEOM_Field)) );
}
@ -178,7 +178,7 @@ GEOMImpl_IFieldOperations::GetFields( const Handle(GEOM_Object)& theShape )
for (; anIt.More(); anIt.Next()) {
TCollection_ExtendedString& anEntry = anIt.Value();
anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(GetDocID(), entry, false);
Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(entry, false);
if ( !anObj.IsNull() && anObj->IsKind(STANDARD_TYPE(GEOM_Field)) )
{
Handle(GEOM_Field) field = Handle(GEOM_Field)::DownCast( anObj );
@ -222,7 +222,7 @@ GEOMImpl_IFieldOperations::GetField( const Handle(GEOM_Object)& theShape,
for (; anIt.More(); anIt.Next()) {
TCollection_ExtendedString& anEntry = anIt.Value();
anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
field = Handle(GEOM_Field)::DownCast( GetEngine()->GetObject( GetDocID(), entry, false ));
field = Handle(GEOM_Field)::DownCast( GetEngine()->GetObject( entry, false ));
if ( !field.IsNull() && field->GetName() == theName ) {
SetErrorCode(OK);
break;

View File

@ -34,7 +34,7 @@ class GEOM_Object;
class GEOMImpl_IFieldOperations : public GEOM_IOperations {
public:
Standard_EXPORT GEOMImpl_IFieldOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT GEOMImpl_IFieldOperations(GEOM_Engine* theEngine);
Standard_EXPORT ~GEOMImpl_IFieldOperations();
Standard_EXPORT Handle(GEOM_Field)

View File

@ -53,8 +53,8 @@
* constructor:
*/
//=============================================================================
GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations (GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations (GEOM_Engine* theEngine)
: GEOM_IOperations(theEngine)
{
MESSAGE("GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations");
}

View File

@ -34,7 +34,7 @@
class GEOMImpl_IGroupOperations : public GEOM_IOperations {
public:
Standard_EXPORT GEOMImpl_IGroupOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT GEOMImpl_IGroupOperations(GEOM_Engine* theEngine);
Standard_EXPORT ~GEOMImpl_IGroupOperations();
Standard_EXPORT Handle(GEOM_Object) CreateGroup(Handle(GEOM_Object) theMainShape, TopAbs_ShapeEnum theShapeType);

View File

@ -60,8 +60,8 @@
* constructor:
*/
//=============================================================================
GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations (GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations (GEOM_Engine* theEngine)
: GEOM_IOperations(theEngine)
{
myModifStats = new ShHealOper_ModifStats;
MESSAGE("GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations");
@ -117,7 +117,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::ShapeProcess (Handle(GEOM_Objec
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
// Add a new object
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
//Add the function
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), SHAPE_PROCESS);
@ -334,7 +334,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::SuppressFaces
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
// Add a new object
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GEOM_COPY);
//Add the function
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), SUPPRESS_FACES);
@ -402,7 +402,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::CloseContour
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
// Add a new object
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
//Add the function
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), CLOSE_CONTOUR);
@ -471,7 +471,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::RemoveIntWires
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
// Add a new object
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
//Add the function
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), REMOVE_INT_WIRES);
@ -538,7 +538,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::FillHoles (Handle(GEOM_Object)
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
// Add a new object
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
//Add the function
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), FILL_HOLES);
@ -611,7 +611,7 @@ GEOMImpl_IHealingOperations::Sew (std::list<Handle(GEOM_Object)>& theObjects,
}
// Add a new object
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
//Add the function
int aFunctionType = (isAllowNonManifold ? SEWING_NON_MANIFOLD : SEWING);
@ -680,7 +680,7 @@ GEOMImpl_IHealingOperations::RemoveInternalFaces (std::list< Handle(GEOM_Object)
}
// Add a new object
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GEOM_COPY);
//Add the function
Handle(GEOM_Function)
@ -738,7 +738,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::DivideEdge (Handle(GEOM_Object)
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
// Add a new object
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
//Add the function
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), DIVIDE_EDGE);
@ -805,7 +805,7 @@ GEOMImpl_IHealingOperations::DivideEdgeByPoint (Handle(GEOM_Object)
}
// Add a new object
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
//Add the function
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), DIVIDE_EDGE_BY_POINT);
@ -860,7 +860,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::FuseCollinearEdgesWithinWire
if (theWire.IsNull()) return NULL;
// Add a new object
Handle(GEOM_Object) aRes = GetEngine()->AddObject(GetDocID(), theWire->GetType());
Handle(GEOM_Object) aRes = GetEngine()->AddObject(theWire->GetType());
// Add a new function
Handle(GEOM_Function) aFunction;
@ -973,7 +973,7 @@ bool GEOMImpl_IHealingOperations::GetFreeBoundary (Handle(TColStd_HSequenceOfTra
TopExp_Explorer anExp;
for ( anExp.Init( aClosed, TopAbs_WIRE ); anExp.More(); anExp.Next() )
{
anObj = GetEngine()->AddObject( GetDocID(), GEOM_FREE_BOUNDS );
anObj = GetEngine()->AddObject( GEOM_FREE_BOUNDS );
aFunction = anObj->AddFunction( GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF );
TopoDS_Shape aValueShape = anExp.Current();
aFunction->SetValue( aValueShape );
@ -981,7 +981,7 @@ bool GEOMImpl_IHealingOperations::GetFreeBoundary (Handle(TColStd_HSequenceOfTra
}
for ( anExp.Init( anOpen, TopAbs_WIRE ); anExp.More(); anExp.Next() )
{
anObj = GetEngine()->AddObject( GetDocID(), GEOM_FREE_BOUNDS );
anObj = GetEngine()->AddObject( GEOM_FREE_BOUNDS );
aFunction = anObj->AddFunction( GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF );
TopoDS_Shape aValueShape = anExp.Current();
aFunction->SetValue( aValueShape );
@ -1116,7 +1116,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::ChangeOrientationCopy (Handle(G
return NULL; //There is no function which creates an object to be processed
// Add a new object
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GEOM_COPY);
if (theObject->GetType() == GEOM_VECTOR) { // Mantis issue 21066
//Add the function
@ -1189,7 +1189,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::LimitTolerance (Handle(GEOM_Obj
return NULL; // There is no function which creates an object to be processed
// Add a new object
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), theObject->GetType());
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(theObject->GetType());
// Add the function
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), LIMIT_TOLERANCE);

View File

@ -37,7 +37,7 @@ class ShHealOper_ModifStats;
class GEOMImpl_IHealingOperations : public GEOM_IOperations {
public:
Standard_EXPORT GEOMImpl_IHealingOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT GEOMImpl_IHealingOperations(GEOM_Engine* theEngine);
Standard_EXPORT ~GEOMImpl_IHealingOperations();
// Apply Shape Processing to the selected Object

View File

@ -73,13 +73,13 @@
* constructor
*/
//=============================================================================
GEOMImpl_IInsertOperations::GEOMImpl_IInsertOperations(GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
GEOMImpl_IInsertOperations::GEOMImpl_IInsertOperations(GEOM_Engine* theEngine)
: GEOM_IOperations(theEngine)
{
MESSAGE("GEOMImpl_IInsertOperations::GEOMImpl_IInsertOperations");
myShapesOperations = new GEOMImpl_IShapesOperations(GetEngine(), GetDocID());
myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine(), GetDocID());
myFieldOperations = new GEOMImpl_IFieldOperations(GetEngine(), GetDocID());
myShapesOperations = new GEOMImpl_IShapesOperations(GetEngine());
myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine());
myFieldOperations = new GEOMImpl_IFieldOperations(GetEngine());
}
//=============================================================================
@ -107,7 +107,7 @@ Handle(GEOM_Object) GEOMImpl_IInsertOperations::MakeCopy (Handle(GEOM_Object) th
if (theOriginal.IsNull()) return NULL;
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a Copy function for creation a copy object
Handle(GEOM_Function) aFunction = aCopy->AddFunction(GEOMImpl_CopyDriver::GetID(), COPY_WITH_REF);
@ -157,7 +157,7 @@ void GEOMImpl_IInsertOperations::Export
if (theOriginal.IsNull()) return;
if ( !GEOMImpl_IECallBack::GetCallBack( theFormatName )->Export( GetDocID(), theOriginal, theFileName, theFormatName ) )
if ( !GEOMImpl_IECallBack::GetCallBack( theFormatName )->Export( theOriginal, theFileName, theFormatName ) )
return;
SetErrorCode(OK);
}
@ -176,7 +176,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IInsertOperations::Import
if (theFileName.IsEmpty() || theFormatName.IsEmpty()) return NULL;
Handle(TColStd_HSequenceOfTransient) aSeq =
GEOMImpl_IECallBack::GetCallBack( theFormatName )->Import( GetDocID(), theFormatName, theFileName );
GEOMImpl_IECallBack::GetCallBack( theFormatName )->Import( theFormatName, theFileName );
SetErrorCode(OK);
return aSeq;
}
@ -195,7 +195,7 @@ TCollection_AsciiString GEOMImpl_IInsertOperations::ReadValue
TCollection_AsciiString aValue;
if (theFileName.IsEmpty() || theFormatName.IsEmpty() || theParameterName.IsEmpty()) return aValue;
aValue = GEOMImpl_IECallBack::GetCallBack( theFormatName )->ReadValue( GetDocID(), theFileName, theFormatName, theParameterName );
aValue = GEOMImpl_IECallBack::GetCallBack( theFormatName )->ReadValue( theFileName, theFormatName, theParameterName );
SetErrorCode(OK);
return aValue;
@ -211,7 +211,7 @@ Handle(GEOM_Object) GEOMImpl_IInsertOperations::RestoreShape (std::istringstream
SetErrorCode(KO);
//Add a new result object
Handle(GEOM_Object) result = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) result = GetEngine()->AddObject(GEOM_COPY);
//Add a Copy function
Handle(GEOM_Function) aFunction = result->AddFunction(GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF);
@ -298,7 +298,7 @@ int GEOMImpl_IInsertOperations::LoadTexture(const TCollection_AsciiString& theTe
for (i = 1, bdit = bytedata.begin(); bdit != bytedata.end(); ++bdit, ++i)
aTexture->SetValue(i, (Standard_Byte)(*bdit));
int aTextureId = GetEngine()->addTexture(GetDocID(), lenbytes*8, lines.size(), aTexture, theTextureFile);
int aTextureId = GetEngine()->addTexture(lenbytes*8, lines.size(), aTexture, theTextureFile);
if (aTextureId > 0) SetErrorCode(OK);
return aTextureId;
}
@ -307,7 +307,7 @@ int GEOMImpl_IInsertOperations::AddTexture(int theWidth, int theHeight,
const Handle(TColStd_HArray1OfByte)& theTexture)
{
SetErrorCode(KO);
int aTextureId = GetEngine()->addTexture(GetDocID(), theWidth, theHeight, theTexture);
int aTextureId = GetEngine()->addTexture(theWidth, theHeight, theTexture);
if (aTextureId > 0) SetErrorCode(OK);
return aTextureId;
}
@ -325,7 +325,7 @@ Handle(TColStd_HArray1OfByte) GEOMImpl_IInsertOperations::GetTexture(int theText
if (theTextureId <= 0)
return aTexture;
aTexture = GetEngine()->getTexture(GetDocID(), theTextureId, theWidth, theHeight, aFileName);
aTexture = GetEngine()->getTexture(theTextureId, theWidth, theHeight, aFileName);
if (theWidth > 0 && theHeight > 0 && aTexture->Length() > 0) SetErrorCode(OK);
@ -335,7 +335,7 @@ Handle(TColStd_HArray1OfByte) GEOMImpl_IInsertOperations::GetTexture(int theText
std::list<int> GEOMImpl_IInsertOperations::GetAllTextures()
{
SetErrorCode(KO);
std::list<int> id_list = GetEngine()->getAllTextures(GetDocID());
std::list<int> id_list = GetEngine()->getAllTextures();
SetErrorCode(OK);
return id_list;
}
@ -359,7 +359,7 @@ bool GEOMImpl_IInsertOperations::TransferData
//Add a new Transfer Data object object
Handle(GEOM_Object) aTDObj =
GetEngine()->AddObject(GetDocID(), GEOM_TRANSFER_DATA);
GetEngine()->AddObject(GEOM_TRANSFER_DATA);
//Add a Transfer Data function for created object
Handle(GEOM_Function) aFunction =

View File

@ -56,7 +56,7 @@ class GEOMImpl_IInsertOperations : public GEOM_IOperations {
long myMaxNumber;
};
Standard_EXPORT GEOMImpl_IInsertOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT GEOMImpl_IInsertOperations(GEOM_Engine* theEngine);
Standard_EXPORT ~GEOMImpl_IInsertOperations();

View File

@ -67,8 +67,8 @@
* constructor:
*/
//=============================================================================
GEOMImpl_ILocalOperations::GEOMImpl_ILocalOperations (GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
GEOMImpl_ILocalOperations::GEOMImpl_ILocalOperations (GEOM_Engine* theEngine)
: GEOM_IOperations(theEngine)
{
MESSAGE("GEOMImpl_ILocalOperations::GEOMImpl_ILocalOperations");
}
@ -95,7 +95,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletAll
SetErrorCode(KO);
//Add a new Fillet object
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
//Add a new Fillet function
Handle(GEOM_Function) aFunction =
@ -146,7 +146,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdges
SetErrorCode(KO);
//Add a new Fillet object
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
//Add a new Fillet function
Handle(GEOM_Function) aFunction =
@ -213,7 +213,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdgesR1R2
SetErrorCode(KO);
//Add a new Fillet object
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
//Add a new Fillet function
Handle(GEOM_Function) aFunction =
@ -282,7 +282,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFaces
SetErrorCode(KO);
//Add a new Fillet object
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
//Add a new Fillet function
Handle(GEOM_Function) aFunction =
@ -349,7 +349,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFacesR1R2
SetErrorCode(KO);
//Add a new Fillet object
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
//Add a new Fillet function
Handle(GEOM_Function) aFunction =
@ -417,7 +417,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFillet2D
SetErrorCode(KO);
//Add a new Fillet object
Handle(GEOM_Object) aFillet2D = GetEngine()->AddObject(GetDocID(), GEOM_FILLET_2D);
Handle(GEOM_Object) aFillet2D = GetEngine()->AddObject(GEOM_FILLET_2D);
//Add a new Fillet function
Handle(GEOM_Function) aFunction =
@ -485,7 +485,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFillet1D
SetErrorCode(KO);
//Add a new Fillet object
Handle(GEOM_Object) aFillet1D = GetEngine()->AddObject(GetDocID(), GEOM_FILLET_1D);
Handle(GEOM_Object) aFillet1D = GetEngine()->AddObject(GEOM_FILLET_1D);
//Add a new Fillet function
Handle(GEOM_Function) aFunction =
@ -553,7 +553,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferAll (Handle(GEOM_Objec
SetErrorCode(KO);
//Add a new Chamfer object
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
//Add a new Chamfer function
Handle(GEOM_Function) aFunction =
@ -605,7 +605,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdge
SetErrorCode(KO);
//Add a new Chamfer object
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
//Add a new Chamfer function
Handle(GEOM_Function) aFunction =
@ -661,7 +661,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgeAD
SetErrorCode(KO);
//Add a new Chamfer object
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
//Add a new Chamfer function
Handle(GEOM_Function) aFunction =
@ -716,7 +716,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFaces
SetErrorCode(KO);
//Add a new Chamfer object
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
//Add a new Chamfer function
Handle(GEOM_Function) aFunction =
@ -785,7 +785,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFacesAD
SetErrorCode(KO);
//Add a new Chamfer object
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
//Add a new Chamfer function
Handle(GEOM_Function) aFunction =
@ -854,7 +854,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdges
SetErrorCode(KO);
//Add a new Chamfer object
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
//Add a new Chamfer function
Handle(GEOM_Function) aFunction =
@ -924,7 +924,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgesAD
SetErrorCode(KO);
//Add a new Chamfer object
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
//Add a new Chamfer function
Handle(GEOM_Function) aFunction =
@ -995,7 +995,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeArchimede (Handle(GEOM_Object
SetErrorCode(KO);
//Add a new Archimede object
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_ARCHIMEDE);
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_ARCHIMEDE);
//Add a new Archimede function
Handle(GEOM_Function) aFunction = aChamfer->AddFunction(GEOMImpl_ArchimedeDriver::GetID(), ARCHIMEDE_TYPE);
@ -1073,7 +1073,7 @@ Standard_Integer GEOMImpl_ILocalOperations::GetSubShapeIndex (Handle(GEOM_Object
if (aGen) {
GEOMImpl_IShapesOperations* anIShapesOperations =
aGen->GetIShapesOperations(GetDocID());
aGen->GetIShapesOperations();
anInd = anIShapesOperations->GetSubShapeIndex(theShape, theSubShape);
SetErrorCode(anIShapesOperations->GetErrorCode());
}

View File

@ -33,7 +33,7 @@
class GEOMImpl_ILocalOperations : public GEOM_IOperations {
public:
Standard_EXPORT GEOMImpl_ILocalOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT GEOMImpl_ILocalOperations(GEOM_Engine* theEngine);
Standard_EXPORT ~GEOMImpl_ILocalOperations();
Standard_EXPORT Handle(GEOM_Object) MakeFilletAll (Handle(GEOM_Object) theShape, double theR);

View File

@ -86,8 +86,8 @@
* Constructor
*/
//=============================================================================
GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations (GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations (GEOM_Engine* theEngine)
: GEOM_IOperations(theEngine)
{
MESSAGE("GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations");
}
@ -807,7 +807,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetCentreOfMass
if (theShape.IsNull()) return NULL;
//Add a new CentreOfMass object
Handle(GEOM_Object) aCDG = GetEngine()->AddObject(GetDocID(), GEOM_CDG);
Handle(GEOM_Object) aCDG = GetEngine()->AddObject(GEOM_CDG);
//Add a new CentreOfMass function
Handle(GEOM_Function) aFunction =
@ -862,7 +862,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetVertexByIndex
if (aRefShape.IsNull()) return NULL;
//Add a new Vertex object
Handle(GEOM_Object) aVertex = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
Handle(GEOM_Object) aVertex = GetEngine()->AddObject(GEOM_POINT);
//Add a function
Handle(GEOM_Function) aFunction =
@ -911,7 +911,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetNormal
if (theFace.IsNull()) return NULL;
//Add a new Normale object
Handle(GEOM_Object) aNorm = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
Handle(GEOM_Object) aNorm = GetEngine()->AddObject(GEOM_VECTOR);
//Add a new Normale function
Handle(GEOM_Function) aFunction =
@ -1152,7 +1152,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetBoundingBox
if (theShape.IsNull()) return NULL;
//Add a new BoundingBox object
Handle(GEOM_Object) aBnd = GetEngine()->AddObject(GetDocID(), GEOM_BOX);
Handle(GEOM_Object) aBnd = GetEngine()->AddObject(GEOM_BOX);
//Add a new BoundingBox function
const int aType = (precise ? BND_BOX_MEASURE_PRECISE : BND_BOX_MEASURE);

View File

@ -41,7 +41,7 @@ class GEOM_Object;
class GEOMImpl_IMeasureOperations : public GEOM_IOperations {
public:
Standard_EXPORT GEOMImpl_IMeasureOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT GEOMImpl_IMeasureOperations(GEOM_Engine* theEngine);
Standard_EXPORT ~GEOMImpl_IMeasureOperations();
enum ShapeKind {

View File

@ -168,8 +168,8 @@ namespace
* constructor:
*/
//=============================================================================
GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations (GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations (GEOM_Engine* theEngine)
: GEOM_IOperations(theEngine)
{
MESSAGE("GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations");
}
@ -197,7 +197,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeEdge
if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
//Add a new Edge object
Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GEOM_EDGE);
//Add a new Vector function
Handle(GEOM_Function) aFunction =
@ -252,7 +252,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeEdgeOnCurveByLength
if (theRefCurve.IsNull()) return NULL;
//Add a new Edge object
Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GEOM_EDGE);
//Add a new Vector function
Handle(GEOM_Function) aFunction =
@ -311,7 +311,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeEdgeWire
if (theWire.IsNull()) return NULL;
//Add a new Edge object
Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GEOM_EDGE);
//Add a new Vector function
Handle(GEOM_Function) aFunction =
@ -377,7 +377,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeWire
SetErrorCode(KO);
//Add a new object
Handle(GEOM_Object) aWire = GetEngine()->AddObject(GetDocID(), GEOM_WIRE);
Handle(GEOM_Object) aWire = GetEngine()->AddObject(GEOM_WIRE);
//Add a new function
Handle(GEOM_Function) aFunction =
@ -449,7 +449,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFace (Handle(GEOM_Object) th
if (theWire.IsNull()) return NULL;
//Add a new Face object
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
//Add a new Shape function for creation of a face from a wire
Handle(GEOM_Function) aFunction =
@ -509,7 +509,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceWires
SetErrorCode(KO);
//Add a new object
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_FACE);
//Add a new function
Handle(GEOM_Function) aFunction =
@ -588,7 +588,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceFromSurface
SetErrorCode(KO);
//Add a new object
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_FACE);
//Add a new function
Handle(GEOM_Function) aFunction =
@ -658,7 +658,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceWithConstraints
SetErrorCode(KO);
//Add a new object
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_FILLING);
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_FILLING);
//Add a new function
Handle(GEOM_Function) aFunction =
@ -799,7 +799,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeShape
SetErrorCode(KO);
//Add a new object
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), theObjectType);
Handle(GEOM_Object) aShape = GetEngine()->AddObject(theObjectType);
//Add a new function
Handle(GEOM_Function) aFunction =
@ -869,7 +869,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeSolidFromConnectedFaces
SetErrorCode(KO);
//Add a new object
Handle(GEOM_Object) aSolid = GetEngine()->AddObject(GetDocID(), GEOM_SOLID);
Handle(GEOM_Object) aSolid = GetEngine()->AddObject(GEOM_SOLID);
//Add a new function
Handle(GEOM_Function) aFunction =
@ -947,7 +947,7 @@ GEOMImpl_IShapesOperations::MakeGlueFaces (std::list< Handle(GEOM_Object) >& the
}
//Add a new Glued object
Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GEOM_GLUED);
//Add a new Glue function
Handle(GEOM_Function) aFunction;
@ -1095,7 +1095,7 @@ GEOMImpl_IShapesOperations::MakeGlueFacesByList(std::list< Handle(GEOM_Object) >
}
//Add a new Glued object
Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GEOM_GLUED);
//Add a new Glue function
Handle(GEOM_Function) aFunction;
@ -1163,7 +1163,7 @@ GEOMImpl_IShapesOperations::MakeGlueEdges (std::list< Handle(GEOM_Object) >& the
}
//Add a new Glued object
Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GEOM_GLUED);
//Add a new Glue function
Handle(GEOM_Function) aFunction;
@ -1344,7 +1344,7 @@ GEOMImpl_IShapesOperations::MakeGlueEdgesByList (std::list< Handle(GEOM_Object)
return NULL;
}
//Add a new Glued object
Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GEOM_GLUED);
//Add a new Glue function
Handle(GEOM_Function) aFunction;
@ -1452,7 +1452,7 @@ GEOMImpl_IShapesOperations::GetExistingSubObjects(Handle(GEOM_Object) theShap
Standard_Integer aStrLen = anEntry.LengthOfCString();
char* anEntryStr = new char[aStrLen+1];
anEntry.ToUTF8CString(anEntryStr);
Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(GetDocID(), anEntryStr, false);
Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(anEntryStr, false);
if (!anObj.IsNull() ) {
bool isGroup = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() == GEOM_GROUP;
bool isSubShape = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() != GEOM_GROUP;
@ -1553,7 +1553,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeExplode
//anObj = GetEngine()->AddSubShape(theShape, anArray);
{
anObj = GetEngine()->AddObject(GetDocID(), GEOM_SUBSHAPE);
anObj = GetEngine()->AddObject(GEOM_SUBSHAPE);
Handle(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
if (aFunction.IsNull()) return aSeq;
@ -1766,7 +1766,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeSubShapes
anArray = new TColStd_HArray1OfInteger(1,1);
anArray->SetValue(1, id);
anObj = GetEngine()->AddObject(GetDocID(), GEOM_SUBSHAPE);
anObj = GetEngine()->AddObject(GEOM_SUBSHAPE);
if (!anObj.IsNull()) {
Handle(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
if (aFunction.IsNull()) return aSeq;
@ -2155,7 +2155,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ReverseShape(Handle(GEOM_Object)
/*
//Add a new reversed object
Handle(GEOM_Object) aReversed = GetEngine()->AddObject(GetDocID(), theShape->GetType());
Handle(GEOM_Object) aReversed = GetEngine()->AddObject(theShape->GetType());
//Add a new Revese function
Handle(GEOM_Function) aFunction;
@ -2201,7 +2201,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ReverseShape(Handle(GEOM_Object)
if (aGen) {
GEOMImpl_IHealingOperations* anIHealingOperations =
aGen->GetIHealingOperations(GetDocID());
aGen->GetIHealingOperations();
aReversed = anIHealingOperations->ChangeOrientationCopy(theShape);
SetErrorCode(anIHealingOperations->GetErrorCode());
}
@ -3000,7 +3000,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetShapesOnShapeAsCompound
}
//Add a new result object
Handle(GEOM_Object) aRes = GetEngine()->AddObject(GetDocID(), GEOM_SHAPES_ON_SHAPE);
Handle(GEOM_Object) aRes = GetEngine()->AddObject(GEOM_SHAPES_ON_SHAPE);
Handle(GEOM_Function) aFunction =
aRes->AddFunction(GEOMImpl_ShapeDriver::GetID(), SHAPES_ON_SHAPE);
aFunction->SetValue(aCompound);
@ -3182,7 +3182,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeExtraction
//Add a new Result object
Handle(GEOM_Object) aResult =
GetEngine()->AddObject(GetDocID(), GEOM_EXTRACTION);
GetEngine()->AddObject(GEOM_EXTRACTION);
//Add a new Extraction function
Handle(GEOM_Function) aFunction =
@ -5140,7 +5140,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ExtendEdge
}
//Add a new Edge object
Handle(GEOM_Object) aResEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
Handle(GEOM_Object) aResEdge = GetEngine()->AddObject(GEOM_EDGE);
//Add a new Vector function
Handle(GEOM_Function) aFunction =
@ -5207,7 +5207,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ExtendFace
}
//Add a new Face object
Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GEOM_FACE);
//Add a new Vector function
Handle(GEOM_Function) aFunction =
@ -5273,7 +5273,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeSurfaceFromFace
}
//Add a new Face object
Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GEOM_FACE);
//Add a new Vector function
Handle(GEOM_Function) aFunction =

View File

@ -78,7 +78,7 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations
std::list<Standard_Integer> indices; ///< Shape indices touched by this type of modification.
};
Standard_EXPORT GEOMImpl_IShapesOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT GEOMImpl_IShapesOperations(GEOM_Engine* theEngine);
Standard_EXPORT ~GEOMImpl_IShapesOperations();
Standard_EXPORT Handle(GEOM_Object) MakeEdge (Handle(GEOM_Object) thePoint1,

View File

@ -77,8 +77,8 @@
*/
//=============================================================================
GEOMImpl_ITransformOperations::GEOMImpl_ITransformOperations (GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
GEOMImpl_ITransformOperations::GEOMImpl_ITransformOperations (GEOM_Engine* theEngine)
: GEOM_IOperations(theEngine)
{
MESSAGE("GEOMImpl_ITransformOperations::GEOMImpl_ITransformOperations");
}
@ -217,7 +217,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateTwoPointsCopy
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a translate function
Handle(GEOM_Function) aFunction =
@ -270,7 +270,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateDXDYDZCopy
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a translate function
Handle(GEOM_Function) aFunction =
@ -375,7 +375,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateVectorCopy
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a translate function
Handle(GEOM_Function) aFunction =
@ -431,7 +431,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateVectorDistance
//Add a translate function
if (theCopy) {
aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
aCopy = GetEngine()->AddObject(theObject->GetType());
aFunction = aCopy->AddFunction(GEOMImpl_TranslateDriver::GetID(), TRANSLATE_VECTOR_DISTANCE);
}
else {
@ -493,7 +493,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Translate1D
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
//Add a translate function
Handle(GEOM_Function) aFunction =
@ -552,7 +552,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Translate2D (Handle(GEOM_Obje
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
//Add a translate function
Handle(GEOM_Function) aFunction =
@ -806,7 +806,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorPlaneCopy
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a mirror function
Handle(GEOM_Function) aFunction =
@ -909,7 +909,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorPointCopy
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a mirror function
Handle(GEOM_Function) aFunction =
@ -1012,7 +1012,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorAxisCopy
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a mirror function
Handle(GEOM_Function) aFunction =
@ -1113,7 +1113,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::OffsetShapeCopy
if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be offset
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a new Offset function
Handle(GEOM_Function) aFunction =
@ -1184,7 +1184,7 @@ GEOMImpl_ITransformOperations::ProjectShapeCopy (Handle(GEOM_Object) theSource,
else
{
//Add a new Projection object
aCopy = GetEngine()->AddObject(GetDocID(), GEOM_PROJECTION);
aCopy = GetEngine()->AddObject(GEOM_PROJECTION);
//Add a Projection function
Handle(GEOM_Function) aFunction =
@ -1248,7 +1248,7 @@ Standard_Real GEOMImpl_ITransformOperations::ProjectPointOnWire
}
//Add a new Projection object
thePointOnEdge = GetEngine()->AddObject(GetDocID(), GEOM_PROJECTION);
thePointOnEdge = GetEngine()->AddObject(GEOM_PROJECTION);
//Add a Projection function
Handle(GEOM_Function) aFunction = thePointOnEdge->AddFunction
@ -1363,7 +1363,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShapeCopy
if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be scaled
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a scale function
Handle(GEOM_Function) aFunction =
@ -1429,7 +1429,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShapeAlongAxes (Handle(G
Handle(GEOM_Object) aCopy; //Add a new Copy object
Handle(GEOM_Function) aFunction;
if (doCopy) {
aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
aCopy = GetEngine()->AddObject(theObject->GetType());
aFunction = aCopy->AddFunction(GEOMImpl_ScaleDriver::GetID(), SCALE_SHAPE_AXES_COPY);
}
else {
@ -1554,7 +1554,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionShapeCopy
if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be set in position
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a position function
Standard_Integer aType = POSITION_SHAPE_COPY;
@ -1616,7 +1616,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionAlongPath
Handle(GEOM_Object) aCopy;
if (theCopy) {
aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
aCopy = GetEngine()->AddObject(theObject->GetType());
aFunction = aCopy->AddFunction(GEOMImpl_PositionDriver::GetID(), POSITION_ALONG_PATH);
}
else
@ -1733,7 +1733,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateCopy (Handle(GEOM_Objec
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a rotate function
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_COPY);
@ -1786,7 +1786,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate1D (Handle(GEOM_Object)
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
//Add a rotate function
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_1D);
@ -1841,7 +1841,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate1D (Handle(GEOM_Object)
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
//Add a rotate function
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_1D_STEP);
@ -1902,7 +1902,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate2D (Handle(GEOM_Object)
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
//Add a rotate function
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_2D);
@ -1965,7 +1965,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate2D (Handle(GEOM_Object)
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
//Add a rotate function
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_2D);
@ -2087,7 +2087,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateThreePointsCopy (Handle
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
//Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
//Add a rotate function
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_THREE_POINTS_COPY);
@ -2144,7 +2144,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TransformLikeOtherCopy
if (aSampleFunc.IsNull()) return NULL; // There is no function which creates a sample object
// Add a new Copy object
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
// Add a transform function (depends on theSample function)
Handle(GEOM_Function) aFunction =
@ -2295,7 +2295,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MakeProjectionOnCylinder
//Add a new Projection object
Handle(GEOM_Object) aResult =
GetEngine()->AddObject(GetDocID(), GEOM_PROJECTION);
GetEngine()->AddObject(GEOM_PROJECTION);
//Add a Projection function
Handle(GEOM_Function) aFunction = aResult->AddFunction

View File

@ -37,7 +37,7 @@ class GEOMImpl_IRotate;
class GEOMImpl_ITransformOperations : public GEOM_IOperations
{
public:
Standard_EXPORT GEOMImpl_ITransformOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT GEOMImpl_ITransformOperations(GEOM_Engine* theEngine);
Standard_EXPORT ~GEOMImpl_ITransformOperations();
Standard_EXPORT Handle(GEOM_Object) TranslateTwoPoints (Handle(GEOM_Object) theObject,

View File

@ -69,7 +69,7 @@ Standard_Integer GEOMImpl_ImportDriver::Execute(LOGBOOK& log) const
return 0;
Handle(TColStd_HSequenceOfTransient) aSeq =
GEOMImpl_IECallBack::GetCallBack( aFormatName )->Import( GetDocID(), aFormatName, aFileName );
GEOMImpl_IECallBack::GetCallBack( aFormatName )->Import( aFormatName, aFileName );
if( aSeq.IsNull() )
return 0;

View File

@ -457,7 +457,7 @@ void GEOMToolsGUI::OnEditDelete()
}
_PTR(StudyBuilder) aStudyBuilder (aStudy->NewBuilder());
GEOM_Displayer* disp = new GEOM_Displayer( appStudy );
GEOM_Displayer* disp = new GEOM_Displayer();
if ( isComponentSelected ) {
// GEOM component is selected: delete all objects recursively
@ -572,8 +572,7 @@ void GEOMToolsGUI::deactivate()
{
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
if ( app ) {
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
GEOM_Displayer aDisp (appStudy);
GEOM_Displayer aDisp;
aDisp.GlobalSelection();
getGeometryGUI()->setLocalSelectionMode(GEOM_ALLOBJECTS);
}

View File

@ -168,7 +168,7 @@ void GEOMToolsGUI::OnAutoColor()
QList<SALOMEDS::Color> aReservedColors;
GEOM_Displayer displayer ( appStudy );
GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@ -256,7 +256,7 @@ void GEOMToolsGUI::OnColor()
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
GEOM_Displayer displayer( appStudy );
GEOM_Displayer displayer;
// get active view
SALOME_View* window = displayer.GetActiveView();
@ -308,7 +308,7 @@ void GEOMToolsGUI::OnTexture()
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
GEOM_Displayer displayer( appStudy );
GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@ -351,7 +351,7 @@ void GEOMToolsGUI::OnChangeTransparency( bool increase )
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
GEOM_Displayer displayer( appStudy );
GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@ -396,7 +396,7 @@ void GEOMToolsGUI::OnNbIsos( ActionType actionType )
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
GEOM_Displayer displayer( appStudy );
GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@ -466,7 +466,7 @@ void GEOMToolsGUI::OnDeflection()
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
GEOM_Displayer displayer( appStudy );
GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@ -496,8 +496,7 @@ void GEOMToolsGUI::OnSelectOnly(int mode)
{
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
if ( app ) {
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
GEOM_Displayer aDisp (appStudy);
GEOM_Displayer aDisp;
aDisp.GlobalSelection(mode);
getGeometryGUI()->setLocalSelectionMode(mode);
}
@ -665,7 +664,7 @@ void GEOMToolsGUI::OnEdgeWidth()
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
GEOM_Displayer displayer( appStudy );
GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@ -708,7 +707,7 @@ void GEOMToolsGUI::OnIsosWidth() {
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
GEOM_Displayer displayer( appStudy );
GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@ -750,7 +749,7 @@ void GEOMToolsGUI::OnBringToFront() {
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
GEOM_Displayer displayer( appStudy );
GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@ -776,7 +775,7 @@ void GEOMToolsGUI::OnClsBringToFront() {
SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
if ( !appStudy ) return;
GEOM_Displayer displayer( appStudy );
GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@ -815,7 +814,7 @@ void GEOMToolsGUI::OnSetMaterial( const QVariant& theParam )
if ( selected.IsEmpty() ) return;
GEOM_Displayer displayer( study );
GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;

View File

@ -237,7 +237,7 @@ void GEOMToolsGUI_MarkerDlg::accept()
}
}
}
GEOM_Displayer displayer( getStudy() );
GEOM_Displayer displayer;
displayer.Redisplay( selected, true );
selMgr->setSelectedObjects( selected );
}
@ -277,7 +277,7 @@ void GEOMToolsGUI_MarkerDlg::init()
// ---
GEOM::GEOM_Gen_var engine = GeometryGUI::GetGeomGen();
myOperation = engine->GetIInsertOperations( getStudy()->id() );
myOperation = engine->GetIInsertOperations();
GEOM::ListOfLong_var ids = myOperation->GetAllTextures();
for ( int i = 0; i < ids->length(); i++ )
addTexture( ids[i] );
@ -339,7 +339,7 @@ void GEOMToolsGUI_MarkerDlg::addTexture( int id, bool select ) const
if ( id > 0 && myCustomTypeCombo->index( id ) == -1 ) {
int tWidth, tHeight;
Handle(TColStd_HArray1OfByte) texture = GeometryGUI::getTexture(getStudy(), id, tWidth, tHeight);
Handle(TColStd_HArray1OfByte) texture = GeometryGUI::getTexture(id, tWidth, tHeight);
if ( !texture.IsNull() && texture->Length() == tWidth*tHeight/8 ) {
QImage image( tWidth, tHeight, QImage::Format_Mono );

View File

@ -141,22 +141,22 @@ GEOMToolsGUI_PublishDlg::~GEOMToolsGUI_PublishDlg()
if ( appStudy ) {
_PTR(Study) aStudy = appStudy->studyDS();
if ( aStudy ) {
GEOM_Displayer displayer ( appStudy );
QTreeWidgetItemIterator it( myTreeWidget );
while ( *it ) {
QString entry = myEntryToItem.key( *it );
_PTR(SObject) SO ( aStudy->FindObjectID( qPrintable( entry ) ) );
if ( SO ) {
GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
if ( CORBA::is_nil( aGeomObject ) ) continue;
if ( displayer.IsDisplayed( aGeomObject->GetStudyEntry() ) ) {
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( aGeomObject->GetStudyEntry(), "GEOM", "" );
displayer.Erase( io );
GEOM_Displayer displayer;
QTreeWidgetItemIterator it( myTreeWidget );
while ( *it ) {
QString entry = myEntryToItem.key( *it );
_PTR(SObject) SO ( aStudy->FindObjectID( qPrintable( entry ) ) );
if ( SO ) {
GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
if ( CORBA::is_nil( aGeomObject ) ) continue;
if ( displayer.IsDisplayed( aGeomObject->GetStudyEntry() ) ) {
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( aGeomObject->GetStudyEntry(), "GEOM", "" );
displayer.Erase( io );
}
}
++it;
}
}
++it;
}
displayer.UpdateViewer();
displayer.UpdateViewer();
}
}
}
@ -458,7 +458,7 @@ void GEOMToolsGUI_PublishDlg::onItemClicked(QTreeWidgetItem* theItem, int theCol
if ( !SO ) return;
GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
if ( CORBA::is_nil( aGeomObject ) ) return;
GEOM_Displayer displayer ( appStudy );
GEOM_Displayer displayer;
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( aGeomObject->GetStudyEntry(), "GEOM", "" );
if ( displayer.IsDisplayed( aGeomObject->GetStudyEntry() ) ) {

View File

@ -42,8 +42,7 @@
#include <QMessageBox>
GEOMToolsGUI_ReduceStudyDlg::GEOMToolsGUI_ReduceStudyDlg( QWidget* parent )
:QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
myDisplayer(NULL)
:QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
{
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
myVisible = QIcon( resMgr->loadPixmap( "SUIT", tr( "ICON_DATAOBJ_VISIBLE" ) ) );
@ -53,7 +52,7 @@ myDisplayer(NULL)
if ( !myApp ) return;
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
myStudy = study->studyDS();
myDisplayer = GEOM_Displayer( study );
myDisplayer = GEOM_Displayer();
setWindowTitle( tr( "GEOM_REDUCE_STUDY_TITLE" ) );
setAttribute(Qt::WA_DeleteOnClose);

View File

@ -83,12 +83,11 @@ void ConvertV6toV7( TCollection_AsciiString& theScript )
//purpose :
//=======================================================================
Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
CORBA::Boolean isPublished,
CORBA::Boolean isMultiFile,
Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Boolean isPublished,
CORBA::Boolean isMultiFile,
CORBA::Boolean& isValidScript)
{
SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(theStudy);
SALOMEDS::Study_var aStudy = GetStudy();
if(CORBA::is_nil(aStudy))
return new Engines::TMPFile(0);

View File

@ -69,8 +69,7 @@ GEOM::GEOM_Object_ptr GEOM_Field_i::GetShape()
HANDLE_NAMESPACE(GEOM_Object) shape = _impl->GetShape();
if ( !shape.IsNull() )
{
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( shape->GetDocID(),
shape->GetEntryString().ToCString());
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( shape->GetEntryString().ToCString());
shapeVar = GEOM::GEOM_Object::_narrow( obj );
}
return shapeVar._retn();
@ -138,8 +137,7 @@ GEOM::GEOM_FieldStep_ptr GEOM_Field_i::AddStep(::CORBA::Long stepID, ::CORBA::Lo
HANDLE_NAMESPACE(GEOM_FieldStep) step = _impl->AddStep( stepID, stamp );
if ( !step.IsNull() )
{
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetDocID(),
step->GetEntryString().ToCString());
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetEntryString().ToCString());
stepVar = GEOM::GEOM_FieldStep::_narrow( obj );
}
return stepVar._retn();
@ -201,8 +199,7 @@ GEOM::GEOM_FieldStep_ptr GEOM_Field_i::GetStep(CORBA::Long stepID)
HANDLE_NAMESPACE(GEOM_FieldStep) step = _impl->GetStep(stepID);
if ( !step.IsNull() )
{
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetDocID(),
step->GetEntryString().ToCString());
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetEntryString().ToCString());
stepVar = GEOM::GEOM_FieldStep::_narrow( obj );
}
return stepVar._retn();
@ -291,8 +288,7 @@ GEOM::GEOM_Field_ptr GEOM_FieldStep_i::GetField()
HANDLE_NAMESPACE(GEOM_Field) field = _impl->GetField();
if ( !field.IsNull() )
{
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( field->GetDocID(),
field->GetEntryString().ToCString());
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( field->GetEntryString().ToCString());
fieldVar = GEOM::GEOM_Field::_narrow( obj );
}
return fieldVar._retn();

View File

@ -171,7 +171,8 @@ char* GEOM_Gen_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
// : Used when a study is loaded
// : The IOR (IORName) of object created is returned
//============================================================================
char* GEOM_Gen_i::LocalPersistentIDToIOR(const char* aLocalPersistentID,
char* GEOM_Gen_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
const char* aLocalPersistentID,
CORBA::Boolean isMultiFile,
CORBA::Boolean isASCII)
{
@ -181,7 +182,7 @@ char* GEOM_Gen_i::LocalPersistentIDToIOR(const char* aLocalPersistentID,
{
TCollection_AsciiString anEntry;
TDF_Tool::Entry(anObject->GetEntry(), anEntry);
GEOM::GEOM_BaseObject_var obj = GetObject(anObject->GetDocID(), anEntry.ToCString());
GEOM::GEOM_BaseObject_var obj = GetObject(anEntry.ToCString());
CORBA::String_var aPersRefString = _orb->object_to_string(obj);
return CORBA::string_dup(aPersRefString);
@ -419,7 +420,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::SObject_ptr theSObjec
//Set NoteBook variables used in the object creation
TCollection_AsciiString aVars;
CORBA::String_var aString=aBaseObj->GetParameters();
SALOMEDS::ListOfListOfStrings_var aSections = theStudy->ParseVariables(aString);
SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(aString);
for(int i = 0, n = aSections->length(); i < n; i++) {
SALOMEDS::ListOfStrings aListOfVars = aSections[i];
for(int j = 0, m = aListOfVars.length(); j < m; j++) {
@ -474,7 +475,7 @@ void GEOM_Gen_i::CreateAndPublishGroup(GEOM::GEOM_Object_var theMainShape,
Standard_Integer anIndex = anIndices.FindIndex(aValue);
//anArray->SetValue(1, anIndex);
GOp->AddObject(GrObj,anIndex);
//anObj = GEOM_Engine::GetEngine()->AddObject(aMainShape->GetDocID(), GEOM_SUBSHAPE);
//anObj = GEOM_Engine::GetEngine()->AddObject(GEOM_SUBSHAPE);
//if (anObj.IsNull()) continue;
//HANDLE_NAMESPACE(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
//if (aFunction.IsNull()) continue;
@ -486,8 +487,8 @@ void GEOM_Gen_i::CreateAndPublishGroup(GEOM::GEOM_Object_var theMainShape,
//SALOMEDS::SObject_var aResultSO;
//TCollection_AsciiString anEntry;
//TDF_Tool::Entry(anObj->GetEntry(),anEntry);
//GEOM::GEOM_Object_var aGObj = GetObject(anObj->GetDocID(), anEntry.ToCString());
//AddInStudy(theStudy, aGObj._retn(), SeqN.Value(i).ToCString(), GrObj);
//GEOM::GEOM_Object_var aGObj = GetObject(anEntry.ToCString());
//AddInStudy(aGObj._retn(), SeqN.Value(i).ToCString(), GrObj);
}
}
}
@ -730,7 +731,7 @@ CORBA::Boolean GEOM_Gen_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
// function : Close()
// purpose :
//============================================================================
void GEOM_Gen_i::Close()
void GEOM_Gen_i::Close(SALOMEDS::SComponent_ptr theComponent)
{
_impl->Close();
}
@ -826,7 +827,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream,
TCollection_AsciiString anEntry;
TDF_Tool::Entry(anObj->GetEntry(), anEntry);
GEOM::GEOM_BaseObject_var obj = GetObject(anObj->GetDocID(), anEntry.ToCString());
GEOM::GEOM_BaseObject_var obj = GetObject(anEntry.ToCString());
//Set the study entry of the published GEOM_Object
obj->SetStudyEntry(aNewSO->GetID());
@ -865,7 +866,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy (GEOM::GEOM_BaseObject_ptr theObjec
{
SALOMEDS::SObject_var aResultSO;
SALOMEDS::Study_var aStudy = GetStudy();
if(theObject->_is_nil() || theStudy->_is_nil()) return aResultSO;
if(theObject->_is_nil() || aStudy->_is_nil()) return aResultSO;
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
CORBA::String_var IOR;
@ -951,7 +952,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesO (GEOM::GEOM_Object_ptr theO
// 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 = GetStudy()->FindObjectIOR(anIORo.in());
//PTv, IMP 0020001, The salome object <aSO>
// is not obligatory in case of invokation from script
// if (CORBA::is_nil(aSO))
@ -2567,7 +2568,7 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::AddSubShape (GEOM::GEOM_Object_ptr theMainSh
TCollection_AsciiString anEntry;
TDF_Tool::Entry(anObject->GetEntry(), anEntry);
return GEOM::GEOM_Object::_narrow( GetObject(anObject->GetDocID(), anEntry.ToCString()));
return GEOM::GEOM_Object::_narrow( GetObject(anEntry.ToCString()));
}
//=============================================================================

View File

@ -131,7 +131,7 @@ GEOM_IOperations_i::GetBaseObject(HANDLE_NAMESPACE(GEOM_BaseObject) theObject)
if (theObject.IsNull()) return GO._retn();
TCollection_AsciiString anEntry;
TDF_Tool::Entry(theObject->GetEntry(), anEntry);
GO = _engine->GetObject(theObject->GetDocID(), (char*) anEntry.ToCString());
GO = _engine->GetObject((char*) anEntry.ToCString());
return GO._retn();
}

View File

@ -178,7 +178,7 @@ char* GEOM_Object_i::GetSubShapeName(CORBA::Long subID)
{
TCollection_AsciiString anEntry = anIt.Value();
HANDLE_NAMESPACE(GEOM_BaseObject) anObj =
GEOM_Engine::GetEngine()->GetObject( _impl->GetDocID(), anEntry.ToCString(), false );
GEOM_Engine::GetEngine()->GetObject( anEntry.ToCString(), false );
if ( anObj.IsNull() ) continue;
TCollection_AsciiString aSubName = anObj->GetName();

View File

@ -891,10 +891,10 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
"""
# Example: see GEOM_TestAll.py
try:
aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
aSObject = self.AddInStudy(aShape, aName, None)
if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
if doRestoreSubShapes:
self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
self.RestoreSubShapesSO(aSObject, theArgs,
theFindMethod, theInheritFirstArg, True )
except:
print "addToStudy() failed"
@ -1010,7 +1010,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
list of published sub-shapes
"""
# Example: see GEOM_TestAll.py
return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
return self.RestoreSubShapesO(theObject, theArgs,
theFindMethod, theInheritFirstArg, theAddPrefix)
## Publish sub-shapes, standing for arguments and sub-shapes of arguments

View File

@ -124,14 +124,9 @@ void GEOM_Swig::createAndDisplayGO( const char* theEntry, bool theUpdateViewer )
{}
virtual void Execute()
{
SUIT_Application* app = SUIT_Session::session()->activeApplication();
if ( !app ) return;
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
if ( !study ) return;
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.c_str(), "GEOM", "" );
GEOM_Displayer( study ).Display( io, myUpdateViewer );
GEOM_Displayer().Display( io, myUpdateViewer );
}
};
@ -186,14 +181,9 @@ void GEOM_Swig::eraseGO( const char* theEntry, bool theUpdateViewer )
{}
virtual void Execute()
{
SUIT_Application* app = SUIT_Session::session()->activeApplication();
if ( !app ) return;
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
if ( !study ) return;
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.c_str(), "GEOM", "" );
GEOM_Displayer( study ).Erase( io, true, myUpdateViewer );
GEOM_Displayer().Erase( io, true, myUpdateViewer );
}
};
@ -212,13 +202,7 @@ void GEOM_Swig::UpdateViewer()
{}
virtual void Execute()
{
SUIT_Application* app = SUIT_Session::session()->activeApplication();
if ( !app ) return;
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
if ( !study ) return;
GEOM_Displayer( study ).UpdateViewer();
GEOM_Displayer().UpdateViewer();
}
};
@ -354,7 +338,7 @@ void TSetPropertyEvent::Execute()
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
if ( !study ) return;
GEOM_Displayer displayer( study );
GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;

View File

@ -642,8 +642,7 @@ bool GenerationGUI_PipeDlg::extractPrefix() const
// purpose : virtual method to restore tree of argument's sub-shapes under
// the resulting shape. Redefined from GEOMBase_Helper class.
//=================================================================================
void GenerationGUI_PipeDlg::restoreSubShapes
(SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_ptr theSObject)
void GenerationGUI_PipeDlg::restoreSubShapes(SALOMEDS::SObject_ptr theSObject)
{
QCheckBox *aGenGroupCheck = NULL;
QLineEdit *aPrefixEdit = NULL;
@ -691,8 +690,7 @@ void GenerationGUI_PipeDlg::restoreSubShapes
}
aName += tr((*it)->GetName());
getGeomEngine()->AddInStudy(theStudy, (*it).get(),
aName.toStdString().c_str(), aFather);
getGeomEngine()->AddInStudy((*it).get(), aName.toStdString().c_str(), aFather);
}
}
}

View File

@ -55,8 +55,7 @@ protected:
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual bool extractPrefix() const;
virtual void restoreSubShapes
(SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
virtual void restoreSubShapes(SALOMEDS::SObject_ptr);
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:

View File

@ -107,8 +107,6 @@ bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
{
SalomeApp_Application* app = getGeometryGUI()->getApp();
if ( !app ) return false;
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
if ( !study ) return false;
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "IGESPluginEngine" );
IGESOpPtr igesOp = GEOM::IIGESOperations::_narrow( op );
@ -182,7 +180,7 @@ bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
entryList.append( so->GetID() );
transaction.commit();
GEOM_Displayer( study ).Display( main.in() );
GEOM_Displayer().Display( main.in() );
main->UnRegister();
}
else

View File

@ -45,12 +45,11 @@ IGESPlugin_IECallBack::~IGESPlugin_IECallBack()
* Export
*/
//=============================================================================
bool IGESPlugin_IECallBack::Export( int theDocId,
const Handle(GEOM_Object) theOriginal,
const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& theFormatName )
bool IGESPlugin_IECallBack::Export( const Handle(GEOM_Object) theOriginal,
const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& theFormatName )
{
IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine(), theDocId );
IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine() );
TCollection_AsciiString aVersion = ( theFormatName == "IGES_5_3" ) ? "5.3" : "5.1";
aPluginOperations->ExportIGES( theOriginal, theFileName, aVersion );
return true;
@ -62,11 +61,10 @@ bool IGESPlugin_IECallBack::Export( int theDocId,
*/
//=============================================================================
Handle(TColStd_HSequenceOfTransient)
IGESPlugin_IECallBack::Import( int theDocId,
const TCollection_AsciiString& theFormatName,
const TCollection_AsciiString& theFileName )
IGESPlugin_IECallBack::Import( const TCollection_AsciiString& theFormatName,
const TCollection_AsciiString& theFileName )
{
IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine(), theDocId );
IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine() );
bool anIsIgnoreUnits = ( theFormatName == "IGES_SCALE" ) ? true : false;
return aPluginOperations->ImportIGES( theFileName, anIsIgnoreUnits );
}
@ -77,11 +75,10 @@ IGESPlugin_IECallBack::Import( int theDocId,
*/
//=============================================================================
TCollection_AsciiString
IGESPlugin_IECallBack::ReadValue( int theDocId,
const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& theFormatName,
const TCollection_AsciiString& theParameterName )
IGESPlugin_IECallBack::ReadValue( const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& theFormatName,
const TCollection_AsciiString& theParameterName )
{
IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine(), theDocId );
IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine() );
return aPluginOperations->ReadValue( theFileName, theParameterName );
}

View File

@ -36,17 +36,14 @@ public:
IGESPlugin_IECallBack();
~IGESPlugin_IECallBack();
bool Export( int theDocId,
const Handle(GEOM_Object) theOriginal,
const TCollection_AsciiString& theFileName,
bool Export( const Handle(GEOM_Object) theOriginal,
const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& theFormatName );
Handle(TColStd_HSequenceOfTransient) Import( int theDocId,
const TCollection_AsciiString& theFormatName,
const TCollection_AsciiString& theFileName );
Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
const TCollection_AsciiString& theFileName );
TCollection_AsciiString ReadValue( int theDocId,
const TCollection_AsciiString& theFileName,
TCollection_AsciiString ReadValue( const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& theFormatName,
const TCollection_AsciiString& theParameterName );
};

View File

@ -38,8 +38,8 @@
* Constructor
*/
//=============================================================================
IGESPlugin_IOperations::IGESPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
IGESPlugin_IOperations::IGESPlugin_IOperations( GEOM_Engine* theEngine )
: GEOMImpl_IBaseIEOperations( theEngine )
{
MESSAGE( "IGESPlugin_IOperations::IGESPlugin_IOperations" );
}
@ -77,7 +77,7 @@ void IGESPlugin_IOperations::ExportIGES( const Handle(GEOM_Object) theOrigi
if( aRefFunction.IsNull() ) return; //There is no function which creates an object to be exported
//Add a new result object
Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
Handle(GEOM_Object) result = GetEngine()->AddObject( GEOM_IMPORT);
//Add an Export function
Handle(GEOM_Function) aFunction = result->AddFunction( IGESPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
@ -129,7 +129,7 @@ IGESPlugin_IOperations::ImportIGES( const TCollection_AsciiString& theFileName,
if( theFileName.IsEmpty() ) return NULL;
//Add a new result object
Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
Handle(GEOM_Object) anImported = GetEngine()->AddObject( GEOM_IMPORT );
//Add an Import function
Handle(GEOM_Function) aFunction =

View File

@ -30,7 +30,7 @@
class IGESPLUGINENGINE_EXPORT IGESPlugin_IOperations: public GEOMImpl_IBaseIEOperations
{
public:
IGESPlugin_IOperations( GEOM_Engine*, int );
IGESPlugin_IOperations( GEOM_Engine* );
~IGESPlugin_IOperations();
void ExportIGES( const Handle(GEOM_Object),

View File

@ -59,11 +59,12 @@ GEOM_IOperations_i* IGESPlugin_OperationsCreator::Create( PortableServer::POA_pt
{
Unexpect aCatch( SALOME_SalomeException );
MESSAGE( "IGESPlugin_OperationsCreator::Create" );
_operation = new IGESPlugin_IOperations( theGenImpl );
return new IGESPlugin_IOperations_i( thePOA, theEngine, _operation );
return new IGESPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
}
IGESPlugin_IOperations* IGESPlugin_OperationsCreator::get()
IGESPlugin_IOperations* IGESPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
{
if( !_operation )
_operation = new IGESPlugin_IOperations( theGenImpl );
return _operation;
}

View File

@ -44,10 +44,10 @@ public:
GEOM::GEOM_Gen_ptr theEngine,
::GEOMImpl_Gen* theGenImpl );
private:
static IGESPlugin_IOperations* get();
static IGESPlugin_IOperations* get(::GEOMImpl_Gen* theGenImpl);
private:
IGESPlugin_IOperations* _operation;
static IGESPlugin_IOperations* _operation;
friend class IGESPlugin_IECallBack;
};

View File

@ -178,8 +178,8 @@ void MeasureGUI::ChangeDimensionsVisibility( const bool theIsVisible )
return;
}
SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() );
if ( !anActiveStudy )
SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() );
if ( !aStudy )
{
return;
}
@ -205,16 +205,16 @@ void MeasureGUI::ChangeDimensionsVisibility( const bool theIsVisible )
SUIT_OverrideCursor wc;
GEOMGUI_DimensionProperty aDimensions( anActiveStudy, anIObject->getEntry() );
GEOMGUI_DimensionProperty aDimensions( aStudy, anIObject->getEntry() );
for ( int anIt = 0; anIt < aDimensions.GetNumber(); ++anIt )
{
aDimensions.SetVisible( anIt, theIsVisible );
}
aDimensions.SaveToAttribute( anActiveStudy, anIObject->getEntry() );
aDimensions.SaveToAttribute( aStudy, anIObject->getEntry() );
GEOM_Displayer( anActiveStudy ).Redisplay( anIObject, true );
GEOM_Displayer().Redisplay( anIObject, true );
}
//=======================================================================

View File

@ -363,7 +363,7 @@ bool MeasureGUI_Skeleton::isValid( QString& )
GEOM_Displayer* MeasureGUI_Skeleton::getDisplayer()
{
if ( !myDisplayer )
myDisplayer = new GEOM_Displayer( getStudy() );
myDisplayer = new GEOM_Displayer();
return myDisplayer;
}

View File

@ -505,12 +505,11 @@ bool OperationGUI_PartitionDlg::execute (ObjectList& objects)
// function : restoreSubShapes
// purpose :
//=================================================================================
void OperationGUI_PartitionDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy,
SALOMEDS::SObject_ptr theSObject )
void OperationGUI_PartitionDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject )
{
if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
// empty list of arguments means that all arguments should be restored
getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
/*theFindMethod=*/GEOM::FSM_GetInPlaceByHistory,
/*theInheritFirstArg=*/myListShapes.length() == 1 && myListTools.length() == 0,
mainFrame()->CheckBoxAddPrefix->isChecked() ); // ? false

View File

@ -50,7 +50,7 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
virtual void restoreSubShapes( SALOMEDS::SObject_ptr );
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:

View File

@ -364,7 +364,7 @@ bool RepairGUI_FreeFacesDlg::execute( ObjectList& objects )
GEOM_Displayer* RepairGUI_FreeFacesDlg::getDisplayer()
{
if ( !myDisplayer )
myDisplayer = new GEOM_Displayer( getStudy() );
myDisplayer = new GEOM_Displayer();
return myDisplayer;
}

View File

@ -542,8 +542,7 @@ bool RepairGUI_GlueDlg::execute(ObjectList& objects)
// function : restoreSubShapes
// purpose :
//=================================================================================
void RepairGUI_GlueDlg::restoreSubShapes(SALOMEDS::Study_ptr theStudy,
SALOMEDS::SObject_ptr theSObject)
void RepairGUI_GlueDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject)
{
if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
GEOM::find_shape_method aFindMethod = GEOM::FSM_GetInPlace;
@ -551,7 +550,7 @@ void RepairGUI_GlueDlg::restoreSubShapes(SALOMEDS::Study_ptr theStudy,
aFindMethod = GEOM::FSM_GetInPlaceByHistory;
// empty list of arguments means that all arguments should be restored
getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
aFindMethod, /*theInheritFirstArg=*/true,
mainFrame()->CheckBoxAddPrefix->isChecked());
}

View File

@ -55,7 +55,7 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid (QString&);
virtual bool execute (ObjectList&);
virtual void restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
virtual void restoreSubShapes (SALOMEDS::SObject_ptr);
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:

View File

@ -433,12 +433,11 @@ void RepairGUI_LimitToleranceDlg::updateButtonState()
// function : restoreSubShapes
// purpose :
//=================================================================================
void RepairGUI_LimitToleranceDlg::restoreSubShapes(SALOMEDS::Study_ptr theStudy,
SALOMEDS::SObject_ptr theSObject)
void RepairGUI_LimitToleranceDlg::restoreSubShapes(SALOMEDS::SObject_ptr theSObject)
{
if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
// empty list of arguments means that all arguments should be restored
getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
getGeomEngine()->RestoreSubShapesSO(theSObject, GEOM::ListOfGO(),
GEOM::FSM_GetInPlace, /*theInheritFirstArg=*/true,
mainFrame()->CheckBoxAddPrefix->isChecked());
}

View File

@ -48,7 +48,7 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid (QString&);
virtual bool execute (ObjectList&);
virtual void restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
virtual void restoreSubShapes (SALOMEDS::SObject_ptr);
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:

Some files were not shown because too many files have changed in this diff Show More