mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-27 09:50:34 +05:00
0023299: [CEA] Finalize multi-study removal
- delete study id parameter - delete using of StudyManager
This commit is contained in:
parent
a5ebfce8d1
commit
58df7626e7
@ -293,11 +293,6 @@ module GEOM
|
|||||||
*/
|
*/
|
||||||
string GetEntry();
|
string GetEntry();
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief Get ID of study, where the object is created.
|
|
||||||
*/
|
|
||||||
long GetStudyID();
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Get internal type of operation created this object (POINT, BOX, CYLINDER, EXTRUSION...).
|
* \brief Get internal type of operation created this object (POINT, BOX, CYLINDER, EXTRUSION...).
|
||||||
* \note To get topological information on the object, use \ref GEOM_IMeasureOperations::WhatIs() "WhatIs()"
|
* \note To get topological information on the object, use \ref GEOM_IMeasureOperations::WhatIs() "WhatIs()"
|
||||||
@ -692,11 +687,6 @@ module GEOM
|
|||||||
*/
|
*/
|
||||||
string GetErrorCode();
|
string GetErrorCode();
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief Get ID of study, where the operation is defined
|
|
||||||
*/
|
|
||||||
long GetStudyID();
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Opens a new transaction
|
* \brief Opens a new transaction
|
||||||
*/
|
*/
|
||||||
@ -4870,9 +4860,9 @@ module GEOM
|
|||||||
* \brief Undo/Redo Management
|
* \brief Undo/Redo Management
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void Undo (in long theStudyID);
|
void Undo ();
|
||||||
|
|
||||||
void Redo (in long theStudyID);
|
void Redo ();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Publishing management
|
* \brief Publishing management
|
||||||
@ -4881,8 +4871,7 @@ module GEOM
|
|||||||
* if theFather is not NULL the object is placed under thFather's SObject.
|
* if theFather is not NULL the object is placed under thFather's SObject.
|
||||||
* Returns a SObject where theObject is placed
|
* Returns a SObject where theObject is placed
|
||||||
*/
|
*/
|
||||||
SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
|
SALOMEDS::SObject AddInStudy (in GEOM_BaseObject theObject,
|
||||||
in GEOM_BaseObject theObject,
|
|
||||||
in string theName,
|
in string theName,
|
||||||
in GEOM_BaseObject theFather);
|
in GEOM_BaseObject theFather);
|
||||||
|
|
||||||
@ -4890,8 +4879,6 @@ module GEOM
|
|||||||
* \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
|
* \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
|
||||||
*
|
*
|
||||||
* To be used from python scripts out of geompy.addToStudy (non-default usage)
|
* To be used from python scripts out of geompy.addToStudy (non-default usage)
|
||||||
* \param theStudy the study, in which theObject is published already,
|
|
||||||
* and in which the arguments will be published
|
|
||||||
* \param theObject published GEOM_Object, arguments of which will be published
|
* \param theObject published GEOM_Object, arguments of which will be published
|
||||||
* \param theArgs list of GEOM_Object, operation arguments to be published.
|
* \param theArgs list of GEOM_Object, operation arguments to be published.
|
||||||
* If this list is empty, all operation arguments will be published
|
* If this list is empty, all operation arguments will be published
|
||||||
@ -4910,8 +4897,7 @@ module GEOM
|
|||||||
* and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
|
* and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
|
||||||
* \return list of published sub-shapes
|
* \return list of published sub-shapes
|
||||||
*/
|
*/
|
||||||
ListOfGO RestoreSubShapesO (in SALOMEDS::Study theStudy,
|
ListOfGO RestoreSubShapesO (in GEOM_Object theObject,
|
||||||
in GEOM_Object theObject,
|
|
||||||
in ListOfGO theArgs,
|
in ListOfGO theArgs,
|
||||||
in find_shape_method theFindMethod,
|
in find_shape_method theFindMethod,
|
||||||
in boolean theInheritFirstArg,
|
in boolean theInheritFirstArg,
|
||||||
@ -4921,8 +4907,6 @@ module GEOM
|
|||||||
* \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
|
* \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
|
||||||
*
|
*
|
||||||
* To be used from python scripts out of geompy.addToStudy (non-default usage)
|
* To be used from python scripts out of geompy.addToStudy (non-default usage)
|
||||||
* \param theStudy the study, in which theObject is published already,
|
|
||||||
* and in which the arguments will be published
|
|
||||||
* \param theObject published GEOM_Object, arguments of which will be published
|
* \param theObject published GEOM_Object, arguments of which will be published
|
||||||
* \param theArgs list of GEOM_Object, operation arguments to be published.
|
* \param theArgs list of GEOM_Object, operation arguments to be published.
|
||||||
* If this list is empty, all operation arguments will be published
|
* If this list is empty, all operation arguments will be published
|
||||||
@ -4941,8 +4925,7 @@ module GEOM
|
|||||||
* and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
|
* and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
|
||||||
* \return list of published sub-shapes
|
* \return list of published sub-shapes
|
||||||
*/
|
*/
|
||||||
ListOfGO RestoreGivenSubShapesO (in SALOMEDS::Study theStudy,
|
ListOfGO RestoreGivenSubShapesO (in GEOM_Object theObject,
|
||||||
in GEOM_Object theObject,
|
|
||||||
in ListOfGO theArgs,
|
in ListOfGO theArgs,
|
||||||
in find_shape_method theFindMethod,
|
in find_shape_method theFindMethod,
|
||||||
in boolean theInheritFirstArg,
|
in boolean theInheritFirstArg,
|
||||||
@ -4953,8 +4936,6 @@ module GEOM
|
|||||||
*
|
*
|
||||||
* To be used from GUI and from geompy.addToStudy.
|
* To be used from GUI and from geompy.addToStudy.
|
||||||
* Work like the above method, but accepts study object theSObject instead of GEOM_Object.
|
* Work like the above method, but accepts study object theSObject instead of GEOM_Object.
|
||||||
* \param theStudy the study, in which theObject is published already,
|
|
||||||
* and in which the arguments will be published
|
|
||||||
* \param theSObject study object, referencing GEOM_Object, arguments of which will be published
|
* \param theSObject study object, referencing GEOM_Object, arguments of which will be published
|
||||||
* \param theArgs list of GEOM_Object, operation arguments to be published.
|
* \param theArgs list of GEOM_Object, operation arguments to be published.
|
||||||
* If this list is empty, all operation arguments will be published
|
* If this list is empty, all operation arguments will be published
|
||||||
@ -4972,8 +4953,7 @@ module GEOM
|
|||||||
* \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
|
* \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
|
||||||
* and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
|
* and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
|
||||||
*/
|
*/
|
||||||
ListOfGO RestoreSubShapesSO (in SALOMEDS::Study theStudy,
|
ListOfGO RestoreSubShapesSO (in SALOMEDS::SObject theSObject,
|
||||||
in SALOMEDS::SObject theSObject,
|
|
||||||
in ListOfGO theArgs,
|
in ListOfGO theArgs,
|
||||||
in find_shape_method theFindMethod,
|
in find_shape_method theFindMethod,
|
||||||
in boolean theInheritFirstArg,
|
in boolean theInheritFirstArg,
|
||||||
@ -4981,22 +4961,21 @@ module GEOM
|
|||||||
|
|
||||||
// # Methods to access interfaces for objects creation and transformation
|
// # Methods to access interfaces for objects creation and transformation
|
||||||
|
|
||||||
GEOM_IBasicOperations GetIBasicOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
|
GEOM_IBasicOperations GetIBasicOperations () raises (SALOME::SALOME_Exception);
|
||||||
GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
|
GEOM_ITransformOperations GetITransformOperations() raises (SALOME::SALOME_Exception);
|
||||||
GEOM_I3DPrimOperations GetI3DPrimOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
|
GEOM_I3DPrimOperations GetI3DPrimOperations () raises (SALOME::SALOME_Exception);
|
||||||
GEOM_IShapesOperations GetIShapesOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
|
GEOM_IShapesOperations GetIShapesOperations () raises (SALOME::SALOME_Exception);
|
||||||
GEOM_IBooleanOperations GetIBooleanOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
|
GEOM_IBooleanOperations GetIBooleanOperations () raises (SALOME::SALOME_Exception);
|
||||||
GEOM_ICurvesOperations GetICurvesOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
|
GEOM_ICurvesOperations GetICurvesOperations () raises (SALOME::SALOME_Exception);
|
||||||
GEOM_ILocalOperations GetILocalOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
|
GEOM_ILocalOperations GetILocalOperations () raises (SALOME::SALOME_Exception);
|
||||||
GEOM_IHealingOperations GetIHealingOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
|
GEOM_IHealingOperations GetIHealingOperations () raises (SALOME::SALOME_Exception);
|
||||||
GEOM_IInsertOperations GetIInsertOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
|
GEOM_IInsertOperations GetIInsertOperations () raises (SALOME::SALOME_Exception);
|
||||||
GEOM_IMeasureOperations GetIMeasureOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
|
GEOM_IMeasureOperations GetIMeasureOperations () raises (SALOME::SALOME_Exception);
|
||||||
GEOM_IBlocksOperations GetIBlocksOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
|
GEOM_IBlocksOperations GetIBlocksOperations () raises (SALOME::SALOME_Exception);
|
||||||
GEOM_IGroupOperations GetIGroupOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
|
GEOM_IGroupOperations GetIGroupOperations () raises (SALOME::SALOME_Exception);
|
||||||
GEOM_IFieldOperations GetIFieldOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
|
GEOM_IFieldOperations GetIFieldOperations () raises (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
GEOM_IOperations GetPluginOperations (in long theStudyID,
|
GEOM_IOperations GetPluginOperations (in string theLibName) raises (SALOME::SALOME_Exception);
|
||||||
in string theLibName) raises (SALOME::SALOME_Exception);
|
|
||||||
|
|
||||||
// # Objects Management
|
// # Objects Management
|
||||||
|
|
||||||
@ -5009,11 +4988,10 @@ module GEOM
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns an object defined by the study and its entry in the GEOM component
|
* \brief Returns an object defined by the study and its entry in the GEOM component
|
||||||
* \param theStudyID is a SALOMEDS Study ID
|
|
||||||
* \param theEntry is an entry of the requested GEOM_Object in the GEOM component
|
* \param theEntry is an entry of the requested GEOM_Object in the GEOM component
|
||||||
* \note if the object has not previously been created a NULL GEOM_Object is returned
|
* \note if the object has not previously been created a NULL GEOM_Object is returned
|
||||||
*/
|
*/
|
||||||
GEOM_BaseObject GetObject (in long theStudyID, in string theEntry);
|
GEOM_BaseObject GetObject (in string theEntry);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Add a sub-shape defined by indices in \a theIndices
|
* \brief Add a sub-shape defined by indices in \a theIndices
|
||||||
@ -5052,11 +5030,9 @@ module GEOM
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Publishes the named sub-shapes of given object in the study.
|
* \brief Publishes the named sub-shapes of given object in the study.
|
||||||
* \param theStudy The study in which the object is published
|
|
||||||
* \param theObject The object which named sub-shapes are published
|
* \param theObject The object which named sub-shapes are published
|
||||||
*/
|
*/
|
||||||
ListOfGO PublishNamedShapesInStudy(in SALOMEDS::Study theStudy,
|
ListOfGO PublishNamedShapesInStudy(//in SObject theSObject,
|
||||||
//in SObject theSObject,
|
|
||||||
in Object theObject);
|
in Object theObject);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -5109,31 +5085,27 @@ module GEOM
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Collects dependencies of the given objects from other ones
|
* \brief Collects dependencies of the given objects from other ones
|
||||||
* \param theStudy The study in which the object is published
|
|
||||||
* \param theListOfEntries List of GEOM object entries in OCAF tree (not in study)
|
* \param theListOfEntries List of GEOM object entries in OCAF tree (not in study)
|
||||||
* \return Struct of dependent entries and its links as a byte array
|
* \return Struct of dependent entries and its links as a byte array
|
||||||
* \note This method is supposed to be used by GUI only.
|
* \note This method is supposed to be used by GUI only.
|
||||||
*/
|
*/
|
||||||
SALOMEDS::TMPFile GetDependencyTree(in SALOMEDS::Study theStudy,
|
SALOMEDS::TMPFile GetDependencyTree(in string_array theListOfEntries);
|
||||||
in string_array theListOfEntries);
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Fills 3 lists that is used to reduce study of redundant objects:
|
* \brief Fills 3 lists that is used to reduce study of redundant objects:
|
||||||
* - dependencies of the given objects from other ones;
|
* - dependencies of the given objects from other ones;
|
||||||
* - children of the given objects;
|
* - children of the given objects;
|
||||||
* - all other objects in study.
|
* - all other objects in study.
|
||||||
* \param theStudy The study in which the object was published
|
|
||||||
* \param theSelectedEntries List of GEOM object entries in OCAF tree
|
* \param theSelectedEntries List of GEOM object entries in OCAF tree
|
||||||
* \param theParentEntries List of GEOM object entries on which the given objects depend
|
* \param theParentEntries List of GEOM object entries on which the given objects depend
|
||||||
* \param theSubEntries Children entries list of the given objects
|
* \param theSubEntries Children entries list of the given objects
|
||||||
* \param theOtherEntries List of GEOM object entries which are in the study, but not in parents and children lists
|
* \param theOtherEntries List of GEOM object entries which are in the study, but not in parents and children lists
|
||||||
* \note This method is supposed to be used by GUI only.
|
* \note This method is supposed to be used by GUI only.
|
||||||
*/
|
*/
|
||||||
void GetEntriesToReduceStudy(in SALOMEDS::Study theStudy,
|
void GetEntriesToReduceStudy(inout string_array theSelectedEntries,
|
||||||
inout string_array theSelectedEntries,
|
inout string_array theParentEntries,
|
||||||
inout string_array theParentEntries,
|
inout string_array theSubEntries,
|
||||||
inout string_array theSubEntries,
|
inout string_array theOtherEntries);
|
||||||
inout string_array theOtherEntries);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -35,11 +35,6 @@ module GEOM
|
|||||||
|
|
||||||
interface GEOM_Superv : Engines::EngineComponent,SALOMEDS::Driver
|
interface GEOM_Superv : Engines::EngineComponent,SALOMEDS::Driver
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------//
|
|
||||||
// Set current study ID //
|
|
||||||
//-----------------------------------------------------------//
|
|
||||||
void SetStudyID (in long theStudyID) ;
|
|
||||||
|
|
||||||
//-----------------------------------------------------------//
|
//-----------------------------------------------------------//
|
||||||
// Create ListOfGO and add items to it //
|
// Create ListOfGO and add items to it //
|
||||||
//-----------------------------------------------------------//
|
//-----------------------------------------------------------//
|
||||||
|
@ -193,13 +193,7 @@
|
|||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list></inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list></outParameter-list>
|
<outParameter-list></outParameter-list>
|
||||||
<DataStream-list></DataStream-list>
|
<DataStream-list></DataStream-list>
|
||||||
</component-service>
|
</component-service>
|
||||||
@ -209,13 +203,7 @@
|
|||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list></inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list></outParameter-list>
|
<outParameter-list></outParameter-list>
|
||||||
<DataStream-list></DataStream-list>
|
<DataStream-list></DataStream-list>
|
||||||
</component-service>
|
</component-service>
|
||||||
@ -403,13 +391,7 @@
|
|||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list></inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list>
|
<outParameter-list>
|
||||||
<outParameter>
|
<outParameter>
|
||||||
<outParameter-name>return</outParameter-name>
|
<outParameter-name>return</outParameter-name>
|
||||||
@ -425,13 +407,7 @@
|
|||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list></inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list>
|
<outParameter-list>
|
||||||
<outParameter>
|
<outParameter>
|
||||||
<outParameter-name>return</outParameter-name>
|
<outParameter-name>return</outParameter-name>
|
||||||
@ -447,13 +423,7 @@
|
|||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list></inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list>
|
<outParameter-list>
|
||||||
<outParameter>
|
<outParameter>
|
||||||
<outParameter-name>return</outParameter-name>
|
<outParameter-name>return</outParameter-name>
|
||||||
@ -469,13 +439,7 @@
|
|||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list></inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list>
|
<outParameter-list>
|
||||||
<outParameter>
|
<outParameter>
|
||||||
<outParameter-name>return</outParameter-name>
|
<outParameter-name>return</outParameter-name>
|
||||||
@ -491,13 +455,7 @@
|
|||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list></inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list>
|
<outParameter-list>
|
||||||
<outParameter>
|
<outParameter>
|
||||||
<outParameter-name>return</outParameter-name>
|
<outParameter-name>return</outParameter-name>
|
||||||
@ -513,13 +471,7 @@
|
|||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list></inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list>
|
<outParameter-list>
|
||||||
<outParameter>
|
<outParameter>
|
||||||
<outParameter-name>return</outParameter-name>
|
<outParameter-name>return</outParameter-name>
|
||||||
@ -535,13 +487,7 @@
|
|||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list></inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list>
|
<outParameter-list>
|
||||||
<outParameter>
|
<outParameter>
|
||||||
<outParameter-name>return</outParameter-name>
|
<outParameter-name>return</outParameter-name>
|
||||||
@ -557,13 +503,7 @@
|
|||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list></inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list>
|
<outParameter-list>
|
||||||
<outParameter>
|
<outParameter>
|
||||||
<outParameter-name>return</outParameter-name>
|
<outParameter-name>return</outParameter-name>
|
||||||
@ -579,13 +519,7 @@
|
|||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list></inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list>
|
<outParameter-list>
|
||||||
<outParameter>
|
<outParameter>
|
||||||
<outParameter-name>return</outParameter-name>
|
<outParameter-name>return</outParameter-name>
|
||||||
@ -601,13 +535,7 @@
|
|||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list></inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list>
|
<outParameter-list>
|
||||||
<outParameter>
|
<outParameter>
|
||||||
<outParameter-name>return</outParameter-name>
|
<outParameter-name>return</outParameter-name>
|
||||||
@ -623,13 +551,7 @@
|
|||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list></inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list>
|
<outParameter-list>
|
||||||
<outParameter>
|
<outParameter>
|
||||||
<outParameter-name>return</outParameter-name>
|
<outParameter-name>return</outParameter-name>
|
||||||
@ -645,13 +567,7 @@
|
|||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list></inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list>
|
<outParameter-list>
|
||||||
<outParameter>
|
<outParameter>
|
||||||
<outParameter-name>return</outParameter-name>
|
<outParameter-name>return</outParameter-name>
|
||||||
@ -667,13 +583,7 @@
|
|||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list></inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list>
|
<outParameter-list>
|
||||||
<outParameter>
|
<outParameter>
|
||||||
<outParameter-name>return</outParameter-name>
|
<outParameter-name>return</outParameter-name>
|
||||||
@ -690,11 +600,6 @@
|
|||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
<inParameter>
|
<inParameter>
|
||||||
<inParameter-name>theLibName</inParameter-name>
|
<inParameter-name>theLibName</inParameter-name>
|
||||||
<inParameter-type>string</inParameter-type>
|
<inParameter-type>string</inParameter-type>
|
||||||
@ -733,11 +638,6 @@
|
|||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
<inParameter>
|
<inParameter>
|
||||||
<inParameter-name>theEntry</inParameter-name>
|
<inParameter-name>theEntry</inParameter-name>
|
||||||
<inParameter-type>string</inParameter-type>
|
<inParameter-type>string</inParameter-type>
|
||||||
@ -1008,22 +908,6 @@
|
|||||||
<component-interface-comment>unknown</component-interface-comment>
|
<component-interface-comment>unknown</component-interface-comment>
|
||||||
<!-- interface services list -->
|
<!-- interface services list -->
|
||||||
<component-service-list>
|
<component-service-list>
|
||||||
<component-service>
|
|
||||||
<service-name>SetStudyID</service-name>
|
|
||||||
<service-author>SALOME team</service-author>
|
|
||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
|
||||||
<service-comment>unknown</service-comment>
|
|
||||||
<service-by-default>0</service-by-default>
|
|
||||||
<inParameter-list>
|
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyID</inParameter-name>
|
|
||||||
<inParameter-type>long</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list></outParameter-list>
|
|
||||||
<DataStream-list></DataStream-list>
|
|
||||||
</component-service>
|
|
||||||
<component-service>
|
<component-service>
|
||||||
<service-name>CreateListOfGO</service-name>
|
<service-name>CreateListOfGO</service-name>
|
||||||
<service-author>SALOME team</service-author>
|
<service-author>SALOME team</service-author>
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include "Utils_ExceptHandlers.hxx"
|
#include "Utils_ExceptHandlers.hxx"
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
std::map <int, AdvancedEngine_IOperations*> AdvancedEngine_OperationsCreator::_mapOfOperations;
|
AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::_operation;
|
||||||
|
|
||||||
AdvancedEngine_OperationsCreator::AdvancedEngine_OperationsCreator()
|
AdvancedEngine_OperationsCreator::AdvancedEngine_OperationsCreator()
|
||||||
{
|
{
|
||||||
@ -51,19 +51,16 @@ AdvancedEngine_OperationsCreator::~AdvancedEngine_OperationsCreator()
|
|||||||
}
|
}
|
||||||
|
|
||||||
GEOM_IOperations_i* AdvancedEngine_OperationsCreator::Create (PortableServer::POA_ptr thePOA,
|
GEOM_IOperations_i* AdvancedEngine_OperationsCreator::Create (PortableServer::POA_ptr thePOA,
|
||||||
int theStudyId,
|
|
||||||
GEOM::GEOM_Gen_ptr theEngine,
|
GEOM::GEOM_Gen_ptr theEngine,
|
||||||
::GEOMImpl_Gen* theGenImpl)
|
::GEOMImpl_Gen* theGenImpl)
|
||||||
{
|
{
|
||||||
Unexpect aCatch(SALOME_SalomeException);
|
Unexpect aCatch(SALOME_SalomeException);
|
||||||
MESSAGE( "AdvancedEngine_OperationsCreator::Create" );
|
MESSAGE( "AdvancedEngine_OperationsCreator::Create" );
|
||||||
return new AdvancedEngine_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
|
_operation = new AdvancedEngine_IOperations( theGenImpl );
|
||||||
|
return new AdvancedEngine_IOperations_i( thePOA, theEngine, _operation );
|
||||||
}
|
}
|
||||||
|
|
||||||
AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
|
AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get()
|
||||||
int theStudyId )
|
|
||||||
{
|
{
|
||||||
if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
|
return _operation;
|
||||||
_mapOfOperations[theStudyId] = new AdvancedEngine_IOperations( theGenImpl, theStudyId );
|
|
||||||
return _mapOfOperations[theStudyId];
|
|
||||||
}
|
}
|
||||||
|
@ -41,15 +41,13 @@ public:
|
|||||||
~AdvancedEngine_OperationsCreator();
|
~AdvancedEngine_OperationsCreator();
|
||||||
|
|
||||||
GEOM_IOperations_i* Create (PortableServer::POA_ptr thePOA,
|
GEOM_IOperations_i* Create (PortableServer::POA_ptr thePOA,
|
||||||
int theStudyId,
|
GEOM::GEOM_Gen_ptr theEngine,
|
||||||
GEOM::GEOM_Gen_ptr theEngine,
|
::GEOMImpl_Gen* theGenImpl);
|
||||||
::GEOMImpl_Gen* theGenImpl);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static AdvancedEngine_IOperations* get( ::GEOMImpl_Gen* theGenImpl,
|
static AdvancedEngine_IOperations* get();
|
||||||
int theStudyId );
|
|
||||||
private:
|
private:
|
||||||
static std::map <int, AdvancedEngine_IOperations*> _mapOfOperations;
|
static AdvancedEngine_IOperations*_operation;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -216,7 +216,7 @@ void AdvancedGUI_DividedCylinderDlg::ValueChangedInSpinBox()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr AdvancedGUI_DividedCylinderDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr AdvancedGUI_DividedCylinderDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
|
return getGeomEngine()->GetPluginOperations("AdvancedEngine");
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -392,7 +392,7 @@ void AdvancedGUI_DividedDiskDlg::ValueChangedInSpinBox()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr AdvancedGUI_DividedDiskDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr AdvancedGUI_DividedDiskDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
|
return getGeomEngine()->GetPluginOperations("AdvancedEngine");
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -555,7 +555,7 @@ void AdvancedGUI_PipeTShapeDlg::SelectionIntoArgument()
|
|||||||
|
|
||||||
if (aFindedObject->_is_nil()) { // Object not found in study
|
if (aFindedObject->_is_nil()) { // Object not found in study
|
||||||
GEOM::GEOM_IShapesOperations_var aShapesOp =
|
GEOM::GEOM_IShapesOperations_var aShapesOp =
|
||||||
getGeomEngine()->GetIShapesOperations(getStudyId());
|
getGeomEngine()->GetIShapesOperations();
|
||||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -847,7 +847,7 @@ void AdvancedGUI_PipeTShapeDlg::DisplayPreview (const bool activate, const bool
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr AdvancedGUI_PipeTShapeDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr AdvancedGUI_PipeTShapeDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
|
return getGeomEngine()->GetPluginOperations("AdvancedEngine");
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -195,7 +195,7 @@ void AdvancedGUI_SmoothingSurfaceDlg::enterEvent (QEvent*)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr AdvancedGUI_SmoothingSurfaceDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr AdvancedGUI_SmoothingSurfaceDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
|
return getGeomEngine()->GetPluginOperations("AdvancedEngine");
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -109,11 +109,8 @@ bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
|
|||||||
{
|
{
|
||||||
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
||||||
if ( !app ) return false;
|
if ( !app ) return false;
|
||||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
|
|
||||||
if ( !study ) return false;
|
|
||||||
|
|
||||||
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "BREPPluginEngine" );
|
||||||
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "BREPPluginEngine" );
|
|
||||||
BREPOpPtr brepOp = GEOM::IBREPOperations::_narrow( op );
|
BREPOpPtr brepOp = GEOM::IBREPOperations::_narrow( op );
|
||||||
if ( brepOp.isNull() ) return false;
|
if ( brepOp.isNull() ) return false;
|
||||||
|
|
||||||
@ -133,32 +130,31 @@ bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
app->putInfo( tr( "GEOM_PRP_LOADING" ).arg( fileName ) );
|
app->putInfo( tr( "GEOM_PRP_LOADING" ).arg( fileName ) );
|
||||||
transaction.start();
|
transaction.start();
|
||||||
GEOM::ListOfGO_var result = brepOp->ImportBREP( fileName.toUtf8().constData() );
|
GEOM::ListOfGO_var result = brepOp->ImportBREP( fileName.toUtf8().constData() );
|
||||||
if ( result->length() > 0 && brepOp->IsDone() )
|
if ( result->length() > 0 && brepOp->IsDone() )
|
||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var main = result[0];
|
GEOM::GEOM_Object_var main = result[0];
|
||||||
QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
|
QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
|
||||||
SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( dsStudy,
|
SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(),
|
||||||
SALOMEDS::SObject::_nil(),
|
main.in(),
|
||||||
main.in(),
|
publishName.toUtf8().constData() );
|
||||||
publishName.toUtf8().constData() );
|
|
||||||
|
|
||||||
entryList.append( so->GetID() );
|
entryList.append( so->GetID() );
|
||||||
transaction.commit();
|
transaction.commit();
|
||||||
GEOM_Displayer( study ).Display( main.in() );
|
GEOM_Displayer( study ).Display( main.in() );
|
||||||
main->UnRegister();
|
main->UnRegister();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
transaction.abort();
|
transaction.abort();
|
||||||
errors.append( QString( "%1 : %2" ).arg( fileName ).arg( brepOp->GetErrorCode() ) );
|
errors.append( QString( "%1 : %2" ).arg( fileName ).arg( brepOp->GetErrorCode() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( const SALOME::SALOME_Exception& e )
|
catch( const SALOME::SALOME_Exception& e )
|
||||||
{
|
{
|
||||||
transaction.abort();
|
transaction.abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getGeometryGUI()->updateObjBrowser( true );
|
getGeometryGUI()->updateObjBrowser( true );
|
||||||
@ -182,11 +178,8 @@ bool BREPPlugin_GUI::exportBREP( SUIT_Desktop* parent )
|
|||||||
{
|
{
|
||||||
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
||||||
if ( !app ) return false;
|
if ( !app ) return false;
|
||||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
|
|
||||||
if ( !study ) return false;
|
|
||||||
|
|
||||||
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "BREPPluginEngine" );
|
||||||
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "BREPPluginEngine" );
|
|
||||||
BREPOpPtr brepOp = GEOM::IBREPOperations::_narrow( op );
|
BREPOpPtr brepOp = GEOM::IBREPOperations::_narrow( op );
|
||||||
if ( brepOp.isNull() ) return false;
|
if ( brepOp.isNull() ) return false;
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
// OCCT includes
|
// OCCT includes
|
||||||
#include <TFunction_DriverTable.hxx>
|
#include <TFunction_DriverTable.hxx>
|
||||||
|
|
||||||
std::map <int, BREPPlugin_IOperations*> BREPPlugin_OperationsCreator::_mapOfOperations;
|
BREPPlugin_IOperations* BREPPlugin_OperationsCreator::_operation;
|
||||||
|
|
||||||
BREPPlugin_OperationsCreator::BREPPlugin_OperationsCreator()
|
BREPPlugin_OperationsCreator::BREPPlugin_OperationsCreator()
|
||||||
{
|
{
|
||||||
@ -51,19 +51,16 @@ BREPPlugin_OperationsCreator::~BREPPlugin_OperationsCreator()
|
|||||||
}
|
}
|
||||||
|
|
||||||
GEOM_IOperations_i* BREPPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
|
GEOM_IOperations_i* BREPPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
|
||||||
int theStudyId,
|
|
||||||
GEOM::GEOM_Gen_ptr theEngine,
|
GEOM::GEOM_Gen_ptr theEngine,
|
||||||
::GEOMImpl_Gen* theGenImpl )
|
::GEOMImpl_Gen* theGenImpl )
|
||||||
{
|
{
|
||||||
Unexpect aCatch( SALOME_SalomeException );
|
Unexpect aCatch( SALOME_SalomeException );
|
||||||
MESSAGE( "BREPPlugin_OperationsCreator::Create" );
|
MESSAGE( "BREPPlugin_OperationsCreator::Create" );
|
||||||
return new BREPPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
|
_operation = new BREPPlugin_IOperations( theGenImpl );
|
||||||
|
return new BREPPlugin_IOperations_i( thePOA, theEngine, _operation );
|
||||||
}
|
}
|
||||||
|
|
||||||
BREPPlugin_IOperations* BREPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
|
BREPPlugin_IOperations* BREPPlugin_OperationsCreator::get()
|
||||||
int theStudyId )
|
|
||||||
{
|
{
|
||||||
if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
|
return _operation;
|
||||||
_mapOfOperations[theStudyId] = new BREPPlugin_IOperations( theGenImpl, theStudyId );
|
|
||||||
return _mapOfOperations[theStudyId];
|
|
||||||
}
|
}
|
||||||
|
@ -41,15 +41,13 @@ public:
|
|||||||
~BREPPlugin_OperationsCreator();
|
~BREPPlugin_OperationsCreator();
|
||||||
|
|
||||||
GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
|
GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
|
||||||
int theStudyId,
|
GEOM::GEOM_Gen_ptr theEngine,
|
||||||
GEOM::GEOM_Gen_ptr theEngine,
|
::GEOMImpl_Gen* theGenImpl );
|
||||||
::GEOMImpl_Gen* theGenImpl );
|
|
||||||
private:
|
private:
|
||||||
static BREPPlugin_IOperations* get( ::GEOMImpl_Gen* theGenImpl,
|
static BREPPlugin_IOperations* get();
|
||||||
int theStudyId );
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static std::map <int, BREPPlugin_IOperations*> _mapOfOperations;
|
static BREPPlugin_IOperations* _operation;
|
||||||
|
|
||||||
friend class BREPPlugin_IECallBack;
|
friend class BREPPlugin_IECallBack;
|
||||||
};
|
};
|
||||||
|
@ -452,7 +452,7 @@ void BasicGUI_ArcDlg::enterEvent( QEvent* )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BasicGUI_ArcDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BasicGUI_ArcDlg::createOperation()
|
||||||
{
|
{
|
||||||
return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
|
return myGeomGUI->GetGeomGen()->GetICurvesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -543,7 +543,7 @@ double BasicGUI_CircleDlg::getRadius() const
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BasicGUI_CircleDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BasicGUI_CircleDlg::createOperation()
|
||||||
{
|
{
|
||||||
return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
|
return myGeomGUI->GetGeomGen()->GetICurvesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -418,7 +418,7 @@ void BasicGUI_CurveDlg::enterEvent (QEvent*)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BasicGUI_CurveDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BasicGUI_CurveDlg::createOperation()
|
||||||
{
|
{
|
||||||
return myGeomGUI->GetGeomGen()->GetICurvesOperations(getStudyId());
|
return myGeomGUI->GetGeomGen()->GetICurvesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -371,7 +371,7 @@ void BasicGUI_EllipseDlg::ValueChangedInSpinBox( double newValue )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BasicGUI_EllipseDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BasicGUI_EllipseDlg::createOperation()
|
||||||
{
|
{
|
||||||
return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
|
return myGeomGUI->GetGeomGen()->GetICurvesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -364,7 +364,7 @@ void BasicGUI_LineDlg::enterEvent( QEvent* )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BasicGUI_LineDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BasicGUI_LineDlg::createOperation()
|
||||||
{
|
{
|
||||||
return myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
|
return myGeomGUI->GetGeomGen()->GetIBasicOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -511,7 +511,7 @@ void BasicGUI_MarkerDlg::enterEvent( QEvent* )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BasicGUI_MarkerDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BasicGUI_MarkerDlg::createOperation()
|
||||||
{
|
{
|
||||||
return myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
|
return myGeomGUI->GetGeomGen()->GetIBasicOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -675,7 +675,7 @@ QString BasicGUI_PlaneDlg::getSizeAsString() const
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BasicGUI_PlaneDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BasicGUI_PlaneDlg::createOperation()
|
||||||
{
|
{
|
||||||
return myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
|
return myGeomGUI->GetGeomGen()->GetIBasicOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -733,7 +733,7 @@ void BasicGUI_PointDlg::OnPointSelected(const gp_Pnt& thePnt)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BasicGUI_PointDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BasicGUI_PointDlg::createOperation()
|
||||||
{
|
{
|
||||||
return myGeomGUI->GetGeomGen()->GetIBasicOperations(getStudyId());
|
return myGeomGUI->GetGeomGen()->GetIBasicOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -395,7 +395,7 @@ void BasicGUI_VectorDlg::ReverseVector( int state )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BasicGUI_VectorDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BasicGUI_VectorDlg::createOperation()
|
||||||
{
|
{
|
||||||
return myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
|
return myGeomGUI->GetGeomGen()->GetIBasicOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -335,7 +335,7 @@ void BasicGUI_WorkingPlaneDlg::SelectionIntoArgument()
|
|||||||
aName = aName + ":edge_" + QString::number( anIndex );
|
aName = aName + ":edge_" + QString::number( anIndex );
|
||||||
|
|
||||||
GEOM::GEOM_IShapesOperations_var aShapesOp =
|
GEOM::GEOM_IShapesOperations_var aShapesOp =
|
||||||
getGeomEngine()->GetIShapesOperations( getStudyId() );
|
getGeomEngine()->GetIShapesOperations();
|
||||||
if ( myEditCurrentArgument == Group2->LineEdit1 )
|
if ( myEditCurrentArgument == Group2->LineEdit1 )
|
||||||
myVectX = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
myVectX = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||||
else
|
else
|
||||||
@ -489,7 +489,7 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
|||||||
Zz = Xx = 1.;
|
Zz = Xx = 1.;
|
||||||
|
|
||||||
GEOM::GEOM_IMeasureOperations_ptr aMeasureOp =
|
GEOM::GEOM_IMeasureOperations_ptr aMeasureOp =
|
||||||
myGeomGUI->GetGeomGen()->GetIMeasureOperations( getStudyId() );
|
myGeomGUI->GetGeomGen()->GetIMeasureOperations();
|
||||||
aMeasureOp->GetPosition( myFace, Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz);
|
aMeasureOp->GetPosition( myFace, Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz);
|
||||||
|
|
||||||
if ( aMeasureOp->IsDone() ) {
|
if ( aMeasureOp->IsDone() ) {
|
||||||
@ -582,7 +582,7 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( showPreview ) {
|
if ( showPreview ) {
|
||||||
GEOM::GEOM_IBasicOperations_var aBasicOp = getGeomEngine()->GetIBasicOperations( getStudyId() );
|
GEOM::GEOM_IBasicOperations_var aBasicOp = getGeomEngine()->GetIBasicOperations();
|
||||||
GEOM::GEOM_Object_var anObj = aBasicOp->MakeMarker
|
GEOM::GEOM_Object_var anObj = aBasicOp->MakeMarker
|
||||||
( myWPlane.Location().X(), myWPlane.Location().Y(), myWPlane.Location().Z(),
|
( myWPlane.Location().X(), myWPlane.Location().Y(), myWPlane.Location().Z(),
|
||||||
myWPlane.XDirection().X(), myWPlane.XDirection().Y(), myWPlane.XDirection().Z(),
|
myWPlane.XDirection().X(), myWPlane.XDirection().Y(), myWPlane.XDirection().Z(),
|
||||||
|
@ -422,7 +422,7 @@ void BlocksGUI_BlockDlg::enterEvent (QEvent*)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BlocksGUI_BlockDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BlocksGUI_BlockDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIBlocksOperations(getStudyId());
|
return getGeomEngine()->GetIBlocksOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -360,7 +360,7 @@ bool BlocksGUI_ExplodeDlg::isAllSubShapes() const
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BlocksGUI_ExplodeDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BlocksGUI_ExplodeDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIBlocksOperations( getStudyId() );
|
return getGeomEngine()->GetIBlocksOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -222,7 +222,7 @@ void BlocksGUI_PropagateDlg::enterEvent( QEvent* )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BlocksGUI_PropagateDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BlocksGUI_PropagateDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIBlocksOperations( getStudyId() );
|
return getGeomEngine()->GetIBlocksOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -482,7 +482,7 @@ void BlocksGUI_QuadFaceDlg::activateSelection()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BlocksGUI_QuadFaceDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BlocksGUI_QuadFaceDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIBlocksOperations(getStudyId());
|
return getGeomEngine()->GetIBlocksOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -543,7 +543,7 @@ void BlocksGUI_TrsfDlg::enableWidgets()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BlocksGUI_TrsfDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BlocksGUI_TrsfDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIBlocksOperations(getStudyId());
|
return getGeomEngine()->GetIBlocksOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -378,7 +378,7 @@ void BooleanGUI_Dialog::enterEvent (QEvent*)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BooleanGUI_Dialog::createOperation()
|
GEOM::GEOM_IOperations_ptr BooleanGUI_Dialog::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIBooleanOperations(getStudyId());
|
return getGeomEngine()->GetIBooleanOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -207,7 +207,7 @@ void BuildGUI_CompoundDlg::enterEvent(QEvent* e)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BuildGUI_CompoundDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BuildGUI_CompoundDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIShapesOperations( getStudyId() );
|
return getGeomEngine()->GetIShapesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -416,7 +416,7 @@ void BuildGUI_EdgeDlg::ValueChangedInSpinBox(double newValue)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BuildGUI_EdgeDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BuildGUI_EdgeDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIShapesOperations(getStudyId());
|
return getGeomEngine()->GetIShapesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -585,7 +585,7 @@ void BuildGUI_FaceDlg::enterEvent( QEvent* )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BuildGUI_FaceDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BuildGUI_FaceDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIShapesOperations( getStudyId() );
|
return getGeomEngine()->GetIShapesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -234,7 +234,7 @@ void BuildGUI_ShellDlg::enterEvent( QEvent* )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BuildGUI_ShellDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BuildGUI_ShellDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIShapesOperations( getStudyId() );
|
return getGeomEngine()->GetIShapesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -296,7 +296,7 @@ void BuildGUI_SolidDlg::EnableNameField( bool toEnable )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BuildGUI_SolidDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BuildGUI_SolidDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIShapesOperations( getStudyId() );
|
return getGeomEngine()->GetIShapesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -308,7 +308,7 @@ bool BuildGUI_SolidDlg::isValid (QString& msg)
|
|||||||
bool ok = !myShells.isEmpty();
|
bool ok = !myShells.isEmpty();
|
||||||
|
|
||||||
GEOM::MeasureOpPtr anOp;
|
GEOM::MeasureOpPtr anOp;
|
||||||
anOp.take(myGeomGUI->GetGeomGen()->GetIMeasureOperations(getStudyId()));
|
anOp.take(myGeomGUI->GetGeomGen()->GetIMeasureOperations());
|
||||||
if (getConstructorId() == 0 && (!GroupSolid->CheckButton1->isChecked() || myShells.count() == 1)) {
|
if (getConstructorId() == 0 && (!GroupSolid->CheckButton1->isChecked() || myShells.count() == 1)) {
|
||||||
for (int i = 0, n = myShells.count(); i < n && ok; i++) {
|
for (int i = 0, n = myShells.count(); i < n && ok; i++) {
|
||||||
CORBA::String_var aRes = anOp->IsGoodForSolid(myShells[i].get());
|
CORBA::String_var aRes = anOp->IsGoodForSolid(myShells[i].get());
|
||||||
@ -336,7 +336,7 @@ bool BuildGUI_SolidDlg::isClosed( GEOM::GEOM_Object_ptr shell )
|
|||||||
|
|
||||||
if ( !CORBA::is_nil( shell ) ) {
|
if ( !CORBA::is_nil( shell ) ) {
|
||||||
GEOM::MeasureOpPtr anOp;
|
GEOM::MeasureOpPtr anOp;
|
||||||
anOp.take( myGeomGUI->GetGeomGen()->GetIMeasureOperations( getStudyId() ) );
|
anOp.take( myGeomGUI->GetGeomGen()->GetIMeasureOperations() );
|
||||||
|
|
||||||
// Detect kind of shape and parameters
|
// Detect kind of shape and parameters
|
||||||
aKind = anOp->KindOfShape(shell, anInts, aDbls);
|
aKind = anOp->KindOfShape(shell, anInts, aDbls);
|
||||||
|
@ -263,7 +263,7 @@ void BuildGUI_WireDlg::enterEvent( QEvent* )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr BuildGUI_WireDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr BuildGUI_WireDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIShapesOperations( getStudyId() );
|
return getGeomEngine()->GetIShapesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -59,13 +59,7 @@ myIsMainObject( false )
|
|||||||
myTextItem->setFont( textFont );
|
myTextItem->setFont( textFont );
|
||||||
|
|
||||||
myEntry = theEntry;
|
myEntry = theEntry;
|
||||||
|
myGeomObject = GeometryGUI::GetGeomGen()->GetObject( myEntry.c_str() );
|
||||||
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
|
||||||
if ( !app ) return;
|
|
||||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
|
|
||||||
SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
|
||||||
int studyId = aStudyDS->StudyId();
|
|
||||||
myGeomObject = GeometryGUI::GetGeomGen()->GetObject( studyId, myEntry.c_str() );
|
|
||||||
|
|
||||||
updateName();
|
updateName();
|
||||||
|
|
||||||
|
@ -50,8 +50,7 @@ void DependencyTree_Selector::getSelection( SUIT_DataOwnerPtrList& theList ) con
|
|||||||
if( DependencyTree_Object* treeObject = dynamic_cast<DependencyTree_Object*>( myView->selectedObject() ) ) {
|
if( DependencyTree_Object* treeObject = dynamic_cast<DependencyTree_Object*>( myView->selectedObject() ) ) {
|
||||||
QString studyEntry;
|
QString studyEntry;
|
||||||
QString name;
|
QString name;
|
||||||
GEOM::GEOM_BaseObject_var anObj = GeometryGUI::GetGeomGen()->GetObject( myView->getStudyId(),
|
GEOM::GEOM_BaseObject_var anObj = GeometryGUI::GetGeomGen()->GetObject( treeObject->getEntry().c_str() );
|
||||||
treeObject->getEntry().c_str() );
|
|
||||||
if( anObj->_is_nil() )
|
if( anObj->_is_nil() )
|
||||||
continue;
|
continue;
|
||||||
CORBA::String_var studyEntryVar = anObj->GetStudyEntry();
|
CORBA::String_var studyEntryVar = anObj->GetStudyEntry();
|
||||||
|
@ -48,9 +48,6 @@ myIsUpdate( true )
|
|||||||
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
||||||
if ( !app ) return;
|
if ( !app ) return;
|
||||||
|
|
||||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
|
||||||
myStudy = GeometryGUI::ClientStudyToStudy( study->studyDS());
|
|
||||||
|
|
||||||
mySelectionMgr = app->selectionMgr();
|
mySelectionMgr = app->selectionMgr();
|
||||||
if ( !mySelectionMgr ) return;
|
if ( !mySelectionMgr ) return;
|
||||||
|
|
||||||
@ -183,15 +180,6 @@ QString DependencyTree_View::getViewName() const
|
|||||||
return tr( "DEPENDENCY_TREE" );
|
return tr( "DEPENDENCY_TREE" );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
|
||||||
// function : getStudyId()
|
|
||||||
// purpose : return Id of current study
|
|
||||||
//=================================================================================
|
|
||||||
int DependencyTree_View::getStudyId() const
|
|
||||||
{
|
|
||||||
return myStudy->StudyId();
|
|
||||||
}
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : getObjectByEntry()
|
// function : getObjectByEntry()
|
||||||
// purpose : return DependencyTree_Object by entry
|
// purpose : return DependencyTree_Object by entry
|
||||||
@ -799,7 +787,7 @@ void DependencyTree_View::getNewTreeModel( bool theUseSelectedObject, bool theUs
|
|||||||
|
|
||||||
// get string which describes dependency tree structure
|
// get string which describes dependency tree structure
|
||||||
SALOMEDS::TMPFile_var SeqFile =
|
SALOMEDS::TMPFile_var SeqFile =
|
||||||
GeometryGUI::GetGeomGen()->GetDependencyTree( myStudy, myMainEntries );
|
GeometryGUI::GetGeomGen()->GetDependencyTree( myMainEntries );
|
||||||
char* buf = (char*)&SeqFile[0];
|
char* buf = (char*)&SeqFile[0];
|
||||||
|
|
||||||
clearView( true );
|
clearView( true );
|
||||||
|
@ -60,7 +60,6 @@ public:
|
|||||||
void wheelEvent( QWheelEvent* event );
|
void wheelEvent( QWheelEvent* event );
|
||||||
|
|
||||||
QString getViewName() const;
|
QString getViewName() const;
|
||||||
int getStudyId() const;
|
|
||||||
|
|
||||||
DependencyTree_Object* getObjectByEntry( const std::string& );
|
DependencyTree_Object* getObjectByEntry( const std::string& );
|
||||||
|
|
||||||
@ -129,7 +128,6 @@ private:
|
|||||||
QCheckBox* myDisplayDescendants;
|
QCheckBox* myDisplayDescendants;
|
||||||
QPushButton* updateButton;
|
QPushButton* updateButton;
|
||||||
|
|
||||||
SALOMEDS::Study_var myStudy;
|
|
||||||
LightApp_SelectionMgr* mySelectionMgr;
|
LightApp_SelectionMgr* mySelectionMgr;
|
||||||
GEOM::string_array_var myMainEntries;
|
GEOM::string_array_var myMainEntries;
|
||||||
|
|
||||||
|
@ -756,7 +756,7 @@ void EntityGUI_3DSketcherDlg::SelectionIntoArgument()
|
|||||||
aSelMgr->GetIndexes(aSelList.First(), aMap);
|
aSelMgr->GetIndexes(aSelList.First(), aMap);
|
||||||
if (aMap.Extent() == 1) {
|
if (aMap.Extent() == 1) {
|
||||||
int anIndex = aMap(1);
|
int anIndex = aMap(1);
|
||||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
|
||||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -943,7 +943,7 @@ void EntityGUI_3DSketcherDlg::enterEvent (QEvent*)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr EntityGUI_3DSketcherDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr EntityGUI_3DSketcherDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetICurvesOperations(getStudyId());
|
return getGeomEngine()->GetICurvesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -719,7 +719,7 @@ void EntityGUI_FeatureDetectorDlg::showImageSample()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr EntityGUI_FeatureDetectorDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr EntityGUI_FeatureDetectorDlg::createOperation()
|
||||||
{
|
{
|
||||||
return myGeomGUI->GetGeomGen()->GetIShapesOperations( getStudyId() );
|
return myGeomGUI->GetGeomGen()->GetIShapesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -730,7 +730,7 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects )
|
|||||||
{
|
{
|
||||||
bool res = false;
|
bool res = false;
|
||||||
|
|
||||||
GEOM::GEOM_IBasicOperations_var aBasicOperations = myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
|
GEOM::GEOM_IBasicOperations_var aBasicOperations = myGeomGUI->GetGeomGen()->GetIBasicOperations();
|
||||||
GEOM::GEOM_IShapesOperations_var aShapesOperations = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
|
GEOM::GEOM_IShapesOperations_var aShapesOperations = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
|
||||||
|
|
||||||
ShapeRec_Parameters* parameters = parametersChanged();
|
ShapeRec_Parameters* parameters = parametersChanged();
|
||||||
@ -791,7 +791,7 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects )
|
|||||||
}
|
}
|
||||||
else if (myConstructorId == CONTOURS)
|
else if (myConstructorId == CONTOURS)
|
||||||
{
|
{
|
||||||
GEOM::GEOM_ICurvesOperations_var aCurveOperations = myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
|
GEOM::GEOM_ICurvesOperations_var aCurveOperations = myGeomGUI->GetGeomGen()->GetICurvesOperations();
|
||||||
|
|
||||||
myDetector->ComputeContours( useROI, parameters );
|
myDetector->ComputeContours( useROI, parameters );
|
||||||
std::vector< std::vector<cv::Point> > contours = myDetector->GetContours();
|
std::vector< std::vector<cv::Point> > contours = myDetector->GetContours();
|
||||||
|
@ -1765,7 +1765,7 @@ void EntityGUI_FieldDlg::highlightSubShapes()
|
|||||||
SALOME_ListIO aSelList;
|
SALOME_ListIO aSelList;
|
||||||
|
|
||||||
// To highlight the selected sub-shape in Object Browser, if it's already published under the main shape
|
// To highlight the selected sub-shape in Object Browser, if it's already published under the main shape
|
||||||
GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations(getStudyId());
|
GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations();
|
||||||
QMap<int, QString> childsMap;
|
QMap<int, QString> childsMap;
|
||||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
|
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
|
||||||
if (appStudy) {
|
if (appStudy) {
|
||||||
@ -1818,7 +1818,7 @@ void EntityGUI_FieldDlg::highlightSubShapes()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr EntityGUI_FieldDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr EntityGUI_FieldDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIFieldOperations(getStudyId());
|
return getGeomEngine()->GetIFieldOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
#define RETURN_WITH_MSG(a, b) \
|
#define RETURN_WITH_MSG(a, b) \
|
||||||
@ -1857,7 +1857,7 @@ bool EntityGUI_FieldDlg::isValid(QString& theMessage)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool EntityGUI_FieldDlg::execute()
|
bool EntityGUI_FieldDlg::execute()
|
||||||
{
|
{
|
||||||
SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy( getStudy()->studyDS() );
|
SALOMEDS::Study_var aStudyDS = GeometryGUI::GetStudy();
|
||||||
SALOMEDS::StudyBuilder_var aBuilder = aStudyDS->NewBuilder();
|
SALOMEDS::StudyBuilder_var aBuilder = aStudyDS->NewBuilder();
|
||||||
|
|
||||||
QString aName = getNewObjectName().trimmed();
|
QString aName = getNewObjectName().trimmed();
|
||||||
@ -1882,7 +1882,7 @@ bool EntityGUI_FieldDlg::execute()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
SALOMEDS::SObject_wrap aSO =
|
SALOMEDS::SObject_wrap aSO =
|
||||||
getGeomEngine()->AddInStudy( aStudyDS, myField, aName.toLatin1().constData(), myShape );
|
getGeomEngine()->AddInStudy( myField, aName.toLatin1().constData(), myShape );
|
||||||
if ( !aSO->_is_nil() ) {
|
if ( !aSO->_is_nil() ) {
|
||||||
myField->UnRegister();
|
myField->UnRegister();
|
||||||
CORBA::String_var entry = aSO->GetID();
|
CORBA::String_var entry = aSO->GetID();
|
||||||
@ -1918,7 +1918,7 @@ bool EntityGUI_FieldDlg::execute()
|
|||||||
step = myField->AddStep( tbl->getStepID(), tbl->getStamp() );
|
step = myField->AddStep( tbl->getStepID(), tbl->getStamp() );
|
||||||
|
|
||||||
SALOMEDS::SObject_wrap aSO =
|
SALOMEDS::SObject_wrap aSO =
|
||||||
getGeomEngine()->AddInStudy( aStudyDS, step, stepName.toLatin1().constData(), myField );
|
getGeomEngine()->AddInStudy( step, stepName.toLatin1().constData(), myField );
|
||||||
if ( /*!myIsCreation &&*/ !aSO->_is_nil() ) {
|
if ( /*!myIsCreation &&*/ !aSO->_is_nil() ) {
|
||||||
step->UnRegister();
|
step->UnRegister();
|
||||||
CORBA::String_var entry = aSO->GetID();
|
CORBA::String_var entry = aSO->GetID();
|
||||||
|
@ -190,7 +190,7 @@ void EntityGUI_IsolineDlg::TypeChanged(int)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr EntityGUI_IsolineDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr EntityGUI_IsolineDlg::createOperation()
|
||||||
{
|
{
|
||||||
return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
|
return myGeomGUI->GetGeomGen()->GetICurvesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -163,7 +163,7 @@ bool EntityGUI_PictureImportDlg::ClickOnApply()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr EntityGUI_PictureImportDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr EntityGUI_PictureImportDlg::createOperation()
|
||||||
{
|
{
|
||||||
return myGeomGUI->GetGeomGen()->GetIBlocksOperations( getStudyId() );
|
return myGeomGUI->GetGeomGen()->GetIBlocksOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -175,7 +175,7 @@ bool EntityGUI_PictureImportDlg::execute( ObjectList& objects )
|
|||||||
bool res = false;
|
bool res = false;
|
||||||
|
|
||||||
GEOM::GEOM_Object_var anObj;
|
GEOM::GEOM_Object_var anObj;
|
||||||
GEOM::GEOM_IBasicOperations_var aBasicOperations = myGeomGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
|
GEOM::GEOM_IBasicOperations_var aBasicOperations = myGeomGUI->GetGeomGen()->GetIBasicOperations();
|
||||||
GEOM::GEOM_IBlocksOperations_var aBlocksOperations = GEOM::GEOM_IBlocksOperations::_narrow( getOperation() );
|
GEOM::GEOM_IBlocksOperations_var aBlocksOperations = GEOM::GEOM_IBlocksOperations::_narrow( getOperation() );
|
||||||
QString theImgFileName = myLineEdit->text();
|
QString theImgFileName = myLineEdit->text();
|
||||||
if ( theImgFileName.isEmpty() )
|
if ( theImgFileName.isEmpty() )
|
||||||
|
@ -286,7 +286,7 @@ void EntityGUI_PolylineDlg::GetCurveParams(GEOM::ListOfListOfDouble &theCoords,
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr EntityGUI_PolylineDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr EntityGUI_PolylineDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetICurvesOperations( getStudyId() );
|
return getGeomEngine()->GetICurvesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -678,7 +678,7 @@ gp_Ax3 EntityGUI_PolylineDlg::WPlaneToLCS(GEOM::GeomObjPtr theGeomObj)
|
|||||||
|
|
||||||
if (aShape.ShapeType() == TopAbs_FACE) {
|
if (aShape.ShapeType() == TopAbs_FACE) {
|
||||||
GEOM::GEOM_IMeasureOperations_ptr aMeasureOp =
|
GEOM::GEOM_IMeasureOperations_ptr aMeasureOp =
|
||||||
myGeomGUI->GetGeomGen()->GetIMeasureOperations(getStudyId());
|
myGeomGUI->GetGeomGen()->GetIMeasureOperations();
|
||||||
double Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz;
|
double Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz;
|
||||||
|
|
||||||
aMeasureOp->GetPosition(theGeomObj.get(), Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz);
|
aMeasureOp->GetPosition(theGeomObj.get(), Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz);
|
||||||
|
@ -462,7 +462,7 @@ void EntityGUI_SketcherDlg::Init()
|
|||||||
|
|
||||||
myHelpFileName = "create_sketcher_page.html";
|
myHelpFileName = "create_sketcher_page.html";
|
||||||
|
|
||||||
GEOM::GEOM_IBasicOperations_var aBasicOp = getGeomEngine()->GetIBasicOperations( getStudyId() );
|
GEOM::GEOM_IBasicOperations_var aBasicOp = getGeomEngine()->GetIBasicOperations();
|
||||||
myGlobalCS = aBasicOp->MakeMarker( 0,0,0,
|
myGlobalCS = aBasicOp->MakeMarker( 0,0,0,
|
||||||
1,0,0,
|
1,0,0,
|
||||||
0,1,0 );
|
0,1,0 );
|
||||||
@ -2270,7 +2270,7 @@ QString EntityGUI_SketcherDlg::GetNewCommand( QString& theParameters )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr EntityGUI_SketcherDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr EntityGUI_SketcherDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetICurvesOperations( getStudyId() );
|
return getGeomEngine()->GetICurvesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -2794,7 +2794,7 @@ gp_Ax3 EntityGUI_SketcherDlg::WPlaneToLCS( GEOM::GEOM_Object_var geomObj )
|
|||||||
if (aShape.ShapeType() == TopAbs_FACE)
|
if (aShape.ShapeType() == TopAbs_FACE)
|
||||||
{
|
{
|
||||||
GEOM::GEOM_IMeasureOperations_ptr aMeasureOp =
|
GEOM::GEOM_IMeasureOperations_ptr aMeasureOp =
|
||||||
myGeometryGUI->GetGeomGen()->GetIMeasureOperations( getStudyId() );
|
myGeometryGUI->GetGeomGen()->GetIMeasureOperations();
|
||||||
double Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz;
|
double Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz;
|
||||||
aMeasureOp->GetPosition( geomObj, Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz);
|
aMeasureOp->GetPosition( geomObj, Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz);
|
||||||
if ( aMeasureOp->IsDone() )
|
if ( aMeasureOp->IsDone() )
|
||||||
|
@ -810,7 +810,7 @@ void EntityGUI_SubShapeDlg::activateSelection()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr EntityGUI_SubShapeDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr EntityGUI_SubShapeDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIShapesOperations(getStudyId());
|
return getGeomEngine()->GetIShapesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -169,7 +169,7 @@ void EntityGUI_SurfFromFaceDlg::enterEvent (QEvent*)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr EntityGUI_SurfFromFaceDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr EntityGUI_SurfFromFaceDlg::createOperation()
|
||||||
{
|
{
|
||||||
return myGeomGUI->GetGeomGen()->GetIShapesOperations(getStudyId());
|
return myGeomGUI->GetGeomGen()->GetIShapesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -869,8 +869,7 @@ void GEOMBase::PublishSubObject( GEOM::GEOM_Object_ptr object, const QString& na
|
|||||||
QString fatherEntry = GetEntry( father );
|
QString fatherEntry = GetEntry( father );
|
||||||
if ( entry.isEmpty() && !CORBA::is_nil( father ) && !fatherEntry.isEmpty() ) {
|
if ( entry.isEmpty() && !CORBA::is_nil( father ) && !fatherEntry.isEmpty() ) {
|
||||||
QString aName = !name.isEmpty() ? name : GetName( object );
|
QString aName = !name.isEmpty() ? name : GetName( object );
|
||||||
GeometryGUI::GetGeomGen()->AddInStudy( GeometryGUI::ClientStudyToStudy( studyDS ),
|
GeometryGUI::GetGeomGen()->AddInStudy( object, aName.toLatin1().data(), father.in() );
|
||||||
object, aName.toLatin1().data(), father.in() );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -595,12 +595,10 @@ QString GEOMBase_Helper::addInStudy( GEOM::GEOM_Object_ptr theObj, const char* t
|
|||||||
if ( !aStudy || theObj->_is_nil() )
|
if ( !aStudy || theObj->_is_nil() )
|
||||||
return QString();
|
return QString();
|
||||||
|
|
||||||
SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy(aStudy);
|
|
||||||
|
|
||||||
GEOM::GEOM_Object_ptr aFatherObj = getFather( theObj );
|
GEOM::GEOM_Object_ptr aFatherObj = getFather( theObj );
|
||||||
|
|
||||||
SALOMEDS::SObject_var aSO =
|
SALOMEDS::SObject_var aSO =
|
||||||
getGeomEngine()->AddInStudy(aStudyDS, theObj, theName, aFatherObj);
|
getGeomEngine()->AddInStudy(theObj, theName, aFatherObj);
|
||||||
|
|
||||||
QString anEntry;
|
QString anEntry;
|
||||||
if ( !aSO->_is_nil() ) {
|
if ( !aSO->_is_nil() ) {
|
||||||
@ -609,7 +607,7 @@ QString GEOMBase_Helper::addInStudy( GEOM::GEOM_Object_ptr theObj, const char* t
|
|||||||
}
|
}
|
||||||
// Each dialog is responsible for this method implementation,
|
// Each dialog is responsible for this method implementation,
|
||||||
// default implementation does nothing
|
// default implementation does nothing
|
||||||
restoreSubShapes(aStudyDS, aSO);
|
restoreSubShapes(aSO);
|
||||||
aSO->UnRegister();
|
aSO->UnRegister();
|
||||||
|
|
||||||
return anEntry;
|
return anEntry;
|
||||||
@ -619,15 +617,14 @@ QString GEOMBase_Helper::addInStudy( GEOM::GEOM_Object_ptr theObj, const char* t
|
|||||||
// Function : restoreSubShapes
|
// Function : restoreSubShapes
|
||||||
// Purpose : restore tree of argument's sub-shapes under the resulting shape
|
// Purpose : restore tree of argument's sub-shapes under the resulting shape
|
||||||
//================================================================
|
//================================================================
|
||||||
void GEOMBase_Helper::restoreSubShapes (SALOMEDS::Study_ptr /*theStudy*/,
|
void GEOMBase_Helper::restoreSubShapes (SALOMEDS::SObject_ptr /*theSObject*/)
|
||||||
SALOMEDS::SObject_ptr /*theSObject*/)
|
|
||||||
{
|
{
|
||||||
// do nothing by default
|
// do nothing by default
|
||||||
|
|
||||||
// example of implementation in particular dialog:
|
// example of implementation in particular dialog:
|
||||||
// GEOM::ListOfGO anArgs;
|
// GEOM::ListOfGO anArgs;
|
||||||
// anArgs.length(0); // empty list means that all arguments should be restored
|
// anArgs.length(0); // empty list means that all arguments should be restored
|
||||||
// getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
|
// getGeomEngine()->RestoreSubShapesSO(theSObject, anArgs,
|
||||||
// /*theFindMethod=*/GEOM::FSM_GetInPlace,
|
// /*theFindMethod=*/GEOM::FSM_GetInPlace,
|
||||||
// /*theInheritFirstArg=*/false);
|
// /*theInheritFirstArg=*/false);
|
||||||
}
|
}
|
||||||
@ -657,18 +654,6 @@ void GEOMBase_Helper::updateViewer()
|
|||||||
getDisplayer()->UpdateViewer();
|
getDisplayer()->UpdateViewer();
|
||||||
}
|
}
|
||||||
|
|
||||||
//================================================================
|
|
||||||
// Function : getStudyId
|
|
||||||
// Purpose : Get study Id
|
|
||||||
//================================================================
|
|
||||||
int GEOMBase_Helper::getStudyId() const
|
|
||||||
{
|
|
||||||
int anId = -1;
|
|
||||||
if ( getStudy() )
|
|
||||||
anId = getStudy()->id();
|
|
||||||
return anId;
|
|
||||||
}
|
|
||||||
|
|
||||||
//================================================================
|
//================================================================
|
||||||
// Function : getStudy
|
// Function : getStudy
|
||||||
// Purpose : Returns the active study. It is recommended to use
|
// Purpose : Returns the active study. It is recommended to use
|
||||||
@ -1365,7 +1350,7 @@ QList<GEOM::GeomObjPtr> GEOMBase_Helper::getSelected( const QList<TopAbs_ShapeEn
|
|||||||
GEOM::GeomObjPtr subShape = findObjectInFather( object.get(), idx );
|
GEOM::GeomObjPtr subShape = findObjectInFather( object.get(), idx );
|
||||||
if ( !subShape ) {
|
if ( !subShape ) {
|
||||||
// sub-shape is not yet published in the study
|
// sub-shape is not yet published in the study
|
||||||
GEOM::ShapesOpPtr shapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
GEOM::ShapesOpPtr shapesOp = getGeomEngine()->GetIShapesOperations();
|
||||||
subShape.take( shapesOp->GetSubShape( object.get(), idx ) ); // take ownership!
|
subShape.take( shapesOp->GetSubShape( object.get(), idx ) ); // take ownership!
|
||||||
}
|
}
|
||||||
if ( typeInList( (TopAbs_ShapeEnum)(subShape->GetShapeType()), types ) ) {
|
if ( typeInList( (TopAbs_ShapeEnum)(subShape->GetShapeType()), types ) ) {
|
||||||
|
@ -120,7 +120,6 @@ protected:
|
|||||||
bool hasCommand () const;
|
bool hasCommand () const;
|
||||||
|
|
||||||
void updateObjBrowser() const;
|
void updateObjBrowser() const;
|
||||||
int getStudyId () const;
|
|
||||||
SalomeApp_Study* getStudy () const;
|
SalomeApp_Study* getStudy () const;
|
||||||
bool checkViewWindow ();
|
bool checkViewWindow ();
|
||||||
|
|
||||||
@ -162,7 +161,7 @@ protected:
|
|||||||
// It should perform the required operation and put all new or modified objects into
|
// It should perform the required operation and put all new or modified objects into
|
||||||
// <objects> argument.Should return <false> if some error occurs during its execution.
|
// <objects> argument.Should return <false> if some error occurs during its execution.
|
||||||
|
|
||||||
virtual void restoreSubShapes( SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_ptr theSObject );
|
virtual void restoreSubShapes( SALOMEDS::SObject_ptr theSObject );
|
||||||
// This method is called by addInStudy().
|
// This method is called by addInStudy().
|
||||||
|
|
||||||
virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr theObj );
|
virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr theObj );
|
||||||
|
@ -187,7 +187,7 @@ void GEOMBase_Skeleton::initSpinBox( SalomeApp_DoubleSpinBox* spinBox,
|
|||||||
void GEOMBase_Skeleton::updateAttributes( GEOM::GEOM_Object_ptr theObj,
|
void GEOMBase_Skeleton::updateAttributes( GEOM::GEOM_Object_ptr theObj,
|
||||||
const QStringList& theParameters)
|
const QStringList& theParameters)
|
||||||
{
|
{
|
||||||
SALOMEDS::Study_var aStudy = GeometryGUI::ClientStudyToStudy(getStudy()->studyDS());
|
SALOMEDS::Study_var aStudy = GeometryGUI::GetStudy();
|
||||||
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
|
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
|
||||||
SALOMEDS::SObject_var aSObject = aStudy->FindObjectID(theObj->GetStudyEntry());
|
SALOMEDS::SObject_var aSObject = aStudy->FindObjectID(theObj->GetStudyEntry());
|
||||||
SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(aSObject, "AttributeString");
|
SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(aSObject, "AttributeString");
|
||||||
|
@ -137,7 +137,7 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GeometryGUI::StudyTextureMap GeometryGUI::myTextureMap;
|
GeometryGUI::TextureMap GeometryGUI::myTextureMap;
|
||||||
|
|
||||||
GEOM::GEOM_Gen_var GeometryGUI::myComponentGeom = GEOM::GEOM_Gen::_nil();
|
GEOM::GEOM_Gen_var GeometryGUI::myComponentGeom = GEOM::GEOM_Gen::_nil();
|
||||||
|
|
||||||
@ -177,17 +177,15 @@ CORBA::Object_var GeometryGUI::ClientSObjectToObject (_PTR(SObject) theSObject)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function : ClientStudyToStudy
|
// function : GetStudy
|
||||||
// purpose :
|
// purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
SALOMEDS::Study_var GeometryGUI::ClientStudyToStudy (_PTR(Study) theStudy)
|
SALOMEDS::Study_var GeometryGUI::GetStudy()
|
||||||
{
|
{
|
||||||
SALOME_NamingService *aNamingService = SalomeApp_Application::namingService();
|
SALOME_NamingService *aNamingService = SalomeApp_Application::namingService();
|
||||||
CORBA::Object_var aSMObject = aNamingService->Resolve("/myStudyManager");
|
CORBA::Object_var aStudyObject = aNamingService->Resolve("/Study");
|
||||||
SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(aSMObject);
|
SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(aStudyObject);
|
||||||
int aStudyID = theStudy->StudyId();
|
return aStudy._retn();
|
||||||
SALOMEDS::Study_var aDSStudy = aStudyManager->GetStudyByID(aStudyID);
|
|
||||||
return aDSStudy._retn();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeometryGUI::Modified (bool theIsUpdateActions)
|
void GeometryGUI::Modified (bool theIsUpdateActions)
|
||||||
@ -882,9 +880,8 @@ void GeometryGUI::createOriginAndBaseVectors()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( appStudy ) {
|
if ( appStudy ) {
|
||||||
_PTR(Study) studyDS = appStudy->studyDS();
|
if ( !CORBA::is_nil( GetGeomGen() ) ) {
|
||||||
if ( studyDS && !CORBA::is_nil( GetGeomGen() ) ) {
|
GEOM::GEOM_IBasicOperations_var aBasicOperations = GetGeomGen()->GetIBasicOperations();
|
||||||
GEOM::GEOM_IBasicOperations_var aBasicOperations = GetGeomGen()->GetIBasicOperations( studyDS->StudyId() );
|
|
||||||
if ( !aBasicOperations->_is_nil() ) {
|
if ( !aBasicOperations->_is_nil() ) {
|
||||||
SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
|
SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
|
||||||
double aLength = aResourceMgr->doubleValue( "Geometry", "base_vectors_length", 1.0 );
|
double aLength = aResourceMgr->doubleValue( "Geometry", "base_vectors_length", 1.0 );
|
||||||
@ -893,11 +890,10 @@ void GeometryGUI::createOriginAndBaseVectors()
|
|||||||
GEOM::GEOM_Object_var anOY = aBasicOperations->MakeVectorDXDYDZ( 0.0, aLength, 0.0 );
|
GEOM::GEOM_Object_var anOY = aBasicOperations->MakeVectorDXDYDZ( 0.0, aLength, 0.0 );
|
||||||
GEOM::GEOM_Object_var anOZ = aBasicOperations->MakeVectorDXDYDZ( 0.0, 0.0, aLength );
|
GEOM::GEOM_Object_var anOZ = aBasicOperations->MakeVectorDXDYDZ( 0.0, 0.0, aLength );
|
||||||
|
|
||||||
SALOMEDS::Study_var aDSStudy = ClientStudyToStudy( studyDS );
|
GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(), anOrigin, "O" );
|
||||||
GetGeomGen()->PublishInStudy( aDSStudy, SALOMEDS::SObject::_nil(), anOrigin, "O" );
|
GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(), anOX, "OX" );
|
||||||
GetGeomGen()->PublishInStudy( aDSStudy, SALOMEDS::SObject::_nil(), anOX, "OX" );
|
GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(), anOY, "OY" );
|
||||||
GetGeomGen()->PublishInStudy( aDSStudy, SALOMEDS::SObject::_nil(), anOY, "OY" );
|
GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(), anOZ, "OZ" );
|
||||||
GetGeomGen()->PublishInStudy( aDSStudy, SALOMEDS::SObject::_nil(), anOZ, "OZ" );
|
|
||||||
anOrigin->UnRegister();
|
anOrigin->UnRegister();
|
||||||
anOX->UnRegister();
|
anOX->UnRegister();
|
||||||
anOY->UnRegister();
|
anOY->UnRegister();
|
||||||
@ -2155,31 +2151,27 @@ QString GeometryGUI::engineIOR() const
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle(TColStd_HArray1OfByte) GeometryGUI::getTexture
|
Handle(TColStd_HArray1OfByte) GeometryGUI::getTexture (int theId, int& theWidth, int& theHeight)
|
||||||
(SalomeApp_Study* theStudy, int theId, int& theWidth, int& theHeight)
|
|
||||||
{
|
{
|
||||||
theWidth = theHeight = 0;
|
theWidth = theHeight = 0;
|
||||||
|
|
||||||
Handle(TColStd_HArray1OfByte) aTexture;
|
Handle(TColStd_HArray1OfByte) aTexture;
|
||||||
|
|
||||||
if (theStudy) {
|
aTexture = myTextureMap[ theId ];
|
||||||
TextureMap aTextureMap = myTextureMap[ theStudy->studyDS()->StudyId() ];
|
if ( aTexture.IsNull() ) {
|
||||||
aTexture = aTextureMap[ theId ];
|
GEOM::GEOM_IInsertOperations_var aInsOp = GeometryGUI::GetGeomGen()->GetIInsertOperations();
|
||||||
if ( aTexture.IsNull() ) {
|
if ( !aInsOp->_is_nil() ) {
|
||||||
GEOM::GEOM_IInsertOperations_var aInsOp = GeometryGUI::GetGeomGen()->GetIInsertOperations( theStudy->studyDS()->StudyId() );
|
CORBA::Long aWidth, aHeight;
|
||||||
if ( !aInsOp->_is_nil() ) {
|
SALOMEDS::TMPFile_var aStream = aInsOp->GetTexture( theId, aWidth, aHeight );
|
||||||
CORBA::Long aWidth, aHeight;
|
if ( aWidth > 0 && aHeight > 0 && aStream->length() > 0 ) {
|
||||||
SALOMEDS::TMPFile_var aStream = aInsOp->GetTexture( theId, aWidth, aHeight );
|
theWidth = aWidth;
|
||||||
if ( aWidth > 0 && aHeight > 0 && aStream->length() > 0 ) {
|
theHeight = aHeight;
|
||||||
theWidth = aWidth;
|
|
||||||
theHeight = aHeight;
|
|
||||||
|
|
||||||
aTexture = new TColStd_HArray1OfByte (1, aStream->length());
|
aTexture = new TColStd_HArray1OfByte (1, aStream->length());
|
||||||
|
|
||||||
for (int i = 0; i < aStream->length(); i++)
|
for (int i = 0; i < aStream->length(); i++)
|
||||||
aTexture->SetValue( i+1, (Standard_Byte)aStream[i] );
|
aTexture->SetValue( i+1, (Standard_Byte)aStream[i] );
|
||||||
aTextureMap[ theId ] = aTexture;
|
myTextureMap[ theId ] = aTexture;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3246,12 +3238,11 @@ void GeometryGUI::ClearShapeBuffer( GEOM::GEOM_Object_ptr theObj )
|
|||||||
TCollection_AsciiString asciiIOR( (char *)IOR.in() );
|
TCollection_AsciiString asciiIOR( (char *)IOR.in() );
|
||||||
GEOM_Client::get_client().RemoveShapeFromBuffer( asciiIOR );
|
GEOM_Client::get_client().RemoveShapeFromBuffer( asciiIOR );
|
||||||
|
|
||||||
SALOMEDSClient_StudyManager *aManager = SalomeApp_Application::studyMgr();
|
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( application()->activeStudy() );
|
||||||
|
if ( !appStudy )
|
||||||
|
return;
|
||||||
|
|
||||||
if (!aManager)
|
_PTR(Study) aStudy = appStudy->studyDS();
|
||||||
return;
|
|
||||||
|
|
||||||
_PTR(Study) aStudy = aManager->GetStudyByID(theObj->GetStudyID());
|
|
||||||
|
|
||||||
if ( !aStudy )
|
if ( !aStudy )
|
||||||
return;
|
return;
|
||||||
|
@ -85,14 +85,14 @@ public:
|
|||||||
virtual void initialize( CAM_Application* );
|
virtual void initialize( CAM_Application* );
|
||||||
virtual QString engineIOR() const;
|
virtual QString engineIOR() const;
|
||||||
|
|
||||||
static Handle(TColStd_HArray1OfByte) getTexture (SalomeApp_Study*, int, int&, int&);
|
static Handle(TColStd_HArray1OfByte) getTexture (int, int&, int&);
|
||||||
|
|
||||||
static bool InitGeomGen();
|
static bool InitGeomGen();
|
||||||
|
|
||||||
static GEOM::GEOM_Gen_var GetGeomGen();
|
static GEOM::GEOM_Gen_var GetGeomGen();
|
||||||
|
|
||||||
static CORBA::Object_var ClientSObjectToObject (_PTR(SObject) theSObject);
|
static CORBA::Object_var ClientSObjectToObject (_PTR(SObject) theSObject);
|
||||||
static SALOMEDS::Study_var ClientStudyToStudy (_PTR(Study) theStudy);
|
static SALOMEDS::Study_var GetStudy();
|
||||||
|
|
||||||
static void Modified( bool = true );
|
static void Modified( bool = true );
|
||||||
|
|
||||||
@ -206,31 +206,30 @@ private:
|
|||||||
|
|
||||||
typedef QMap<long, Handle(TColStd_HArray1OfByte)> TextureMap;
|
typedef QMap<long, Handle(TColStd_HArray1OfByte)> TextureMap;
|
||||||
|
|
||||||
typedef QMap<long, TextureMap> StudyTextureMap;
|
|
||||||
typedef QMap<QString, GEOMGUI*> GUIMap;
|
typedef QMap<QString, GEOMGUI*> GUIMap;
|
||||||
|
|
||||||
typedef QPair<QString, QString> PluginAction;
|
typedef QPair<QString, QString> PluginAction;
|
||||||
|
|
||||||
GUIMap myGUIMap; // GUI libraries map
|
GUIMap myGUIMap; // GUI libraries map
|
||||||
QDialog* myActiveDialogBox; // active dialog box
|
QDialog* myActiveDialogBox; // active dialog box
|
||||||
gp_Ax3 myWorkingPlane;
|
gp_Ax3 myWorkingPlane;
|
||||||
//QMap<int,QString> myRules; // popup rules
|
//QMap<int,QString> myRules; // popup rules
|
||||||
static StudyTextureMap myTextureMap; // texture map
|
static TextureMap myTextureMap; // texture map
|
||||||
|
|
||||||
QMap<int, PluginAction> myPluginActions; // plugin actions
|
QMap<int, PluginAction> myPluginActions; // plugin actions
|
||||||
QMap<QString, QString> myPluginLibs; // plugin name to plugin client library
|
QMap<QString, QString> myPluginLibs; // plugin name to plugin client library
|
||||||
|
|
||||||
QList<GEOMGUI_OCCSelector*> myOCCSelectors;
|
QList<GEOMGUI_OCCSelector*> myOCCSelectors;
|
||||||
QList<LightApp_VTKSelector*> myVTKSelectors;
|
QList<LightApp_VTKSelector*> myVTKSelectors;
|
||||||
|
|
||||||
LightApp_Displayer* myDisplayer;
|
LightApp_Displayer* myDisplayer;
|
||||||
int myLocalSelectionMode; //Select Only
|
int myLocalSelectionMode; //Select Only
|
||||||
|
|
||||||
GEOMGUI_CreationInfoWdg* myCreationInfoWdg;
|
GEOMGUI_CreationInfoWdg* myCreationInfoWdg;
|
||||||
|
|
||||||
GEOMGUI_TextTreeWdg* myTextTreeWdg;
|
GEOMGUI_TextTreeWdg* myTextTreeWdg;
|
||||||
|
|
||||||
SALOME_ListIO myTopLevelIOList;
|
SALOME_ListIO myTopLevelIOList;
|
||||||
|
|
||||||
friend class DisplayGUI;
|
friend class DisplayGUI;
|
||||||
};
|
};
|
||||||
|
@ -52,7 +52,7 @@ myDisplayer(NULL)
|
|||||||
myApp = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
myApp = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
||||||
if ( !myApp ) return;
|
if ( !myApp ) return;
|
||||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
|
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
|
||||||
myStudy = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() )->studyDS();
|
myStudy = study->studyDS();
|
||||||
myDisplayer = GEOM_Displayer( study );
|
myDisplayer = GEOM_Displayer( study );
|
||||||
|
|
||||||
setWindowTitle( tr( "GEOM_REDUCE_STUDY_TITLE" ) );
|
setWindowTitle( tr( "GEOM_REDUCE_STUDY_TITLE" ) );
|
||||||
@ -164,9 +164,8 @@ void GEOMToolsGUI_ReduceStudyDlg::init( const std::set<std::string>& theObjectEn
|
|||||||
GEOM::string_array_var subObjects = new GEOM::string_array();
|
GEOM::string_array_var subObjects = new GEOM::string_array();
|
||||||
GEOM::string_array_var otherObjects = new GEOM::string_array();
|
GEOM::string_array_var otherObjects = new GEOM::string_array();
|
||||||
|
|
||||||
GeometryGUI::GetGeomGen()->GetEntriesToReduceStudy( GeometryGUI::ClientStudyToStudy( myStudy ),
|
GeometryGUI::GetGeomGen()->GetEntriesToReduceStudy( keptObjects, parentsObjects,
|
||||||
keptObjects, parentsObjects,
|
subObjects, otherObjects );
|
||||||
subObjects, otherObjects );
|
|
||||||
|
|
||||||
for ( int i = 0; i < keptObjects->length(); i++ )
|
for ( int i = 0; i < keptObjects->length(); i++ )
|
||||||
myKeptObjects.insert( keptObjects[i].in() );
|
myKeptObjects.insert( keptObjects[i].in() );
|
||||||
@ -269,7 +268,7 @@ void GEOMToolsGUI_ReduceStudyDlg::addObjectsToTree( QTreeWidget* theWidget, std:
|
|||||||
std::set<std::string>::iterator it;
|
std::set<std::string>::iterator it;
|
||||||
for( it = theObjects.begin(); it != theObjects.end(); ++it ) {
|
for( it = theObjects.begin(); it != theObjects.end(); ++it ) {
|
||||||
std::string objectEntry = *it;
|
std::string objectEntry = *it;
|
||||||
GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( myStudy->StudyId(), objectEntry.c_str() );
|
GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( objectEntry.c_str() );
|
||||||
GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( GeomBaseObject );
|
GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( GeomBaseObject );
|
||||||
QString studyEntry = GeomBaseObject->GetStudyEntry();
|
QString studyEntry = GeomBaseObject->GetStudyEntry();
|
||||||
if( GeomObject->_is_nil() || studyEntry.isEmpty() || !isObjectDrawable( studyEntry.toStdString() ) )
|
if( GeomObject->_is_nil() || studyEntry.isEmpty() || !isObjectDrawable( studyEntry.toStdString() ) )
|
||||||
@ -394,8 +393,7 @@ void GEOMToolsGUI_ReduceStudyDlg::unpublishObjects( std::set<std::string>& theOb
|
|||||||
std::set<std::string>::iterator it;
|
std::set<std::string>::iterator it;
|
||||||
for( it = theObjects.begin(); it != theObjects.end(); ++it ) {
|
for( it = theObjects.begin(); it != theObjects.end(); ++it ) {
|
||||||
std::string objectEntry = *it;
|
std::string objectEntry = *it;
|
||||||
GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( myStudy->StudyId(),
|
GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( objectEntry.c_str() );
|
||||||
objectEntry.c_str() );
|
|
||||||
std::string studyEntry = GeomBaseObject->GetStudyEntry();
|
std::string studyEntry = GeomBaseObject->GetStudyEntry();
|
||||||
if ( studyEntry == "" || !isObjectDrawable( studyEntry ) )
|
if ( studyEntry == "" || !isObjectDrawable( studyEntry ) )
|
||||||
continue;
|
continue;
|
||||||
@ -427,8 +425,7 @@ void GEOMToolsGUI_ReduceStudyDlg::removeObjects( std::set<std::string>& theObjec
|
|||||||
std::set<std::string>::iterator it;
|
std::set<std::string>::iterator it;
|
||||||
for( it = theObjects.begin(); it != theObjects.end(); ++it ) {
|
for( it = theObjects.begin(); it != theObjects.end(); ++it ) {
|
||||||
std::string objectEntry = *it;
|
std::string objectEntry = *it;
|
||||||
GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( myStudy->StudyId(),
|
GEOM::GEOM_BaseObject_var GeomBaseObject = GeometryGUI::GetGeomGen()->GetObject( objectEntry.c_str() );
|
||||||
objectEntry.c_str() );
|
|
||||||
std::string studyEntry = GeomBaseObject->GetStudyEntry();
|
std::string studyEntry = GeomBaseObject->GetStudyEntry();
|
||||||
if ( studyEntry == "" )
|
if ( studyEntry == "" )
|
||||||
GeometryGUI::GetGeomGen()->RemoveObject( GeomBaseObject );
|
GeometryGUI::GetGeomGen()->RemoveObject( GeomBaseObject );
|
||||||
|
@ -83,17 +83,6 @@ char* GEOM_BaseObject_i::GetEntry()
|
|||||||
return CORBA::string_dup(anEntstr);
|
return CORBA::string_dup(anEntstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
/*!
|
|
||||||
* GetStudyID
|
|
||||||
*/
|
|
||||||
//=============================================================================
|
|
||||||
|
|
||||||
CORBA::Long GEOM_BaseObject_i::GetStudyID()
|
|
||||||
{
|
|
||||||
return _impl->GetDocID();
|
|
||||||
}
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* GetType
|
* GetType
|
||||||
@ -184,7 +173,7 @@ GEOM::ListOfGBO* GEOM_BaseObject_i::GetDependency()
|
|||||||
HANDLE_NAMESPACE(GEOM_BaseObject) anObj = HANDLE_NAMESPACE(GEOM_BaseObject)::DownCast(aSeq->Value(i));
|
HANDLE_NAMESPACE(GEOM_BaseObject) anObj = HANDLE_NAMESPACE(GEOM_BaseObject)::DownCast(aSeq->Value(i));
|
||||||
if (anObj.IsNull()) continue;
|
if (anObj.IsNull()) continue;
|
||||||
TDF_Tool::Entry(anObj->GetEntry(), anEntry);
|
TDF_Tool::Entry(anObj->GetEntry(), anEntry);
|
||||||
GEOM::GEOM_BaseObject_var obj = _engine->GetObject(anObj->GetDocID(), (char*) anEntry.ToCString());
|
GEOM::GEOM_BaseObject_var obj = _engine->GetObject((char*) anEntry.ToCString());
|
||||||
aList[i-1] = obj;
|
aList[i-1] = obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,8 +202,7 @@ GEOM::ListOfGBO* GEOM_BaseObject_i::GetLastDependency()
|
|||||||
for (int i = 1; i<=aLength; i++) {
|
for (int i = 1; i<=aLength; i++) {
|
||||||
HANDLE_NAMESPACE(GEOM_BaseObject) anObj = HANDLE_NAMESPACE(GEOM_BaseObject)::DownCast(aSeq->Value(i));
|
HANDLE_NAMESPACE(GEOM_BaseObject) anObj = HANDLE_NAMESPACE(GEOM_BaseObject)::DownCast(aSeq->Value(i));
|
||||||
if (anObj.IsNull()) continue;
|
if (anObj.IsNull()) continue;
|
||||||
GEOM::GEOM_BaseObject_var obj = _engine->GetObject(anObj->GetDocID(),
|
GEOM::GEOM_BaseObject_var obj = _engine->GetObject(anObj->GetEntryString().ToCString());
|
||||||
anObj->GetEntryString().ToCString());
|
|
||||||
aList[i-1] = GEOM::GEOM_BaseObject::_duplicate( obj );
|
aList[i-1] = GEOM::GEOM_BaseObject::_duplicate( obj );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,8 +42,6 @@ class GEOM_I_EXPORT GEOM_BaseObject_i : public virtual POA_GEOM::GEOM_BaseObject
|
|||||||
|
|
||||||
virtual char* GetEntry();
|
virtual char* GetEntry();
|
||||||
|
|
||||||
virtual CORBA::Long GetStudyID();
|
|
||||||
|
|
||||||
virtual CORBA::Long GetType();
|
virtual CORBA::Long GetType();
|
||||||
|
|
||||||
virtual CORBA::Long GetTick();
|
virtual CORBA::Long GetTick();
|
||||||
|
@ -151,7 +151,7 @@ Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
|
|||||||
}
|
}
|
||||||
|
|
||||||
TCollection_AsciiString aScript;
|
TCollection_AsciiString aScript;
|
||||||
aScript += _impl->DumpPython(aStudy->StudyId(), objectDataVec, aVariableMap, isPublished, isMultiFile, isValidScript);
|
aScript += _impl->DumpPython(objectDataVec, aVariableMap, isPublished, isMultiFile, isValidScript);
|
||||||
|
|
||||||
if (isPublished)
|
if (isPublished)
|
||||||
{
|
{
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -71,7 +71,6 @@ class GEOM_I_EXPORT GEOM_GenericOperationsCreator
|
|||||||
public:
|
public:
|
||||||
// Create operations
|
// Create operations
|
||||||
virtual GEOM_IOperations_i* Create (PortableServer::POA_ptr thePOA,
|
virtual GEOM_IOperations_i* Create (PortableServer::POA_ptr thePOA,
|
||||||
int theStudyId,
|
|
||||||
GEOM::GEOM_Gen_ptr theEngine,
|
GEOM::GEOM_Gen_ptr theEngine,
|
||||||
::GEOMImpl_Gen* theGenImpl) = 0;
|
::GEOMImpl_Gen* theGenImpl) = 0;
|
||||||
// return the name of IDL module
|
// return the name of IDL module
|
||||||
@ -109,6 +108,9 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
|
|||||||
// Get Naming Service object
|
// Get Naming Service object
|
||||||
SALOME_NamingService* GetNS() { return name_service; }
|
SALOME_NamingService* GetNS() { return name_service; }
|
||||||
|
|
||||||
|
// Get Study
|
||||||
|
SALOMEDS::Study_var GetStudy();
|
||||||
|
|
||||||
//-----------------------------------------------------------------------//
|
//-----------------------------------------------------------------------//
|
||||||
// Inherited methods from SALOMEDS::Driver //
|
// Inherited methods from SALOMEDS::Driver //
|
||||||
//-----------------------------------------------------------------------//
|
//-----------------------------------------------------------------------//
|
||||||
@ -145,13 +147,11 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
|
|||||||
CORBA::Boolean isASCII);
|
CORBA::Boolean isASCII);
|
||||||
|
|
||||||
bool CanPublishInStudy(CORBA::Object_ptr theIOR);
|
bool CanPublishInStudy(CORBA::Object_ptr theIOR);
|
||||||
SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
|
SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::SObject_ptr theSObject,
|
||||||
SALOMEDS::SObject_ptr theSObject,
|
|
||||||
CORBA::Object_ptr theObject,
|
CORBA::Object_ptr theObject,
|
||||||
const char* theName) throw (SALOME::SALOME_Exception) ;
|
const char* theName) throw (SALOME::SALOME_Exception) ;
|
||||||
|
|
||||||
GEOM::ListOfGO* PublishNamedShapesInStudy(SALOMEDS::Study_ptr theStudy,
|
GEOM::ListOfGO* PublishNamedShapesInStudy(CORBA::Object_ptr theObject);
|
||||||
CORBA::Object_ptr theObject);
|
|
||||||
|
|
||||||
CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
|
CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
|
||||||
SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
|
SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
|
||||||
@ -163,16 +163,14 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
|
|||||||
/*! \brief Adds theObject in the study with a name = theName, if
|
/*! \brief Adds theObject in the study with a name = theName, if
|
||||||
* theFather is not null the object is placed under theFather
|
* theFather is not null the object is placed under theFather
|
||||||
*/
|
*/
|
||||||
SALOMEDS::SObject_ptr AddInStudy (SALOMEDS::Study_ptr theStudy,
|
SALOMEDS::SObject_ptr AddInStudy (GEOM::GEOM_BaseObject_ptr theObject,
|
||||||
GEOM::GEOM_BaseObject_ptr theObject,
|
|
||||||
const char* theName,
|
const char* theName,
|
||||||
GEOM::GEOM_BaseObject_ptr theFather);
|
GEOM::GEOM_BaseObject_ptr theFather);
|
||||||
|
|
||||||
/*! \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments.
|
/*! \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments.
|
||||||
* To be used from python scripts out of geompy.addToStudy (non-default usage)
|
* To be used from python scripts out of geompy.addToStudy (non-default usage)
|
||||||
*/
|
*/
|
||||||
GEOM::ListOfGO* RestoreSubShapesO (SALOMEDS::Study_ptr theStudy,
|
GEOM::ListOfGO* RestoreSubShapesO (GEOM::GEOM_Object_ptr theObject,
|
||||||
GEOM::GEOM_Object_ptr theObject,
|
|
||||||
const GEOM::ListOfGO& theArgs,
|
const GEOM::ListOfGO& theArgs,
|
||||||
GEOM::find_shape_method theFindMethod,
|
GEOM::find_shape_method theFindMethod,
|
||||||
CORBA::Boolean theInheritFirstArg,
|
CORBA::Boolean theInheritFirstArg,
|
||||||
@ -181,8 +179,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
|
|||||||
/*! \brief Publish sub-shapes, standing for given in \a theArgs arguments and sub-shapes.
|
/*! \brief Publish sub-shapes, standing for given in \a theArgs arguments and sub-shapes.
|
||||||
* To be used from python scripts, generated by Dump Python.
|
* To be used from python scripts, generated by Dump Python.
|
||||||
*/
|
*/
|
||||||
GEOM::ListOfGO* RestoreGivenSubShapesO (SALOMEDS::Study_ptr theStudy,
|
GEOM::ListOfGO* RestoreGivenSubShapesO (GEOM::GEOM_Object_ptr theObject,
|
||||||
GEOM::GEOM_Object_ptr theObject,
|
|
||||||
const GEOM::ListOfGO& theArgs,
|
const GEOM::ListOfGO& theArgs,
|
||||||
GEOM::find_shape_method theFindMethod,
|
GEOM::find_shape_method theFindMethod,
|
||||||
CORBA::Boolean theInheritFirstArg,
|
CORBA::Boolean theInheritFirstArg,
|
||||||
@ -191,86 +188,83 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
|
|||||||
/*! \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments.
|
/*! \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments.
|
||||||
* To be used from GUI and from geompy.addToStudy
|
* To be used from GUI and from geompy.addToStudy
|
||||||
*/
|
*/
|
||||||
GEOM::ListOfGO* RestoreSubShapesSO (SALOMEDS::Study_ptr theStudy,
|
GEOM::ListOfGO* RestoreSubShapesSO (SALOMEDS::SObject_ptr theSObject,
|
||||||
SALOMEDS::SObject_ptr theSObject,
|
|
||||||
const GEOM::ListOfGO& theArgs,
|
const GEOM::ListOfGO& theArgs,
|
||||||
GEOM::find_shape_method theFindMethod,
|
GEOM::find_shape_method theFindMethod,
|
||||||
CORBA::Boolean theInheritFirstArg,
|
CORBA::Boolean theInheritFirstArg,
|
||||||
CORBA::Boolean theAddPrefix);
|
CORBA::Boolean theAddPrefix);
|
||||||
|
|
||||||
//Collects dependencies of the given objects from other ones
|
//Collects dependencies of the given objects from other ones
|
||||||
SALOMEDS::TMPFile* GetDependencyTree(SALOMEDS::Study_ptr theStudy,
|
SALOMEDS::TMPFile* GetDependencyTree(const GEOM::string_array& theObjectEntries);
|
||||||
const GEOM::string_array& theObjectEntries);
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------//
|
//-----------------------------------------------------------------------//
|
||||||
// Transaction methods //
|
// Transaction methods //
|
||||||
//-----------------------------------------------------------------------//
|
//-----------------------------------------------------------------------//
|
||||||
|
|
||||||
//Undos one transaction in the document associated with theStudyID
|
//Undos one transaction in the document
|
||||||
virtual void Undo(CORBA::Long theStudyID);
|
virtual void Undo();
|
||||||
|
|
||||||
//Redos one transaction in the document associated with theStudyID
|
//Redos one transaction in the document
|
||||||
virtual void Redo(CORBA::Long theStudyID);
|
virtual void Redo();
|
||||||
|
|
||||||
//-----------------------------------------------------------------------//
|
//-----------------------------------------------------------------------//
|
||||||
// Operations methods //
|
// Operations methods //
|
||||||
//-----------------------------------------------------------------------//
|
//-----------------------------------------------------------------------//
|
||||||
|
|
||||||
//Returns a pointer to BasicOperations interface
|
//Returns a pointer to BasicOperations interface
|
||||||
virtual GEOM::GEOM_IBasicOperations_ptr GetIBasicOperations (CORBA::Long theStudyID)
|
virtual GEOM::GEOM_IBasicOperations_ptr GetIBasicOperations()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
//Returns a pointer to TransformOperations interface
|
//Returns a pointer to TransformOperations interface
|
||||||
virtual GEOM::GEOM_ITransformOperations_ptr GetITransformOperations (CORBA::Long theStudyID)
|
virtual GEOM::GEOM_ITransformOperations_ptr GetITransformOperations()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
//Returns a pointer to 3DPrimOperations interface
|
//Returns a pointer to 3DPrimOperations interface
|
||||||
virtual GEOM::GEOM_I3DPrimOperations_ptr GetI3DPrimOperations (CORBA::Long theStudyID)
|
virtual GEOM::GEOM_I3DPrimOperations_ptr GetI3DPrimOperations()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
//Returns a pointer to ShapesOperations interface
|
//Returns a pointer to ShapesOperations interface
|
||||||
virtual GEOM::GEOM_IShapesOperations_ptr GetIShapesOperations (CORBA::Long theStudyID)
|
virtual GEOM::GEOM_IShapesOperations_ptr GetIShapesOperations()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
//Returns a pointer to BlocksOperations interface
|
//Returns a pointer to BlocksOperations interface
|
||||||
virtual GEOM::GEOM_IBlocksOperations_ptr GetIBlocksOperations (CORBA::Long theStudyID)
|
virtual GEOM::GEOM_IBlocksOperations_ptr GetIBlocksOperations()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
//Returns a pointer to BooleanOperations interface
|
//Returns a pointer to BooleanOperations interface
|
||||||
virtual GEOM::GEOM_IBooleanOperations_ptr GetIBooleanOperations (CORBA::Long theStudyID)
|
virtual GEOM::GEOM_IBooleanOperations_ptr GetIBooleanOperations()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
//Returns a pointer to CurvesOperations interface
|
//Returns a pointer to CurvesOperations interface
|
||||||
virtual GEOM::GEOM_ICurvesOperations_ptr GetICurvesOperations (CORBA::Long theStudyID)
|
virtual GEOM::GEOM_ICurvesOperations_ptr GetICurvesOperations()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
//Returns a pointer to LocalOperations interface
|
//Returns a pointer to LocalOperations interface
|
||||||
virtual GEOM::GEOM_ILocalOperations_ptr GetILocalOperations (CORBA::Long theStudyID)
|
virtual GEOM::GEOM_ILocalOperations_ptr GetILocalOperations()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
//Returns a pointer to HealingOperations interface
|
//Returns a pointer to HealingOperations interface
|
||||||
virtual GEOM::GEOM_IHealingOperations_ptr GetIHealingOperations (CORBA::Long theStudyID)
|
virtual GEOM::GEOM_IHealingOperations_ptr GetIHealingOperations()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
//Returns a pointer to InsertOperations interface
|
//Returns a pointer to InsertOperations interface
|
||||||
virtual GEOM::GEOM_IInsertOperations_ptr GetIInsertOperations (CORBA::Long theStudyID)
|
virtual GEOM::GEOM_IInsertOperations_ptr GetIInsertOperations()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
//Returns a pointer to MeasureOperations interface
|
//Returns a pointer to MeasureOperations interface
|
||||||
virtual GEOM::GEOM_IMeasureOperations_ptr GetIMeasureOperations (CORBA::Long theStudyID)
|
virtual GEOM::GEOM_IMeasureOperations_ptr GetIMeasureOperations()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
//Returns a pointer to GroupOperations interface
|
//Returns a pointer to GroupOperations interface
|
||||||
virtual GEOM::GEOM_IGroupOperations_ptr GetIGroupOperations (CORBA::Long theStudyID)
|
virtual GEOM::GEOM_IGroupOperations_ptr GetIGroupOperations()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
//Returns a pointer to FiedlOperations interface
|
//Returns a pointer to FiedlOperations interface
|
||||||
virtual GEOM::GEOM_IFieldOperations_ptr GetIFieldOperations (CORBA::Long theStudyID)
|
virtual GEOM::GEOM_IFieldOperations_ptr GetIFieldOperations()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
//Returns a pointer to corresponding plugin operations interface
|
//Returns a pointer to corresponding plugin operations interface
|
||||||
virtual GEOM::GEOM_IOperations_ptr GetPluginOperations (CORBA::Long theStudyID,
|
virtual GEOM::GEOM_IOperations_ptr GetPluginOperations (const char* theLibName)
|
||||||
const char* theLibName)
|
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
//Adds a new sub-shape
|
//Adds a new sub-shape
|
||||||
@ -283,8 +277,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
|
|||||||
|
|
||||||
virtual GEOM::GEOM_Object_ptr GetIORFromString(const char* stringIOR);
|
virtual GEOM::GEOM_Object_ptr GetIORFromString(const char* stringIOR);
|
||||||
|
|
||||||
virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
|
virtual Engines::TMPFile* DumpPython(CORBA::Boolean isPublished,
|
||||||
CORBA::Boolean isPublished,
|
|
||||||
CORBA::Boolean isMultiFile,
|
CORBA::Boolean isMultiFile,
|
||||||
CORBA::Boolean& isValidScript);
|
CORBA::Boolean& isValidScript);
|
||||||
|
|
||||||
@ -294,7 +287,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
|
|||||||
|
|
||||||
// Object information
|
// Object information
|
||||||
virtual bool hasObjectInfo();
|
virtual bool hasObjectInfo();
|
||||||
virtual char* getObjectInfo(CORBA::Long studyId, const char* entry);
|
virtual char* getObjectInfo(const char* entry);
|
||||||
|
|
||||||
// Version information
|
// Version information
|
||||||
virtual char* getVersion();
|
virtual char* getVersion();
|
||||||
@ -319,8 +312,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
|
|||||||
/*! \brief Fills 3 lists that is used to clean study of redundant objects.
|
/*! \brief Fills 3 lists that is used to clean study of redundant objects.
|
||||||
* To be used from GUI.
|
* To be used from GUI.
|
||||||
*/
|
*/
|
||||||
void GetEntriesToReduceStudy(SALOMEDS::Study_ptr theStudy,
|
void GetEntriesToReduceStudy(GEOM::string_array& theSelectedEntries,
|
||||||
GEOM::string_array& theSelectedEntries,
|
|
||||||
GEOM::string_array& theParentEntries,
|
GEOM::string_array& theParentEntries,
|
||||||
GEOM::string_array& theSubEntries,
|
GEOM::string_array& theSubEntries,
|
||||||
GEOM::string_array& theOtherEntries);
|
GEOM::string_array& theOtherEntries);
|
||||||
@ -329,35 +321,31 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
|
|||||||
// Internal methods //
|
// Internal methods //
|
||||||
//-----------------------------------------------------------------------//
|
//-----------------------------------------------------------------------//
|
||||||
|
|
||||||
virtual GEOM::GEOM_BaseObject_ptr GetObject(CORBA::Long theStudyID, const char* theEntry);
|
virtual GEOM::GEOM_BaseObject_ptr GetObject(const char* theEntry);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GEOM::ListOfGO* RestoreSubShapes (SALOMEDS::Study_ptr theStudy,
|
GEOM::ListOfGO* RestoreSubShapes (GEOM::GEOM_Object_ptr theObject,
|
||||||
GEOM::GEOM_Object_ptr theObject,
|
|
||||||
SALOMEDS::SObject_ptr theSObject,
|
SALOMEDS::SObject_ptr theSObject,
|
||||||
const GEOM::ListOfGO& theArgs,
|
const GEOM::ListOfGO& theArgs,
|
||||||
GEOM::find_shape_method theFindMethod,
|
GEOM::find_shape_method theFindMethod,
|
||||||
CORBA::Boolean theInheritFirstArg,
|
CORBA::Boolean theInheritFirstArg,
|
||||||
CORBA::Boolean theAddPrefix);
|
CORBA::Boolean theAddPrefix);
|
||||||
|
|
||||||
GEOM::ListOfGO* RestoreSubShapesOneLevel (SALOMEDS::Study_ptr theStudy,
|
GEOM::ListOfGO* RestoreSubShapesOneLevel (SALOMEDS::SObject_ptr theOldSO,
|
||||||
SALOMEDS::SObject_ptr theOldSO,
|
|
||||||
SALOMEDS::SObject_ptr theNewSO,
|
SALOMEDS::SObject_ptr theNewSO,
|
||||||
GEOM::GEOM_Object_ptr theNewO,
|
GEOM::GEOM_Object_ptr theNewO,
|
||||||
GEOM::ListOfGO& theOutArgs,
|
GEOM::ListOfGO& theOutArgs,
|
||||||
GEOM::find_shape_method theFindMethod,
|
GEOM::find_shape_method theFindMethod,
|
||||||
CORBA::Boolean theAddPrefix);
|
CORBA::Boolean theAddPrefix);
|
||||||
|
|
||||||
GEOM::ListOfGO* RestoreGivenSubShapes (SALOMEDS::Study_ptr theStudy,
|
GEOM::ListOfGO* RestoreGivenSubShapes (GEOM::GEOM_Object_ptr theObject,
|
||||||
GEOM::GEOM_Object_ptr theObject,
|
|
||||||
SALOMEDS::SObject_ptr theSObject,
|
SALOMEDS::SObject_ptr theSObject,
|
||||||
const GEOM::ListOfGO& theArgs,
|
const GEOM::ListOfGO& theArgs,
|
||||||
GEOM::find_shape_method theFindMethod,
|
GEOM::find_shape_method theFindMethod,
|
||||||
CORBA::Boolean theInheritFirstArg,
|
CORBA::Boolean theInheritFirstArg,
|
||||||
CORBA::Boolean theAddPrefix);
|
CORBA::Boolean theAddPrefix);
|
||||||
|
|
||||||
GEOM::ListOfGO* RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr theStudy,
|
GEOM::ListOfGO* RestoreGivenSubShapesOneLevel (SALOMEDS::SObject_ptr theOldSO,
|
||||||
SALOMEDS::SObject_ptr theOldSO,
|
|
||||||
SALOMEDS::SObject_ptr theNewSO,
|
SALOMEDS::SObject_ptr theNewSO,
|
||||||
GEOM::GEOM_Object_ptr theNewO,
|
GEOM::GEOM_Object_ptr theNewO,
|
||||||
std::set<std::string> theArgs,
|
std::set<std::string> theArgs,
|
||||||
@ -365,8 +353,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
|
|||||||
CORBA::Boolean theAddPrefix);
|
CORBA::Boolean theAddPrefix);
|
||||||
|
|
||||||
// auxilary for PublishNamedShapesInStudy
|
// auxilary for PublishNamedShapesInStudy
|
||||||
void CreateAndPublishGroup(SALOMEDS::Study_ptr theStudy,
|
void CreateAndPublishGroup(GEOM::GEOM_Object_var theMainShape,
|
||||||
GEOM::GEOM_Object_var theMainShape,
|
|
||||||
const TopTools_IndexedMapOfShape& anIndices,
|
const TopTools_IndexedMapOfShape& anIndices,
|
||||||
const TopTools_SequenceOfShape& SeqS,
|
const TopTools_SequenceOfShape& SeqS,
|
||||||
const TColStd_SequenceOfAsciiString& SeqN,
|
const TColStd_SequenceOfAsciiString& SeqN,
|
||||||
@ -389,8 +376,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
|
|||||||
std::set<std::string>& aChildren,
|
std::set<std::string>& aChildren,
|
||||||
std::set<std::string>& anOthers);
|
std::set<std::string>& anOthers);
|
||||||
|
|
||||||
void includeSubObjects(SALOMEDS::Study_ptr theStudy,
|
void includeSubObjects(const std::string& aSelectedEntry,
|
||||||
const std::string& aSelectedEntry,
|
|
||||||
std::set<std::string>& aSelected,
|
std::set<std::string>& aSelected,
|
||||||
std::set<std::string>& aParents,
|
std::set<std::string>& aParents,
|
||||||
std::set<std::string>& aChildren,
|
std::set<std::string>& aChildren,
|
||||||
|
@ -88,16 +88,6 @@ char* GEOM_IOperations_i::GetErrorCode()
|
|||||||
return CORBA::string_dup(_impl->GetErrorCode());
|
return CORBA::string_dup(_impl->GetErrorCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
/*!
|
|
||||||
* GetStudyID
|
|
||||||
*/
|
|
||||||
//=============================================================================
|
|
||||||
CORBA::Long GEOM_IOperations_i::GetStudyID()
|
|
||||||
{
|
|
||||||
return _impl->GetDocID();
|
|
||||||
}
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* StartOperation
|
* StartOperation
|
||||||
@ -156,7 +146,7 @@ GEOM_IOperations_i::GetBaseObjectImpl(GEOM::GEOM_BaseObject_ptr theObject)
|
|||||||
HANDLE_NAMESPACE(GEOM_BaseObject) anImpl;
|
HANDLE_NAMESPACE(GEOM_BaseObject) anImpl;
|
||||||
if (!CORBA::is_nil(theObject)) {
|
if (!CORBA::is_nil(theObject)) {
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
CORBA::String_var anEntry = theObject->GetEntry();
|
||||||
anImpl = GetImpl()->GetEngine()->GetObject( theObject->GetStudyID(), anEntry );
|
anImpl = GetImpl()->GetEngine()->GetObject( anEntry );
|
||||||
}
|
}
|
||||||
return anImpl;
|
return anImpl;
|
||||||
}
|
}
|
||||||
|
@ -45,8 +45,6 @@ class GEOM_I_EXPORT GEOM_IOperations_i : public virtual POA_GEOM::GEOM_IOperatio
|
|||||||
|
|
||||||
virtual char* GetErrorCode();
|
virtual char* GetErrorCode();
|
||||||
|
|
||||||
virtual CORBA::Long GetStudyID();
|
|
||||||
|
|
||||||
virtual GEOM::GEOM_BaseObject_ptr GetBaseObject(HANDLE_NAMESPACE(GEOM_BaseObject) theObject);
|
virtual GEOM::GEOM_BaseObject_ptr GetBaseObject(HANDLE_NAMESPACE(GEOM_BaseObject) theObject);
|
||||||
virtual HANDLE_NAMESPACE(GEOM_BaseObject) GetBaseObjectImpl(GEOM::GEOM_BaseObject_ptr theObject);
|
virtual HANDLE_NAMESPACE(GEOM_BaseObject) GetBaseObjectImpl(GEOM::GEOM_BaseObject_ptr theObject);
|
||||||
virtual GEOM::GEOM_Object_ptr GetObject(HANDLE_NAMESPACE(GEOM_Object) theObject);
|
virtual GEOM::GEOM_Object_ptr GetObject(HANDLE_NAMESPACE(GEOM_Object) theObject);
|
||||||
|
@ -395,7 +395,7 @@ GEOM::GEOM_Object_ptr GEOM_Object_i::GetMainShape()
|
|||||||
TCollection_AsciiString anEntry;
|
TCollection_AsciiString anEntry;
|
||||||
TDF_Tool::Entry(aLabel, anEntry);
|
TDF_Tool::Entry(aLabel, anEntry);
|
||||||
return GEOM::GEOM_Object::_narrow
|
return GEOM::GEOM_Object::_narrow
|
||||||
( _engine->GetObject(_impl->GetDocID(), anEntry.ToCString()) );
|
( _engine->GetObject( anEntry.ToCString()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return obj._retn();
|
return obj._retn();
|
||||||
@ -414,7 +414,7 @@ bool GEOM_Object_i::IsSame(GEOM::GEOM_BaseObject_ptr other)
|
|||||||
if ( !CORBA::is_nil( shapePtr ) ) {
|
if ( !CORBA::is_nil( shapePtr ) ) {
|
||||||
CORBA::String_var entry = shapePtr->GetEntry();
|
CORBA::String_var entry = shapePtr->GetEntry();
|
||||||
HANDLE_NAMESPACE(GEOM_Object) otherObject = HANDLE_NAMESPACE(GEOM_Object)::DownCast
|
HANDLE_NAMESPACE(GEOM_Object) otherObject = HANDLE_NAMESPACE(GEOM_Object)::DownCast
|
||||||
( GEOM_Engine::GetEngine()->GetObject( shapePtr->GetStudyID(), entry, false ));
|
( GEOM_Engine::GetEngine()->GetObject( entry, false ));
|
||||||
if ( !otherObject.IsNull() ) {
|
if ( !otherObject.IsNull() ) {
|
||||||
TopoDS_Shape thisShape = _impl->GetValue();
|
TopoDS_Shape thisShape = _impl->GetValue();
|
||||||
TopoDS_Shape otherShape = otherObject->GetValue();
|
TopoDS_Shape otherShape = otherObject->GetValue();
|
||||||
|
@ -51,9 +51,6 @@ GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb,
|
|||||||
|
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
|
|
||||||
myStudyID = -1;
|
|
||||||
myLastStudyID = -1;
|
|
||||||
|
|
||||||
myBasicOp = GEOM::GEOM_IBasicOperations::_nil();
|
myBasicOp = GEOM::GEOM_IBasicOperations::_nil();
|
||||||
my3DPrimOp = GEOM::GEOM_I3DPrimOperations::_nil();
|
my3DPrimOp = GEOM::GEOM_I3DPrimOperations::_nil();
|
||||||
myBoolOp = GEOM::GEOM_IBooleanOperations::_nil();
|
myBoolOp = GEOM::GEOM_IBooleanOperations::_nil();
|
||||||
@ -111,50 +108,6 @@ void GEOM_Superv_i::setGeomEngine()
|
|||||||
myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
|
myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
// SetStudyID:
|
|
||||||
//=============================================================================
|
|
||||||
void GEOM_Superv_i::SetStudyID( CORBA::Long theId )
|
|
||||||
{
|
|
||||||
// mkr : PAL10770 -->
|
|
||||||
myLastStudyID = myStudyID;
|
|
||||||
|
|
||||||
CORBA::Object_ptr anObject = name_service->Resolve("/Kernel/Session");
|
|
||||||
if ( !CORBA::is_nil(anObject) ) {
|
|
||||||
SALOME::Session_var aSession = SALOME::Session::_narrow(anObject);
|
|
||||||
if ( !CORBA::is_nil(aSession) ) {
|
|
||||||
int aStudyID = aSession->GetActiveStudyId();
|
|
||||||
if ( theId != aStudyID && aStudyID > 0) { // mkr : IPAL12128
|
|
||||||
MESSAGE("Warning : given study ID theId="<<theId<<" is wrong and will be replaced by the value "<<aStudyID);
|
|
||||||
myStudyID = aStudyID;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
myStudyID = theId; // mkr : IPAL12128
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( isNewStudy(myLastStudyID,myStudyID) ) {
|
|
||||||
if (CORBA::is_nil(myGeomEngine)) setGeomEngine();
|
|
||||||
std::string anEngine = _orb->object_to_string( myGeomEngine );
|
|
||||||
|
|
||||||
CORBA::Object_var anObj = name_service->Resolve("/myStudyManager");
|
|
||||||
if ( !CORBA::is_nil(anObj) ) {
|
|
||||||
SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(anObj);
|
|
||||||
if ( !CORBA::is_nil(aStudyManager) ) {
|
|
||||||
_PTR(Study) aDSStudy = ClientFactory::Study(aStudyManager->GetStudyByID(myStudyID));
|
|
||||||
if ( aDSStudy ) {
|
|
||||||
_PTR(SComponent) aSCO = aDSStudy->FindComponent(myGeomEngine->ComponentDataType());
|
|
||||||
if ( aSCO ) {
|
|
||||||
_PTR(StudyBuilder) aBuilder = aDSStudy->NewBuilder();
|
|
||||||
if ( aBuilder ) aBuilder->LoadWith( aSCO, anEngine );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// mkr : PAL10770 <--
|
|
||||||
}
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// CreateListOfGO:
|
// CreateListOfGO:
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -236,11 +189,8 @@ void GEOM_Superv_i::getBasicOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM_IBasicOperations interface
|
// get GEOM_IBasicOperations interface
|
||||||
if (CORBA::is_nil(myBasicOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(myBasicOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
myBasicOp = myGeomEngine->GetIBasicOperations();
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
myBasicOp = myGeomEngine->GetIBasicOperations(myStudyID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,11 +202,8 @@ void GEOM_Superv_i::get3DPrimOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM_I3DPrimOperations interface
|
// get GEOM_I3DPrimOperations interface
|
||||||
if (CORBA::is_nil(my3DPrimOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(my3DPrimOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
my3DPrimOp = myGeomEngine->GetI3DPrimOperations();
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
my3DPrimOp = myGeomEngine->GetI3DPrimOperations(myStudyID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -268,11 +215,8 @@ void GEOM_Superv_i::getBoolOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM_IBooleanOperations interface
|
// get GEOM_IBooleanOperations interface
|
||||||
if (CORBA::is_nil(myBoolOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(myBoolOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
myBoolOp = myGeomEngine->GetIBooleanOperations();
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
myBoolOp = myGeomEngine->GetIBooleanOperations(myStudyID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,11 +228,8 @@ void GEOM_Superv_i::getInsOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM_IInsertOperations interface
|
// get GEOM_IInsertOperations interface
|
||||||
if (CORBA::is_nil(myInsOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(myInsOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
myInsOp = myGeomEngine->GetIInsertOperations();
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
myInsOp = myGeomEngine->GetIInsertOperations(myStudyID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -300,11 +241,8 @@ void GEOM_Superv_i::getTransfOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM_ITransformOperations interface
|
// get GEOM_ITransformOperations interface
|
||||||
if (CORBA::is_nil(myTransfOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(myTransfOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
myTransfOp = myGeomEngine->GetITransformOperations();
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
myTransfOp = myGeomEngine->GetITransformOperations(myStudyID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -316,11 +254,8 @@ void GEOM_Superv_i::getShapesOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM_IShapesOperations interface
|
// get GEOM_IShapesOperations interface
|
||||||
if (CORBA::is_nil(myShapesOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(myShapesOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
myShapesOp = myGeomEngine->GetIShapesOperations();
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
myShapesOp = myGeomEngine->GetIShapesOperations(myStudyID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,11 +267,8 @@ void GEOM_Superv_i::getBlocksOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM_IBlocksOperations interface
|
// get GEOM_IBlocksOperations interface
|
||||||
if (CORBA::is_nil(myBlocksOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(myBlocksOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
myBlocksOp = myGeomEngine->GetIBlocksOperations();
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
myBlocksOp = myGeomEngine->GetIBlocksOperations(myStudyID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,11 +280,8 @@ void GEOM_Superv_i::getCurvesOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM_ICurvesOperations interface
|
// get GEOM_ICurvesOperations interface
|
||||||
if (CORBA::is_nil(myCurvesOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(myCurvesOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
myCurvesOp = myGeomEngine->GetICurvesOperations();
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
myCurvesOp = myGeomEngine->GetICurvesOperations(myStudyID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -364,11 +293,8 @@ void GEOM_Superv_i::getLocalOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM_ILocalOperations interface
|
// get GEOM_ILocalOperations interface
|
||||||
if (CORBA::is_nil(myLocalOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(myLocalOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
myLocalOp = myGeomEngine->GetILocalOperations();
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
myLocalOp = myGeomEngine->GetILocalOperations(myStudyID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -380,11 +306,8 @@ void GEOM_Superv_i::getGroupOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM_IGroupOperations interface
|
// get GEOM_IGroupOperations interface
|
||||||
if (CORBA::is_nil(myGroupOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(myGroupOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
myGroupOp = myGeomEngine->GetIGroupOperations();
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -396,11 +319,8 @@ void GEOM_Superv_i::getAdvancedOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM::IAdvancedOperations interface
|
// get GEOM::IAdvancedOperations interface
|
||||||
if (CORBA::is_nil(myAdvancedOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(myAdvancedOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
myAdvancedOp = GEOM::IAdvancedOperations::_narrow(myGeomEngine->GetPluginOperations("AdvancedEngine"));
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
myAdvancedOp = GEOM::IAdvancedOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "AdvancedEngine"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -412,11 +332,8 @@ void GEOM_Superv_i::getSTLPluginOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM::ISTLOperations interface
|
// get GEOM::ISTLOperations interface
|
||||||
if (CORBA::is_nil(mySTLOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(mySTLOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
mySTLOp = GEOM::ISTLOperations::_narrow(myGeomEngine->GetPluginOperations("STLPluginEngine"));
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
mySTLOp = GEOM::ISTLOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "STLPluginEngine"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -428,11 +345,8 @@ void GEOM_Superv_i::getBREPPluginOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM:IBREPOperations interface
|
// get GEOM:IBREPOperations interface
|
||||||
if (CORBA::is_nil(myBREPOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(myBREPOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
myBREPOp = GEOM::IBREPOperations::_narrow(myGeomEngine->GetPluginOperations("BREPPluginEngine"));
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
myBREPOp = GEOM::IBREPOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "BREPPluginEngine"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -444,11 +358,8 @@ void GEOM_Superv_i::getSTEPPluginOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM::ISTEPOperations interface
|
// get GEOM::ISTEPOperations interface
|
||||||
if (CORBA::is_nil(mySTEPOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(mySTEPOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
mySTEPOp = GEOM::ISTEPOperations::_narrow(myGeomEngine->GetPluginOperations("STEPPluginEngine"));
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
mySTEPOp = GEOM::ISTEPOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "STEPPluginEngine"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -460,11 +371,8 @@ void GEOM_Superv_i::getIGESPluginOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM::IIGESOperations interface
|
// get GEOM::IIGESOperations interface
|
||||||
if (CORBA::is_nil(myIGESOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(myIGESOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
myIGESOp = GEOM::IIGESOperations::_narrow(myGeomEngine->GetPluginOperations("IGESPluginEngine"));
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
myIGESOp = GEOM::IIGESOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "IGESPluginEngine"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -476,11 +384,8 @@ void GEOM_Superv_i::getXAOPluginOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM::IXAOOperations interface
|
// get GEOM::IXAOOperations interface
|
||||||
if (CORBA::is_nil(myXAOOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(myXAOOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
myXAOOp = GEOM::IXAOOperations::_narrow(myGeomEngine->GetPluginOperations("XAOPluginEngine"));
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
myXAOOp = GEOM::IXAOOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "XAOPluginEngine"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -493,11 +398,8 @@ void GEOM_Superv_i::getVTKPluginOp()
|
|||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
// get GEOM::IVTKOperations interface
|
// get GEOM::IVTKOperations interface
|
||||||
if (CORBA::is_nil(myVTKOp) || isNewStudy(myLastStudyID,myStudyID)) {
|
if (CORBA::is_nil(myVTKOp)) {
|
||||||
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
|
myVTKOp = GEOM::IVTKOperations::_narrow(myGeomEngine->GetPluginOperations("VTKPluginEngine"));
|
||||||
// Try to get id of the study from the SALOME Session
|
|
||||||
if(myStudyID < 0 ) SetStudyID(-1);
|
|
||||||
myVTKOp = GEOM::IVTKOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "VTKPluginEngine"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -619,14 +521,13 @@ CORBA::Boolean GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
|
|||||||
// function : PublishInStudy
|
// function : PublishInStudy
|
||||||
// purpose :
|
// purpose :
|
||||||
//============================================================================
|
//============================================================================
|
||||||
SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
|
SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::SObject_ptr theSObject,
|
||||||
SALOMEDS::SObject_ptr theSObject,
|
|
||||||
CORBA::Object_ptr theObject,
|
CORBA::Object_ptr theObject,
|
||||||
const char* theName) throw (SALOME::SALOME_Exception)
|
const char* theName) throw (SALOME::SALOME_Exception)
|
||||||
{
|
{
|
||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
return myGeomEngine->PublishInStudy(theStudy, theSObject, theObject, theName);
|
return myGeomEngine->PublishInStudy(theSObject, theObject, theName);
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
@ -634,13 +535,12 @@ SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::Study_ptr theStudy
|
|||||||
// purpose :
|
// purpose :
|
||||||
//============================================================================
|
//============================================================================
|
||||||
GEOM::ListOfGO*
|
GEOM::ListOfGO*
|
||||||
GEOM_Superv_i::PublishNamedShapesInStudy(SALOMEDS::Study_ptr theStudy,
|
GEOM_Superv_i::PublishNamedShapesInStudy(//SALOMEDS::SObject_ptr theSObject,
|
||||||
//SALOMEDS::SObject_ptr theSObject,
|
|
||||||
CORBA::Object_ptr theObject)
|
CORBA::Object_ptr theObject)
|
||||||
{
|
{
|
||||||
if (CORBA::is_nil(myGeomEngine))
|
if (CORBA::is_nil(myGeomEngine))
|
||||||
setGeomEngine();
|
setGeomEngine();
|
||||||
return myGeomEngine->PublishNamedShapesInStudy(theStudy, theObject);
|
return myGeomEngine->PublishNamedShapesInStudy(theObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
@ -81,11 +81,6 @@ public:
|
|||||||
PortableServer::ServantBase_var GetServant(CORBA::Object_ptr theObject,
|
PortableServer::ServantBase_var GetServant(CORBA::Object_ptr theObject,
|
||||||
PortableServer::POA_ptr thePOA);
|
PortableServer::POA_ptr thePOA);
|
||||||
|
|
||||||
//-----------------------------------------------------------------------//
|
|
||||||
// Set current stydy ID //
|
|
||||||
//-----------------------------------------------------------------------//
|
|
||||||
void SetStudyID( CORBA::Long theId );
|
|
||||||
|
|
||||||
//-----------------------------------------------------------//
|
//-----------------------------------------------------------//
|
||||||
// Create ListOfGO and add items to it //
|
// Create ListOfGO and add items to it //
|
||||||
//-----------------------------------------------------------//
|
//-----------------------------------------------------------//
|
||||||
@ -143,13 +138,11 @@ public:
|
|||||||
CORBA::Boolean isASCII);
|
CORBA::Boolean isASCII);
|
||||||
|
|
||||||
CORBA::Boolean CanPublishInStudy(CORBA::Object_ptr theIOR);
|
CORBA::Boolean CanPublishInStudy(CORBA::Object_ptr theIOR);
|
||||||
SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
|
SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::SObject_ptr theSObject,
|
||||||
SALOMEDS::SObject_ptr theSObject,
|
|
||||||
CORBA::Object_ptr theObject,
|
CORBA::Object_ptr theObject,
|
||||||
const char* theName) throw (SALOME::SALOME_Exception) ;
|
const char* theName) throw (SALOME::SALOME_Exception) ;
|
||||||
|
|
||||||
GEOM::ListOfGO* PublishNamedShapesInStudy(SALOMEDS::Study_ptr theStudy,
|
GEOM::ListOfGO* PublishNamedShapesInStudy(//SALOMEDS::SObject_ptr theSObject,
|
||||||
//SALOMEDS::SObject_ptr theSObject,
|
|
||||||
CORBA::Object_ptr theObject);
|
CORBA::Object_ptr theObject);
|
||||||
|
|
||||||
CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
|
CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
|
||||||
@ -790,8 +783,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
SALOME_NamingService * name_service;
|
SALOME_NamingService * name_service;
|
||||||
GEOM::GEOM_Gen_var myGeomEngine;
|
GEOM::GEOM_Gen_var myGeomEngine;
|
||||||
CORBA::Long myStudyID;
|
|
||||||
CORBA::Long myLastStudyID; // mkr : PAL10770
|
|
||||||
PortableServer::POA_var myPOA;
|
PortableServer::POA_var myPOA;
|
||||||
|
|
||||||
GEOM::GEOM_IBasicOperations_var myBasicOp;
|
GEOM::GEOM_IBasicOperations_var myBasicOp;
|
||||||
|
@ -38,9 +38,10 @@ from salome.kernel.logger import Logger
|
|||||||
from salome.kernel import termcolor
|
from salome.kernel import termcolor
|
||||||
logger = Logger("salome.geom.geomtools", color = termcolor.RED)
|
logger = Logger("salome.geom.geomtools", color = termcolor.RED)
|
||||||
|
|
||||||
from salome.kernel.studyedit import getActiveStudyId, getStudyEditor
|
from salome.kernel.studyedit import getStudyEditor
|
||||||
from salome.kernel.services import IDToObject, IDToSObject
|
from salome.kernel.services import IDToObject, IDToSObject
|
||||||
from salome.kernel.deprecation import is_called_by_sphinx
|
from salome.kernel.deprecation import is_called_by_sphinx
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if not is_called_by_sphinx():
|
if not is_called_by_sphinx():
|
||||||
@ -50,29 +51,16 @@ try:
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
_geompys = {}
|
_geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
## Return an object behaving exactly like geompy module, except that it is
|
## Return an object behaving exactly like geompy module.
|
||||||
# associated with the study \em studyId. If \em studyId is \b None, return
|
|
||||||
# a pseudo geompy object for the current study.
|
|
||||||
# \ingroup geomtools
|
# \ingroup geomtools
|
||||||
def getGeompy(studyId = None):
|
def getGeompy():
|
||||||
"""
|
"""
|
||||||
Return an object behaving exactly like geompy module, except that it is
|
Return an object behaving exactly like geompy module.
|
||||||
associated with the study `studyId`. If `studyId` is :const:`None`, return
|
|
||||||
a pseudo geompy object for the current study.
|
|
||||||
"""
|
"""
|
||||||
# We can't use geompy module because it initializes GEOM with
|
|
||||||
# salome.myStudy, which may not exist. So we use this trick to create
|
|
||||||
# a pseudo geompy module.
|
|
||||||
salome.salome_init()
|
salome.salome_init()
|
||||||
if studyId is None:
|
return _geompy
|
||||||
studyId = getActiveStudyId()
|
|
||||||
if not _geompys.has_key(studyId):
|
|
||||||
from salome.geom import geomBuilder
|
|
||||||
study = salome.myStudyManager.GetStudyByID(studyId)
|
|
||||||
_geompys[studyId] = geomBuilder.New(study)
|
|
||||||
return _geompys[studyId]
|
|
||||||
|
|
||||||
|
|
||||||
ModeWireFrame = 0
|
ModeWireFrame = 0
|
||||||
@ -146,8 +134,7 @@ class GeomStudyTools:
|
|||||||
:param folderName: the name of a folder in the GEOM part of the study
|
:param folderName: the name of a folder in the GEOM part of the study
|
||||||
"""
|
"""
|
||||||
study = self.editor.study
|
study = self.editor.study
|
||||||
studyId = study._get_StudyId()
|
geompy = getGeompy()
|
||||||
geompy = getGeompy(studyId)
|
|
||||||
|
|
||||||
if folderName is None:
|
if folderName is None:
|
||||||
# Insert the shape in the study by the standard way
|
# Insert the shape in the study by the standard way
|
||||||
@ -183,7 +170,6 @@ class GeomStudyTools:
|
|||||||
The underlying GEOM object is returned (so that it can be destroyed)
|
The underlying GEOM object is returned (so that it can be destroyed)
|
||||||
"""
|
"""
|
||||||
study = self.editor.study
|
study = self.editor.study
|
||||||
studyId = study._get_StudyId()
|
|
||||||
shape = self.getGeomObjectFromEntry(shapeStudyEntry)
|
shape = self.getGeomObjectFromEntry(shapeStudyEntry)
|
||||||
studyObject = IDToSObject(shapeStudyEntry)
|
studyObject = IDToSObject(shapeStudyEntry)
|
||||||
self.editor.removeItem(studyObject,True)
|
self.editor.removeItem(studyObject,True)
|
||||||
@ -364,13 +350,12 @@ def TEST_createAndDeleteShape():
|
|||||||
import salome
|
import salome
|
||||||
salome.salome_init()
|
salome.salome_init()
|
||||||
study = salome.myStudy
|
study = salome.myStudy
|
||||||
studyId = salome.myStudyId
|
|
||||||
|
|
||||||
from salome.geom import geomtools
|
from salome.geom import geomtools
|
||||||
geompy = geomtools.getGeompy(studyId)
|
geompy = geomtools.getGeompy()
|
||||||
|
|
||||||
from salome.kernel.studyedit import getStudyEditor
|
from salome.kernel.studyedit import getStudyEditor
|
||||||
studyEditor = getStudyEditor(studyId)
|
studyEditor = getStudyEditor()
|
||||||
|
|
||||||
gst = geomtools.GeomStudyTools(studyEditor)
|
gst = geomtools.GeomStudyTools(studyEditor)
|
||||||
|
|
||||||
|
@ -112,23 +112,15 @@ from salome.geom.structelem.parts import InvalidParameterError
|
|||||||
import GEOM
|
import GEOM
|
||||||
|
|
||||||
## This class manages the structural elements in the study. It is used to
|
## This class manages the structural elements in the study. It is used to
|
||||||
# create a new structural element from a list of commands. The parameter
|
# create a new structural element from a list of commands.
|
||||||
# \em studyId defines the ID of the study in which the manager will create
|
|
||||||
# structural elements. If it is \b None or not specified, it will use
|
|
||||||
# the ID of the current study as defined by
|
|
||||||
# \b salome.kernel.studyedit.getActiveStudyId() function.
|
|
||||||
# \ingroup structelem
|
# \ingroup structelem
|
||||||
class StructuralElementManager:
|
class StructuralElementManager:
|
||||||
"""
|
"""
|
||||||
This class manages the structural elements in the study. It is used to
|
This class manages the structural elements in the study. It is used to
|
||||||
create a new structural element from a list of commands. The parameter
|
create a new structural element from a list of commands.
|
||||||
`studyId` defines the ID of the study in which the manager will create
|
|
||||||
structural elements. If it is :const:`None` or not specified, it will use
|
|
||||||
the ID of the current study as defined by
|
|
||||||
:func:`salome.kernel.studyedit.getActiveStudyId` function.
|
|
||||||
"""
|
"""
|
||||||
def __init__(self, studyId = None):
|
def __init__(self):
|
||||||
self._studyEditor = getStudyEditor(studyId)
|
self._studyEditor = getStudyEditor()
|
||||||
|
|
||||||
## Create a structural element from the list of commands \em commandList.
|
## Create a structural element from the list of commands \em commandList.
|
||||||
# Each command in this list represent a part of the structural element,
|
# Each command in this list represent a part of the structural element,
|
||||||
@ -218,7 +210,7 @@ class StructuralElementManager:
|
|||||||
logger.debug("StructuralElementManager.createElement: START")
|
logger.debug("StructuralElementManager.createElement: START")
|
||||||
logger.debug("Command list: %s" % commandList)
|
logger.debug("Command list: %s" % commandList)
|
||||||
|
|
||||||
element = StructuralElement(self._studyEditor.studyId)
|
element = StructuralElement()
|
||||||
orientationCmdList = []
|
orientationCmdList = []
|
||||||
for command in commandList:
|
for command in commandList:
|
||||||
(parttype, parameters) = command
|
(parttype, parameters) = command
|
||||||
@ -252,9 +244,8 @@ class StructuralElementManager:
|
|||||||
|
|
||||||
# Create the part
|
# Create the part
|
||||||
try:
|
try:
|
||||||
part = parts.__dict__[parttype](
|
part = parts.__dict__[parttype](meshGroup,
|
||||||
self._studyEditor.studyId, meshGroup,
|
groupGeomObj, newparams)
|
||||||
groupGeomObj, newparams)
|
|
||||||
element.addPart(part)
|
element.addPart(part)
|
||||||
except InvalidParameterError, e:
|
except InvalidParameterError, e:
|
||||||
logger.error("Invalid parameter error: %s" % e)
|
logger.error("Invalid parameter error: %s" % e)
|
||||||
@ -317,30 +308,22 @@ class StructuralElementManager:
|
|||||||
|
|
||||||
|
|
||||||
## This class represents a structural element, i.e. a set of geometrical
|
## This class represents a structural element, i.e. a set of geometrical
|
||||||
# objects built along geometrical primitives. The parameter \em studyId
|
# objects built along geometrical primitives. Structural elements are
|
||||||
# defines the ID of the study that will contain the structural element. If
|
# normally created by the class StructuralElementManager, so this class
|
||||||
# it is \b None or not specified, the constructor will use the ID of
|
# should not be instantiated directly in the general case.
|
||||||
# the active study as defined by \b salome.kernel.studyedit.getActiveStudyId
|
|
||||||
# function. Structural elements are normally created by the class
|
|
||||||
# StructuralElementManager, so this class should not be
|
|
||||||
# instantiated directly in the general case.
|
|
||||||
# \ingroup structelem
|
# \ingroup structelem
|
||||||
class StructuralElement:
|
class StructuralElement:
|
||||||
"""
|
"""
|
||||||
This class represents a structural element, i.e. a set of geometrical
|
This class represents a structural element, i.e. a set of geometrical
|
||||||
objects built along geometrical primitives. The parameter `studyId`
|
objects built along geometrical primitives. Structural elements
|
||||||
defines the ID of the study that will contain the structural element. If
|
are normally created by the class :class:`StructuralElementManager`,
|
||||||
it is :const:`None` or not specified, the constructor will use the ID of
|
so this class should not be instantiated directly in the general case.
|
||||||
the active study as defined by :func:`salome.kernel.studyedit.getActiveStudyId`
|
|
||||||
function. Structural elements are normally created by the class
|
|
||||||
:class:`StructuralElementManager`, so this class should not be
|
|
||||||
instantiated directly in the general case.
|
|
||||||
"""
|
"""
|
||||||
_counter = 1
|
_counter = 1
|
||||||
|
|
||||||
MAIN_FOLDER_NAME = "Structural Elements"
|
MAIN_FOLDER_NAME = "Structural Elements"
|
||||||
|
|
||||||
def __init__(self, studyId = None):
|
def __init__(self):
|
||||||
# _parts is the dictionary mapping group name to structural element
|
# _parts is the dictionary mapping group name to structural element
|
||||||
# part. _shapeDict is the dictionary mapping SubShapeID objects to
|
# part. _shapeDict is the dictionary mapping SubShapeID objects to
|
||||||
# structural element parts. Both are used to avoid duplicate shapes
|
# structural element parts. Both are used to avoid duplicate shapes
|
||||||
@ -349,9 +332,8 @@ class StructuralElement:
|
|||||||
self._shapeDict = {}
|
self._shapeDict = {}
|
||||||
self._id = StructuralElement._counter
|
self._id = StructuralElement._counter
|
||||||
StructuralElement._counter += 1
|
StructuralElement._counter += 1
|
||||||
self._studyEditor = getStudyEditor(studyId)
|
self._studyEditor = getStudyEditor()
|
||||||
logger.debug("Creating structural element in study %s" %
|
logger.debug("Creating structural element in study")
|
||||||
self._studyEditor.studyId)
|
|
||||||
self._SObject = None
|
self._SObject = None
|
||||||
|
|
||||||
## Find or create the study object corresponding to the structural
|
## Find or create the study object corresponding to the structural
|
||||||
@ -364,7 +346,7 @@ class StructuralElement:
|
|||||||
numerical ID.
|
numerical ID.
|
||||||
"""
|
"""
|
||||||
if self._SObject is None:
|
if self._SObject is None:
|
||||||
geompy = getGeompy(self._studyEditor.studyId)
|
geompy = getGeompy()
|
||||||
geomComponent = self._studyEditor.study.FindComponent("GEOM")
|
geomComponent = self._studyEditor.study.FindComponent("GEOM")
|
||||||
mainFolder = self._studyEditor.findItem(geomComponent,
|
mainFolder = self._studyEditor.findItem(geomComponent,
|
||||||
name = StructuralElement.MAIN_FOLDER_NAME,
|
name = StructuralElement.MAIN_FOLDER_NAME,
|
||||||
@ -452,7 +434,7 @@ class StructuralElement:
|
|||||||
different parts of the structural element, and add them to the study.
|
different parts of the structural element, and add them to the study.
|
||||||
"""
|
"""
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
geompy = getGeompy(self._studyEditor.studyId)
|
geompy = getGeompy()
|
||||||
for part in self._parts.itervalues():
|
for part in self._parts.itervalues():
|
||||||
# Build the structural element part
|
# Build the structural element part
|
||||||
logger.debug("Building %s" % part)
|
logger.debug("Building %s" % part)
|
||||||
@ -496,7 +478,7 @@ class StructuralElement:
|
|||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
aStudy = theSObject.GetStudy()
|
aStudy = theSObject.GetStudy()
|
||||||
useCaseBuilder = aStudy.GetUseCaseBuilder()
|
useCaseBuilder = aStudy.GetUseCaseBuilder()
|
||||||
editor = getStudyEditor(aStudy._get_StudyId())
|
editor = getStudyEditor()
|
||||||
aIterator = useCaseBuilder.GetUseCaseIterator(theSObject)
|
aIterator = useCaseBuilder.GetUseCaseIterator(theSObject)
|
||||||
aIterator.Init(False)
|
aIterator.Init(False)
|
||||||
while aIterator.More():
|
while aIterator.More():
|
||||||
|
@ -119,7 +119,6 @@ class SubShapeID:
|
|||||||
|
|
||||||
## This class is the base class for all structural element parts. It should
|
## This class is the base class for all structural element parts. It should
|
||||||
# not be instantiated directly (consider it as an "abstract" class).
|
# not be instantiated directly (consider it as an "abstract" class).
|
||||||
# \param studyId (integer) the ID of the study in which the part is created.
|
|
||||||
# \param groupName (string) the name of the underlying geometrical primitive
|
# \param groupName (string) the name of the underlying geometrical primitive
|
||||||
# in the study.
|
# in the study.
|
||||||
# \param groupGeomObj (GEOM object) the underlying geometrical primitive.
|
# \param groupGeomObj (GEOM object) the underlying geometrical primitive.
|
||||||
@ -132,9 +131,6 @@ class StructuralElementPart:
|
|||||||
This class is the base class for all structural element parts. It should
|
This class is the base class for all structural element parts. It should
|
||||||
not be instantiated directly (consider it as an "abstract" class).
|
not be instantiated directly (consider it as an "abstract" class).
|
||||||
|
|
||||||
:type studyId: integer
|
|
||||||
:param studyId: the ID of the study in which the part is created.
|
|
||||||
|
|
||||||
:type groupName: string
|
:type groupName: string
|
||||||
:param groupName: the name of the underlying geometrical primitive in the
|
:param groupName: the name of the underlying geometrical primitive in the
|
||||||
study.
|
study.
|
||||||
@ -153,7 +149,7 @@ class StructuralElementPart:
|
|||||||
|
|
||||||
DEFAULT_NAME = "StructElemPart"
|
DEFAULT_NAME = "StructElemPart"
|
||||||
|
|
||||||
def __init__(self, studyId, groupName, groupGeomObj, parameters,
|
def __init__(self, groupName, groupGeomObj, parameters,
|
||||||
name = DEFAULT_NAME, color = None):
|
name = DEFAULT_NAME, color = None):
|
||||||
self._parameters = parameters
|
self._parameters = parameters
|
||||||
self.groupName = groupName
|
self.groupName = groupName
|
||||||
@ -161,7 +157,7 @@ class StructuralElementPart:
|
|||||||
self._orientation = None
|
self._orientation = None
|
||||||
self._paramUserName = {}
|
self._paramUserName = {}
|
||||||
self.name = name
|
self.name = name
|
||||||
self.geom = getGeompy(studyId)
|
self.geom = getGeompy()
|
||||||
self.baseShapesSet = set()
|
self.baseShapesSet = set()
|
||||||
self.isMainShape = (groupGeomObj.GetType() != 37) # See geompyDC.ShapeIdToType for type codes
|
self.isMainShape = (groupGeomObj.GetType() != 37) # See geompyDC.ShapeIdToType for type codes
|
||||||
if not self.isMainShape:
|
if not self.isMainShape:
|
||||||
@ -236,11 +232,11 @@ class StructuralElementPart:
|
|||||||
mindim, value)
|
mindim, value)
|
||||||
|
|
||||||
## Build the geometric shapes and the markers corresponding to the
|
## Build the geometric shapes and the markers corresponding to the
|
||||||
# structural element part in the study \em studyId.
|
# structural element part in the study.
|
||||||
def build(self):
|
def build(self):
|
||||||
"""
|
"""
|
||||||
Build the geometric shapes and the markers corresponding to the
|
Build the geometric shapes and the markers corresponding to the
|
||||||
structural element part in the study `studyId`.
|
structural element part in the study.
|
||||||
"""
|
"""
|
||||||
shape = self._buildPart()
|
shape = self._buildPart()
|
||||||
markers = self._buildMarkers()
|
markers = self._buildMarkers()
|
||||||
@ -308,9 +304,9 @@ class Beam(StructuralElementPart):
|
|||||||
|
|
||||||
DEFAULT_NAME = "Beam"
|
DEFAULT_NAME = "Beam"
|
||||||
|
|
||||||
def __init__(self, studyId, groupName, groupGeomObj, parameters,
|
def __init__(self, groupName, groupGeomObj, parameters,
|
||||||
name = DEFAULT_NAME, color = None):
|
name = DEFAULT_NAME, color = None):
|
||||||
StructuralElementPart.__init__(self, studyId, groupName, groupGeomObj,
|
StructuralElementPart.__init__(self, groupName, groupGeomObj,
|
||||||
parameters, name, color)
|
parameters, name, color)
|
||||||
self._orientation = orientation.Orientation1D()
|
self._orientation = orientation.Orientation1D()
|
||||||
|
|
||||||
@ -454,7 +450,7 @@ class CircularBeam(Beam):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, studyId, groupName, groupGeomObj, parameters,
|
def __init__(self, groupName, groupGeomObj, parameters,
|
||||||
name = Beam.DEFAULT_NAME, color = None):
|
name = Beam.DEFAULT_NAME, color = None):
|
||||||
if color is None:
|
if color is None:
|
||||||
if parameters.has_key("R1"): # variable section
|
if parameters.has_key("R1"): # variable section
|
||||||
@ -462,7 +458,7 @@ class CircularBeam(Beam):
|
|||||||
else: # constant section
|
else: # constant section
|
||||||
color = RED
|
color = RED
|
||||||
|
|
||||||
Beam.__init__(self, studyId, groupName, groupGeomObj, parameters,
|
Beam.__init__(self, groupName, groupGeomObj, parameters,
|
||||||
name, color)
|
name, color)
|
||||||
|
|
||||||
self.R1 = self._getParameter(["R1", "R"])
|
self.R1 = self._getParameter(["R1", "R"])
|
||||||
@ -566,7 +562,7 @@ class RectangularBeam(Beam):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, studyId, groupName, groupGeomObj, parameters,
|
def __init__(self, groupName, groupGeomObj, parameters,
|
||||||
name = Beam.DEFAULT_NAME, color = None):
|
name = Beam.DEFAULT_NAME, color = None):
|
||||||
if color is None:
|
if color is None:
|
||||||
if parameters.has_key("HY1") or parameters.has_key("H1"):
|
if parameters.has_key("HY1") or parameters.has_key("H1"):
|
||||||
@ -574,7 +570,7 @@ class RectangularBeam(Beam):
|
|||||||
else: # constant section
|
else: # constant section
|
||||||
color = BLUE
|
color = BLUE
|
||||||
|
|
||||||
Beam.__init__(self, studyId, groupName, groupGeomObj, parameters,
|
Beam.__init__(self, groupName, groupGeomObj, parameters,
|
||||||
name, color)
|
name, color)
|
||||||
|
|
||||||
self.HY1 = self._getParameter(["HY1", "HY", "H1", "H"])
|
self.HY1 = self._getParameter(["HY1", "HY", "H1", "H"])
|
||||||
@ -714,7 +710,7 @@ class GeneralBeam(RectangularBeam):
|
|||||||
parameters.
|
parameters.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, studyId, groupName, groupGeomObj, parameters,
|
def __init__(self, groupName, groupGeomObj, parameters,
|
||||||
name = Beam.DEFAULT_NAME, color = None):
|
name = Beam.DEFAULT_NAME, color = None):
|
||||||
self.IY1 = getParameterInDict(["IY1", "IY"], parameters)
|
self.IY1 = getParameterInDict(["IY1", "IY"], parameters)
|
||||||
self.IZ1 = getParameterInDict(["IZ1", "IZ"], parameters)
|
self.IZ1 = getParameterInDict(["IZ1", "IZ"], parameters)
|
||||||
@ -733,7 +729,7 @@ class GeneralBeam(RectangularBeam):
|
|||||||
else: # constant section
|
else: # constant section
|
||||||
color = GREEN
|
color = GREEN
|
||||||
|
|
||||||
RectangularBeam.__init__(self, studyId, groupName, groupGeomObj, parameters,
|
RectangularBeam.__init__(self, groupName, groupGeomObj, parameters,
|
||||||
name, color)
|
name, color)
|
||||||
|
|
||||||
## This class is an "abstract" class for all 2D structural element parts. It
|
## This class is an "abstract" class for all 2D structural element parts. It
|
||||||
@ -749,9 +745,9 @@ class StructuralElementPart2D(StructuralElementPart):
|
|||||||
|
|
||||||
DEFAULT_NAME = "StructuralElementPart2D"
|
DEFAULT_NAME = "StructuralElementPart2D"
|
||||||
|
|
||||||
def __init__(self, studyId, groupName, groupGeomObj, parameters,
|
def __init__(self, groupName, groupGeomObj, parameters,
|
||||||
name = DEFAULT_NAME):
|
name = DEFAULT_NAME):
|
||||||
StructuralElementPart.__init__(self, studyId, groupName, groupGeomObj,
|
StructuralElementPart.__init__(self, groupName, groupGeomObj,
|
||||||
parameters, name)
|
parameters, name)
|
||||||
self._orientation = orientation.Orientation2D(
|
self._orientation = orientation.Orientation2D(
|
||||||
self._getParameter(["angleAlpha"]),
|
self._getParameter(["angleAlpha"]),
|
||||||
@ -834,9 +830,9 @@ class ThickShell(StructuralElementPart2D):
|
|||||||
|
|
||||||
DEFAULT_NAME = "ThickShell"
|
DEFAULT_NAME = "ThickShell"
|
||||||
|
|
||||||
def __init__(self, studyId, groupName, groupGeomObj, parameters,
|
def __init__(self, groupName, groupGeomObj, parameters,
|
||||||
name = DEFAULT_NAME):
|
name = DEFAULT_NAME):
|
||||||
StructuralElementPart2D.__init__(self, studyId, groupName,
|
StructuralElementPart2D.__init__(self, groupName,
|
||||||
groupGeomObj, parameters, name)
|
groupGeomObj, parameters, name)
|
||||||
self.thickness = self._getParameter(["Epais"])
|
self.thickness = self._getParameter(["Epais"])
|
||||||
logger.debug(repr(self))
|
logger.debug(repr(self))
|
||||||
@ -978,9 +974,9 @@ class Grid(StructuralElementPart2D):
|
|||||||
|
|
||||||
DEFAULT_NAME = "Grid"
|
DEFAULT_NAME = "Grid"
|
||||||
|
|
||||||
def __init__(self, studyId, groupName, groupGeomObj, parameters,
|
def __init__(self, groupName, groupGeomObj, parameters,
|
||||||
name = DEFAULT_NAME):
|
name = DEFAULT_NAME):
|
||||||
StructuralElementPart2D.__init__(self, studyId, groupName,
|
StructuralElementPart2D.__init__(self, groupName,
|
||||||
groupGeomObj, parameters, name)
|
groupGeomObj, parameters, name)
|
||||||
self.xr = self._getParameter(["origAxeX"])
|
self.xr = self._getParameter(["origAxeX"])
|
||||||
self.yr = self._getParameter(["origAxeY"])
|
self.yr = self._getParameter(["origAxeY"])
|
||||||
@ -1106,82 +1102,82 @@ class Grid(StructuralElementPart2D):
|
|||||||
|
|
||||||
## Alias for class GeneralBeam.
|
## Alias for class GeneralBeam.
|
||||||
# \ingroup parts
|
# \ingroup parts
|
||||||
def VisuPoutreGenerale(studyId, groupName, groupGeomObj, parameters,
|
def VisuPoutreGenerale(groupName, groupGeomObj, parameters,
|
||||||
name = "POUTRE"):
|
name = "POUTRE"):
|
||||||
"""
|
"""
|
||||||
Alias for class :class:`GeneralBeam`.
|
Alias for class :class:`GeneralBeam`.
|
||||||
"""
|
"""
|
||||||
return GeneralBeam(studyId, groupName, groupGeomObj, parameters, name)
|
return GeneralBeam(groupName, groupGeomObj, parameters, name)
|
||||||
|
|
||||||
## Alias for class CircularBeam.
|
## Alias for class CircularBeam.
|
||||||
# \ingroup parts
|
# \ingroup parts
|
||||||
def VisuPoutreCercle(studyId, groupName, groupGeomObj, parameters,
|
def VisuPoutreCercle(groupName, groupGeomObj, parameters,
|
||||||
name = "POUTRE"):
|
name = "POUTRE"):
|
||||||
"""
|
"""
|
||||||
Alias for class :class:`CircularBeam`.
|
Alias for class :class:`CircularBeam`.
|
||||||
"""
|
"""
|
||||||
return CircularBeam(studyId, groupName, groupGeomObj, parameters, name)
|
return CircularBeam(groupName, groupGeomObj, parameters, name)
|
||||||
|
|
||||||
## Alias for class RectangularBeam.
|
## Alias for class RectangularBeam.
|
||||||
# \ingroup parts
|
# \ingroup parts
|
||||||
def VisuPoutreRectangle(studyId, groupName, groupGeomObj, parameters,
|
def VisuPoutreRectangle(groupName, groupGeomObj, parameters,
|
||||||
name = "POUTRE"):
|
name = "POUTRE"):
|
||||||
"""
|
"""
|
||||||
Alias for class :class:`RectangularBeam`.
|
Alias for class :class:`RectangularBeam`.
|
||||||
"""
|
"""
|
||||||
return RectangularBeam(studyId, groupName, groupGeomObj, parameters, name)
|
return RectangularBeam(groupName, groupGeomObj, parameters, name)
|
||||||
|
|
||||||
## Alias for class GeneralBeam.
|
## Alias for class GeneralBeam.
|
||||||
# \ingroup parts
|
# \ingroup parts
|
||||||
def VisuBarreGenerale(studyId, groupName, groupGeomObj, parameters,
|
def VisuBarreGenerale(groupName, groupGeomObj, parameters,
|
||||||
name = "BARRE"):
|
name = "BARRE"):
|
||||||
"""
|
"""
|
||||||
Alias for class :class:`GeneralBeam`.
|
Alias for class :class:`GeneralBeam`.
|
||||||
"""
|
"""
|
||||||
return GeneralBeam(studyId, groupName, groupGeomObj, parameters, name,
|
return GeneralBeam(groupName, groupGeomObj, parameters, name,
|
||||||
color = ORANGE)
|
color = ORANGE)
|
||||||
|
|
||||||
## Alias for class RectangularBeam.
|
## Alias for class RectangularBeam.
|
||||||
# \ingroup parts
|
# \ingroup parts
|
||||||
def VisuBarreRectangle(studyId, groupName, groupGeomObj, parameters,
|
def VisuBarreRectangle(groupName, groupGeomObj, parameters,
|
||||||
name = "BARRE"):
|
name = "BARRE"):
|
||||||
"""
|
"""
|
||||||
Alias for class :class:`RectangularBeam`.
|
Alias for class :class:`RectangularBeam`.
|
||||||
"""
|
"""
|
||||||
return RectangularBeam(studyId, groupName, groupGeomObj, parameters, name,
|
return RectangularBeam(groupName, groupGeomObj, parameters, name,
|
||||||
color = ORANGE)
|
color = ORANGE)
|
||||||
|
|
||||||
## Alias for class CircularBeam.
|
## Alias for class CircularBeam.
|
||||||
# \ingroup parts
|
# \ingroup parts
|
||||||
def VisuBarreCercle(studyId, groupName, groupGeomObj, parameters,
|
def VisuBarreCercle(groupName, groupGeomObj, parameters,
|
||||||
name = "BARRE"):
|
name = "BARRE"):
|
||||||
"""
|
"""
|
||||||
Alias for class :class:`CircularBeam`.
|
Alias for class :class:`CircularBeam`.
|
||||||
"""
|
"""
|
||||||
return CircularBeam(studyId, groupName, groupGeomObj, parameters, name,
|
return CircularBeam(groupName, groupGeomObj, parameters, name,
|
||||||
color = ORANGE)
|
color = ORANGE)
|
||||||
|
|
||||||
## Alias for class CircularBeam.
|
## Alias for class CircularBeam.
|
||||||
# \ingroup parts
|
# \ingroup parts
|
||||||
def VisuCable(studyId, groupName, groupGeomObj, parameters, name = "CABLE"):
|
def VisuCable(groupName, groupGeomObj, parameters, name = "CABLE"):
|
||||||
"""
|
"""
|
||||||
Alias for class :class:`CircularBeam`.
|
Alias for class :class:`CircularBeam`.
|
||||||
"""
|
"""
|
||||||
return CircularBeam(studyId, groupName, groupGeomObj, parameters, name,
|
return CircularBeam(groupName, groupGeomObj, parameters, name,
|
||||||
color = PURPLE)
|
color = PURPLE)
|
||||||
|
|
||||||
## Alias for class ThickShell.
|
## Alias for class ThickShell.
|
||||||
# \ingroup parts
|
# \ingroup parts
|
||||||
def VisuCoque(studyId, groupName, groupGeomObj, parameters, name = "COQUE"):
|
def VisuCoque(groupName, groupGeomObj, parameters, name = "COQUE"):
|
||||||
"""
|
"""
|
||||||
Alias for class :class:`ThickShell`.
|
Alias for class :class:`ThickShell`.
|
||||||
"""
|
"""
|
||||||
return ThickShell(studyId, groupName, groupGeomObj, parameters, name)
|
return ThickShell(groupName, groupGeomObj, parameters, name)
|
||||||
|
|
||||||
## Alias for class Grid.
|
## Alias for class Grid.
|
||||||
# \ingroup parts
|
# \ingroup parts
|
||||||
def VisuGrille(studyId, groupName, groupGeomObj, parameters, name = "GRILLE"):
|
def VisuGrille(groupName, groupGeomObj, parameters, name = "GRILLE"):
|
||||||
"""
|
"""
|
||||||
Alias for class :class:`Grid`.
|
Alias for class :class:`Grid`.
|
||||||
"""
|
"""
|
||||||
return Grid(studyId, groupName, groupGeomObj, parameters, name)
|
return Grid(groupName, groupGeomObj, parameters, name)
|
||||||
|
@ -23,7 +23,7 @@ from GEOM import IAdvancedOperations
|
|||||||
__libraryName__ = "AdvancedEngine"
|
__libraryName__ = "AdvancedEngine"
|
||||||
|
|
||||||
def GetAdvancedOperations(self):
|
def GetAdvancedOperations(self):
|
||||||
anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
|
anOp = self.GetPluginOperations(__libraryName__)
|
||||||
return anOp._narrow(IAdvancedOperations)
|
return anOp._narrow(IAdvancedOperations)
|
||||||
|
|
||||||
## Create a T-shape object with specified caracteristics for the main
|
## Create a T-shape object with specified caracteristics for the main
|
||||||
|
@ -24,7 +24,7 @@ from GEOM import IBREPOperations
|
|||||||
__libraryName__ = "BREPPluginEngine"
|
__libraryName__ = "BREPPluginEngine"
|
||||||
|
|
||||||
def GetBREPPluginOperations(self):
|
def GetBREPPluginOperations(self):
|
||||||
anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
|
anOp = self.GetPluginOperations(__libraryName__)
|
||||||
return anOp._narrow(IBREPOperations)
|
return anOp._narrow(IBREPOperations)
|
||||||
|
|
||||||
## Export the given shape into a file with given name in BREP format.
|
## Export the given shape into a file with given name in BREP format.
|
||||||
|
@ -49,10 +49,10 @@ obj5_entry = geompy.addToStudy(obj5, "Object5")
|
|||||||
hasInfo = geompy.hasObjectInfo()
|
hasInfo = geompy.hasObjectInfo()
|
||||||
print "Check if GEOM module provides information about its objects: ", hasInfo
|
print "Check if GEOM module provides information about its objects: ", hasInfo
|
||||||
if hasInfo == True:
|
if hasInfo == True:
|
||||||
print "Information about first object: ", geompy.getObjectInfo(salome.myStudyId, obj1_entry)
|
print "Information about first object: ", geompy.getObjectInfo(obj1_entry)
|
||||||
print "Information about second object: ", geompy.getObjectInfo(salome.myStudyId, obj2_entry)
|
print "Information about second object: ", geompy.getObjectInfo(obj2_entry)
|
||||||
print "Information about third object: ", geompy.getObjectInfo(salome.myStudyId, obj3_entry)
|
print "Information about third object: ", geompy.getObjectInfo(obj3_entry)
|
||||||
print "Information about fourth object: ", geompy.getObjectInfo(salome.myStudyId, obj4_entry)
|
print "Information about fourth object: ", geompy.getObjectInfo(obj4_entry)
|
||||||
print "Information about fifth object: ", geompy.getObjectInfo(salome.myStudyId, obj5_entry)
|
print "Information about fifth object: ", geompy.getObjectInfo(obj5_entry)
|
||||||
|
|
||||||
salome.sg.updateObjBrowser(True)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -36,10 +36,10 @@ import math
|
|||||||
geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM")
|
geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM")
|
||||||
myBuilder = salome.myStudy.NewBuilder()
|
myBuilder = salome.myStudy.NewBuilder()
|
||||||
|
|
||||||
BasicOp = geom.GetIBasicOperations(salome.myStudyId)
|
BasicOp = geom.GetIBasicOperations()
|
||||||
PrimOp = geom.GetI3DPrimOperations(salome.myStudyId)
|
PrimOp = geom.GetI3DPrimOperations()
|
||||||
InsertOp = geom.GetIInsertOperations(salome.myStudyId)
|
InsertOp = geom.GetIInsertOperations()
|
||||||
TrsfOp = geom.GetITransformOperations(salome.myStudyId)
|
TrsfOp = geom.GetITransformOperations()
|
||||||
|
|
||||||
point0 = BasicOp.MakePointXYZ(0.,0.,0.)
|
point0 = BasicOp.MakePointXYZ(0.,0.,0.)
|
||||||
pointz1 = BasicOp.MakePointXYZ(0.,0.,1.)
|
pointz1 = BasicOp.MakePointXYZ(0.,0.,1.)
|
||||||
|
@ -37,10 +37,10 @@ import salome_ComponentGUI
|
|||||||
|
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
BasicOp = geompy.GetIBasicOperations(salome.myStudyId)
|
BasicOp = geompy.GetIBasicOperations()
|
||||||
PrimOp = geompy.GetI3DPrimOperations(salome.myStudyId)
|
PrimOp = geompy.GetI3DPrimOperations()
|
||||||
InsertOp = geompy.GetIInsertOperations(salome.myStudyId)
|
InsertOp = geompy.GetIInsertOperations()
|
||||||
TrsfOp = geompy.GetITransformOperations(salome.myStudyId)
|
TrsfOp = geompy.GetITransformOperations()
|
||||||
|
|
||||||
point0 = BasicOp.MakePointXYZ(0.,0.,0.)
|
point0 = BasicOp.MakePointXYZ(0.,0.,0.)
|
||||||
pointz1 = BasicOp.MakePointXYZ(0.,0.,1.)
|
pointz1 = BasicOp.MakePointXYZ(0.,0.,1.)
|
||||||
|
@ -33,7 +33,7 @@ from salome.geom import geomBuilder
|
|||||||
geompy = geomBuilder.New(salome.myStudy)
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
#Create Points
|
#Create Points
|
||||||
BasicOp = geompy.GetIBasicOperations(salome.myStudyId)
|
BasicOp = geompy.GetIBasicOperations()
|
||||||
Vertex1 = BasicOp.MakePointXYZ(0., 0., 0.)
|
Vertex1 = BasicOp.MakePointXYZ(0., 0., 0.)
|
||||||
Vertex2 = BasicOp.MakePointXYZ(100., 20., 30.)
|
Vertex2 = BasicOp.MakePointXYZ(100., 20., 30.)
|
||||||
Vertex3 = BasicOp.MakePointXYZ(150., 100., -25.)
|
Vertex3 = BasicOp.MakePointXYZ(150., 100., -25.)
|
||||||
|
@ -56,7 +56,7 @@ PosCour = PosZ + HauteurT * 4 / 7
|
|||||||
PosRot = PosZ + 0.9 * HauteurT
|
PosRot = PosZ + 0.9 * HauteurT
|
||||||
|
|
||||||
#Points
|
#Points
|
||||||
BasicOp = geompy.GetIBasicOperations(salome.myStudyId)
|
BasicOp = geompy.GetIBasicOperations()
|
||||||
OO = BasicOp.MakePointXYZ(0, 0, 0)
|
OO = BasicOp.MakePointXYZ(0, 0, 0)
|
||||||
P0 = BasicOp.MakePointXYZ(0, 0, 1)
|
P0 = BasicOp.MakePointXYZ(0, 0, 1)
|
||||||
P1 = BasicOp.MakePointXYZ(PosX, PosY, PosZ)
|
P1 = BasicOp.MakePointXYZ(PosX, PosY, PosZ)
|
||||||
|
@ -24,7 +24,7 @@ from GEOM import IIGESOperations
|
|||||||
__libraryName__ = "IGESPluginEngine"
|
__libraryName__ = "IGESPluginEngine"
|
||||||
|
|
||||||
def GetIGESPluginOperations(self):
|
def GetIGESPluginOperations(self):
|
||||||
anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
|
anOp = self.GetPluginOperations(__libraryName__)
|
||||||
return anOp._narrow(IIGESOperations)
|
return anOp._narrow(IIGESOperations)
|
||||||
|
|
||||||
## Export the given shape into a file with given name in IGES format.
|
## Export the given shape into a file with given name in IGES format.
|
||||||
|
@ -80,11 +80,11 @@ theFilenameToSave = theHomePath + "/Pyramid.hdf"
|
|||||||
if os.access(theFilenameToSave, os.F_OK):
|
if os.access(theFilenameToSave, os.F_OK):
|
||||||
if os.access(theFilenameToSave, os.W_OK):
|
if os.access(theFilenameToSave, os.W_OK):
|
||||||
os.remove(theFilenameToSave)
|
os.remove(theFilenameToSave)
|
||||||
salome.myStudyManager.SaveAs(theFilenameToSave, salome.myStudy, 0)
|
salome.myStudy.SaveAs(theFilenameToSave, 0)
|
||||||
else:
|
else:
|
||||||
print "You have no enough permissions to overwrite HDF file: ",theFilenameToSave
|
print "You have no enough permissions to overwrite HDF file: ",theFilenameToSave
|
||||||
else:
|
else:
|
||||||
salome.myStudyManager.SaveAs(theFilenameToSave, salome.myStudy, 0)
|
salome.myStudy.SaveAs(theFilenameToSave, 0)
|
||||||
|
|
||||||
|
|
||||||
salome.sg.updateObjBrowser(True)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -25,7 +25,7 @@ import GEOM
|
|||||||
__libraryName__ = "STEPPluginEngine"
|
__libraryName__ = "STEPPluginEngine"
|
||||||
|
|
||||||
def GetSTEPPluginOperations(self):
|
def GetSTEPPluginOperations(self):
|
||||||
anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
|
anOp = self.GetPluginOperations(__libraryName__)
|
||||||
return anOp._narrow(ISTEPOperations)
|
return anOp._narrow(ISTEPOperations)
|
||||||
|
|
||||||
## Export the given shape into a file with given name in STEP format.
|
## Export the given shape into a file with given name in STEP format.
|
||||||
|
@ -24,7 +24,7 @@ from GEOM import ISTLOperations
|
|||||||
__libraryName__ = "STLPluginEngine"
|
__libraryName__ = "STLPluginEngine"
|
||||||
|
|
||||||
def GetSTLPluginOperations(self):
|
def GetSTLPluginOperations(self):
|
||||||
anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
|
anOp = self.GetPluginOperations(__libraryName__)
|
||||||
return anOp._narrow(ISTLOperations)
|
return anOp._narrow(ISTLOperations)
|
||||||
|
|
||||||
## Export the given shape into a file with given name in STL format.
|
## Export the given shape into a file with given name in STL format.
|
||||||
|
@ -24,7 +24,7 @@ from GEOM import IVTKOperations
|
|||||||
__libraryName__ = "VTKPluginEngine"
|
__libraryName__ = "VTKPluginEngine"
|
||||||
|
|
||||||
def GetVTKPluginOperations(self):
|
def GetVTKPluginOperations(self):
|
||||||
anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
|
anOp = self.GetPluginOperations(__libraryName__)
|
||||||
return anOp._narrow(IVTKOperations)
|
return anOp._narrow(IVTKOperations)
|
||||||
|
|
||||||
## Export the given shape into a file with given name in VTK format.
|
## Export the given shape into a file with given name in VTK format.
|
||||||
|
@ -24,7 +24,7 @@ from GEOM import IXAOOperations
|
|||||||
__libraryName__ = "XAOPluginEngine"
|
__libraryName__ = "XAOPluginEngine"
|
||||||
|
|
||||||
def GetXAOPluginOperations(self):
|
def GetXAOPluginOperations(self):
|
||||||
anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
|
anOp = self.GetPluginOperations(__libraryName__)
|
||||||
return anOp._narrow(IXAOOperations)
|
return anOp._narrow(IXAOOperations)
|
||||||
|
|
||||||
## Export a shape to XAO format
|
## Export a shape to XAO format
|
||||||
|
@ -652,7 +652,6 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
|
|||||||
GEOM._objref_GEOM_Gen.__init__(self)
|
GEOM._objref_GEOM_Gen.__init__(self)
|
||||||
self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
|
self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
|
||||||
self.myBuilder = None
|
self.myBuilder = None
|
||||||
self.myStudyId = 0
|
|
||||||
self.father = None
|
self.father = None
|
||||||
|
|
||||||
self.BasicOp = None
|
self.BasicOp = None
|
||||||
@ -755,7 +754,6 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
|
|||||||
## @{
|
## @{
|
||||||
def init_geom(self,theStudy):
|
def init_geom(self,theStudy):
|
||||||
self.myStudy = theStudy
|
self.myStudy = theStudy
|
||||||
self.myStudyId = self.myStudy._get_StudyId()
|
|
||||||
self.myBuilder = self.myStudy.NewBuilder()
|
self.myBuilder = self.myStudy.NewBuilder()
|
||||||
self.father = self.myStudy.FindComponent("GEOM")
|
self.father = self.myStudy.FindComponent("GEOM")
|
||||||
notebook.myStudy = theStudy
|
notebook.myStudy = theStudy
|
||||||
@ -769,19 +767,19 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
|
|||||||
aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
|
aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
|
||||||
self.myBuilder.DefineComponentInstance(self.father,self)
|
self.myBuilder.DefineComponentInstance(self.father,self)
|
||||||
pass
|
pass
|
||||||
self.BasicOp = self.GetIBasicOperations (self.myStudyId)
|
self.BasicOp = self.GetIBasicOperations ()
|
||||||
self.CurvesOp = self.GetICurvesOperations (self.myStudyId)
|
self.CurvesOp = self.GetICurvesOperations ()
|
||||||
self.PrimOp = self.GetI3DPrimOperations (self.myStudyId)
|
self.PrimOp = self.GetI3DPrimOperations ()
|
||||||
self.ShapesOp = self.GetIShapesOperations (self.myStudyId)
|
self.ShapesOp = self.GetIShapesOperations ()
|
||||||
self.HealOp = self.GetIHealingOperations (self.myStudyId)
|
self.HealOp = self.GetIHealingOperations ()
|
||||||
self.InsertOp = self.GetIInsertOperations (self.myStudyId)
|
self.InsertOp = self.GetIInsertOperations ()
|
||||||
self.BoolOp = self.GetIBooleanOperations (self.myStudyId)
|
self.BoolOp = self.GetIBooleanOperations ()
|
||||||
self.TrsfOp = self.GetITransformOperations(self.myStudyId)
|
self.TrsfOp = self.GetITransformOperations()
|
||||||
self.LocalOp = self.GetILocalOperations (self.myStudyId)
|
self.LocalOp = self.GetILocalOperations ()
|
||||||
self.MeasuOp = self.GetIMeasureOperations (self.myStudyId)
|
self.MeasuOp = self.GetIMeasureOperations ()
|
||||||
self.BlocksOp = self.GetIBlocksOperations (self.myStudyId)
|
self.BlocksOp = self.GetIBlocksOperations ()
|
||||||
self.GroupOp = self.GetIGroupOperations (self.myStudyId)
|
self.GroupOp = self.GetIGroupOperations ()
|
||||||
self.FieldOp = self.GetIFieldOperations (self.myStudyId)
|
self.FieldOp = self.GetIFieldOperations ()
|
||||||
|
|
||||||
# set GEOM as root in the use case tree
|
# set GEOM as root in the use case tree
|
||||||
self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
|
self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
|
||||||
@ -792,8 +790,8 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
|
|||||||
self.myBuilder.LoadWith(self.father, self)
|
self.myBuilder.LoadWith(self.father, self)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def GetPluginOperations(self, studyID, libraryName):
|
def GetPluginOperations(self, libraryName):
|
||||||
op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
|
op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, libraryName)
|
||||||
return op
|
return op
|
||||||
|
|
||||||
## Enable / disable results auto-publishing
|
## Enable / disable results auto-publishing
|
||||||
|
@ -248,7 +248,7 @@ int GEOM_Swig::getIndexTopology( const char* theSubIOR, const char* theMainIOR )
|
|||||||
if ( !CORBA::is_nil( aGeomGen ) && !CORBA::is_nil( aMainShape ) && !CORBA::is_nil( aSubShape ) ) {
|
if ( !CORBA::is_nil( aGeomGen ) && !CORBA::is_nil( aMainShape ) && !CORBA::is_nil( aSubShape ) ) {
|
||||||
// get shapes operations interface
|
// get shapes operations interface
|
||||||
GEOM::GEOM_IShapesOperations_var anIShapesOperations =
|
GEOM::GEOM_IShapesOperations_var anIShapesOperations =
|
||||||
aGeomGen->GetIShapesOperations( aMainShape->GetStudyID() );
|
aGeomGen->GetIShapesOperations();
|
||||||
if ( !CORBA::is_nil( anIShapesOperations ) )
|
if ( !CORBA::is_nil( anIShapesOperations ) )
|
||||||
index = anIShapesOperations->GetTopologyIndex( aMainShape, aSubShape );
|
index = anIShapesOperations->GetTopologyIndex( aMainShape, aSubShape );
|
||||||
}
|
}
|
||||||
@ -275,7 +275,7 @@ const char* GEOM_Swig::getShapeTypeString( const char* theIOR )
|
|||||||
if ( !CORBA::is_nil( aGeomGen ) && !CORBA::is_nil( aShape ) ) {
|
if ( !CORBA::is_nil( aGeomGen ) && !CORBA::is_nil( aShape ) ) {
|
||||||
// get shapes operations interface
|
// get shapes operations interface
|
||||||
GEOM::GEOM_IShapesOperations_var anIShapesOperations =
|
GEOM::GEOM_IShapesOperations_var anIShapesOperations =
|
||||||
aGeomGen->GetIShapesOperations( aShape->GetStudyID() );
|
aGeomGen->GetIShapesOperations();
|
||||||
if ( !CORBA::is_nil( anIShapesOperations ) )
|
if ( !CORBA::is_nil( anIShapesOperations ) )
|
||||||
aTypeName = anIShapesOperations->GetShapeTypeString( aShape );
|
aTypeName = anIShapesOperations->GetShapeTypeString( aShape );
|
||||||
}
|
}
|
||||||
|
@ -327,7 +327,7 @@ void GenerationGUI_FillingDlg::ApproxChanged()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr GenerationGUI_FillingDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr GenerationGUI_FillingDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetI3DPrimOperations(getStudyId());
|
return getGeomEngine()->GetI3DPrimOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -502,7 +502,7 @@ void GenerationGUI_PipeDlg::enterEvent (QEvent*)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr GenerationGUI_PipeDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr GenerationGUI_PipeDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetI3DPrimOperations(getStudyId());
|
return getGeomEngine()->GetI3DPrimOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -339,7 +339,7 @@ void GenerationGUI_PipePathDlg::enterEvent (QEvent*)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr GenerationGUI_PipePathDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr GenerationGUI_PipePathDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetI3DPrimOperations(getStudyId());
|
return getGeomEngine()->GetI3DPrimOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -526,7 +526,7 @@ void GenerationGUI_PrismDlg::ValueChangedInSpinBox()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr GenerationGUI_PrismDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr GenerationGUI_PrismDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetI3DPrimOperations(getStudyId());
|
return getGeomEngine()->GetI3DPrimOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -296,7 +296,7 @@ double GenerationGUI_RevolDlg::getAngle() const
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr GenerationGUI_RevolDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr GenerationGUI_RevolDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetI3DPrimOperations(getStudyId());
|
return getGeomEngine()->GetI3DPrimOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -376,7 +376,7 @@ void GenerationGUI_ThicknessDlg::ValueChangedInSpinBox()
|
|||||||
//==============================================================================
|
//==============================================================================
|
||||||
GEOM::GEOM_IOperations_ptr GenerationGUI_ThicknessDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr GenerationGUI_ThicknessDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetI3DPrimOperations(getStudyId());
|
return getGeomEngine()->GetI3DPrimOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
@ -265,7 +265,7 @@ void GroupGUI_BooleanDlg::enterEvent (QEvent*)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr GroupGUI_BooleanDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr GroupGUI_BooleanDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIGroupOperations(getStudyId());
|
return getGeomEngine()->GetIGroupOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -509,7 +509,7 @@ void GroupGUI_GroupDlg::onGetInPlace()
|
|||||||
SUIT_OverrideCursor wc;
|
SUIT_OverrideCursor wc;
|
||||||
myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
|
myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
|
||||||
GEOM::GEOM_IShapesOperations_var aShapesOp =
|
GEOM::GEOM_IShapesOperations_var aShapesOp =
|
||||||
getGeomEngine()->GetIShapesOperations(getStudyId());
|
getGeomEngine()->GetIShapesOperations();
|
||||||
if (subSelectionWay() == GET_IN_PLACE) {
|
if (subSelectionWay() == GET_IN_PLACE) {
|
||||||
GEOM::GEOM_Object_var aGetInPlaceObj = aShapesOp->GetInPlace(myMainObj, anObj);
|
GEOM::GEOM_Object_var aGetInPlaceObj = aShapesOp->GetInPlace(myMainObj, anObj);
|
||||||
setInPlaceObj(aGetInPlaceObj);
|
setInPlaceObj(aGetInPlaceObj);
|
||||||
@ -542,8 +542,8 @@ void GroupGUI_GroupDlg::setInPlaceObj(GEOM::GEOM_Object_var theObj, const bool i
|
|||||||
// build map of indices
|
// build map of indices
|
||||||
myMain2InPlaceIndices.Clear();
|
myMain2InPlaceIndices.Clear();
|
||||||
if (!myInPlaceObj->_is_nil()) {
|
if (!myInPlaceObj->_is_nil()) {
|
||||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
|
||||||
GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations(getStudyId());
|
GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations();
|
||||||
|
|
||||||
GEOM::ListOfGO_var aSubObjects = aShapesOp->MakeExplode(myInPlaceObj, getShapeType(), false);
|
GEOM::ListOfGO_var aSubObjects = aShapesOp->MakeExplode(myInPlaceObj, getShapeType(), false);
|
||||||
for ( int i = 0; i < aSubObjects->length(); i++ )
|
for ( int i = 0; i < aSubObjects->length(); i++ )
|
||||||
@ -696,7 +696,7 @@ void GroupGUI_GroupDlg::selectAllSubShapes()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
GEOM::ListOfLong_var aSubShapes;
|
GEOM::ListOfLong_var aSubShapes;
|
||||||
GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations();
|
||||||
aSubShapes = aShOp->SubShapeAllIDs(myMainObj, getShapeType(), false);
|
aSubShapes = aShOp->SubShapeAllIDs(myMainObj, getShapeType(), false);
|
||||||
if (aSubShapes->length() > 0) {
|
if (aSubShapes->length() > 0) {
|
||||||
if (subSelectionWay() == ALL_SUBSHAPES)
|
if (subSelectionWay() == ALL_SUBSHAPES)
|
||||||
@ -1171,7 +1171,7 @@ void GroupGUI_GroupDlg::updateState (bool isAdd)
|
|||||||
myIsShapeType &&
|
myIsShapeType &&
|
||||||
getShapeType() != TopAbs_VERTEX);
|
getShapeType() != TopAbs_VERTEX);
|
||||||
// manage of 'Plot' button access
|
// manage of 'Plot' button access
|
||||||
GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations();
|
||||||
GEOM::ListOfLong_var aSubShapes = aShOp->SubShapeAllIDs( myMainObj, getShapeType(), false );
|
GEOM::ListOfLong_var aSubShapes = aShOp->SubShapeAllIDs( myMainObj, getShapeType(), false );
|
||||||
bool hasCurrentEntities = aSubShapes->length() > 0;
|
bool hasCurrentEntities = aSubShapes->length() > 0;
|
||||||
#ifndef DISABLE_PLOT2DVIEWER
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
@ -1252,7 +1252,7 @@ void GroupGUI_GroupDlg::highlightSubShapes()
|
|||||||
SALOME_ListIO aSelList;
|
SALOME_ListIO aSelList;
|
||||||
|
|
||||||
// To highlight the selected sub-shape in Object Browser, if it's already published under the main shape
|
// To highlight the selected sub-shape in Object Browser, if it's already published under the main shape
|
||||||
GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations(getStudyId());
|
GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations();
|
||||||
QMap<int, QString> childsMap;
|
QMap<int, QString> childsMap;
|
||||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
|
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
|
||||||
if (appStudy) {
|
if (appStudy) {
|
||||||
@ -1311,7 +1311,7 @@ void GroupGUI_GroupDlg::highlightSubShapes()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr GroupGUI_GroupDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr GroupGUI_GroupDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIGroupOperations(getStudyId());
|
return getGeomEngine()->GetIGroupOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
#define RETURN_WITH_MSG(a, b) \
|
#define RETURN_WITH_MSG(a, b) \
|
||||||
|
@ -110,8 +110,7 @@ bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
|
|||||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
|
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
|
||||||
if ( !study ) return false;
|
if ( !study ) return false;
|
||||||
|
|
||||||
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "IGESPluginEngine" );
|
||||||
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "IGESPluginEngine" );
|
|
||||||
IGESOpPtr igesOp = GEOM::IIGESOperations::_narrow( op );
|
IGESOpPtr igesOp = GEOM::IIGESOperations::_narrow( op );
|
||||||
if ( igesOp.isNull() ) return false;
|
if ( igesOp.isNull() ) return false;
|
||||||
|
|
||||||
@ -177,10 +176,9 @@ bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var main = result[0];
|
GEOM::GEOM_Object_var main = result[0];
|
||||||
QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
|
QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
|
||||||
SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( dsStudy,
|
SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( SALOMEDS::SObject::_nil(),
|
||||||
SALOMEDS::SObject::_nil(),
|
main.in(),
|
||||||
main.in(),
|
publishName.toUtf8().constData() );
|
||||||
publishName.toUtf8().constData() );
|
|
||||||
|
|
||||||
entryList.append( so->GetID() );
|
entryList.append( so->GetID() );
|
||||||
transaction.commit();
|
transaction.commit();
|
||||||
@ -223,8 +221,7 @@ bool IGESPlugin_GUI::exportIGES( SUIT_Desktop* parent )
|
|||||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
|
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
|
||||||
if ( !study ) return false;
|
if ( !study ) return false;
|
||||||
|
|
||||||
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "IGESPluginEngine" );
|
||||||
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "IGESPluginEngine" );
|
|
||||||
IGESOpPtr igesOp = GEOM::IIGESOperations::_narrow( op );
|
IGESOpPtr igesOp = GEOM::IIGESOperations::_narrow( op );
|
||||||
if ( igesOp.isNull() ) return false;
|
if ( igesOp.isNull() ) return false;
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
// OCCT includes
|
// OCCT includes
|
||||||
#include <TFunction_DriverTable.hxx>
|
#include <TFunction_DriverTable.hxx>
|
||||||
|
|
||||||
std::map <int, IGESPlugin_IOperations*> IGESPlugin_OperationsCreator::_mapOfOperations;
|
IGESPlugin_IOperations* IGESPlugin_OperationsCreator::_operation;
|
||||||
|
|
||||||
IGESPlugin_OperationsCreator::IGESPlugin_OperationsCreator()
|
IGESPlugin_OperationsCreator::IGESPlugin_OperationsCreator()
|
||||||
{
|
{
|
||||||
@ -54,19 +54,16 @@ IGESPlugin_OperationsCreator::~IGESPlugin_OperationsCreator()
|
|||||||
}
|
}
|
||||||
|
|
||||||
GEOM_IOperations_i* IGESPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
|
GEOM_IOperations_i* IGESPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
|
||||||
int theStudyId,
|
|
||||||
GEOM::GEOM_Gen_ptr theEngine,
|
GEOM::GEOM_Gen_ptr theEngine,
|
||||||
::GEOMImpl_Gen* theGenImpl )
|
::GEOMImpl_Gen* theGenImpl )
|
||||||
{
|
{
|
||||||
Unexpect aCatch( SALOME_SalomeException );
|
Unexpect aCatch( SALOME_SalomeException );
|
||||||
MESSAGE( "IGESPlugin_OperationsCreator::Create" );
|
MESSAGE( "IGESPlugin_OperationsCreator::Create" );
|
||||||
return new IGESPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
|
_operation = new IGESPlugin_IOperations( theGenImpl );
|
||||||
|
return new IGESPlugin_IOperations_i( thePOA, theEngine, _operation );
|
||||||
}
|
}
|
||||||
|
|
||||||
IGESPlugin_IOperations* IGESPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
|
IGESPlugin_IOperations* IGESPlugin_OperationsCreator::get()
|
||||||
int theStudyId )
|
|
||||||
{
|
{
|
||||||
if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
|
return _operation;
|
||||||
_mapOfOperations[theStudyId] = new IGESPlugin_IOperations( theGenImpl, theStudyId );
|
|
||||||
return _mapOfOperations[theStudyId];
|
|
||||||
}
|
}
|
||||||
|
@ -41,15 +41,13 @@ public:
|
|||||||
~IGESPlugin_OperationsCreator();
|
~IGESPlugin_OperationsCreator();
|
||||||
|
|
||||||
GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
|
GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
|
||||||
int theStudyId,
|
GEOM::GEOM_Gen_ptr theEngine,
|
||||||
GEOM::GEOM_Gen_ptr theEngine,
|
::GEOMImpl_Gen* theGenImpl );
|
||||||
::GEOMImpl_Gen* theGenImpl );
|
|
||||||
private:
|
private:
|
||||||
static IGESPlugin_IOperations* get( ::GEOMImpl_Gen* theGenImpl,
|
static IGESPlugin_IOperations* get();
|
||||||
int theStudyId );
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static std::map <int, IGESPlugin_IOperations*> _mapOfOperations;
|
IGESPlugin_IOperations* _operation;
|
||||||
|
|
||||||
friend class IGESPlugin_IECallBack;
|
friend class IGESPlugin_IECallBack;
|
||||||
};
|
};
|
||||||
|
@ -273,7 +273,7 @@ void MeasureGUI_BndBoxDlg::SelectionIntoArgument()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr MeasureGUI_BndBoxDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr MeasureGUI_BndBoxDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIMeasureOperations(getStudyId());
|
return getGeomEngine()->GetIMeasureOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -272,7 +272,7 @@ void MeasureGUI_CenterMassDlg::enterEvent( QEvent* )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr MeasureGUI_CenterMassDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr MeasureGUI_CenterMassDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIMeasureOperations( getStudyId() );
|
return getGeomEngine()->GetIMeasureOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -394,7 +394,7 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::processObject()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr MeasureGUI_CheckCompoundOfBlocksDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr MeasureGUI_CheckCompoundOfBlocksDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIBlocksOperations( getStudyId() );
|
return getGeomEngine()->GetIBlocksOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -486,7 +486,7 @@ bool MeasureGUI_CheckSelfIntersectionsDlg::extractPrefix() const
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr MeasureGUI_CheckSelfIntersectionsDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr MeasureGUI_CheckSelfIntersectionsDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIMeasureOperations( getStudyId() );
|
return getGeomEngine()->GetIMeasureOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -710,7 +710,7 @@ bool MeasureGUI_CheckSelfIntersectionsDlg::execute(ObjectList& objects)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GEOM::ShapesOpPtr shapesOper = getGeomEngine()->GetIShapesOperations(getStudyId());
|
GEOM::ShapesOpPtr shapesOper = getGeomEngine()->GetIShapesOperations();
|
||||||
|
|
||||||
// Explode sub-shapes
|
// Explode sub-shapes
|
||||||
GEOM::ListOfLong_var anArray = new GEOM::ListOfLong;
|
GEOM::ListOfLong_var anArray = new GEOM::ListOfLong;
|
||||||
|
@ -445,7 +445,7 @@ void MeasureGUI_CheckShapeDlg::processObject()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr MeasureGUI_CheckShapeDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr MeasureGUI_CheckShapeDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIMeasureOperations( getStudyId() );
|
return getGeomEngine()->GetIMeasureOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -625,7 +625,7 @@ bool MeasureGUI_CheckShapeDlg::execute( ObjectList& objects )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (myShapesOper->_is_nil()) {
|
if (myShapesOper->_is_nil()) {
|
||||||
myShapesOper = getGeomEngine()->GetIShapesOperations(getStudyId());
|
myShapesOper = getGeomEngine()->GetIShapesOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
GEOM::ListOfGO_var aList = myShapesOper->MakeSubShapes(myObj, anArray);
|
GEOM::ListOfGO_var aList = myShapesOper->MakeSubShapes(myObj, anArray);
|
||||||
|
@ -415,7 +415,7 @@ SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr MeasureGUI_DistanceDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr MeasureGUI_DistanceDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIMeasureOperations(getStudyId());
|
return getGeomEngine()->GetIMeasureOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -434,7 +434,7 @@ bool MeasureGUI_DistanceDlg::isValid (QString& msg)
|
|||||||
bool MeasureGUI_DistanceDlg::execute (ObjectList& objects)
|
bool MeasureGUI_DistanceDlg::execute (ObjectList& objects)
|
||||||
{
|
{
|
||||||
GEOM::GEOM_IMeasureOperations_var anOper = GEOM::GEOM_IMeasureOperations::_narrow(getOperation());
|
GEOM::GEOM_IMeasureOperations_var anOper = GEOM::GEOM_IMeasureOperations::_narrow(getOperation());
|
||||||
GEOM::GEOM_IBasicOperations_var aBasicOper = getGeomEngine()->GetIBasicOperations(getStudyId());
|
GEOM::GEOM_IBasicOperations_var aBasicOper = getGeomEngine()->GetIBasicOperations();
|
||||||
|
|
||||||
GEOM::ListOfDouble_var aDbls;
|
GEOM::ListOfDouble_var aDbls;
|
||||||
int nbSols = anOper->ClosestPoints(myObj1.get(), myObj2.get(), aDbls);
|
int nbSols = anOper->ClosestPoints(myObj1.get(), myObj2.get(), aDbls);
|
||||||
|
@ -360,7 +360,7 @@ bool MeasureGUI_FastCheckIntersectionsDlg::extractPrefix() const
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr MeasureGUI_FastCheckIntersectionsDlg::createOperation()
|
GEOM::GEOM_IOperations_ptr MeasureGUI_FastCheckIntersectionsDlg::createOperation()
|
||||||
{
|
{
|
||||||
return getGeomEngine()->GetIMeasureOperations( getStudyId() );
|
return getGeomEngine()->GetIMeasureOperations();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -611,7 +611,7 @@ GEOM::ListOfGO_var MeasureGUI_FastCheckIntersectionsDlg::getLstObjFromListSelect
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (myShapesOper->_is_nil())
|
if (myShapesOper->_is_nil())
|
||||||
myShapesOper = getGeomEngine()->GetIShapesOperations(getStudyId());
|
myShapesOper = getGeomEngine()->GetIShapesOperations();
|
||||||
|
|
||||||
GEOM::ListOfGO_var aObjLstCreate = myShapesOper->MakeSubShapes(anObj.get(), anArray);
|
GEOM::ListOfGO_var aObjLstCreate = myShapesOper->MakeSubShapes(anObj.get(), anArray);
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user