Back to index

salome-geom  6.5.0
Functions
Restore presentation parameters and a tree of sub-shapes
Transforming geometrical objects
Collaboration diagram for Restore presentation parameters and a tree of sub-shapes:

Functions

def geompyDC.geompyDC.RestoreSubShapes
 Publish sub-shapes, standing for arguments and sub-shapes of arguments To be used from python scripts out of addToStudy() (non-default usage)
def geompyDC.geompyDC.RestoreGivenSubShapes
 Publish sub-shapes, standing for arguments and sub-shapes of arguments To be used from python scripts out of addToStudy() (non-default usage)

Function Documentation

def geompyDC.geompyDC.RestoreGivenSubShapes (   self,
  theObject,
  theArgs = [],
  theFindMethod = GEOM.FSM_GetInPlace,
  theInheritFirstArg = False,
  theAddPrefix = True 
)

Publish sub-shapes, standing for arguments and sub-shapes of arguments To be used from python scripts out of addToStudy() (non-default usage)

Parameters:
theObjectpublished GEOM.GEOM_Object, arguments of which will be published
theArgslist of GEOM.GEOM_Object, operation arguments to be published. If this list is empty, all operation arguments will be published
theFindMethodmethod to search sub-shapes, corresponding to arguments and their sub-shapes. Value from enumeration GEOM::find_shape_method.
theInheritFirstArgset properties of the first argument for theObject. Do not publish sub-shapes in place of arguments, but only in place of sub-shapes of the first argument, because the whole shape corresponds to the first argument. Mainly to be used after transformations, but it also can be usefull after partition with one object shape, and some other operations, where only the first argument has to be considered. If theObject has only one argument shape, this flag is automatically considered as True, not regarding really passed value.
theAddPrefixadd prefix "from_" to names of restored sub-shapes, and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
Returns:
list of published sub-shapes

Example

Publish sub-shapes, standing for arguments and sub-shapes of arguments
To be used from python scripts out of geompy.addToStudy() (non-default usage)

Parameters:
    theObject published GEOM.GEOM_Object, arguments of which will be published
    theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
  If this list is empty, all operation arguments will be published
    theFindMethod method to search sub-shapes, corresponding to arguments and
      their sub-shapes. Value from enumeration GEOM::find_shape_method.
    theInheritFirstArg set properties of the first argument for theObject.
           Do not publish sub-shapes in place of arguments, but only
           in place of sub-shapes of the first argument,
           because the whole shape corresponds to the first argument.
           Mainly to be used after transformations, but it also can be
           usefull after partition with one object shape, and some other
           operations, where only the first argument has to be considered.
           If theObject has only one argument shape, this flag is automatically
           considered as True, not regarding really passed value.
    theAddPrefix add prefix "from_" to names of restored sub-shapes,
     and prefix "from_subshapes_of_" to names of partially restored sub-shapes.

Returns: 
    list of published sub-shapes

Definition at line 616 of file geompyDC.py.

00616 
00617                                    theInheritFirstArg=False, theAddPrefix=True):
00618             """
00619             Publish sub-shapes, standing for arguments and sub-shapes of arguments
00620             To be used from python scripts out of geompy.addToStudy() (non-default usage)
00621 
00622             Parameters:
00623                 theObject published GEOM.GEOM_Object, arguments of which will be published
00624                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
00625                           If this list is empty, all operation arguments will be published
00626                 theFindMethod method to search sub-shapes, corresponding to arguments and
00627                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
00628                 theInheritFirstArg set properties of the first argument for theObject.
00629                                    Do not publish sub-shapes in place of arguments, but only
00630                                    in place of sub-shapes of the first argument,
00631                                    because the whole shape corresponds to the first argument.
00632                                    Mainly to be used after transformations, but it also can be
00633                                    usefull after partition with one object shape, and some other
00634                                    operations, where only the first argument has to be considered.
00635                                    If theObject has only one argument shape, this flag is automatically
00636                                    considered as True, not regarding really passed value.
00637                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
00638                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
00639 
00640             Returns: 
00641                 list of published sub-shapes
00642             """
00643             # Example: see GEOM_TestAll.py
00644             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
00645                                                theFindMethod, theInheritFirstArg, theAddPrefix)

