Correct documentation

This commit is contained in:
vsr 2013-04-17 10:43:10 +00:00
parent 8fab12198b
commit 14b6ec1909

View File

@ -34,25 +34,30 @@
## ##
## @details ## @details
## ##
## By default, all functions of geompy.py Python interface do not publish ## By default, all functions of geomBuilder Python module do not publish
## resulting geometrical objects. This can be done in the Python script ## resulting geometrical objects. This can be done in the Python script
## by means of geompy.addToStudy() or geompy.addToStudyInFather() ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
## functions. ## functions.
## ##
## However, it is possible to publish result data in the study ## However, it is possible to publish result data in the study
## automatically. For this, almost each function of geompy.py module has ## automatically. For this, almost each function of
## \ref geomBuilder.geomBuilder "geomBuilder" class has
## an additional @a theName parameter (@c None by default). ## an additional @a theName parameter (@c None by default).
## As soon as non-empty string value is passed to this parameter, ## As soon as non-empty string value is passed to this parameter,
## the result object is published in the study automatically. ## the result object is published in the study automatically.
## ##
## For example, ## For example, consider the following Python script:
## ##
## @code ## @code
## import salome
## from salome.geom import geomBuilder
## geompy = geomBuilder.New(salome.myStudy)
## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
## geompy.addToStudy(box, "box") # explicit publishing ## geompy.addToStudy(box, "box") # explicit publishing
## @endcode ## @endcode
## ##
## can be replaced by one-line instruction ## Last two lines can be replaced by one-line instruction:
## ##
## @code ## @code
## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
@ -65,8 +70,9 @@
## @endcode ## @endcode
## ##
## Note, that some functions produce more than one geometrical objects. For example, ## Note, that some functions produce more than one geometrical objects. For example,
## geompy.GetNonBlocks() function returns two objects: group of all non-hexa solids and group of ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
## all non-quad faces. For such functions it is possible to specify separate names for results. ## group of all non-hexa solids and group of all non-quad faces.
## For such functions it is possible to specify separate names for results.
## ##
## For example ## For example
## ##
@ -88,8 +94,8 @@
## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad". ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
## ##
## Automatic publication of all results can be also enabled/disabled by means of the function ## Automatic publication of all results can be also enabled/disabled by means of the function
## geompy.addToStudyAuto(). The automatic publishing is managed by the numeric parameter passed ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
## to this function: ## is managed by the numeric parameter passed to this function:
## - if @a maxNbSubShapes = 0, automatic publishing is disabled. ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
## maximum number of sub-shapes allowed for publishing is unlimited; any negative ## maximum number of sub-shapes allowed for publishing is unlimited; any negative
@ -107,11 +113,14 @@
## For example: ## For example:
## ##
## @code ## @code
## import salome
## from salome.geom import geomBuilder
## geompy = geomBuilder.New(salome.myStudy)
## geompy.addToStudyAuto() # enable automatic publication ## geompy.addToStudyAuto() # enable automatic publication
## box = geompy.MakeBoxDXDYDZ(100, 100, 100) ## box = geompy.MakeBoxDXDYDZ(100, 100, 100)
## # the box is created and published in the study with default name ## # the box is created and published in the study with default name
## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
## vertices = geompy.SubShapeAll(box, geompy.ShapeType['VERTEX']) ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
## # only 5 first vertices will be published, with default names ## # only 5 first vertices will be published, with default names
## print len(vertices) ## print len(vertices)
## # note, that result value still containes all 8 vertices ## # note, that result value still containes all 8 vertices
@ -121,20 +130,24 @@
## This feature can be used, for example, for debugging purposes. ## This feature can be used, for example, for debugging purposes.
## ##
## @note ## @note
## - Use automatic publication feature with caution. When it is enabled, any function of geompy.py module ## - Use automatic publication feature with caution. When it is enabled, any function of
## publishes the results in the study, that can lead to the huge size of the study data tree. ## \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
## For example, repeating call of geompy.SubShapeAll() command on the same main shape each time will ## that can lead to the huge size of the study data tree.
## publish all child objects, that will lead to a lot of duplicated items in the study. ## For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
## command on the same main shape each time will publish all child objects, that will lead
## to a lot of duplicated items in the study.
## - Sub-shapes are automatically published as child items of the parent main shape in the study if main ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
## shape was also published before. Otherwise, sub-shapes are published as top-level objects. ## shape was also published before. Otherwise, sub-shapes are published as top-level objects.
## - Not that some functions of geompy.py module do not have @theName parameter (and, thus, do not support ## - Not that some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
## automatic publication). For example, some transformation operations like geompy.TranslateDXDYDZ(). ## @theName parameter (and, thus, do not support automatic publication).
## For example, some transformation operations like
## \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
## Refer to the documentation to check if some function has such possibility. ## Refer to the documentation to check if some function has such possibility.
## ##
## @} ## @}
## @defgroup l1_geompy_auxiliary Auxiliary data structures and methods ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
## @defgroup l1_geomBuilder_purpose All package methods, grouped by their purpose ## @defgroup l1_geomBuilder_purpose All package methods, grouped by their purpose
## @{ ## @{
@ -642,7 +655,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
pass pass
pass pass
## @addtogroup l1_geompy_auxiliary ## @addtogroup l1_geomBuilder_auxiliary
## @{ ## @{
def init_geom(self,theStudy): def init_geom(self,theStudy):
self.myStudy = theStudy self.myStudy = theStudy
@ -828,7 +841,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
drwAttribute.SetDrawable(False) drwAttribute.SetDrawable(False)
pass pass
# end of l1_geompy_auxiliary # end of l1_geomBuilder_auxiliary
## @} ## @}
## @addtogroup l3_restore_ss ## @addtogroup l3_restore_ss
@ -12034,7 +12047,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
# #
# @return New GEOM_Object, containing the copied shape. # @return New GEOM_Object, containing the copied shape.
# #
# @ingroup l1_geompy_auxiliary # @ingroup l1_geomBuilder_auxiliary
# @ref swig_MakeCopy "Example" # @ref swig_MakeCopy "Example"
def MakeCopy(self, theOriginal, theName=None): def MakeCopy(self, theOriginal, theName=None):
""" """