Here is the call graph for this function:

Here is the caller graph for this function:

def geompyDC.geompyDC.RestoreSubShapes (   self,
  theObject,
  theArgs = [],
  theFindMethod = GEOM.FSM_GetInPlace,
  theInheritFirstArg = False,
  theAddPrefix = True 
)

Publish sub-shapes, standing for arguments and sub-shapes of arguments To be used from python scripts out of addToStudy() (non-default usage)

Parameters:
theObjectpublished GEOM.GEOM_Object, arguments of which will be published
theArgslist of GEOM.GEOM_Object, operation arguments to be published. If this list is empty, all operation arguments will be published
theFindMethodmethod to search sub-shapes, corresponding to arguments and their sub-shapes. Value from enumeration GEOM.find_shape_method.
theInheritFirstArgset properties of the first argument for theObject. Do not publish sub-shapes in place of arguments, but only in place of sub-shapes of the first argument, because the whole shape corresponds to the first argument. Mainly to be used after transformations, but it also can be usefull after partition with one object shape, and some other operations, where only the first argument has to be considered. If theObject has only one argument shape, this flag is automatically considered as True, not regarding really passed value.
theAddPrefixadd prefix "from_" to names of restored sub-shapes, and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
Returns:
list of published sub-shapes

Example

Publish sub-shapes, standing for arguments and sub-shapes of arguments
To be used from python scripts out of geompy.addToStudy (non-default usage)

Parameters:
    theObject published GEOM.GEOM_Object, arguments of which will be published
    theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
  If this list is empty, all operation arguments will be published
    theFindMethod method to search sub-shapes, corresponding to arguments and
      their sub-shapes. Value from enumeration GEOM.find_shape_method.
    theInheritFirstArg set properties of the first argument for theObject.
           Do not publish sub-shapes in place of arguments, but only
           in place of sub-shapes of the first argument,
           because the whole shape corresponds to the first argument.
           Mainly to be used after transformations, but it also can be
           usefull after partition with one object shape, and some other
           operations, where only the first argument has to be considered.
           If theObject has only one argument shape, this flag is automatically
           considered as True, not regarding really passed value.
    theAddPrefix add prefix "from_" to names of restored sub-shapes,
     and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
Returns:
    list of published sub-shapes

Definition at line 565 of file geompyDC.py.

00565 
00566                               theInheritFirstArg=False, theAddPrefix=True):
00567             """
00568             Publish sub-shapes, standing for arguments and sub-shapes of arguments
00569             To be used from python scripts out of geompy.addToStudy (non-default usage)
00570 
00571             Parameters:
00572                 theObject published GEOM.GEOM_Object, arguments of which will be published
00573                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
00574                           If this list is empty, all operation arguments will be published
00575                 theFindMethod method to search sub-shapes, corresponding to arguments and
00576                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
00577                 theInheritFirstArg set properties of the first argument for theObject.
00578                                    Do not publish sub-shapes in place of arguments, but only
00579                                    in place of sub-shapes of the first argument,
00580                                    because the whole shape corresponds to the first argument.
00581                                    Mainly to be used after transformations, but it also can be
00582                                    usefull after partition with one object shape, and some other
00583                                    operations, where only the first argument has to be considered.
00584                                    If theObject has only one argument shape, this flag is automatically
00585                                    considered as True, not regarding really passed value.
00586                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
00587                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
00588             Returns:
00589                 list of published sub-shapes
00590             """
00591             # Example: see GEOM_TestAll.py
00592             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
00593                                           theFindMethod, theInheritFirstArg, theAddPrefix)

Here is the call graph for this function:

Here is the caller graph for this function: