]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_SWIG/geomBuilder.py
Salome HOME
0022746: [EDF] Improvement of Glue Faces and Glue Edges operations
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup geomBuilder geomBuilder Python module
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ##
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ##
50 ## For example, consider the following Python script:
51 ##
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New(salome.myStudy)
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ##
60 ## Last two lines can be replaced by one-line instruction:
61 ##
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ##
66 ## ... or simply
67 ##
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, "nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, ("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ##
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New(salome.myStudy)
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100)
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still containes all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## It is possible to customize the representation of the geometrical
148 ## data in the data tree; this can be done by using folders. A folder can
149 ## be created in the study tree using function
150 ## \ref geomBuilder.geomBuilder.NewFolder() "NewFolder()"
151 ## (by default it is created under the "Geometry" root object).
152 ## As soon as folder is created, any published geometry object
153 ## can be moved into it.
154 ##
155 ## For example:
156 ##
157 ## @code
158 ## import salome
159 ## from salome.geom import geomBuilder
160 ## geompy = geomBuilder.New(salome.myStudy)
161 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box")
162 ## # the box was created and published in the study
163 ## folder = geompy.NewFolder("Primitives")
164 ## # an empty "Primitives" folder was created under default "Geometry" root object
165 ## geompy.PutToFolder(box, folder)
166 ## # the box was moved into "Primitives" folder
167 ## @endcode
168 ##
169 ## Subfolders are also can be created by specifying another folder as a parent:
170 ##
171 ## @code
172 ## subfolder = geompy.NewFolder("3D", folder)
173 ## # "3D" folder was created under "Primitives" folder
174 ## @endcode
175 ##
176 ## @note
177 ## - Folder container is just a representation layer object that
178 ## deals with already published objects only. So, any geometry object
179 ## should be published in the study (for example, with
180 ## \ref geomBuilder.geomBuilder.PutToFolder() "addToStudy()" function)
181 ## BEFORE moving it into any existing folder.
182 ## - \ref geomBuilder.geomBuilder.PutToFolder() "PutToFolder()" function
183 ## does not change physical position of geometry object in the study tree,
184 ## it only affects on the representation of the data tree.
185 ## - It is impossible to publish geometry object using any folder as father.
186 ##
187 ##  \defgroup l1_publish_data
188 ##  \defgroup l1_geomBuilder_auxiliary
189 ##  \defgroup l1_geomBuilder_purpose
190 ## @}
191
192 ## @defgroup l1_publish_data Publishing results in SALOME study
193
194 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
195
196 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
197 ## @{
198 ##   @defgroup l2_import_export Importing/exporting geometrical objects
199 ##   @defgroup l2_creating      Creating geometrical objects
200 ##   @{
201 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
202 ##     @{
203 ##       @defgroup l4_curves        Creating Curves
204
205 ##     @}
206 ##     @defgroup l3_3d_primitives Creating 3D Primitives
207 ##     @defgroup l3_complex       Creating Complex Objects
208 ##     @defgroup l3_groups        Working with groups
209 ##     @defgroup l3_blocks        Building by blocks
210 ##     @{
211 ##       @defgroup l4_blocks_measure Check and Improve
212
213 ##     @}
214 ##     @defgroup l3_sketcher      Sketcher
215 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
216 ##     @{
217 ##       @defgroup l4_decompose     Decompose objects
218 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
219 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
220 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
221 ##       @defgroup l4_advanced      Advanced objects creation functions
222
223 ##     @}
224
225 ##   @}
226 ##   @defgroup l2_transforming  Transforming geometrical objects
227 ##   @{
228 ##     @defgroup l3_basic_op      Basic Operations
229 ##     @defgroup l3_boolean       Boolean Operations
230 ##     @defgroup l3_transform     Transformation Operations
231 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
232 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
233 ##     @defgroup l3_blocks_op     Blocks Operations
234 ##     @defgroup l3_healing       Repairing Operations
235 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
236
237 ##   @}
238 ##   @defgroup l2_measure       Using measurement tools
239 ##   @defgroup l2_field         Field on Geometry
240
241 ## @}
242
243 # initialize SALOME session in try/except block
244 # to avoid problems in some cases, e.g. when generating documentation
245 try:
246     import salome
247     salome.salome_init()
248     from salome import *
249 except:
250     pass
251
252 from salome_notebook import *
253
254 import GEOM
255 import math
256 import os
257 import functools
258
259 from salome.geom.gsketcher import Sketcher3D, Sketcher2D, Polyline2D
260
261 # service function
262 def _toListOfNames(_names, _size=-1):
263     l = []
264     import types
265     if type(_names) in [types.ListType, types.TupleType]:
266         for i in _names: l.append(i)
267     elif _names:
268         l.append(_names)
269     if l and len(l) < _size:
270         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
271     return l
272
273 # Decorator function to manage transactions for all geometric operations.
274 def ManageTransactions(theOpeName):
275     def MTDecorator(theFunction):
276         # To keep the original function name an documentation.
277         @functools.wraps(theFunction)
278         def OpenCallClose(self, *args, **kwargs):
279             # Open transaction
280             anOperation = getattr(self, theOpeName)
281             anOperation.StartOperation()
282             try:
283                 # Call the function
284                 res = theFunction(self, *args, **kwargs)
285                 # Commit transaction
286                 anOperation.FinishOperation()
287                 return res
288             except:
289                 # Abort transaction
290                 anOperation.AbortOperation()
291                 raise
292         return OpenCallClose
293     return MTDecorator
294
295 ## Raise an Error, containing the Method_name, if Operation is Failed
296 ## @ingroup l1_geomBuilder_auxiliary
297 def RaiseIfFailed (Method_name, Operation):
298     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
299         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
300
301 ## Return list of variables value from salome notebook
302 ## @ingroup l1_geomBuilder_auxiliary
303 def ParseParameters(*parameters):
304     Result = []
305     StringResult = []
306     for parameter in parameters:
307         if isinstance(parameter, list):
308             lResults = ParseParameters(*parameter)
309             if len(lResults) > 0:
310                 Result.append(lResults[:-1])
311                 StringResult += lResults[-1].split(":")
312                 pass
313             pass
314         else:
315             if isinstance(parameter,str):
316                 if notebook.isVariable(parameter):
317                     Result.append(notebook.get(parameter))
318                 else:
319                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
320                 pass
321             else:
322                 Result.append(parameter)
323                 pass
324             StringResult.append(str(parameter))
325             pass
326         pass
327     if Result:
328         Result.append(":".join(StringResult))
329     else:
330         Result = ":".join(StringResult)
331     return Result
332
333 ## Return list of variables value from salome notebook
334 ## @ingroup l1_geomBuilder_auxiliary
335 def ParseList(list):
336     Result = []
337     StringResult = ""
338     for parameter in list:
339         if isinstance(parameter,str) and notebook.isVariable(parameter):
340             Result.append(str(notebook.get(parameter)))
341             pass
342         else:
343             Result.append(str(parameter))
344             pass
345
346         StringResult = StringResult + str(parameter)
347         StringResult = StringResult + ":"
348         pass
349     StringResult = StringResult[:len(StringResult)-1]
350     return Result, StringResult
351
352 ## Return list of variables value from salome notebook
353 ## @ingroup l1_geomBuilder_auxiliary
354 def ParseSketcherCommand(command):
355     Result = ""
356     StringResult = ""
357     sections = command.split(":")
358     for section in sections:
359         parameters = section.split(" ")
360         paramIndex = 1
361         for parameter in parameters:
362             if paramIndex > 1 and parameter.find("'") != -1:
363                 parameter = parameter.replace("'","")
364                 if notebook.isVariable(parameter):
365                     Result = Result + str(notebook.get(parameter)) + " "
366                     pass
367                 else:
368                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
369                     pass
370                 pass
371             else:
372                 Result = Result + str(parameter) + " "
373                 pass
374             if paramIndex > 1:
375                 StringResult = StringResult + parameter
376                 StringResult = StringResult + ":"
377                 pass
378             paramIndex = paramIndex + 1
379             pass
380         Result = Result[:len(Result)-1] + ":"
381         pass
382     Result = Result[:len(Result)-1]
383     return Result, StringResult
384
385 ## Helper function which can be used to pack the passed string to the byte data.
386 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
387 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
388 ## For example,
389 ## \code
390 ## val = PackData("10001110") # val = 0xAE
391 ## val = PackData("1")        # val = 0x80
392 ## \endcode
393 ## @param data unpacked data - a string containing '1' and '0' symbols
394 ## @return data packed to the byte stream
395 ## @ingroup l1_geomBuilder_auxiliary
396 def PackData(data):
397     """
398     Helper function which can be used to pack the passed string to the byte data.
399     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
400     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
401
402     Parameters:
403         data unpacked data - a string containing '1' and '0' symbols
404
405     Returns:
406         data packed to the byte stream
407
408     Example of usage:
409         val = PackData("10001110") # val = 0xAE
410         val = PackData("1")        # val = 0x80
411     """
412     bytes = len(data)/8
413     if len(data)%8: bytes += 1
414     res = ""
415     for b in range(bytes):
416         d = data[b*8:(b+1)*8]
417         val = 0
418         for i in range(8):
419             val *= 2
420             if i < len(d):
421                 if d[i] == "1": val += 1
422                 elif d[i] != "0":
423                     raise "Invalid symbol %s" % d[i]
424                 pass
425             pass
426         res += chr(val)
427         pass
428     return res
429
430 ## Read bitmap texture from the text file.
431 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
432 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
433 ## The function returns width and height of the pixmap in pixels and byte stream representing
434 ## texture bitmap itself.
435 ##
436 ## This function can be used to read the texture to the byte stream in order to pass it to
437 ## the AddTexture() function of geomBuilder class.
438 ## For example,
439 ## \code
440 ## from salome.geom import geomBuilder
441 ## geompy = geomBuilder.New(salome.myStudy)
442 ## texture = geompy.readtexture('mytexture.dat')
443 ## texture = geompy.AddTexture(*texture)
444 ## obj.SetMarkerTexture(texture)
445 ## \endcode
446 ## @param fname texture file name
447 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
448 ## @ingroup l1_geomBuilder_auxiliary
449 def ReadTexture(fname):
450     """
451     Read bitmap texture from the text file.
452     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
453     A zero symbol ('0') represents transparent pixel of the texture bitmap.
454     The function returns width and height of the pixmap in pixels and byte stream representing
455     texture bitmap itself.
456     This function can be used to read the texture to the byte stream in order to pass it to
457     the AddTexture() function of geomBuilder class.
458
459     Parameters:
460         fname texture file name
461
462     Returns:
463         sequence of tree values: texture's width, height in pixels and its byte stream
464
465     Example of usage:
466         from salome.geom import geomBuilder
467         geompy = geomBuilder.New(salome.myStudy)
468         texture = geompy.readtexture('mytexture.dat')
469         texture = geompy.AddTexture(*texture)
470         obj.SetMarkerTexture(texture)
471     """
472     try:
473         f = open(fname)
474         lines = [ l.strip() for l in f.readlines()]
475         f.close()
476         maxlen = 0
477         if lines: maxlen = max([len(x) for x in lines])
478         lenbytes = maxlen/8
479         if maxlen%8: lenbytes += 1
480         bytedata=""
481         for line in lines:
482             if len(line)%8:
483                 lenline = (len(line)/8+1)*8
484                 pass
485             else:
486                 lenline = (len(line)/8)*8
487                 pass
488             for i in range(lenline/8):
489                 byte=""
490                 for j in range(8):
491                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
492                     else: byte += "0"
493                     pass
494                 bytedata += PackData(byte)
495                 pass
496             for i in range(lenline/8, lenbytes):
497                 bytedata += PackData("0")
498             pass
499         return lenbytes*8, len(lines), bytedata
500     except:
501         pass
502     return 0, 0, ""
503
504 ## Returns a long value from enumeration type
505 #  Can be used for CORBA enumerator types like GEOM.shape_type
506 #  @param theItem enumeration type
507 #  @ingroup l1_geomBuilder_auxiliary
508 def EnumToLong(theItem):
509     """
510     Returns a long value from enumeration type
511     Can be used for CORBA enumerator types like geomBuilder.ShapeType
512
513     Parameters:
514         theItem enumeration type
515     """
516     ret = theItem
517     if hasattr(theItem, "_v"): ret = theItem._v
518     return ret
519
520 ## Pack an argument into a list
521 def ToList( arg ):
522     if isinstance( arg, list ):
523         return arg
524     if hasattr( arg, "__getitem__" ):
525         return list( arg )
526     return [ arg ]
527
528 ## Information about closed/unclosed state of shell or wire
529 #  @ingroup l1_geomBuilder_auxiliary
530 class info:
531     """
532     Information about closed/unclosed state of shell or wire
533     """
534     UNKNOWN  = 0
535     CLOSED   = 1
536     UNCLOSED = 2
537
538 ## Private class used to bind calls of plugin operations to geomBuilder
539 class PluginOperation:
540   def __init__(self, operation, function):
541     self.operation = operation
542     self.function = function
543     pass
544
545   @ManageTransactions("operation")
546   def __call__(self, *args):
547     res = self.function(self.operation, *args)
548     RaiseIfFailed(self.function.__name__, self.operation)
549     return res
550
551 # Warning: geom is a singleton
552 geom = None
553 engine = None
554 doLcc = False
555 created = False
556
557 class geomBuilder(object, GEOM._objref_GEOM_Gen):
558
559         ## Enumeration ShapeType as a dictionary. \n
560         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
561         #  @ingroup l1_geomBuilder_auxiliary
562         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
563
564         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
565         #  and a list of parameters, describing the shape.
566         #  List of parameters, describing the shape:
567         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
568         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
569         #
570         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
571         #
572         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
573         #
574         #  - SPHERE:       [xc yc zc            R]
575         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
576         #  - BOX:          [xc yc zc                      ax ay az]
577         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
578         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
579         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
580         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
581         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
582         #
583         #  - SPHERE2D:     [xc yc zc            R]
584         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
585         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
586         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
587         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
588         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
589         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
590         #  - PLANE:        [xo yo zo  dx dy dz]
591         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
592         #  - FACE:                                       [nb_edges  nb_vertices]
593         #
594         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
595         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
596         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
597         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
598         #  - LINE:         [xo yo zo  dx dy dz]
599         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
600         #  - EDGE:                                                 [nb_vertices]
601         #
602         #  - VERTEX:       [x  y  z]
603         #  @ingroup l1_geomBuilder_auxiliary
604         kind = GEOM.GEOM_IKindOfShape
605
606         def __new__(cls):
607             global engine
608             global geom
609             global doLcc
610             global created
611             #print "==== __new__ ", engine, geom, doLcc, created
612             if geom is None:
613                 # geom engine is either retrieved from engine, or created
614                 geom = engine
615                 # Following test avoids a recursive loop
616                 if doLcc:
617                     if geom is not None:
618                         # geom engine not created: existing engine found
619                         doLcc = False
620                     if doLcc and not created:
621                         doLcc = False
622                         # FindOrLoadComponent called:
623                         # 1. CORBA resolution of server
624                         # 2. the __new__ method is called again
625                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
626                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
627                         #print "====1 ",geom
628                 else:
629                     # FindOrLoadComponent not called
630                     if geom is None:
631                         # geomBuilder instance is created from lcc.FindOrLoadComponent
632                         #print "==== super ", engine, geom, doLcc, created
633                         geom = super(geomBuilder,cls).__new__(cls)
634                         #print "====2 ",geom
635                     else:
636                         # geom engine not created: existing engine found
637                         #print "==== existing ", engine, geom, doLcc, created
638                         pass
639                 #print "return geom 1 ", geom
640                 return geom
641
642             #print "return geom 2 ", geom
643             return geom
644
645         def __init__(self):
646             global created
647             #print "-------- geomBuilder __init__ --- ", created, self
648             if not created:
649               created = True
650               GEOM._objref_GEOM_Gen.__init__(self)
651               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
652               self.myBuilder = None
653               self.myStudyId = 0
654               self.father    = None
655
656               self.BasicOp  = None
657               self.CurvesOp = None
658               self.PrimOp   = None
659               self.ShapesOp = None
660               self.HealOp   = None
661               self.InsertOp = None
662               self.BoolOp   = None
663               self.TrsfOp   = None
664               self.LocalOp  = None
665               self.MeasuOp  = None
666               self.BlocksOp = None
667               self.GroupOp  = None
668               self.FieldOp  = None
669             pass
670
671         ## Process object publication in the study, as follows:
672         #  - if @a theName is specified (not None), the object is published in the study
673         #    with this name, not taking into account "auto-publishing" option;
674         #  - if @a theName is NOT specified, the object is published in the study
675         #    (using default name, which can be customized using @a theDefaultName parameter)
676         #    only if auto-publishing is switched on.
677         #
678         #  @param theObj  object, a subject for publishing
679         #  @param theName object name for study
680         #  @param theDefaultName default name for the auto-publishing
681         #
682         #  @sa addToStudyAuto()
683         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
684             # ---
685             def _item_name(_names, _defname, _idx=-1):
686                 if not _names: _names = _defname
687                 if type(_names) in [types.ListType, types.TupleType]:
688                     if _idx >= 0:
689                         if _idx >= len(_names) or not _names[_idx]:
690                             if type(_defname) not in [types.ListType, types.TupleType]:
691                                 _name = "%s_%d"%(_defname, _idx+1)
692                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
693                                 _name = _defname[_idx]
694                             else:
695                                 _name = "%noname_%d"%(dn, _idx+1)
696                             pass
697                         else:
698                             _name = _names[_idx]
699                         pass
700                     else:
701                         # must be wrong  usage
702                         _name = _names[0]
703                     pass
704                 else:
705                     if _idx >= 0:
706                         _name = "%s_%d"%(_names, _idx+1)
707                     else:
708                         _name = _names
709                     pass
710                 return _name
711             # ---
712             def _publish( _name, _obj ):
713                 fatherObj = None
714                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
715                     fatherObj = _obj.GetShape()
716                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
717                     fatherObj = _obj.GetField()
718                 elif not _obj.IsMainShape():
719                     fatherObj = _obj.GetMainShape()
720                     pass
721                 if fatherObj and fatherObj.GetStudyEntry():
722                     self.addToStudyInFather(fatherObj, _obj, _name)
723                 else:
724                     self.addToStudy(_obj, _name)
725                     pass
726                 return
727             # ---
728             if not theObj:
729                 return # null object
730             if not theName and not self.myMaxNbSubShapesAllowed:
731                 return # nothing to do: auto-publishing is disabled
732             if not theName and not theDefaultName:
733                 return # neither theName nor theDefaultName is given
734             import types
735             if type(theObj) in [types.ListType, types.TupleType]:
736                 # list of objects is being published
737                 idx = 0
738                 for obj in theObj:
739                     if not obj: continue # bad object
740                     name = _item_name(theName, theDefaultName, idx)
741                     _publish( name, obj )
742                     idx = idx+1
743                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
744                     pass
745                 pass
746             else:
747                 # single object is published
748                 name = _item_name(theName, theDefaultName)
749                 _publish( name, theObj )
750             pass
751
752         ## @addtogroup l1_geomBuilder_auxiliary
753         ## @{
754         def init_geom(self,theStudy):
755             self.myStudy = theStudy
756             self.myStudyId = self.myStudy._get_StudyId()
757             self.myBuilder = self.myStudy.NewBuilder()
758             self.father = self.myStudy.FindComponent("GEOM")
759             notebook.myStudy = theStudy
760             if self.father is None:
761                 self.father = self.myBuilder.NewComponent("GEOM")
762                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
763                 FName = A1._narrow(SALOMEDS.AttributeName)
764                 FName.SetValue("Geometry")
765                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
766                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
767                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
768                 self.myBuilder.DefineComponentInstance(self.father,self)
769                 pass
770             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
771             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
772             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
773             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
774             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
775             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
776             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
777             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
778             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
779             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
780             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
781             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
782             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
783
784             # set GEOM as root in the use case tree
785             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
786             self.myUseCaseBuilder.SetRootCurrent()
787             self.myUseCaseBuilder.Append(self.father)
788             pass
789
790         def GetPluginOperations(self, studyID, libraryName):
791             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
792             return op
793
794         ## Enable / disable results auto-publishing
795         #
796         #  The automatic publishing is managed in the following way:
797         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
798         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
799         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
800         #  value passed as parameter has the same effect.
801         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
802         #  maximum number of sub-shapes allowed for publishing is set to specified value.
803         #
804         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
805         #  @ingroup l1_publish_data
806         def addToStudyAuto(self, maxNbSubShapes=-1):
807             """
808             Enable / disable results auto-publishing
809
810             The automatic publishing is managed in the following way:
811             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
812             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
813             maximum number of sub-shapes allowed for publishing is unlimited; any negative
814             value passed as parameter has the same effect.
815             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
816             maximum number of sub-shapes allowed for publishing is set to this value.
817
818             Parameters:
819                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
820
821             Example of usage:
822                 geompy.addToStudyAuto()   # enable auto-publishing
823                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
824                 geompy.addToStudyAuto(0)  # disable auto-publishing
825             """
826             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
827             pass
828
829         ## Dump component to the Python script
830         #  This method overrides IDL function to allow default values for the parameters.
831         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
832             """
833             Dump component to the Python script
834             This method overrides IDL function to allow default values for the parameters.
835             """
836             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
837
838         ## Get name for sub-shape aSubObj of shape aMainObj
839         #
840         # @ref swig_SubShapeName "Example"
841         @ManageTransactions("ShapesOp")
842         def SubShapeName(self,aSubObj, aMainObj):
843             """
844             Get name for sub-shape aSubObj of shape aMainObj
845             """
846             # Example: see GEOM_TestAll.py
847
848             #aSubId  = orb.object_to_string(aSubObj)
849             #aMainId = orb.object_to_string(aMainObj)
850             #index = gg.getIndexTopology(aSubId, aMainId)
851             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
852             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
853             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
854             return name
855
856         ## Publish in study aShape with name aName
857         #
858         #  \param aShape the shape to be published
859         #  \param aName  the name for the shape
860         #  \param doRestoreSubShapes if True, finds and publishes also
861         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
862         #         and published sub-shapes of arguments
863         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
864         #                                                  these arguments description
865         #  \return study entry of the published shape in form of string
866         #
867         #  @ingroup l1_publish_data
868         #  @ref swig_all_addtostudy "Example"
869         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
870                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
871             """
872             Publish in study aShape with name aName
873
874             Parameters:
875                 aShape the shape to be published
876                 aName  the name for the shape
877                 doRestoreSubShapes if True, finds and publishes also
878                                    sub-shapes of aShape, corresponding to its arguments
879                                    and published sub-shapes of arguments
880                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
881                                                          these arguments description
882
883             Returns:
884                 study entry of the published shape in form of string
885
886             Example of usage:
887                 id_block1 = geompy.addToStudy(Block1, "Block 1")
888             """
889             # Example: see GEOM_TestAll.py
890             try:
891                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
892                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
893                 if doRestoreSubShapes:
894                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
895                                             theFindMethod, theInheritFirstArg, True )
896             except:
897                 print "addToStudy() failed"
898                 return ""
899             return aShape.GetStudyEntry()
900
901         ## Publish in study aShape with name aName as sub-object of previously published aFather
902         #  \param aFather previously published object
903         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
904         #  \param aName  the name for the shape
905         #
906         #  \return study entry of the published shape in form of string
907         #
908         #  @ingroup l1_publish_data
909         #  @ref swig_all_addtostudyInFather "Example"
910         def addToStudyInFather(self, aFather, aShape, aName):
911             """
912             Publish in study aShape with name aName as sub-object of previously published aFather
913
914             Parameters:
915                 aFather previously published object
916                 aShape the shape to be published as sub-object of aFather
917                 aName  the name for the shape
918
919             Returns:
920                 study entry of the published shape in form of string
921             """
922             # Example: see GEOM_TestAll.py
923             try:
924                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
925                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
926             except:
927                 print "addToStudyInFather() failed"
928                 return ""
929             return aShape.GetStudyEntry()
930
931         ## Unpublish object in study
932         #
933         #  \param obj the object to be unpublished
934         def hideInStudy(self, obj):
935             """
936             Unpublish object in study
937
938             Parameters:
939                 obj the object to be unpublished
940             """
941             ior = salome.orb.object_to_string(obj)
942             aSObject = self.myStudy.FindObjectIOR(ior)
943             if aSObject is not None:
944                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
945                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
946                 drwAttribute.SetDrawable(False)
947                 # hide references if any
948                 vso = self.myStudy.FindDependances(aSObject);
949                 for refObj in vso :
950                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
951                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
952                     drwAttribute.SetDrawable(False)
953                     pass
954                 pass
955
956         # end of l1_geomBuilder_auxiliary
957         ## @}
958
959         ## @addtogroup l3_restore_ss
960         ## @{
961
962         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
963         #  To be used from python scripts out of addToStudy() (non-default usage)
964         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
965         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
966         #                   If this list is empty, all operation arguments will be published
967         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
968         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
969         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
970         #                            Do not publish sub-shapes in place of arguments, but only
971         #                            in place of sub-shapes of the first argument,
972         #                            because the whole shape corresponds to the first argument.
973         #                            Mainly to be used after transformations, but it also can be
974         #                            usefull after partition with one object shape, and some other
975         #                            operations, where only the first argument has to be considered.
976         #                            If theObject has only one argument shape, this flag is automatically
977         #                            considered as True, not regarding really passed value.
978         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
979         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
980         #  \return list of published sub-shapes
981         #
982         #  @ref tui_restore_prs_params "Example"
983         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
984                               theInheritFirstArg=False, theAddPrefix=True):
985             """
986             Publish sub-shapes, standing for arguments and sub-shapes of arguments
987             To be used from python scripts out of geompy.addToStudy (non-default usage)
988
989             Parameters:
990                 theObject published GEOM.GEOM_Object, arguments of which will be published
991                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
992                           If this list is empty, all operation arguments will be published
993                 theFindMethod method to search sub-shapes, corresponding to arguments and
994                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
995                 theInheritFirstArg set properties of the first argument for theObject.
996                                    Do not publish sub-shapes in place of arguments, but only
997                                    in place of sub-shapes of the first argument,
998                                    because the whole shape corresponds to the first argument.
999                                    Mainly to be used after transformations, but it also can be
1000                                    usefull after partition with one object shape, and some other
1001                                    operations, where only the first argument has to be considered.
1002                                    If theObject has only one argument shape, this flag is automatically
1003                                    considered as True, not regarding really passed value.
1004                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1005                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1006             Returns:
1007                 list of published sub-shapes
1008             """
1009             # Example: see GEOM_TestAll.py
1010             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
1011                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1012
1013         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1014         #  To be used from python scripts out of addToStudy() (non-default usage)
1015         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1016         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1017         #                   If this list is empty, all operation arguments will be published
1018         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1019         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1020         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1021         #                            Do not publish sub-shapes in place of arguments, but only
1022         #                            in place of sub-shapes of the first argument,
1023         #                            because the whole shape corresponds to the first argument.
1024         #                            Mainly to be used after transformations, but it also can be
1025         #                            usefull after partition with one object shape, and some other
1026         #                            operations, where only the first argument has to be considered.
1027         #                            If theObject has only one argument shape, this flag is automatically
1028         #                            considered as True, not regarding really passed value.
1029         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1030         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1031         #  \return list of published sub-shapes
1032         #
1033         #  @ref tui_restore_prs_params "Example"
1034         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1035                                    theInheritFirstArg=False, theAddPrefix=True):
1036             """
1037             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1038             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1039
1040             Parameters:
1041                 theObject published GEOM.GEOM_Object, arguments of which will be published
1042                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1043                           If this list is empty, all operation arguments will be published
1044                 theFindMethod method to search sub-shapes, corresponding to arguments and
1045                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1046                 theInheritFirstArg set properties of the first argument for theObject.
1047                                    Do not publish sub-shapes in place of arguments, but only
1048                                    in place of sub-shapes of the first argument,
1049                                    because the whole shape corresponds to the first argument.
1050                                    Mainly to be used after transformations, but it also can be
1051                                    usefull after partition with one object shape, and some other
1052                                    operations, where only the first argument has to be considered.
1053                                    If theObject has only one argument shape, this flag is automatically
1054                                    considered as True, not regarding really passed value.
1055                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1056                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1057
1058             Returns:
1059                 list of published sub-shapes
1060             """
1061             # Example: see GEOM_TestAll.py
1062             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1063                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1064
1065         # end of l3_restore_ss
1066         ## @}
1067
1068         ## @addtogroup l3_basic_go
1069         ## @{
1070
1071         ## Create point by three coordinates.
1072         #  @param theX The X coordinate of the point.
1073         #  @param theY The Y coordinate of the point.
1074         #  @param theZ The Z coordinate of the point.
1075         #  @param theName Object name; when specified, this parameter is used
1076         #         for result publication in the study. Otherwise, if automatic
1077         #         publication is switched on, default value is used for result name.
1078         #
1079         #  @return New GEOM.GEOM_Object, containing the created point.
1080         #
1081         #  @ref tui_creation_point "Example"
1082         @ManageTransactions("BasicOp")
1083         def MakeVertex(self, theX, theY, theZ, theName=None):
1084             """
1085             Create point by three coordinates.
1086
1087             Parameters:
1088                 theX The X coordinate of the point.
1089                 theY The Y coordinate of the point.
1090                 theZ The Z coordinate of the point.
1091                 theName Object name; when specified, this parameter is used
1092                         for result publication in the study. Otherwise, if automatic
1093                         publication is switched on, default value is used for result name.
1094
1095             Returns:
1096                 New GEOM.GEOM_Object, containing the created point.
1097             """
1098             # Example: see GEOM_TestAll.py
1099             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1100             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1101             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1102             anObj.SetParameters(Parameters)
1103             self._autoPublish(anObj, theName, "vertex")
1104             return anObj
1105
1106         ## Create a point, distant from the referenced point
1107         #  on the given distances along the coordinate axes.
1108         #  @param theReference The referenced point.
1109         #  @param theX Displacement from the referenced point along OX axis.
1110         #  @param theY Displacement from the referenced point along OY axis.
1111         #  @param theZ Displacement from the referenced point along OZ axis.
1112         #  @param theName Object name; when specified, this parameter is used
1113         #         for result publication in the study. Otherwise, if automatic
1114         #         publication is switched on, default value is used for result name.
1115         #
1116         #  @return New GEOM.GEOM_Object, containing the created point.
1117         #
1118         #  @ref tui_creation_point "Example"
1119         @ManageTransactions("BasicOp")
1120         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1121             """
1122             Create a point, distant from the referenced point
1123             on the given distances along the coordinate axes.
1124
1125             Parameters:
1126                 theReference The referenced point.
1127                 theX Displacement from the referenced point along OX axis.
1128                 theY Displacement from the referenced point along OY axis.
1129                 theZ Displacement from the referenced point along OZ axis.
1130                 theName Object name; when specified, this parameter is used
1131                         for result publication in the study. Otherwise, if automatic
1132                         publication is switched on, default value is used for result name.
1133
1134             Returns:
1135                 New GEOM.GEOM_Object, containing the created point.
1136             """
1137             # Example: see GEOM_TestAll.py
1138             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1139             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1140             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1141             anObj.SetParameters(Parameters)
1142             self._autoPublish(anObj, theName, "vertex")
1143             return anObj
1144
1145         ## Create a point, corresponding to the given parameter on the given curve.
1146         #  @param theRefCurve The referenced curve.
1147         #  @param theParameter Value of parameter on the referenced curve.
1148         #  @param theName Object name; when specified, this parameter is used
1149         #         for result publication in the study. Otherwise, if automatic
1150         #         publication is switched on, default value is used for result name.
1151         #
1152         #  @return New GEOM.GEOM_Object, containing the created point.
1153         #
1154         #  @ref tui_creation_point "Example"
1155         @ManageTransactions("BasicOp")
1156         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1157             """
1158             Create a point, corresponding to the given parameter on the given curve.
1159
1160             Parameters:
1161                 theRefCurve The referenced curve.
1162                 theParameter Value of parameter on the referenced curve.
1163                 theName Object name; when specified, this parameter is used
1164                         for result publication in the study. Otherwise, if automatic
1165                         publication is switched on, default value is used for result name.
1166
1167             Returns:
1168                 New GEOM.GEOM_Object, containing the created point.
1169
1170             Example of usage:
1171                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1172             """
1173             # Example: see GEOM_TestAll.py
1174             theParameter, Parameters = ParseParameters(theParameter)
1175             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1176             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1177             anObj.SetParameters(Parameters)
1178             self._autoPublish(anObj, theName, "vertex")
1179             return anObj
1180
1181         ## Create a point by projection give coordinates on the given curve
1182         #  @param theRefCurve The referenced curve.
1183         #  @param theX X-coordinate in 3D space
1184         #  @param theY Y-coordinate in 3D space
1185         #  @param theZ Z-coordinate in 3D space
1186         #  @param theName Object name; when specified, this parameter is used
1187         #         for result publication in the study. Otherwise, if automatic
1188         #         publication is switched on, default value is used for result name.
1189         #
1190         #  @return New GEOM.GEOM_Object, containing the created point.
1191         #
1192         #  @ref tui_creation_point "Example"
1193         @ManageTransactions("BasicOp")
1194         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1195             """
1196             Create a point by projection give coordinates on the given curve
1197
1198             Parameters:
1199                 theRefCurve The referenced curve.
1200                 theX X-coordinate in 3D space
1201                 theY Y-coordinate in 3D space
1202                 theZ Z-coordinate in 3D space
1203                 theName Object name; when specified, this parameter is used
1204                         for result publication in the study. Otherwise, if automatic
1205                         publication is switched on, default value is used for result name.
1206
1207             Returns:
1208                 New GEOM.GEOM_Object, containing the created point.
1209
1210             Example of usage:
1211                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1212             """
1213             # Example: see GEOM_TestAll.py
1214             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1215             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1216             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1217             anObj.SetParameters(Parameters)
1218             self._autoPublish(anObj, theName, "vertex")
1219             return anObj
1220
1221         ## Create a point, corresponding to the given length on the given curve.
1222         #  @param theRefCurve The referenced curve.
1223         #  @param theLength Length on the referenced curve. It can be negative.
1224         #  @param theStartPoint Point allowing to choose the direction for the calculation
1225         #                       of the length. If None, start from the first point of theRefCurve.
1226         #  @param theName Object name; when specified, this parameter is used
1227         #         for result publication in the study. Otherwise, if automatic
1228         #         publication is switched on, default value is used for result name.
1229         #
1230         #  @return New GEOM.GEOM_Object, containing the created point.
1231         #
1232         #  @ref tui_creation_point "Example"
1233         @ManageTransactions("BasicOp")
1234         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1235             """
1236             Create a point, corresponding to the given length on the given curve.
1237
1238             Parameters:
1239                 theRefCurve The referenced curve.
1240                 theLength Length on the referenced curve. It can be negative.
1241                 theStartPoint Point allowing to choose the direction for the calculation
1242                               of the length. If None, start from the first point of theRefCurve.
1243                 theName Object name; when specified, this parameter is used
1244                         for result publication in the study. Otherwise, if automatic
1245                         publication is switched on, default value is used for result name.
1246
1247             Returns:
1248                 New GEOM.GEOM_Object, containing the created point.
1249             """
1250             # Example: see GEOM_TestAll.py
1251             theLength, Parameters = ParseParameters(theLength)
1252             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1253             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1254             anObj.SetParameters(Parameters)
1255             self._autoPublish(anObj, theName, "vertex")
1256             return anObj
1257
1258         ## Create a point, corresponding to the given parameters on the
1259         #    given surface.
1260         #  @param theRefSurf The referenced surface.
1261         #  @param theUParameter Value of U-parameter on the referenced surface.
1262         #  @param theVParameter Value of V-parameter on the referenced surface.
1263         #  @param theName Object name; when specified, this parameter is used
1264         #         for result publication in the study. Otherwise, if automatic
1265         #         publication is switched on, default value is used for result name.
1266         #
1267         #  @return New GEOM.GEOM_Object, containing the created point.
1268         #
1269         #  @ref swig_MakeVertexOnSurface "Example"
1270         @ManageTransactions("BasicOp")
1271         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1272             """
1273             Create a point, corresponding to the given parameters on the
1274             given surface.
1275
1276             Parameters:
1277                 theRefSurf The referenced surface.
1278                 theUParameter Value of U-parameter on the referenced surface.
1279                 theVParameter Value of V-parameter on the referenced surface.
1280                 theName Object name; when specified, this parameter is used
1281                         for result publication in the study. Otherwise, if automatic
1282                         publication is switched on, default value is used for result name.
1283
1284             Returns:
1285                 New GEOM.GEOM_Object, containing the created point.
1286
1287             Example of usage:
1288                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1289             """
1290             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1291             # Example: see GEOM_TestAll.py
1292             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1293             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1294             anObj.SetParameters(Parameters);
1295             self._autoPublish(anObj, theName, "vertex")
1296             return anObj
1297
1298         ## Create a point by projection give coordinates on the given surface
1299         #  @param theRefSurf The referenced surface.
1300         #  @param theX X-coordinate in 3D space
1301         #  @param theY Y-coordinate in 3D space
1302         #  @param theZ Z-coordinate in 3D space
1303         #  @param theName Object name; when specified, this parameter is used
1304         #         for result publication in the study. Otherwise, if automatic
1305         #         publication is switched on, default value is used for result name.
1306         #
1307         #  @return New GEOM.GEOM_Object, containing the created point.
1308         #
1309         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1310         @ManageTransactions("BasicOp")
1311         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1312             """
1313             Create a point by projection give coordinates on the given surface
1314
1315             Parameters:
1316                 theRefSurf The referenced surface.
1317                 theX X-coordinate in 3D space
1318                 theY Y-coordinate in 3D space
1319                 theZ Z-coordinate in 3D space
1320                 theName Object name; when specified, this parameter is used
1321                         for result publication in the study. Otherwise, if automatic
1322                         publication is switched on, default value is used for result name.
1323
1324             Returns:
1325                 New GEOM.GEOM_Object, containing the created point.
1326
1327             Example of usage:
1328                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1329             """
1330             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1331             # Example: see GEOM_TestAll.py
1332             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1333             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1334             anObj.SetParameters(Parameters);
1335             self._autoPublish(anObj, theName, "vertex")
1336             return anObj
1337
1338         ## Create a point, which lays on the given face.
1339         #  The point will lay in arbitrary place of the face.
1340         #  The only condition on it is a non-zero distance to the face boundary.
1341         #  Such point can be used to uniquely identify the face inside any
1342         #  shape in case, when the shape does not contain overlapped faces.
1343         #  @param theFace The referenced face.
1344         #  @param theName Object name; when specified, this parameter is used
1345         #         for result publication in the study. Otherwise, if automatic
1346         #         publication is switched on, default value is used for result name.
1347         #
1348         #  @return New GEOM.GEOM_Object, containing the created point.
1349         #
1350         #  @ref swig_MakeVertexInsideFace "Example"
1351         @ManageTransactions("BasicOp")
1352         def MakeVertexInsideFace (self, theFace, theName=None):
1353             """
1354             Create a point, which lays on the given face.
1355             The point will lay in arbitrary place of the face.
1356             The only condition on it is a non-zero distance to the face boundary.
1357             Such point can be used to uniquely identify the face inside any
1358             shape in case, when the shape does not contain overlapped faces.
1359
1360             Parameters:
1361                 theFace The referenced face.
1362                 theName Object name; when specified, this parameter is used
1363                         for result publication in the study. Otherwise, if automatic
1364                         publication is switched on, default value is used for result name.
1365
1366             Returns:
1367                 New GEOM.GEOM_Object, containing the created point.
1368
1369             Example of usage:
1370                 p_on_face = geompy.MakeVertexInsideFace(Face)
1371             """
1372             # Example: see GEOM_TestAll.py
1373             anObj = self.BasicOp.MakePointOnFace(theFace)
1374             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1375             self._autoPublish(anObj, theName, "vertex")
1376             return anObj
1377
1378         ## Create a point on intersection of two lines.
1379         #  @param theRefLine1, theRefLine2 The referenced lines.
1380         #  @param theName Object name; when specified, this parameter is used
1381         #         for result publication in the study. Otherwise, if automatic
1382         #         publication is switched on, default value is used for result name.
1383         #
1384         #  @return New GEOM.GEOM_Object, containing the created point.
1385         #
1386         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1387         @ManageTransactions("BasicOp")
1388         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1389             """
1390             Create a point on intersection of two lines.
1391
1392             Parameters:
1393                 theRefLine1, theRefLine2 The referenced lines.
1394                 theName Object name; when specified, this parameter is used
1395                         for result publication in the study. Otherwise, if automatic
1396                         publication is switched on, default value is used for result name.
1397
1398             Returns:
1399                 New GEOM.GEOM_Object, containing the created point.
1400             """
1401             # Example: see GEOM_TestAll.py
1402             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1403             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1404             self._autoPublish(anObj, theName, "vertex")
1405             return anObj
1406
1407         ## Create a tangent, corresponding to the given parameter on the given curve.
1408         #  @param theRefCurve The referenced curve.
1409         #  @param theParameter Value of parameter on the referenced curve.
1410         #  @param theName Object name; when specified, this parameter is used
1411         #         for result publication in the study. Otherwise, if automatic
1412         #         publication is switched on, default value is used for result name.
1413         #
1414         #  @return New GEOM.GEOM_Object, containing the created tangent.
1415         #
1416         #  @ref swig_MakeTangentOnCurve "Example"
1417         @ManageTransactions("BasicOp")
1418         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1419             """
1420             Create a tangent, corresponding to the given parameter on the given curve.
1421
1422             Parameters:
1423                 theRefCurve The referenced curve.
1424                 theParameter Value of parameter on the referenced curve.
1425                 theName Object name; when specified, this parameter is used
1426                         for result publication in the study. Otherwise, if automatic
1427                         publication is switched on, default value is used for result name.
1428
1429             Returns:
1430                 New GEOM.GEOM_Object, containing the created tangent.
1431
1432             Example of usage:
1433                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1434             """
1435             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1436             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1437             self._autoPublish(anObj, theName, "tangent")
1438             return anObj
1439
1440         ## Create a tangent plane, corresponding to the given parameter on the given face.
1441         #  @param theFace The face for which tangent plane should be built.
1442         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1443         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1444         #  @param theTrimSize the size of plane.
1445         #  @param theName Object name; when specified, this parameter is used
1446         #         for result publication in the study. Otherwise, if automatic
1447         #         publication is switched on, default value is used for result name.
1448         #
1449         #  @return New GEOM.GEOM_Object, containing the created tangent.
1450         #
1451         #  @ref swig_MakeTangentPlaneOnFace "Example"
1452         @ManageTransactions("BasicOp")
1453         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1454             """
1455             Create a tangent plane, corresponding to the given parameter on the given face.
1456
1457             Parameters:
1458                 theFace The face for which tangent plane should be built.
1459                 theParameterV vertical value of the center point (0.0 - 1.0).
1460                 theParameterU horisontal value of the center point (0.0 - 1.0).
1461                 theTrimSize the size of plane.
1462                 theName Object name; when specified, this parameter is used
1463                         for result publication in the study. Otherwise, if automatic
1464                         publication is switched on, default value is used for result name.
1465
1466            Returns:
1467                 New GEOM.GEOM_Object, containing the created tangent.
1468
1469            Example of usage:
1470                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1471             """
1472             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1473             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1474             self._autoPublish(anObj, theName, "tangent")
1475             return anObj
1476
1477         ## Create a vector with the given components.
1478         #  @param theDX X component of the vector.
1479         #  @param theDY Y component of the vector.
1480         #  @param theDZ Z component of the vector.
1481         #  @param theName Object name; when specified, this parameter is used
1482         #         for result publication in the study. Otherwise, if automatic
1483         #         publication is switched on, default value is used for result name.
1484         #
1485         #  @return New GEOM.GEOM_Object, containing the created vector.
1486         #
1487         #  @ref tui_creation_vector "Example"
1488         @ManageTransactions("BasicOp")
1489         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1490             """
1491             Create a vector with the given components.
1492
1493             Parameters:
1494                 theDX X component of the vector.
1495                 theDY Y component of the vector.
1496                 theDZ Z component of the vector.
1497                 theName Object name; when specified, this parameter is used
1498                         for result publication in the study. Otherwise, if automatic
1499                         publication is switched on, default value is used for result name.
1500
1501             Returns:
1502                 New GEOM.GEOM_Object, containing the created vector.
1503             """
1504             # Example: see GEOM_TestAll.py
1505             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1506             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1507             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1508             anObj.SetParameters(Parameters)
1509             self._autoPublish(anObj, theName, "vector")
1510             return anObj
1511
1512         ## Create a vector between two points.
1513         #  @param thePnt1 Start point for the vector.
1514         #  @param thePnt2 End point for the vector.
1515         #  @param theName Object name; when specified, this parameter is used
1516         #         for result publication in the study. Otherwise, if automatic
1517         #         publication is switched on, default value is used for result name.
1518         #
1519         #  @return New GEOM.GEOM_Object, containing the created vector.
1520         #
1521         #  @ref tui_creation_vector "Example"
1522         @ManageTransactions("BasicOp")
1523         def MakeVector(self, thePnt1, thePnt2, theName=None):
1524             """
1525             Create a vector between two points.
1526
1527             Parameters:
1528                 thePnt1 Start point for the vector.
1529                 thePnt2 End point for the vector.
1530                 theName Object name; when specified, this parameter is used
1531                         for result publication in the study. Otherwise, if automatic
1532                         publication is switched on, default value is used for result name.
1533
1534             Returns:
1535                 New GEOM.GEOM_Object, containing the created vector.
1536             """
1537             # Example: see GEOM_TestAll.py
1538             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1539             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1540             self._autoPublish(anObj, theName, "vector")
1541             return anObj
1542
1543         ## Create a line, passing through the given point
1544         #  and parrallel to the given direction
1545         #  @param thePnt Point. The resulting line will pass through it.
1546         #  @param theDir Direction. The resulting line will be parallel to it.
1547         #  @param theName Object name; when specified, this parameter is used
1548         #         for result publication in the study. Otherwise, if automatic
1549         #         publication is switched on, default value is used for result name.
1550         #
1551         #  @return New GEOM.GEOM_Object, containing the created line.
1552         #
1553         #  @ref tui_creation_line "Example"
1554         @ManageTransactions("BasicOp")
1555         def MakeLine(self, thePnt, theDir, theName=None):
1556             """
1557             Create a line, passing through the given point
1558             and parrallel to the given direction
1559
1560             Parameters:
1561                 thePnt Point. The resulting line will pass through it.
1562                 theDir Direction. The resulting line will be parallel to it.
1563                 theName Object name; when specified, this parameter is used
1564                         for result publication in the study. Otherwise, if automatic
1565                         publication is switched on, default value is used for result name.
1566
1567             Returns:
1568                 New GEOM.GEOM_Object, containing the created line.
1569             """
1570             # Example: see GEOM_TestAll.py
1571             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1572             RaiseIfFailed("MakeLine", self.BasicOp)
1573             self._autoPublish(anObj, theName, "line")
1574             return anObj
1575
1576         ## Create a line, passing through the given points
1577         #  @param thePnt1 First of two points, defining the line.
1578         #  @param thePnt2 Second of two points, defining the line.
1579         #  @param theName Object name; when specified, this parameter is used
1580         #         for result publication in the study. Otherwise, if automatic
1581         #         publication is switched on, default value is used for result name.
1582         #
1583         #  @return New GEOM.GEOM_Object, containing the created line.
1584         #
1585         #  @ref tui_creation_line "Example"
1586         @ManageTransactions("BasicOp")
1587         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1588             """
1589             Create a line, passing through the given points
1590
1591             Parameters:
1592                 thePnt1 First of two points, defining the line.
1593                 thePnt2 Second of two points, defining the line.
1594                 theName Object name; when specified, this parameter is used
1595                         for result publication in the study. Otherwise, if automatic
1596                         publication is switched on, default value is used for result name.
1597
1598             Returns:
1599                 New GEOM.GEOM_Object, containing the created line.
1600             """
1601             # Example: see GEOM_TestAll.py
1602             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1603             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1604             self._autoPublish(anObj, theName, "line")
1605             return anObj
1606
1607         ## Create a line on two faces intersection.
1608         #  @param theFace1 First of two faces, defining the line.
1609         #  @param theFace2 Second of two faces, defining the line.
1610         #  @param theName Object name; when specified, this parameter is used
1611         #         for result publication in the study. Otherwise, if automatic
1612         #         publication is switched on, default value is used for result name.
1613         #
1614         #  @return New GEOM.GEOM_Object, containing the created line.
1615         #
1616         #  @ref swig_MakeLineTwoFaces "Example"
1617         @ManageTransactions("BasicOp")
1618         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1619             """
1620             Create a line on two faces intersection.
1621
1622             Parameters:
1623                 theFace1 First of two faces, defining the line.
1624                 theFace2 Second of two faces, defining the line.
1625                 theName Object name; when specified, this parameter is used
1626                         for result publication in the study. Otherwise, if automatic
1627                         publication is switched on, default value is used for result name.
1628
1629             Returns:
1630                 New GEOM.GEOM_Object, containing the created line.
1631             """
1632             # Example: see GEOM_TestAll.py
1633             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1634             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1635             self._autoPublish(anObj, theName, "line")
1636             return anObj
1637
1638         ## Create a plane, passing through the given point
1639         #  and normal to the given vector.
1640         #  @param thePnt Point, the plane has to pass through.
1641         #  @param theVec Vector, defining the plane normal direction.
1642         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1643         #  @param theName Object name; when specified, this parameter is used
1644         #         for result publication in the study. Otherwise, if automatic
1645         #         publication is switched on, default value is used for result name.
1646         #
1647         #  @return New GEOM.GEOM_Object, containing the created plane.
1648         #
1649         #  @ref tui_creation_plane "Example"
1650         @ManageTransactions("BasicOp")
1651         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1652             """
1653             Create a plane, passing through the given point
1654             and normal to the given vector.
1655
1656             Parameters:
1657                 thePnt Point, the plane has to pass through.
1658                 theVec Vector, defining the plane normal direction.
1659                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1660                 theName Object name; when specified, this parameter is used
1661                         for result publication in the study. Otherwise, if automatic
1662                         publication is switched on, default value is used for result name.
1663
1664             Returns:
1665                 New GEOM.GEOM_Object, containing the created plane.
1666             """
1667             # Example: see GEOM_TestAll.py
1668             theTrimSize, Parameters = ParseParameters(theTrimSize);
1669             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1670             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1671             anObj.SetParameters(Parameters)
1672             self._autoPublish(anObj, theName, "plane")
1673             return anObj
1674
1675         ## Create a plane, passing through the three given points
1676         #  @param thePnt1 First of three points, defining the plane.
1677         #  @param thePnt2 Second of three points, defining the plane.
1678         #  @param thePnt3 Fird of three points, defining the plane.
1679         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1680         #  @param theName Object name; when specified, this parameter is used
1681         #         for result publication in the study. Otherwise, if automatic
1682         #         publication is switched on, default value is used for result name.
1683         #
1684         #  @return New GEOM.GEOM_Object, containing the created plane.
1685         #
1686         #  @ref tui_creation_plane "Example"
1687         @ManageTransactions("BasicOp")
1688         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1689             """
1690             Create a plane, passing through the three given points
1691
1692             Parameters:
1693                 thePnt1 First of three points, defining the plane.
1694                 thePnt2 Second of three points, defining the plane.
1695                 thePnt3 Fird of three points, defining the plane.
1696                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1697                 theName Object name; when specified, this parameter is used
1698                         for result publication in the study. Otherwise, if automatic
1699                         publication is switched on, default value is used for result name.
1700
1701             Returns:
1702                 New GEOM.GEOM_Object, containing the created plane.
1703             """
1704             # Example: see GEOM_TestAll.py
1705             theTrimSize, Parameters = ParseParameters(theTrimSize);
1706             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1707             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1708             anObj.SetParameters(Parameters)
1709             self._autoPublish(anObj, theName, "plane")
1710             return anObj
1711
1712         ## Create a plane, similar to the existing one, but with another size of representing face.
1713         #  @param theFace Referenced plane or LCS(Marker).
1714         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1715         #  @param theName Object name; when specified, this parameter is used
1716         #         for result publication in the study. Otherwise, if automatic
1717         #         publication is switched on, default value is used for result name.
1718         #
1719         #  @return New GEOM.GEOM_Object, containing the created plane.
1720         #
1721         #  @ref tui_creation_plane "Example"
1722         @ManageTransactions("BasicOp")
1723         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1724             """
1725             Create a plane, similar to the existing one, but with another size of representing face.
1726
1727             Parameters:
1728                 theFace Referenced plane or LCS(Marker).
1729                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1730                 theName Object name; when specified, this parameter is used
1731                         for result publication in the study. Otherwise, if automatic
1732                         publication is switched on, default value is used for result name.
1733
1734             Returns:
1735                 New GEOM.GEOM_Object, containing the created plane.
1736             """
1737             # Example: see GEOM_TestAll.py
1738             theTrimSize, Parameters = ParseParameters(theTrimSize);
1739             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1740             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1741             anObj.SetParameters(Parameters)
1742             self._autoPublish(anObj, theName, "plane")
1743             return anObj
1744
1745         ## Create a plane, passing through the 2 vectors
1746         #  with center in a start point of the first vector.
1747         #  @param theVec1 Vector, defining center point and plane direction.
1748         #  @param theVec2 Vector, defining the plane normal direction.
1749         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1750         #  @param theName Object name; when specified, this parameter is used
1751         #         for result publication in the study. Otherwise, if automatic
1752         #         publication is switched on, default value is used for result name.
1753         #
1754         #  @return New GEOM.GEOM_Object, containing the created plane.
1755         #
1756         #  @ref tui_creation_plane "Example"
1757         @ManageTransactions("BasicOp")
1758         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1759             """
1760             Create a plane, passing through the 2 vectors
1761             with center in a start point of the first vector.
1762
1763             Parameters:
1764                 theVec1 Vector, defining center point and plane direction.
1765                 theVec2 Vector, defining the plane normal direction.
1766                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1767                 theName Object name; when specified, this parameter is used
1768                         for result publication in the study. Otherwise, if automatic
1769                         publication is switched on, default value is used for result name.
1770
1771             Returns:
1772                 New GEOM.GEOM_Object, containing the created plane.
1773             """
1774             # Example: see GEOM_TestAll.py
1775             theTrimSize, Parameters = ParseParameters(theTrimSize);
1776             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1777             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1778             anObj.SetParameters(Parameters)
1779             self._autoPublish(anObj, theName, "plane")
1780             return anObj
1781
1782         ## Create a plane, based on a Local coordinate system.
1783         #  @param theLCS  coordinate system, defining plane.
1784         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1785         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1786         #  @param theName Object name; when specified, this parameter is used
1787         #         for result publication in the study. Otherwise, if automatic
1788         #         publication is switched on, default value is used for result name.
1789         #
1790         #  @return New GEOM.GEOM_Object, containing the created plane.
1791         #
1792         #  @ref tui_creation_plane "Example"
1793         @ManageTransactions("BasicOp")
1794         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1795             """
1796             Create a plane, based on a Local coordinate system.
1797
1798            Parameters:
1799                 theLCS  coordinate system, defining plane.
1800                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1801                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1802                 theName Object name; when specified, this parameter is used
1803                         for result publication in the study. Otherwise, if automatic
1804                         publication is switched on, default value is used for result name.
1805
1806             Returns:
1807                 New GEOM.GEOM_Object, containing the created plane.
1808             """
1809             # Example: see GEOM_TestAll.py
1810             theTrimSize, Parameters = ParseParameters(theTrimSize);
1811             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1812             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1813             anObj.SetParameters(Parameters)
1814             self._autoPublish(anObj, theName, "plane")
1815             return anObj
1816
1817         ## Create a local coordinate system.
1818         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1819         #  @param XDX,XDY,XDZ Three components of OX direction
1820         #  @param YDX,YDY,YDZ Three components of OY direction
1821         #  @param theName Object name; when specified, this parameter is used
1822         #         for result publication in the study. Otherwise, if automatic
1823         #         publication is switched on, default value is used for result name.
1824         #
1825         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1826         #
1827         #  @ref swig_MakeMarker "Example"
1828         @ManageTransactions("BasicOp")
1829         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1830             """
1831             Create a local coordinate system.
1832
1833             Parameters:
1834                 OX,OY,OZ Three coordinates of coordinate system origin.
1835                 XDX,XDY,XDZ Three components of OX direction
1836                 YDX,YDY,YDZ Three components of OY direction
1837                 theName Object name; when specified, this parameter is used
1838                         for result publication in the study. Otherwise, if automatic
1839                         publication is switched on, default value is used for result name.
1840
1841             Returns:
1842                 New GEOM.GEOM_Object, containing the created coordinate system.
1843             """
1844             # Example: see GEOM_TestAll.py
1845             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1846             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1847             RaiseIfFailed("MakeMarker", self.BasicOp)
1848             anObj.SetParameters(Parameters)
1849             self._autoPublish(anObj, theName, "lcs")
1850             return anObj
1851
1852         ## Create a local coordinate system from shape.
1853         #  @param theShape The initial shape to detect the coordinate system.
1854         #  @param theName Object name; when specified, this parameter is used
1855         #         for result publication in the study. Otherwise, if automatic
1856         #         publication is switched on, default value is used for result name.
1857         #
1858         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1859         #
1860         #  @ref tui_creation_lcs "Example"
1861         @ManageTransactions("BasicOp")
1862         def MakeMarkerFromShape(self, theShape, theName=None):
1863             """
1864             Create a local coordinate system from shape.
1865
1866             Parameters:
1867                 theShape The initial shape to detect the coordinate system.
1868                 theName Object name; when specified, this parameter is used
1869                         for result publication in the study. Otherwise, if automatic
1870                         publication is switched on, default value is used for result name.
1871
1872             Returns:
1873                 New GEOM.GEOM_Object, containing the created coordinate system.
1874             """
1875             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1876             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1877             self._autoPublish(anObj, theName, "lcs")
1878             return anObj
1879
1880         ## Create a local coordinate system from point and two vectors.
1881         #  @param theOrigin Point of coordinate system origin.
1882         #  @param theXVec Vector of X direction
1883         #  @param theYVec Vector of Y direction
1884         #  @param theName Object name; when specified, this parameter is used
1885         #         for result publication in the study. Otherwise, if automatic
1886         #         publication is switched on, default value is used for result name.
1887         #
1888         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1889         #
1890         #  @ref tui_creation_lcs "Example"
1891         @ManageTransactions("BasicOp")
1892         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1893             """
1894             Create a local coordinate system from point and two vectors.
1895
1896             Parameters:
1897                 theOrigin Point of coordinate system origin.
1898                 theXVec Vector of X direction
1899                 theYVec Vector of Y direction
1900                 theName Object name; when specified, this parameter is used
1901                         for result publication in the study. Otherwise, if automatic
1902                         publication is switched on, default value is used for result name.
1903
1904             Returns:
1905                 New GEOM.GEOM_Object, containing the created coordinate system.
1906
1907             """
1908             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1909             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1910             self._autoPublish(anObj, theName, "lcs")
1911             return anObj
1912
1913         # end of l3_basic_go
1914         ## @}
1915
1916         ## @addtogroup l4_curves
1917         ## @{
1918
1919         ##  Create an arc of circle, passing through three given points.
1920         #  @param thePnt1 Start point of the arc.
1921         #  @param thePnt2 Middle point of the arc.
1922         #  @param thePnt3 End point of the arc.
1923         #  @param theName Object name; when specified, this parameter is used
1924         #         for result publication in the study. Otherwise, if automatic
1925         #         publication is switched on, default value is used for result name.
1926         #
1927         #  @return New GEOM.GEOM_Object, containing the created arc.
1928         #
1929         #  @ref swig_MakeArc "Example"
1930         @ManageTransactions("CurvesOp")
1931         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1932             """
1933             Create an arc of circle, passing through three given points.
1934
1935             Parameters:
1936                 thePnt1 Start point of the arc.
1937                 thePnt2 Middle point of the arc.
1938                 thePnt3 End point of the arc.
1939                 theName Object name; when specified, this parameter is used
1940                         for result publication in the study. Otherwise, if automatic
1941                         publication is switched on, default value is used for result name.
1942
1943             Returns:
1944                 New GEOM.GEOM_Object, containing the created arc.
1945             """
1946             # Example: see GEOM_TestAll.py
1947             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1948             RaiseIfFailed("MakeArc", self.CurvesOp)
1949             self._autoPublish(anObj, theName, "arc")
1950             return anObj
1951
1952         ##  Create an arc of circle from a center and 2 points.
1953         #  @param thePnt1 Center of the arc
1954         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1955         #  @param thePnt3 End point of the arc (Gives also a direction)
1956         #  @param theSense Orientation of the arc
1957         #  @param theName Object name; when specified, this parameter is used
1958         #         for result publication in the study. Otherwise, if automatic
1959         #         publication is switched on, default value is used for result name.
1960         #
1961         #  @return New GEOM.GEOM_Object, containing the created arc.
1962         #
1963         #  @ref swig_MakeArc "Example"
1964         @ManageTransactions("CurvesOp")
1965         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1966             """
1967             Create an arc of circle from a center and 2 points.
1968
1969             Parameters:
1970                 thePnt1 Center of the arc
1971                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1972                 thePnt3 End point of the arc (Gives also a direction)
1973                 theSense Orientation of the arc
1974                 theName Object name; when specified, this parameter is used
1975                         for result publication in the study. Otherwise, if automatic
1976                         publication is switched on, default value is used for result name.
1977
1978             Returns:
1979                 New GEOM.GEOM_Object, containing the created arc.
1980             """
1981             # Example: see GEOM_TestAll.py
1982             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1983             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1984             self._autoPublish(anObj, theName, "arc")
1985             return anObj
1986
1987         ##  Create an arc of ellipse, of center and two points.
1988         #  @param theCenter Center of the arc.
1989         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1990         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1991         #  @param theName Object name; when specified, this parameter is used
1992         #         for result publication in the study. Otherwise, if automatic
1993         #         publication is switched on, default value is used for result name.
1994         #
1995         #  @return New GEOM.GEOM_Object, containing the created arc.
1996         #
1997         #  @ref swig_MakeArc "Example"
1998         @ManageTransactions("CurvesOp")
1999         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2000             """
2001             Create an arc of ellipse, of center and two points.
2002
2003             Parameters:
2004                 theCenter Center of the arc.
2005                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2006                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2007                 theName Object name; when specified, this parameter is used
2008                         for result publication in the study. Otherwise, if automatic
2009                         publication is switched on, default value is used for result name.
2010
2011             Returns:
2012                 New GEOM.GEOM_Object, containing the created arc.
2013             """
2014             # Example: see GEOM_TestAll.py
2015             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2016             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2017             self._autoPublish(anObj, theName, "arc")
2018             return anObj
2019
2020         ## Create a circle with given center, normal vector and radius.
2021         #  @param thePnt Circle center.
2022         #  @param theVec Vector, normal to the plane of the circle.
2023         #  @param theR Circle radius.
2024         #  @param theName Object name; when specified, this parameter is used
2025         #         for result publication in the study. Otherwise, if automatic
2026         #         publication is switched on, default value is used for result name.
2027         #
2028         #  @return New GEOM.GEOM_Object, containing the created circle.
2029         #
2030         #  @ref tui_creation_circle "Example"
2031         @ManageTransactions("CurvesOp")
2032         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2033             """
2034             Create a circle with given center, normal vector and radius.
2035
2036             Parameters:
2037                 thePnt Circle center.
2038                 theVec Vector, normal to the plane of the circle.
2039                 theR Circle radius.
2040                 theName Object name; when specified, this parameter is used
2041                         for result publication in the study. Otherwise, if automatic
2042                         publication is switched on, default value is used for result name.
2043
2044             Returns:
2045                 New GEOM.GEOM_Object, containing the created circle.
2046             """
2047             # Example: see GEOM_TestAll.py
2048             theR, Parameters = ParseParameters(theR)
2049             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2050             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2051             anObj.SetParameters(Parameters)
2052             self._autoPublish(anObj, theName, "circle")
2053             return anObj
2054
2055         ## Create a circle with given radius.
2056         #  Center of the circle will be in the origin of global
2057         #  coordinate system and normal vector will be codirected with Z axis
2058         #  @param theR Circle radius.
2059         #  @param theName Object name; when specified, this parameter is used
2060         #         for result publication in the study. Otherwise, if automatic
2061         #         publication is switched on, default value is used for result name.
2062         #
2063         #  @return New GEOM.GEOM_Object, containing the created circle.
2064         @ManageTransactions("CurvesOp")
2065         def MakeCircleR(self, theR, theName=None):
2066             """
2067             Create a circle with given radius.
2068             Center of the circle will be in the origin of global
2069             coordinate system and normal vector will be codirected with Z axis
2070
2071             Parameters:
2072                 theR Circle radius.
2073                 theName Object name; when specified, this parameter is used
2074                         for result publication in the study. Otherwise, if automatic
2075                         publication is switched on, default value is used for result name.
2076
2077             Returns:
2078                 New GEOM.GEOM_Object, containing the created circle.
2079             """
2080             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2081             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2082             self._autoPublish(anObj, theName, "circle")
2083             return anObj
2084
2085         ## Create a circle, passing through three given points
2086         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2087         #  @param theName Object name; when specified, this parameter is used
2088         #         for result publication in the study. Otherwise, if automatic
2089         #         publication is switched on, default value is used for result name.
2090         #
2091         #  @return New GEOM.GEOM_Object, containing the created circle.
2092         #
2093         #  @ref tui_creation_circle "Example"
2094         @ManageTransactions("CurvesOp")
2095         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2096             """
2097             Create a circle, passing through three given points
2098
2099             Parameters:
2100                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2101                 theName Object name; when specified, this parameter is used
2102                         for result publication in the study. Otherwise, if automatic
2103                         publication is switched on, default value is used for result name.
2104
2105             Returns:
2106                 New GEOM.GEOM_Object, containing the created circle.
2107             """
2108             # Example: see GEOM_TestAll.py
2109             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2110             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2111             self._autoPublish(anObj, theName, "circle")
2112             return anObj
2113
2114         ## Create a circle, with given point1 as center,
2115         #  passing through the point2 as radius and laying in the plane,
2116         #  defined by all three given points.
2117         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2118         #  @param theName Object name; when specified, this parameter is used
2119         #         for result publication in the study. Otherwise, if automatic
2120         #         publication is switched on, default value is used for result name.
2121         #
2122         #  @return New GEOM.GEOM_Object, containing the created circle.
2123         #
2124         #  @ref swig_MakeCircle "Example"
2125         @ManageTransactions("CurvesOp")
2126         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2127             """
2128             Create a circle, with given point1 as center,
2129             passing through the point2 as radius and laying in the plane,
2130             defined by all three given points.
2131
2132             Parameters:
2133                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2134                 theName Object name; when specified, this parameter is used
2135                         for result publication in the study. Otherwise, if automatic
2136                         publication is switched on, default value is used for result name.
2137
2138             Returns:
2139                 New GEOM.GEOM_Object, containing the created circle.
2140             """
2141             # Example: see GEOM_example6.py
2142             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2143             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2144             self._autoPublish(anObj, theName, "circle")
2145             return anObj
2146
2147         ## Create an ellipse with given center, normal vector and radiuses.
2148         #  @param thePnt Ellipse center.
2149         #  @param theVec Vector, normal to the plane of the ellipse.
2150         #  @param theRMajor Major ellipse radius.
2151         #  @param theRMinor Minor ellipse radius.
2152         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2153         #  @param theName Object name; when specified, this parameter is used
2154         #         for result publication in the study. Otherwise, if automatic
2155         #         publication is switched on, default value is used for result name.
2156         #
2157         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2158         #
2159         #  @ref tui_creation_ellipse "Example"
2160         @ManageTransactions("CurvesOp")
2161         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2162             """
2163             Create an ellipse with given center, normal vector and radiuses.
2164
2165             Parameters:
2166                 thePnt Ellipse center.
2167                 theVec Vector, normal to the plane of the ellipse.
2168                 theRMajor Major ellipse radius.
2169                 theRMinor Minor ellipse radius.
2170                 theVecMaj Vector, direction of the ellipse's main axis.
2171                 theName Object name; when specified, this parameter is used
2172                         for result publication in the study. Otherwise, if automatic
2173                         publication is switched on, default value is used for result name.
2174
2175             Returns:
2176                 New GEOM.GEOM_Object, containing the created ellipse.
2177             """
2178             # Example: see GEOM_TestAll.py
2179             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2180             if theVecMaj is not None:
2181                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2182             else:
2183                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2184                 pass
2185             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2186             anObj.SetParameters(Parameters)
2187             self._autoPublish(anObj, theName, "ellipse")
2188             return anObj
2189
2190         ## Create an ellipse with given radiuses.
2191         #  Center of the ellipse will be in the origin of global
2192         #  coordinate system and normal vector will be codirected with Z axis
2193         #  @param theRMajor Major ellipse radius.
2194         #  @param theRMinor Minor ellipse radius.
2195         #  @param theName Object name; when specified, this parameter is used
2196         #         for result publication in the study. Otherwise, if automatic
2197         #         publication is switched on, default value is used for result name.
2198         #
2199         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2200         @ManageTransactions("CurvesOp")
2201         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2202             """
2203             Create an ellipse with given radiuses.
2204             Center of the ellipse will be in the origin of global
2205             coordinate system and normal vector will be codirected with Z axis
2206
2207             Parameters:
2208                 theRMajor Major ellipse radius.
2209                 theRMinor Minor ellipse radius.
2210                 theName Object name; when specified, this parameter is used
2211                         for result publication in the study. Otherwise, if automatic
2212                         publication is switched on, default value is used for result name.
2213
2214             Returns:
2215             New GEOM.GEOM_Object, containing the created ellipse.
2216             """
2217             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2218             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2219             self._autoPublish(anObj, theName, "ellipse")
2220             return anObj
2221
2222         ## Create a polyline on the set of points.
2223         #  @param thePoints Sequence of points for the polyline.
2224         #  @param theIsClosed If True, build a closed wire.
2225         #  @param theName Object name; when specified, this parameter is used
2226         #         for result publication in the study. Otherwise, if automatic
2227         #         publication is switched on, default value is used for result name.
2228         #
2229         #  @return New GEOM.GEOM_Object, containing the created polyline.
2230         #
2231         #  @ref tui_creation_curve "Example"
2232         @ManageTransactions("CurvesOp")
2233         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2234             """
2235             Create a polyline on the set of points.
2236
2237             Parameters:
2238                 thePoints Sequence of points for the polyline.
2239                 theIsClosed If True, build a closed wire.
2240                 theName Object name; when specified, this parameter is used
2241                         for result publication in the study. Otherwise, if automatic
2242                         publication is switched on, default value is used for result name.
2243
2244             Returns:
2245                 New GEOM.GEOM_Object, containing the created polyline.
2246             """
2247             # Example: see GEOM_TestAll.py
2248             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2249             RaiseIfFailed("MakePolyline", self.CurvesOp)
2250             self._autoPublish(anObj, theName, "polyline")
2251             return anObj
2252
2253         ## Create bezier curve on the set of points.
2254         #  @param thePoints Sequence of points for the bezier curve.
2255         #  @param theIsClosed If True, build a closed curve.
2256         #  @param theName Object name; when specified, this parameter is used
2257         #         for result publication in the study. Otherwise, if automatic
2258         #         publication is switched on, default value is used for result name.
2259         #
2260         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2261         #
2262         #  @ref tui_creation_curve "Example"
2263         @ManageTransactions("CurvesOp")
2264         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2265             """
2266             Create bezier curve on the set of points.
2267
2268             Parameters:
2269                 thePoints Sequence of points for the bezier curve.
2270                 theIsClosed If True, build a closed curve.
2271                 theName Object name; when specified, this parameter is used
2272                         for result publication in the study. Otherwise, if automatic
2273                         publication is switched on, default value is used for result name.
2274
2275             Returns:
2276                 New GEOM.GEOM_Object, containing the created bezier curve.
2277             """
2278             # Example: see GEOM_TestAll.py
2279             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2280             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2281             self._autoPublish(anObj, theName, "bezier")
2282             return anObj
2283
2284         ## Create B-Spline curve on the set of points.
2285         #  @param thePoints Sequence of points for the B-Spline curve.
2286         #  @param theIsClosed If True, build a closed curve.
2287         #  @param theDoReordering If TRUE, the algo does not follow the order of
2288         #                         \a thePoints but searches for the closest vertex.
2289         #  @param theName Object name; when specified, this parameter is used
2290         #         for result publication in the study. Otherwise, if automatic
2291         #         publication is switched on, default value is used for result name.
2292         #
2293         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2294         #
2295         #  @ref tui_creation_curve "Example"
2296         @ManageTransactions("CurvesOp")
2297         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2298             """
2299             Create B-Spline curve on the set of points.
2300
2301             Parameters:
2302                 thePoints Sequence of points for the B-Spline curve.
2303                 theIsClosed If True, build a closed curve.
2304                 theDoReordering If True, the algo does not follow the order of
2305                                 thePoints but searches for the closest vertex.
2306                 theName Object name; when specified, this parameter is used
2307                         for result publication in the study. Otherwise, if automatic
2308                         publication is switched on, default value is used for result name.
2309
2310             Returns:
2311                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2312             """
2313             # Example: see GEOM_TestAll.py
2314             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2315             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2316             self._autoPublish(anObj, theName, "bspline")
2317             return anObj
2318
2319         ## Create B-Spline curve on the set of points.
2320         #  @param thePoints Sequence of points for the B-Spline curve.
2321         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2322         #  @param theLastVec Vector object, defining the curve direction at its last point.
2323         #  @param theName Object name; when specified, this parameter is used
2324         #         for result publication in the study. Otherwise, if automatic
2325         #         publication is switched on, default value is used for result name.
2326         #
2327         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2328         #
2329         #  @ref tui_creation_curve "Example"
2330         @ManageTransactions("CurvesOp")
2331         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2332             """
2333             Create B-Spline curve on the set of points.
2334
2335             Parameters:
2336                 thePoints Sequence of points for the B-Spline curve.
2337                 theFirstVec Vector object, defining the curve direction at its first point.
2338                 theLastVec Vector object, defining the curve direction at its last point.
2339                 theName Object name; when specified, this parameter is used
2340                         for result publication in the study. Otherwise, if automatic
2341                         publication is switched on, default value is used for result name.
2342
2343             Returns:
2344                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2345             """
2346             # Example: see GEOM_TestAll.py
2347             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2348             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2349             self._autoPublish(anObj, theName, "bspline")
2350             return anObj
2351
2352         ## Creates a curve using the parametric definition of the basic points.
2353         #  @param thexExpr parametric equation of the coordinates X.
2354         #  @param theyExpr parametric equation of the coordinates Y.
2355         #  @param thezExpr parametric equation of the coordinates Z.
2356         #  @param theParamMin the minimal value of the parameter.
2357         #  @param theParamMax the maximum value of the parameter.
2358         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2359         #  @param theCurveType the type of the curve,
2360         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2361         #  @param theNewMethod flag for switching to the new method if the flag is set to false a deprecated method is used which can lead to a bug.
2362         #  @param theName Object name; when specified, this parameter is used
2363         #         for result publication in the study. Otherwise, if automatic
2364         #         publication is switched on, default value is used for result name.
2365         #
2366         #  @return New GEOM.GEOM_Object, containing the created curve.
2367         #
2368         #  @ref tui_creation_curve "Example"
2369         @ManageTransactions("CurvesOp")
2370         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2371                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2372             """
2373             Creates a curve using the parametric definition of the basic points.
2374
2375             Parameters:
2376                 thexExpr parametric equation of the coordinates X.
2377                 theyExpr parametric equation of the coordinates Y.
2378                 thezExpr parametric equation of the coordinates Z.
2379                 theParamMin the minimal value of the parameter.
2380                 theParamMax the maximum value of the parameter.
2381                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2382                 theCurveType the type of the curve,
2383                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2384                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2385                              method is used which can lead to a bug.
2386                 theName Object name; when specified, this parameter is used
2387                         for result publication in the study. Otherwise, if automatic
2388                         publication is switched on, default value is used for result name.
2389
2390             Returns:
2391                 New GEOM.GEOM_Object, containing the created curve.
2392             """
2393             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2394             if theNewMethod:
2395               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2396             else:
2397               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2398             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2399             anObj.SetParameters(Parameters)
2400             self._autoPublish(anObj, theName, "curve")
2401             return anObj
2402
2403         ## Create an isoline curve on a face.
2404         #  @param theFace the face for which an isoline is created.
2405         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2406         #         creation.
2407         #  @param theParameter the U parameter for U-isoline or V parameter
2408         #         for V-isoline.
2409         #  @param theName Object name; when specified, this parameter is used
2410         #         for result publication in the study. Otherwise, if automatic
2411         #         publication is switched on, default value is used for result name.
2412         #
2413         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2414         #          a compound of edges.
2415         #
2416         #  @ref tui_creation_curve "Example"
2417         @ManageTransactions("CurvesOp")
2418         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2419             """
2420             Create an isoline curve on a face.
2421
2422             Parameters:
2423                 theFace the face for which an isoline is created.
2424                 IsUIsoline True for U-isoline creation; False for V-isoline
2425                            creation.
2426                 theParameter the U parameter for U-isoline or V parameter
2427                              for V-isoline.
2428                 theName Object name; when specified, this parameter is used
2429                         for result publication in the study. Otherwise, if automatic
2430                         publication is switched on, default value is used for result name.
2431
2432             Returns:
2433                 New GEOM.GEOM_Object, containing the created isoline edge or a
2434                 compound of edges.
2435             """
2436             # Example: see GEOM_TestAll.py
2437             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2438             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2439             if IsUIsoline:
2440                 self._autoPublish(anObj, theName, "U-Isoline")
2441             else:
2442                 self._autoPublish(anObj, theName, "V-Isoline")
2443             return anObj
2444
2445         # end of l4_curves
2446         ## @}
2447
2448         ## @addtogroup l3_sketcher
2449         ## @{
2450
2451         ## Create a sketcher (wire or face), following the textual description,
2452         #  passed through <VAR>theCommand</VAR> argument. \n
2453         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2454         #  Format of the description string have to be the following:
2455         #
2456         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2457         #
2458         #  Where:
2459         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2460         #  - CMD is one of
2461         #     - "R angle" : Set the direction by angle
2462         #     - "D dx dy" : Set the direction by DX & DY
2463         #     .
2464         #       \n
2465         #     - "TT x y" : Create segment by point at X & Y
2466         #     - "T dx dy" : Create segment by point with DX & DY
2467         #     - "L length" : Create segment by direction & Length
2468         #     - "IX x" : Create segment by direction & Intersect. X
2469         #     - "IY y" : Create segment by direction & Intersect. Y
2470         #     .
2471         #       \n
2472         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2473         #     - "AA x y": Create arc by point at X & Y
2474         #     - "A dx dy" : Create arc by point with DX & DY
2475         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2476         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2477         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2478         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2479         #     .
2480         #       \n
2481         #     - "WW" : Close Wire (to finish)
2482         #     - "WF" : Close Wire and build face (to finish)
2483         #     .
2484         #        \n
2485         #  - Flag1 (= reverse) is 0 or 2 ...
2486         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2487         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2488         #     .
2489         #        \n
2490         #  - Flag2 (= control tolerance) is 0 or 1 ...
2491         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2492         #     - if 1 the wire is built only if the end point is on the arc
2493         #       with a tolerance of 10^-7 on the distance else the creation fails
2494         #
2495         #  @param theCommand String, defining the sketcher in local
2496         #                    coordinates of the working plane.
2497         #  @param theWorkingPlane Nine double values, defining origin,
2498         #                         OZ and OX directions of the working plane.
2499         #  @param theName Object name; when specified, this parameter is used
2500         #         for result publication in the study. Otherwise, if automatic
2501         #         publication is switched on, default value is used for result name.
2502         #
2503         #  @return New GEOM.GEOM_Object, containing the created wire.
2504         #
2505         #  @ref tui_sketcher_page "Example"
2506         @ManageTransactions("CurvesOp")
2507         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2508             """
2509             Create a sketcher (wire or face), following the textual description, passed
2510             through theCommand argument.
2511             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2512             Format of the description string have to be the following:
2513                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2514             Where:
2515             - x1, y1 are coordinates of the first sketcher point (zero by default),
2516             - CMD is one of
2517                - "R angle" : Set the direction by angle
2518                - "D dx dy" : Set the direction by DX & DY
2519
2520                - "TT x y" : Create segment by point at X & Y
2521                - "T dx dy" : Create segment by point with DX & DY
2522                - "L length" : Create segment by direction & Length
2523                - "IX x" : Create segment by direction & Intersect. X
2524                - "IY y" : Create segment by direction & Intersect. Y
2525
2526                - "C radius length" : Create arc by direction, radius and length(in degree)
2527                - "AA x y": Create arc by point at X & Y
2528                - "A dx dy" : Create arc by point with DX & DY
2529                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2530                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2531                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2532                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2533
2534                - "WW" : Close Wire (to finish)
2535                - "WF" : Close Wire and build face (to finish)
2536
2537             - Flag1 (= reverse) is 0 or 2 ...
2538                - if 0 the drawn arc is the one of lower angle (< Pi)
2539                - if 2 the drawn arc ius the one of greater angle (> Pi)
2540
2541             - Flag2 (= control tolerance) is 0 or 1 ...
2542                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2543                - if 1 the wire is built only if the end point is on the arc
2544                  with a tolerance of 10^-7 on the distance else the creation fails
2545
2546             Parameters:
2547                 theCommand String, defining the sketcher in local
2548                            coordinates of the working plane.
2549                 theWorkingPlane Nine double values, defining origin,
2550                                 OZ and OX directions of the working plane.
2551                 theName Object name; when specified, this parameter is used
2552                         for result publication in the study. Otherwise, if automatic
2553                         publication is switched on, default value is used for result name.
2554
2555             Returns:
2556                 New GEOM.GEOM_Object, containing the created wire.
2557             """
2558             # Example: see GEOM_TestAll.py
2559             theCommand,Parameters = ParseSketcherCommand(theCommand)
2560             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2561             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2562             anObj.SetParameters(Parameters)
2563             self._autoPublish(anObj, theName, "wire")
2564             return anObj
2565
2566         ## Create a sketcher (wire or face), following the textual description,
2567         #  passed through <VAR>theCommand</VAR> argument. \n
2568         #  For format of the description string see MakeSketcher() method.\n
2569         #  @param theCommand String, defining the sketcher in local
2570         #                    coordinates of the working plane.
2571         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2572         #  @param theName Object name; when specified, this parameter is used
2573         #         for result publication in the study. Otherwise, if automatic
2574         #         publication is switched on, default value is used for result name.
2575         #
2576         #  @return New GEOM.GEOM_Object, containing the created wire.
2577         #
2578         #  @ref tui_sketcher_page "Example"
2579         @ManageTransactions("CurvesOp")
2580         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2581             """
2582             Create a sketcher (wire or face), following the textual description,
2583             passed through theCommand argument.
2584             For format of the description string see geompy.MakeSketcher() method.
2585
2586             Parameters:
2587                 theCommand String, defining the sketcher in local
2588                            coordinates of the working plane.
2589                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2590                 theName Object name; when specified, this parameter is used
2591                         for result publication in the study. Otherwise, if automatic
2592                         publication is switched on, default value is used for result name.
2593
2594             Returns:
2595                 New GEOM.GEOM_Object, containing the created wire.
2596             """
2597             theCommand,Parameters = ParseSketcherCommand(theCommand)
2598             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2599             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2600             anObj.SetParameters(Parameters)
2601             self._autoPublish(anObj, theName, "wire")
2602             return anObj
2603
2604         ## Obtain a 2D sketcher interface
2605         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2606         def Sketcher2D (self):
2607             """
2608             Obtain a 2D sketcher interface.
2609
2610             Example of usage:
2611                sk = geompy.Sketcher2D()
2612                sk.addPoint(20, 20)
2613                sk.addSegmentRelative(15, 70)
2614                sk.addSegmentPerpY(50)
2615                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2616                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2617                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2618                sk.close()
2619                Sketch_1 = sk.wire(geomObj_1)
2620             """
2621             sk = Sketcher2D (self)
2622             return sk
2623
2624         ## Create a sketcher wire, following the numerical description,
2625         #  passed through <VAR>theCoordinates</VAR> argument. \n
2626         #  @param theCoordinates double values, defining points to create a wire,
2627         #                                                      passing from it.
2628         #  @param theName Object name; when specified, this parameter is used
2629         #         for result publication in the study. Otherwise, if automatic
2630         #         publication is switched on, default value is used for result name.
2631         #
2632         #  @return New GEOM.GEOM_Object, containing the created wire.
2633         #
2634         #  @ref tui_3dsketcher_page "Example"
2635         @ManageTransactions("CurvesOp")
2636         def Make3DSketcher(self, theCoordinates, theName=None):
2637             """
2638             Create a sketcher wire, following the numerical description,
2639             passed through theCoordinates argument.
2640
2641             Parameters:
2642                 theCoordinates double values, defining points to create a wire,
2643                                passing from it.
2644                 theName Object name; when specified, this parameter is used
2645                         for result publication in the study. Otherwise, if automatic
2646                         publication is switched on, default value is used for result name.
2647
2648             Returns:
2649                 New GEOM_Object, containing the created wire.
2650             """
2651             theCoordinates,Parameters = ParseParameters(theCoordinates)
2652             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2653             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2654             anObj.SetParameters(Parameters)
2655             self._autoPublish(anObj, theName, "wire")
2656             return anObj
2657
2658         ## Obtain a 3D sketcher interface
2659         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2660         #
2661         #  @ref tui_3dsketcher_page "Example"
2662         def Sketcher3D (self):
2663             """
2664             Obtain a 3D sketcher interface.
2665
2666             Example of usage:
2667                 sk = geompy.Sketcher3D()
2668                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2669                 sk.addPointsRelative(0, 0, 130)
2670                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2671                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2672                 sk.close()
2673                 a3D_Sketcher_1 = sk.wire()
2674             """
2675             sk = Sketcher3D (self)
2676             return sk
2677
2678         ## Obtain a 2D polyline creation interface
2679         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2680         #
2681         #  @ref tui_3dsketcher_page "Example"
2682         def Polyline2D (self):
2683             """
2684             Obtain a 2D polyline creation interface.
2685
2686             Example of usage:
2687                 pl = geompy.Polyline2D()
2688                 pl.addSection("section 1", GEOM.Polyline, True)
2689                 pl.addPoints(0, 0, 10, 0, 10, 10)
2690                 pl.addSection("section 2", GEOM.Interpolation, False)
2691                 pl.addPoints(20, 0, 30, 0, 30, 10)
2692                 resultObj = pl.result(WorkingPlane)
2693             """
2694             pl = Polyline2D (self)
2695             return pl
2696
2697         # end of l3_sketcher
2698         ## @}
2699
2700         ## @addtogroup l3_3d_primitives
2701         ## @{
2702
2703         ## Create a box by coordinates of two opposite vertices.
2704         #
2705         #  @param x1,y1,z1 double values, defining first point it.
2706         #  @param x2,y2,z2 double values, defining first point it.
2707         #  @param theName Object name; when specified, this parameter is used
2708         #         for result publication in the study. Otherwise, if automatic
2709         #         publication is switched on, default value is used for result name.
2710         #
2711         #  @return New GEOM.GEOM_Object, containing the created box.
2712         #
2713         #  @ref tui_creation_box "Example"
2714         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2715             """
2716             Create a box by coordinates of two opposite vertices.
2717
2718             Parameters:
2719                 x1,y1,z1 double values, defining first point.
2720                 x2,y2,z2 double values, defining second point.
2721                 theName Object name; when specified, this parameter is used
2722                         for result publication in the study. Otherwise, if automatic
2723                         publication is switched on, default value is used for result name.
2724
2725             Returns:
2726                 New GEOM.GEOM_Object, containing the created box.
2727             """
2728             # Example: see GEOM_TestAll.py
2729             pnt1 = self.MakeVertex(x1,y1,z1)
2730             pnt2 = self.MakeVertex(x2,y2,z2)
2731             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2732             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2733
2734         ## Create a box with specified dimensions along the coordinate axes
2735         #  and with edges, parallel to the coordinate axes.
2736         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2737         #  @param theDX Length of Box edges, parallel to OX axis.
2738         #  @param theDY Length of Box edges, parallel to OY axis.
2739         #  @param theDZ Length of Box edges, parallel to OZ axis.
2740         #  @param theName Object name; when specified, this parameter is used
2741         #         for result publication in the study. Otherwise, if automatic
2742         #         publication is switched on, default value is used for result name.
2743         #
2744         #  @return New GEOM.GEOM_Object, containing the created box.
2745         #
2746         #  @ref tui_creation_box "Example"
2747         @ManageTransactions("PrimOp")
2748         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2749             """
2750             Create a box with specified dimensions along the coordinate axes
2751             and with edges, parallel to the coordinate axes.
2752             Center of the box will be at point (DX/2, DY/2, DZ/2).
2753
2754             Parameters:
2755                 theDX Length of Box edges, parallel to OX axis.
2756                 theDY Length of Box edges, parallel to OY axis.
2757                 theDZ Length of Box edges, parallel to OZ axis.
2758                 theName Object name; when specified, this parameter is used
2759                         for result publication in the study. Otherwise, if automatic
2760                         publication is switched on, default value is used for result name.
2761
2762             Returns:
2763                 New GEOM.GEOM_Object, containing the created box.
2764             """
2765             # Example: see GEOM_TestAll.py
2766             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2767             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2768             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2769             anObj.SetParameters(Parameters)
2770             self._autoPublish(anObj, theName, "box")
2771             return anObj
2772
2773         ## Create a box with two specified opposite vertices,
2774         #  and with edges, parallel to the coordinate axes
2775         #  @param thePnt1 First of two opposite vertices.
2776         #  @param thePnt2 Second of two opposite vertices.
2777         #  @param theName Object name; when specified, this parameter is used
2778         #         for result publication in the study. Otherwise, if automatic
2779         #         publication is switched on, default value is used for result name.
2780         #
2781         #  @return New GEOM.GEOM_Object, containing the created box.
2782         #
2783         #  @ref tui_creation_box "Example"
2784         @ManageTransactions("PrimOp")
2785         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2786             """
2787             Create a box with two specified opposite vertices,
2788             and with edges, parallel to the coordinate axes
2789
2790             Parameters:
2791                 thePnt1 First of two opposite vertices.
2792                 thePnt2 Second of two opposite vertices.
2793                 theName Object name; when specified, this parameter is used
2794                         for result publication in the study. Otherwise, if automatic
2795                         publication is switched on, default value is used for result name.
2796
2797             Returns:
2798                 New GEOM.GEOM_Object, containing the created box.
2799             """
2800             # Example: see GEOM_TestAll.py
2801             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2802             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2803             self._autoPublish(anObj, theName, "box")
2804             return anObj
2805
2806         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2807         #  @param theH height of Face.
2808         #  @param theW width of Face.
2809         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2810         #  @param theName Object name; when specified, this parameter is used
2811         #         for result publication in the study. Otherwise, if automatic
2812         #         publication is switched on, default value is used for result name.
2813         #
2814         #  @return New GEOM.GEOM_Object, containing the created face.
2815         #
2816         #  @ref tui_creation_face "Example"
2817         @ManageTransactions("PrimOp")
2818         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2819             """
2820             Create a face with specified dimensions with edges parallel to coordinate axes.
2821
2822             Parameters:
2823                 theH height of Face.
2824                 theW width of Face.
2825                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2826                 theName Object name; when specified, this parameter is used
2827                         for result publication in the study. Otherwise, if automatic
2828                         publication is switched on, default value is used for result name.
2829
2830             Returns:
2831                 New GEOM.GEOM_Object, containing the created face.
2832             """
2833             # Example: see GEOM_TestAll.py
2834             theH,theW,Parameters = ParseParameters(theH, theW)
2835             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2836             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2837             anObj.SetParameters(Parameters)
2838             self._autoPublish(anObj, theName, "rectangle")
2839             return anObj
2840
2841         ## Create a face from another plane and two sizes,
2842         #  vertical size and horisontal size.
2843         #  @param theObj   Normale vector to the creating face or
2844         #  the face object.
2845         #  @param theH     Height (vertical size).
2846         #  @param theW     Width (horisontal size).
2847         #  @param theName Object name; when specified, this parameter is used
2848         #         for result publication in the study. Otherwise, if automatic
2849         #         publication is switched on, default value is used for result name.
2850         #
2851         #  @return New GEOM.GEOM_Object, containing the created face.
2852         #
2853         #  @ref tui_creation_face "Example"
2854         @ManageTransactions("PrimOp")
2855         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2856             """
2857             Create a face from another plane and two sizes,
2858             vertical size and horisontal size.
2859
2860             Parameters:
2861                 theObj   Normale vector to the creating face or
2862                          the face object.
2863                 theH     Height (vertical size).
2864                 theW     Width (horisontal size).
2865                 theName Object name; when specified, this parameter is used
2866                         for result publication in the study. Otherwise, if automatic
2867                         publication is switched on, default value is used for result name.
2868
2869             Returns:
2870                 New GEOM_Object, containing the created face.
2871             """
2872             # Example: see GEOM_TestAll.py
2873             theH,theW,Parameters = ParseParameters(theH, theW)
2874             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2875             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2876             anObj.SetParameters(Parameters)
2877             self._autoPublish(anObj, theName, "rectangle")
2878             return anObj
2879
2880         ## Create a disk with given center, normal vector and radius.
2881         #  @param thePnt Disk center.
2882         #  @param theVec Vector, normal to the plane of the disk.
2883         #  @param theR Disk radius.
2884         #  @param theName Object name; when specified, this parameter is used
2885         #         for result publication in the study. Otherwise, if automatic
2886         #         publication is switched on, default value is used for result name.
2887         #
2888         #  @return New GEOM.GEOM_Object, containing the created disk.
2889         #
2890         #  @ref tui_creation_disk "Example"
2891         @ManageTransactions("PrimOp")
2892         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2893             """
2894             Create a disk with given center, normal vector and radius.
2895
2896             Parameters:
2897                 thePnt Disk center.
2898                 theVec Vector, normal to the plane of the disk.
2899                 theR Disk radius.
2900                 theName Object name; when specified, this parameter is used
2901                         for result publication in the study. Otherwise, if automatic
2902                         publication is switched on, default value is used for result name.
2903
2904             Returns:
2905                 New GEOM.GEOM_Object, containing the created disk.
2906             """
2907             # Example: see GEOM_TestAll.py
2908             theR,Parameters = ParseParameters(theR)
2909             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2910             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2911             anObj.SetParameters(Parameters)
2912             self._autoPublish(anObj, theName, "disk")
2913             return anObj
2914
2915         ## Create a disk, passing through three given points
2916         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2917         #  @param theName Object name; when specified, this parameter is used
2918         #         for result publication in the study. Otherwise, if automatic
2919         #         publication is switched on, default value is used for result name.
2920         #
2921         #  @return New GEOM.GEOM_Object, containing the created disk.
2922         #
2923         #  @ref tui_creation_disk "Example"
2924         @ManageTransactions("PrimOp")
2925         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2926             """
2927             Create a disk, passing through three given points
2928
2929             Parameters:
2930                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2931                 theName Object name; when specified, this parameter is used
2932                         for result publication in the study. Otherwise, if automatic
2933                         publication is switched on, default value is used for result name.
2934
2935             Returns:
2936                 New GEOM.GEOM_Object, containing the created disk.
2937             """
2938             # Example: see GEOM_TestAll.py
2939             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2940             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2941             self._autoPublish(anObj, theName, "disk")
2942             return anObj
2943
2944         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2945         #  @param theR Radius of Face.
2946         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2947         #  @param theName Object name; when specified, this parameter is used
2948         #         for result publication in the study. Otherwise, if automatic
2949         #         publication is switched on, default value is used for result name.
2950         #
2951         #  @return New GEOM.GEOM_Object, containing the created disk.
2952         #
2953         #  @ref tui_creation_face "Example"
2954         @ManageTransactions("PrimOp")
2955         def MakeDiskR(self, theR, theOrientation, theName=None):
2956             """
2957             Create a disk with specified dimensions along OX-OY coordinate axes.
2958
2959             Parameters:
2960                 theR Radius of Face.
2961                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2962                 theName Object name; when specified, this parameter is used
2963                         for result publication in the study. Otherwise, if automatic
2964                         publication is switched on, default value is used for result name.
2965
2966             Returns:
2967                 New GEOM.GEOM_Object, containing the created disk.
2968
2969             Example of usage:
2970                 Disk3 = geompy.MakeDiskR(100., 1)
2971             """
2972             # Example: see GEOM_TestAll.py
2973             theR,Parameters = ParseParameters(theR)
2974             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2975             RaiseIfFailed("MakeDiskR", self.PrimOp)
2976             anObj.SetParameters(Parameters)
2977             self._autoPublish(anObj, theName, "disk")
2978             return anObj
2979
2980         ## Create a cylinder with given base point, axis, radius and height.
2981         #  @param thePnt Central point of cylinder base.
2982         #  @param theAxis Cylinder axis.
2983         #  @param theR Cylinder radius.
2984         #  @param theH Cylinder height.
2985         #  @param theName Object name; when specified, this parameter is used
2986         #         for result publication in the study. Otherwise, if automatic
2987         #         publication is switched on, default value is used for result name.
2988         #
2989         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2990         #
2991         #  @ref tui_creation_cylinder "Example"
2992         @ManageTransactions("PrimOp")
2993         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2994             """
2995             Create a cylinder with given base point, axis, radius and height.
2996
2997             Parameters:
2998                 thePnt Central point of cylinder base.
2999                 theAxis Cylinder axis.
3000                 theR Cylinder radius.
3001                 theH Cylinder height.
3002                 theName Object name; when specified, this parameter is used
3003                         for result publication in the study. Otherwise, if automatic
3004                         publication is switched on, default value is used for result name.
3005
3006             Returns:
3007                 New GEOM.GEOM_Object, containing the created cylinder.
3008             """
3009             # Example: see GEOM_TestAll.py
3010             theR,theH,Parameters = ParseParameters(theR, theH)
3011             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3012             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3013             anObj.SetParameters(Parameters)
3014             self._autoPublish(anObj, theName, "cylinder")
3015             return anObj
3016             
3017         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3018         #  @param thePnt Central point of cylinder base.
3019         #  @param theAxis Cylinder axis.
3020         #  @param theR Cylinder radius.
3021         #  @param theH Cylinder height.
3022         #  @param theA Cylinder angle in radians.
3023         #  @param theName Object name; when specified, this parameter is used
3024         #         for result publication in the study. Otherwise, if automatic
3025         #         publication is switched on, default value is used for result name.
3026         #
3027         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3028         #
3029         #  @ref tui_creation_cylinder "Example"
3030         @ManageTransactions("PrimOp")
3031         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3032             """
3033             Create a portion of cylinder with given base point, axis, radius, height and angle.
3034
3035             Parameters:
3036                 thePnt Central point of cylinder base.
3037                 theAxis Cylinder axis.
3038                 theR Cylinder radius.
3039                 theH Cylinder height.
3040                 theA Cylinder angle in radians.
3041                 theName Object name; when specified, this parameter is used
3042                         for result publication in the study. Otherwise, if automatic
3043                         publication is switched on, default value is used for result name.
3044
3045             Returns:
3046                 New GEOM.GEOM_Object, containing the created cylinder.
3047             """
3048             # Example: see GEOM_TestAll.py
3049             flag = False
3050             if isinstance(theA,str):
3051                 flag = True
3052             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3053             if flag:
3054                 theA = theA*math.pi/180.
3055             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3056             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3057             anObj.SetParameters(Parameters)
3058             self._autoPublish(anObj, theName, "cylinder")
3059             return anObj
3060
3061         ## Create a cylinder with given radius and height at
3062         #  the origin of coordinate system. Axis of the cylinder
3063         #  will be collinear to the OZ axis of the coordinate system.
3064         #  @param theR Cylinder radius.
3065         #  @param theH Cylinder height.
3066         #  @param theName Object name; when specified, this parameter is used
3067         #         for result publication in the study. Otherwise, if automatic
3068         #         publication is switched on, default value is used for result name.
3069         #
3070         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3071         #
3072         #  @ref tui_creation_cylinder "Example"
3073         @ManageTransactions("PrimOp")
3074         def MakeCylinderRH(self, theR, theH, theName=None):
3075             """
3076             Create a cylinder with given radius and height at
3077             the origin of coordinate system. Axis of the cylinder
3078             will be collinear to the OZ axis of the coordinate system.
3079
3080             Parameters:
3081                 theR Cylinder radius.
3082                 theH Cylinder height.
3083                 theName Object name; when specified, this parameter is used
3084                         for result publication in the study. Otherwise, if automatic
3085                         publication is switched on, default value is used for result name.
3086
3087             Returns:
3088                 New GEOM.GEOM_Object, containing the created cylinder.
3089             """
3090             # Example: see GEOM_TestAll.py
3091             theR,theH,Parameters = ParseParameters(theR, theH)
3092             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3093             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3094             anObj.SetParameters(Parameters)
3095             self._autoPublish(anObj, theName, "cylinder")
3096             return anObj
3097             
3098         ## Create a portion of cylinder with given radius, height and angle at
3099         #  the origin of coordinate system. Axis of the cylinder
3100         #  will be collinear to the OZ axis of the coordinate system.
3101         #  @param theR Cylinder radius.
3102         #  @param theH Cylinder height.
3103         #  @param theA Cylinder angle in radians.
3104         #  @param theName Object name; when specified, this parameter is used
3105         #         for result publication in the study. Otherwise, if automatic
3106         #         publication is switched on, default value is used for result name.
3107         #
3108         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3109         #
3110         #  @ref tui_creation_cylinder "Example"
3111         @ManageTransactions("PrimOp")
3112         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3113             """
3114             Create a portion of cylinder with given radius, height and angle at
3115             the origin of coordinate system. Axis of the cylinder
3116             will be collinear to the OZ axis of the coordinate system.
3117
3118             Parameters:
3119                 theR Cylinder radius.
3120                 theH Cylinder height.
3121                 theA Cylinder angle in radians.
3122                 theName Object name; when specified, this parameter is used
3123                         for result publication in the study. Otherwise, if automatic
3124                         publication is switched on, default value is used for result name.
3125
3126             Returns:
3127                 New GEOM.GEOM_Object, containing the created cylinder.
3128             """
3129             # Example: see GEOM_TestAll.py
3130             flag = False
3131             if isinstance(theA,str):
3132                 flag = True
3133             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3134             if flag:
3135                 theA = theA*math.pi/180.
3136             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3137             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3138             anObj.SetParameters(Parameters)
3139             self._autoPublish(anObj, theName, "cylinder")
3140             return anObj
3141
3142         ## Create a sphere with given center and radius.
3143         #  @param thePnt Sphere center.
3144         #  @param theR Sphere radius.
3145         #  @param theName Object name; when specified, this parameter is used
3146         #         for result publication in the study. Otherwise, if automatic
3147         #         publication is switched on, default value is used for result name.
3148         #
3149         #  @return New GEOM.GEOM_Object, containing the created sphere.
3150         #
3151         #  @ref tui_creation_sphere "Example"
3152         @ManageTransactions("PrimOp")
3153         def MakeSpherePntR(self, thePnt, theR, theName=None):
3154             """
3155             Create a sphere with given center and radius.
3156
3157             Parameters:
3158                 thePnt Sphere center.
3159                 theR Sphere radius.
3160                 theName Object name; when specified, this parameter is used
3161                         for result publication in the study. Otherwise, if automatic
3162                         publication is switched on, default value is used for result name.
3163
3164             Returns:
3165                 New GEOM.GEOM_Object, containing the created sphere.
3166             """
3167             # Example: see GEOM_TestAll.py
3168             theR,Parameters = ParseParameters(theR)
3169             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3170             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3171             anObj.SetParameters(Parameters)
3172             self._autoPublish(anObj, theName, "sphere")
3173             return anObj
3174
3175         ## Create a sphere with given center and radius.
3176         #  @param x,y,z Coordinates of sphere center.
3177         #  @param theR Sphere radius.
3178         #  @param theName Object name; when specified, this parameter is used
3179         #         for result publication in the study. Otherwise, if automatic
3180         #         publication is switched on, default value is used for result name.
3181         #
3182         #  @return New GEOM.GEOM_Object, containing the created sphere.
3183         #
3184         #  @ref tui_creation_sphere "Example"
3185         def MakeSphere(self, x, y, z, theR, theName=None):
3186             """
3187             Create a sphere with given center and radius.
3188
3189             Parameters:
3190                 x,y,z Coordinates of sphere center.
3191                 theR Sphere radius.
3192                 theName Object name; when specified, this parameter is used
3193                         for result publication in the study. Otherwise, if automatic
3194                         publication is switched on, default value is used for result name.
3195
3196             Returns:
3197                 New GEOM.GEOM_Object, containing the created sphere.
3198             """
3199             # Example: see GEOM_TestAll.py
3200             point = self.MakeVertex(x, y, z)
3201             # note: auto-publishing is done in self.MakeSpherePntR()
3202             anObj = self.MakeSpherePntR(point, theR, theName)
3203             return anObj
3204
3205         ## Create a sphere with given radius at the origin of coordinate system.
3206         #  @param theR Sphere radius.
3207         #  @param theName Object name; when specified, this parameter is used
3208         #         for result publication in the study. Otherwise, if automatic
3209         #         publication is switched on, default value is used for result name.
3210         #
3211         #  @return New GEOM.GEOM_Object, containing the created sphere.
3212         #
3213         #  @ref tui_creation_sphere "Example"
3214         @ManageTransactions("PrimOp")
3215         def MakeSphereR(self, theR, theName=None):
3216             """
3217             Create a sphere with given radius at the origin of coordinate system.
3218
3219             Parameters:
3220                 theR Sphere radius.
3221                 theName Object name; when specified, this parameter is used
3222                         for result publication in the study. Otherwise, if automatic
3223                         publication is switched on, default value is used for result name.
3224
3225             Returns:
3226                 New GEOM.GEOM_Object, containing the created sphere.
3227             """
3228             # Example: see GEOM_TestAll.py
3229             theR,Parameters = ParseParameters(theR)
3230             anObj = self.PrimOp.MakeSphereR(theR)
3231             RaiseIfFailed("MakeSphereR", self.PrimOp)
3232             anObj.SetParameters(Parameters)
3233             self._autoPublish(anObj, theName, "sphere")
3234             return anObj
3235
3236         ## Create a cone with given base point, axis, height and radiuses.
3237         #  @param thePnt Central point of the first cone base.
3238         #  @param theAxis Cone axis.
3239         #  @param theR1 Radius of the first cone base.
3240         #  @param theR2 Radius of the second cone base.
3241         #    \note If both radiuses are non-zero, the cone will be truncated.
3242         #    \note If the radiuses are equal, a cylinder will be created instead.
3243         #  @param theH Cone height.
3244         #  @param theName Object name; when specified, this parameter is used
3245         #         for result publication in the study. Otherwise, if automatic
3246         #         publication is switched on, default value is used for result name.
3247         #
3248         #  @return New GEOM.GEOM_Object, containing the created cone.
3249         #
3250         #  @ref tui_creation_cone "Example"
3251         @ManageTransactions("PrimOp")
3252         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3253             """
3254             Create a cone with given base point, axis, height and radiuses.
3255
3256             Parameters:
3257                 thePnt Central point of the first cone base.
3258                 theAxis Cone axis.
3259                 theR1 Radius of the first cone base.
3260                 theR2 Radius of the second cone base.
3261                 theH Cone height.
3262                 theName Object name; when specified, this parameter is used
3263                         for result publication in the study. Otherwise, if automatic
3264                         publication is switched on, default value is used for result name.
3265
3266             Note:
3267                 If both radiuses are non-zero, the cone will be truncated.
3268                 If the radiuses are equal, a cylinder will be created instead.
3269
3270             Returns:
3271                 New GEOM.GEOM_Object, containing the created cone.
3272             """
3273             # Example: see GEOM_TestAll.py
3274             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3275             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3276             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3277             anObj.SetParameters(Parameters)
3278             self._autoPublish(anObj, theName, "cone")
3279             return anObj
3280
3281         ## Create a cone with given height and radiuses at
3282         #  the origin of coordinate system. Axis of the cone will
3283         #  be collinear to the OZ axis of the coordinate system.
3284         #  @param theR1 Radius of the first cone base.
3285         #  @param theR2 Radius of the second cone base.
3286         #    \note If both radiuses are non-zero, the cone will be truncated.
3287         #    \note If the radiuses are equal, a cylinder will be created instead.
3288         #  @param theH Cone height.
3289         #  @param theName Object name; when specified, this parameter is used
3290         #         for result publication in the study. Otherwise, if automatic
3291         #         publication is switched on, default value is used for result name.
3292         #
3293         #  @return New GEOM.GEOM_Object, containing the created cone.
3294         #
3295         #  @ref tui_creation_cone "Example"
3296         @ManageTransactions("PrimOp")
3297         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3298             """
3299             Create a cone with given height and radiuses at
3300             the origin of coordinate system. Axis of the cone will
3301             be collinear to the OZ axis of the coordinate system.
3302
3303             Parameters:
3304                 theR1 Radius of the first cone base.
3305                 theR2 Radius of the second cone base.
3306                 theH Cone height.
3307                 theName Object name; when specified, this parameter is used
3308                         for result publication in the study. Otherwise, if automatic
3309                         publication is switched on, default value is used for result name.
3310
3311             Note:
3312                 If both radiuses are non-zero, the cone will be truncated.
3313                 If the radiuses are equal, a cylinder will be created instead.
3314
3315             Returns:
3316                 New GEOM.GEOM_Object, containing the created cone.
3317             """
3318             # Example: see GEOM_TestAll.py
3319             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3320             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3321             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3322             anObj.SetParameters(Parameters)
3323             self._autoPublish(anObj, theName, "cone")
3324             return anObj
3325
3326         ## Create a torus with given center, normal vector and radiuses.
3327         #  @param thePnt Torus central point.
3328         #  @param theVec Torus axis of symmetry.
3329         #  @param theRMajor Torus major radius.
3330         #  @param theRMinor Torus minor radius.
3331         #  @param theName Object name; when specified, this parameter is used
3332         #         for result publication in the study. Otherwise, if automatic
3333         #         publication is switched on, default value is used for result name.
3334         #
3335         #  @return New GEOM.GEOM_Object, containing the created torus.
3336         #
3337         #  @ref tui_creation_torus "Example"
3338         @ManageTransactions("PrimOp")
3339         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3340             """
3341             Create a torus with given center, normal vector and radiuses.
3342
3343             Parameters:
3344                 thePnt Torus central point.
3345                 theVec Torus axis of symmetry.
3346                 theRMajor Torus major radius.
3347                 theRMinor Torus minor radius.
3348                 theName Object name; when specified, this parameter is used
3349                         for result publication in the study. Otherwise, if automatic
3350                         publication is switched on, default value is used for result name.
3351
3352            Returns:
3353                 New GEOM.GEOM_Object, containing the created torus.
3354             """
3355             # Example: see GEOM_TestAll.py
3356             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3357             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3358             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3359             anObj.SetParameters(Parameters)
3360             self._autoPublish(anObj, theName, "torus")
3361             return anObj
3362
3363         ## Create a torus with given radiuses at the origin of coordinate system.
3364         #  @param theRMajor Torus major radius.
3365         #  @param theRMinor Torus minor radius.
3366         #  @param theName Object name; when specified, this parameter is used
3367         #         for result publication in the study. Otherwise, if automatic
3368         #         publication is switched on, default value is used for result name.
3369         #
3370         #  @return New GEOM.GEOM_Object, containing the created torus.
3371         #
3372         #  @ref tui_creation_torus "Example"
3373         @ManageTransactions("PrimOp")
3374         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3375             """
3376            Create a torus with given radiuses at the origin of coordinate system.
3377
3378            Parameters:
3379                 theRMajor Torus major radius.
3380                 theRMinor Torus minor radius.
3381                 theName Object name; when specified, this parameter is used
3382                         for result publication in the study. Otherwise, if automatic
3383                         publication is switched on, default value is used for result name.
3384
3385            Returns:
3386                 New GEOM.GEOM_Object, containing the created torus.
3387             """
3388             # Example: see GEOM_TestAll.py
3389             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3390             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3391             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3392             anObj.SetParameters(Parameters)
3393             self._autoPublish(anObj, theName, "torus")
3394             return anObj
3395
3396         # end of l3_3d_primitives
3397         ## @}
3398
3399         ## @addtogroup l3_complex
3400         ## @{
3401
3402         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3403         #  @param theBase Base shape to be extruded.
3404         #  @param thePoint1 First end of extrusion vector.
3405         #  @param thePoint2 Second end of extrusion vector.
3406         #  @param theScaleFactor Use it to make prism with scaled second base.
3407         #                        Nagative value means not scaled second base.
3408         #  @param theName Object name; when specified, this parameter is used
3409         #         for result publication in the study. Otherwise, if automatic
3410         #         publication is switched on, default value is used for result name.
3411         #
3412         #  @return New GEOM.GEOM_Object, containing the created prism.
3413         #
3414         #  @ref tui_creation_prism "Example"
3415         @ManageTransactions("PrimOp")
3416         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3417             """
3418             Create a shape by extrusion of the base shape along a vector, defined by two points.
3419
3420             Parameters:
3421                 theBase Base shape to be extruded.
3422                 thePoint1 First end of extrusion vector.
3423                 thePoint2 Second end of extrusion vector.
3424                 theScaleFactor Use it to make prism with scaled second base.
3425                                Nagative value means not scaled second base.
3426                 theName Object name; when specified, this parameter is used
3427                         for result publication in the study. Otherwise, if automatic
3428                         publication is switched on, default value is used for result name.
3429
3430             Returns:
3431                 New GEOM.GEOM_Object, containing the created prism.
3432             """
3433             # Example: see GEOM_TestAll.py
3434             anObj = None
3435             Parameters = ""
3436             if theScaleFactor > 0:
3437                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3438                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3439             else:
3440                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3441             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3442             anObj.SetParameters(Parameters)
3443             self._autoPublish(anObj, theName, "prism")
3444             return anObj
3445
3446         ## Create a shape by extrusion of the base shape along a
3447         #  vector, defined by two points, in 2 Ways (forward/backward).
3448         #  @param theBase Base shape to be extruded.
3449         #  @param thePoint1 First end of extrusion vector.
3450         #  @param thePoint2 Second end of extrusion vector.
3451         #  @param theName Object name; when specified, this parameter is used
3452         #         for result publication in the study. Otherwise, if automatic
3453         #         publication is switched on, default value is used for result name.
3454         #
3455         #  @return New GEOM.GEOM_Object, containing the created prism.
3456         #
3457         #  @ref tui_creation_prism "Example"
3458         @ManageTransactions("PrimOp")
3459         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3460             """
3461             Create a shape by extrusion of the base shape along a
3462             vector, defined by two points, in 2 Ways (forward/backward).
3463
3464             Parameters:
3465                 theBase Base shape to be extruded.
3466                 thePoint1 First end of extrusion vector.
3467                 thePoint2 Second end of extrusion vector.
3468                 theName Object name; when specified, this parameter is used
3469                         for result publication in the study. Otherwise, if automatic
3470                         publication is switched on, default value is used for result name.
3471
3472             Returns:
3473                 New GEOM.GEOM_Object, containing the created prism.
3474             """
3475             # Example: see GEOM_TestAll.py
3476             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3477             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3478             self._autoPublish(anObj, theName, "prism")
3479             return anObj
3480
3481         ## Create a shape by extrusion of the base shape along the vector,
3482         #  i.e. all the space, transfixed by the base shape during its translation
3483         #  along the vector on the given distance.
3484         #  @param theBase Base shape to be extruded.
3485         #  @param theVec Direction of extrusion.
3486         #  @param theH Prism dimension along theVec.
3487         #  @param theScaleFactor Use it to make prism with scaled second base.
3488         #                        Negative value means not scaled second base.
3489         #  @param theName Object name; when specified, this parameter is used
3490         #         for result publication in the study. Otherwise, if automatic
3491         #         publication is switched on, default value is used for result name.
3492         #
3493         #  @return New GEOM.GEOM_Object, containing the created prism.
3494         #
3495         #  @ref tui_creation_prism "Example"
3496         @ManageTransactions("PrimOp")
3497         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3498             """
3499             Create a shape by extrusion of the base shape along the vector,
3500             i.e. all the space, transfixed by the base shape during its translation
3501             along the vector on the given distance.
3502
3503             Parameters:
3504                 theBase Base shape to be extruded.
3505                 theVec Direction of extrusion.
3506                 theH Prism dimension along theVec.
3507                 theScaleFactor Use it to make prism with scaled second base.
3508                                Negative value means not scaled second base.
3509                 theName Object name; when specified, this parameter is used
3510                         for result publication in the study. Otherwise, if automatic
3511                         publication is switched on, default value is used for result name.
3512
3513             Returns:
3514                 New GEOM.GEOM_Object, containing the created prism.
3515             """
3516             # Example: see GEOM_TestAll.py
3517             anObj = None
3518             Parameters = ""
3519             if theScaleFactor > 0:
3520                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3521                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3522             else:
3523                 theH,Parameters = ParseParameters(theH)
3524                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3525             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3526             anObj.SetParameters(Parameters)
3527             self._autoPublish(anObj, theName, "prism")
3528             return anObj
3529
3530         ## Create a shape by extrusion of the base shape along the vector,
3531         #  i.e. all the space, transfixed by the base shape during its translation
3532         #  along the vector on the given distance in 2 Ways (forward/backward).
3533         #  @param theBase Base shape to be extruded.
3534         #  @param theVec Direction of extrusion.
3535         #  @param theH Prism dimension along theVec in forward direction.
3536         #  @param theName Object name; when specified, this parameter is used
3537         #         for result publication in the study. Otherwise, if automatic
3538         #         publication is switched on, default value is used for result name.
3539         #
3540         #  @return New GEOM.GEOM_Object, containing the created prism.
3541         #
3542         #  @ref tui_creation_prism "Example"
3543         @ManageTransactions("PrimOp")
3544         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3545             """
3546             Create a shape by extrusion of the base shape along the vector,
3547             i.e. all the space, transfixed by the base shape during its translation
3548             along the vector on the given distance in 2 Ways (forward/backward).
3549
3550             Parameters:
3551                 theBase Base shape to be extruded.
3552                 theVec Direction of extrusion.
3553                 theH Prism dimension along theVec in forward direction.
3554                 theName Object name; when specified, this parameter is used
3555                         for result publication in the study. Otherwise, if automatic
3556                         publication is switched on, default value is used for result name.
3557
3558             Returns:
3559                 New GEOM.GEOM_Object, containing the created prism.
3560             """
3561             # Example: see GEOM_TestAll.py
3562             theH,Parameters = ParseParameters(theH)
3563             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3564             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3565             anObj.SetParameters(Parameters)
3566             self._autoPublish(anObj, theName, "prism")
3567             return anObj
3568
3569         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3570         #  @param theBase Base shape to be extruded.
3571         #  @param theDX, theDY, theDZ Directions of extrusion.
3572         #  @param theScaleFactor Use it to make prism with scaled second base.
3573         #                        Nagative value means not scaled second base.
3574         #  @param theName Object name; when specified, this parameter is used
3575         #         for result publication in the study. Otherwise, if automatic
3576         #         publication is switched on, default value is used for result name.
3577         #
3578         #  @return New GEOM.GEOM_Object, containing the created prism.
3579         #
3580         #  @ref tui_creation_prism "Example"
3581         @ManageTransactions("PrimOp")
3582         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3583             """
3584             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3585
3586             Parameters:
3587                 theBase Base shape to be extruded.
3588                 theDX, theDY, theDZ Directions of extrusion.
3589                 theScaleFactor Use it to make prism with scaled second base.
3590                                Nagative value means not scaled second base.
3591                 theName Object name; when specified, this parameter is used
3592                         for result publication in the study. Otherwise, if automatic
3593                         publication is switched on, default value is used for result name.
3594
3595             Returns:
3596                 New GEOM.GEOM_Object, containing the created prism.
3597             """
3598             # Example: see GEOM_TestAll.py
3599             anObj = None
3600             Parameters = ""
3601             if theScaleFactor > 0:
3602                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3603                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3604             else:
3605                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3606                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3607             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3608             anObj.SetParameters(Parameters)
3609             self._autoPublish(anObj, theName, "prism")
3610             return anObj
3611
3612         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3613         #  i.e. all the space, transfixed by the base shape during its translation
3614         #  along the vector on the given distance in 2 Ways (forward/backward).
3615         #  @param theBase Base shape to be extruded.
3616         #  @param theDX, theDY, theDZ Directions of extrusion.
3617         #  @param theName Object name; when specified, this parameter is used
3618         #         for result publication in the study. Otherwise, if automatic
3619         #         publication is switched on, default value is used for result name.
3620         #
3621         #  @return New GEOM.GEOM_Object, containing the created prism.
3622         #
3623         #  @ref tui_creation_prism "Example"
3624         @ManageTransactions("PrimOp")
3625         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3626             """
3627             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3628             i.e. all the space, transfixed by the base shape during its translation
3629             along the vector on the given distance in 2 Ways (forward/backward).
3630
3631             Parameters:
3632                 theBase Base shape to be extruded.
3633                 theDX, theDY, theDZ Directions of extrusion.
3634                 theName Object name; when specified, this parameter is used
3635                         for result publication in the study. Otherwise, if automatic
3636                         publication is switched on, default value is used for result name.
3637
3638             Returns:
3639                 New GEOM.GEOM_Object, containing the created prism.
3640             """
3641             # Example: see GEOM_TestAll.py
3642             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3643             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3644             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3645             anObj.SetParameters(Parameters)
3646             self._autoPublish(anObj, theName, "prism")
3647             return anObj
3648
3649         ## Create a shape by revolution of the base shape around the axis
3650         #  on the given angle, i.e. all the space, transfixed by the base
3651         #  shape during its rotation around the axis on the given angle.
3652         #  @param theBase Base shape to be rotated.
3653         #  @param theAxis Rotation axis.
3654         #  @param theAngle Rotation angle in radians.
3655         #  @param theName Object name; when specified, this parameter is used
3656         #         for result publication in the study. Otherwise, if automatic
3657         #         publication is switched on, default value is used for result name.
3658         #
3659         #  @return New GEOM.GEOM_Object, containing the created revolution.
3660         #
3661         #  @ref tui_creation_revolution "Example"
3662         @ManageTransactions("PrimOp")
3663         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3664             """
3665             Create a shape by revolution of the base shape around the axis
3666             on the given angle, i.e. all the space, transfixed by the base
3667             shape during its rotation around the axis on the given angle.
3668
3669             Parameters:
3670                 theBase Base shape to be rotated.
3671                 theAxis Rotation axis.
3672                 theAngle Rotation angle in radians.
3673                 theName Object name; when specified, this parameter is used
3674                         for result publication in the study. Otherwise, if automatic
3675                         publication is switched on, default value is used for result name.
3676
3677             Returns:
3678                 New GEOM.GEOM_Object, containing the created revolution.
3679             """
3680             # Example: see GEOM_TestAll.py
3681             theAngle,Parameters = ParseParameters(theAngle)
3682             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3683             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3684             anObj.SetParameters(Parameters)
3685             self._autoPublish(anObj, theName, "revolution")
3686             return anObj
3687
3688         ## Create a shape by revolution of the base shape around the axis
3689         #  on the given angle, i.e. all the space, transfixed by the base
3690         #  shape during its rotation around the axis on the given angle in
3691         #  both directions (forward/backward)
3692         #  @param theBase Base shape to be rotated.
3693         #  @param theAxis Rotation axis.
3694         #  @param theAngle Rotation angle in radians.
3695         #  @param theName Object name; when specified, this parameter is used
3696         #         for result publication in the study. Otherwise, if automatic
3697         #         publication is switched on, default value is used for result name.
3698         #
3699         #  @return New GEOM.GEOM_Object, containing the created revolution.
3700         #
3701         #  @ref tui_creation_revolution "Example"
3702         @ManageTransactions("PrimOp")
3703         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3704             """
3705             Create a shape by revolution of the base shape around the axis
3706             on the given angle, i.e. all the space, transfixed by the base
3707             shape during its rotation around the axis on the given angle in
3708             both directions (forward/backward).
3709
3710             Parameters:
3711                 theBase Base shape to be rotated.
3712                 theAxis Rotation axis.
3713                 theAngle Rotation angle in radians.
3714                 theName Object name; when specified, this parameter is used
3715                         for result publication in the study. Otherwise, if automatic
3716                         publication is switched on, default value is used for result name.
3717
3718             Returns:
3719                 New GEOM.GEOM_Object, containing the created revolution.
3720             """
3721             theAngle,Parameters = ParseParameters(theAngle)
3722             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3723             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3724             anObj.SetParameters(Parameters)
3725             self._autoPublish(anObj, theName, "revolution")
3726             return anObj
3727
3728         ## Create a filling from the given compound of contours.
3729         #  @param theShape the compound of contours
3730         #  @param theMinDeg a minimal degree of BSpline surface to create
3731         #  @param theMaxDeg a maximal degree of BSpline surface to create
3732         #  @param theTol2D a 2d tolerance to be reached
3733         #  @param theTol3D a 3d tolerance to be reached
3734         #  @param theNbIter a number of iteration of approximation algorithm
3735         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3736         #  @param isApprox if True, BSpline curves are generated in the process
3737         #                  of surface construction. By default it is False, that means
3738         #                  the surface is created using given curves. The usage of
3739         #                  Approximation makes the algorithm work slower, but allows
3740         #                  building the surface for rather complex cases.
3741         #  @param theName Object name; when specified, this parameter is used
3742         #         for result publication in the study. Otherwise, if automatic
3743         #         publication is switched on, default value is used for result name.
3744         #
3745         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3746         #
3747         #  @ref tui_creation_filling "Example"
3748         @ManageTransactions("PrimOp")
3749         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3750                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3751             """
3752             Create a filling from the given compound of contours.
3753
3754             Parameters:
3755                 theShape the compound of contours
3756                 theMinDeg a minimal degree of BSpline surface to create
3757                 theMaxDeg a maximal degree of BSpline surface to create
3758                 theTol2D a 2d tolerance to be reached
3759                 theTol3D a 3d tolerance to be reached
3760                 theNbIter a number of iteration of approximation algorithm
3761                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3762                 isApprox if True, BSpline curves are generated in the process
3763                          of surface construction. By default it is False, that means
3764                          the surface is created using given curves. The usage of
3765                          Approximation makes the algorithm work slower, but allows
3766                          building the surface for rather complex cases
3767                 theName Object name; when specified, this parameter is used
3768                         for result publication in the study. Otherwise, if automatic
3769                         publication is switched on, default value is used for result name.
3770
3771             Returns:
3772                 New GEOM.GEOM_Object, containing the created filling surface.
3773
3774             Example of usage:
3775                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3776             """
3777             # Example: see GEOM_TestAll.py
3778             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3779             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3780                                             theTol2D, theTol3D, theNbIter,
3781                                             theMethod, isApprox)
3782             RaiseIfFailed("MakeFilling", self.PrimOp)
3783             anObj.SetParameters(Parameters)
3784             self._autoPublish(anObj, theName, "filling")
3785             return anObj
3786
3787
3788         ## Create a filling from the given compound of contours.
3789         #  This method corresponds to MakeFilling with isApprox=True
3790         #  @param theShape the compound of contours
3791         #  @param theMinDeg a minimal degree of BSpline surface to create
3792         #  @param theMaxDeg a maximal degree of BSpline surface to create
3793         #  @param theTol3D a 3d tolerance to be reached
3794         #  @param theName Object name; when specified, this parameter is used
3795         #         for result publication in the study. Otherwise, if automatic
3796         #         publication is switched on, default value is used for result name.
3797         #
3798         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3799         #
3800         #  @ref tui_creation_filling "Example"
3801         @ManageTransactions("PrimOp")
3802         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3803             """
3804             Create a filling from the given compound of contours.
3805             This method corresponds to MakeFilling with isApprox=True
3806
3807             Parameters:
3808                 theShape the compound of contours
3809                 theMinDeg a minimal degree of BSpline surface to create
3810                 theMaxDeg a maximal degree of BSpline surface to create
3811                 theTol3D a 3d tolerance to be reached
3812                 theName Object name; when specified, this parameter is used
3813                         for result publication in the study. Otherwise, if automatic
3814                         publication is switched on, default value is used for result name.
3815
3816             Returns:
3817                 New GEOM.GEOM_Object, containing the created filling surface.
3818
3819             Example of usage:
3820                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3821             """
3822             # Example: see GEOM_TestAll.py
3823             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3824             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3825                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3826             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3827             anObj.SetParameters(Parameters)
3828             self._autoPublish(anObj, theName, "filling")
3829             return anObj
3830
3831         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3832         #  @param theSeqSections - set of specified sections.
3833         #  @param theModeSolid - mode defining building solid or shell
3834         #  @param thePreci - precision 3D used for smoothing
3835         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3836         #  @param theName Object name; when specified, this parameter is used
3837         #         for result publication in the study. Otherwise, if automatic
3838         #         publication is switched on, default value is used for result name.
3839         #
3840         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3841         #
3842         #  @ref swig_todo "Example"
3843         @ManageTransactions("PrimOp")
3844         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3845             """
3846             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3847
3848             Parameters:
3849                 theSeqSections - set of specified sections.
3850                 theModeSolid - mode defining building solid or shell
3851                 thePreci - precision 3D used for smoothing
3852                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3853                 theName Object name; when specified, this parameter is used
3854                         for result publication in the study. Otherwise, if automatic
3855                         publication is switched on, default value is used for result name.
3856
3857             Returns:
3858                 New GEOM.GEOM_Object, containing the created shell or solid.
3859             """
3860             # Example: see GEOM_TestAll.py
3861             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3862             RaiseIfFailed("MakeThruSections", self.PrimOp)
3863             self._autoPublish(anObj, theName, "filling")
3864             return anObj
3865
3866         ## Create a shape by extrusion of the base shape along
3867         #  the path shape. The path shape can be a wire or an edge.
3868         #  @param theBase Base shape to be extruded.
3869         #  @param thePath Path shape to extrude the base shape along it.
3870         #  @param theName Object name; when specified, this parameter is used
3871         #         for result publication in the study. Otherwise, if automatic
3872         #         publication is switched on, default value is used for result name.
3873         #
3874         #  @return New GEOM.GEOM_Object, containing the created pipe.
3875         #
3876         #  @ref tui_creation_pipe "Example"
3877         @ManageTransactions("PrimOp")
3878         def MakePipe(self, theBase, thePath, theName=None):
3879             """
3880             Create a shape by extrusion of the base shape along
3881             the path shape. The path shape can be a wire or an edge.
3882
3883             Parameters:
3884                 theBase Base shape to be extruded.
3885                 thePath Path shape to extrude the base shape along it.
3886                 theName Object name; when specified, this parameter is used
3887                         for result publication in the study. Otherwise, if automatic
3888                         publication is switched on, default value is used for result name.
3889
3890             Returns:
3891                 New GEOM.GEOM_Object, containing the created pipe.
3892             """
3893             # Example: see GEOM_TestAll.py
3894             anObj = self.PrimOp.MakePipe(theBase, thePath)
3895             RaiseIfFailed("MakePipe", self.PrimOp)
3896             self._autoPublish(anObj, theName, "pipe")
3897             return anObj
3898
3899         ## Create a shape by extrusion of the profile shape along
3900         #  the path shape. The path shape can be a wire or an edge.
3901         #  the several profiles can be specified in the several locations of path.
3902         #  @param theSeqBases - list of  Bases shape to be extruded.
3903         #  @param theLocations - list of locations on the path corresponding
3904         #                        specified list of the Bases shapes. Number of locations
3905         #                        should be equal to number of bases or list of locations can be empty.
3906         #  @param thePath - Path shape to extrude the base shape along it.
3907         #  @param theWithContact - the mode defining that the section is translated to be in
3908         #                          contact with the spine.
3909         #  @param theWithCorrection - defining that the section is rotated to be
3910         #                             orthogonal to the spine tangent in the correspondent point
3911         #  @param theName Object name; when specified, this parameter is used
3912         #         for result publication in the study. Otherwise, if automatic
3913         #         publication is switched on, default value is used for result name.
3914         #
3915         #  @return New GEOM.GEOM_Object, containing the created pipe.
3916         #
3917         #  @ref tui_creation_pipe_with_diff_sec "Example"
3918         @ManageTransactions("PrimOp")
3919         def MakePipeWithDifferentSections(self, theSeqBases,
3920                                           theLocations, thePath,
3921                                           theWithContact, theWithCorrection, theName=None):
3922             """
3923             Create a shape by extrusion of the profile shape along
3924             the path shape. The path shape can be a wire or an edge.
3925             the several profiles can be specified in the several locations of path.
3926
3927             Parameters:
3928                 theSeqBases - list of  Bases shape to be extruded.
3929                 theLocations - list of locations on the path corresponding
3930                                specified list of the Bases shapes. Number of locations
3931                                should be equal to number of bases or list of locations can be empty.
3932                 thePath - Path shape to extrude the base shape along it.
3933                 theWithContact - the mode defining that the section is translated to be in
3934                                  contact with the spine(0/1)
3935                 theWithCorrection - defining that the section is rotated to be
3936                                     orthogonal to the spine tangent in the correspondent point (0/1)
3937                 theName Object name; when specified, this parameter is used
3938                         for result publication in the study. Otherwise, if automatic
3939                         publication is switched on, default value is used for result name.
3940
3941             Returns:
3942                 New GEOM.GEOM_Object, containing the created pipe.
3943             """
3944             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3945                                                               theLocations, thePath,
3946                                                               theWithContact, theWithCorrection)
3947             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3948             self._autoPublish(anObj, theName, "pipe")
3949             return anObj
3950
3951         ## Create a shape by extrusion of the profile shape along
3952         #  the path shape. The path shape can be a wire or a edge.
3953         #  the several profiles can be specified in the several locations of path.
3954         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3955         #                       shell or face. If number of faces in neighbour sections
3956         #                       aren't coincided result solid between such sections will
3957         #                       be created using external boundaries of this shells.
3958         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3959         #                          This list is used for searching correspondences between
3960         #                          faces in the sections. Size of this list must be equal
3961         #                          to size of list of base shapes.
3962         #  @param theLocations - list of locations on the path corresponding
3963         #                        specified list of the Bases shapes. Number of locations
3964         #                        should be equal to number of bases. First and last
3965         #                        locations must be coincided with first and last vertexes
3966         #                        of path correspondingly.
3967         #  @param thePath - Path shape to extrude the base shape along it.
3968         #  @param theWithContact - the mode defining that the section is translated to be in
3969         #                          contact with the spine.
3970         #  @param theWithCorrection - defining that the section is rotated to be
3971         #                             orthogonal to the spine tangent in the correspondent point
3972         #  @param theName Object name; when specified, this parameter is used
3973         #         for result publication in the study. Otherwise, if automatic
3974         #         publication is switched on, default value is used for result name.
3975         #
3976         #  @return New GEOM.GEOM_Object, containing the created solids.
3977         #
3978         #  @ref tui_creation_pipe_with_shell_sec "Example"
3979         @ManageTransactions("PrimOp")
3980         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3981                                       theLocations, thePath,
3982                                       theWithContact, theWithCorrection, theName=None):
3983             """
3984             Create a shape by extrusion of the profile shape along
3985             the path shape. The path shape can be a wire or a edge.
3986             the several profiles can be specified in the several locations of path.
3987
3988             Parameters:
3989                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3990                               shell or face. If number of faces in neighbour sections
3991                               aren't coincided result solid between such sections will
3992                               be created using external boundaries of this shells.
3993                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3994                                  This list is used for searching correspondences between
3995                                  faces in the sections. Size of this list must be equal
3996                                  to size of list of base shapes.
3997                 theLocations - list of locations on the path corresponding
3998                                specified list of the Bases shapes. Number of locations
3999                                should be equal to number of bases. First and last
4000                                locations must be coincided with first and last vertexes
4001                                of path correspondingly.
4002                 thePath - Path shape to extrude the base shape along it.
4003                 theWithContact - the mode defining that the section is translated to be in
4004                                  contact with the spine (0/1)
4005                 theWithCorrection - defining that the section is rotated to be
4006                                     orthogonal to the spine tangent in the correspondent point (0/1)
4007                 theName Object name; when specified, this parameter is used
4008                         for result publication in the study. Otherwise, if automatic
4009                         publication is switched on, default value is used for result name.
4010
4011             Returns:
4012                 New GEOM.GEOM_Object, containing the created solids.
4013             """
4014             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4015                                                           theLocations, thePath,
4016                                                           theWithContact, theWithCorrection)
4017             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4018             self._autoPublish(anObj, theName, "pipe")
4019             return anObj
4020
4021         ## Create a shape by extrusion of the profile shape along
4022         #  the path shape. This function is used only for debug pipe
4023         #  functionality - it is a version of function MakePipeWithShellSections()
4024         #  which give a possibility to recieve information about
4025         #  creating pipe between each pair of sections step by step.
4026         @ManageTransactions("PrimOp")
4027         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4028                                              theLocations, thePath,
4029                                              theWithContact, theWithCorrection, theName=None):
4030             """
4031             Create a shape by extrusion of the profile shape along
4032             the path shape. This function is used only for debug pipe
4033             functionality - it is a version of previous function
4034             geompy.MakePipeWithShellSections() which give a possibility to
4035             recieve information about creating pipe between each pair of
4036             sections step by step.
4037             """
4038             res = []
4039             nbsect = len(theSeqBases)
4040             nbsubsect = len(theSeqSubBases)
4041             #print "nbsect = ",nbsect
4042             for i in range(1,nbsect):
4043                 #print "  i = ",i
4044                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4045                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4046                 tmpSeqSubBases = []
4047                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4048                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4049                                                               tmpLocations, thePath,
4050                                                               theWithContact, theWithCorrection)
4051                 if self.PrimOp.IsDone() == 0:
4052                     print "Problems with pipe creation between ",i," and ",i+1," sections"
4053                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4054                     break
4055                 else:
4056                     print "Pipe between ",i," and ",i+1," sections is OK"
4057                     res.append(anObj)
4058                     pass
4059                 pass
4060
4061             resc = self.MakeCompound(res)
4062             #resc = self.MakeSewing(res, 0.001)
4063             #print "resc: ",resc
4064             self._autoPublish(resc, theName, "pipe")
4065             return resc
4066
4067         ## Create solids between given sections
4068         #  @param theSeqBases - list of sections (shell or face).
4069         #  @param theLocations - list of corresponding vertexes
4070         #  @param theName Object name; when specified, this parameter is used
4071         #         for result publication in the study. Otherwise, if automatic
4072         #         publication is switched on, default value is used for result name.
4073         #
4074         #  @return New GEOM.GEOM_Object, containing the created solids.
4075         #
4076         #  @ref tui_creation_pipe_without_path "Example"
4077         @ManageTransactions("PrimOp")
4078         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
4079             """
4080             Create solids between given sections
4081
4082             Parameters:
4083                 theSeqBases - list of sections (shell or face).
4084                 theLocations - list of corresponding vertexes
4085                 theName Object name; when specified, this parameter is used
4086                         for result publication in the study. Otherwise, if automatic
4087                         publication is switched on, default value is used for result name.
4088
4089             Returns:
4090                 New GEOM.GEOM_Object, containing the created solids.
4091             """
4092             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
4093             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4094             self._autoPublish(anObj, theName, "pipe")
4095             return anObj
4096
4097         ## Create a shape by extrusion of the base shape along
4098         #  the path shape with constant bi-normal direction along the given vector.
4099         #  The path shape can be a wire or an edge.
4100         #  @param theBase Base shape to be extruded.
4101         #  @param thePath Path shape to extrude the base shape along it.
4102         #  @param theVec Vector defines a constant binormal direction to keep the
4103         #                same angle beetween the direction and the sections
4104         #                along the sweep surface.
4105         #  @param theName Object name; when specified, this parameter is used
4106         #         for result publication in the study. Otherwise, if automatic
4107         #         publication is switched on, default value is used for result name.
4108         #
4109         #  @return New GEOM.GEOM_Object, containing the created pipe.
4110         #
4111         #  @ref tui_creation_pipe "Example"
4112         @ManageTransactions("PrimOp")
4113         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
4114             """
4115             Create a shape by extrusion of the base shape along
4116             the path shape with constant bi-normal direction along the given vector.
4117             The path shape can be a wire or an edge.
4118
4119             Parameters:
4120                 theBase Base shape to be extruded.
4121                 thePath Path shape to extrude the base shape along it.
4122                 theVec Vector defines a constant binormal direction to keep the
4123                        same angle beetween the direction and the sections
4124                        along the sweep surface.
4125                 theName Object name; when specified, this parameter is used
4126                         for result publication in the study. Otherwise, if automatic
4127                         publication is switched on, default value is used for result name.
4128
4129             Returns:
4130                 New GEOM.GEOM_Object, containing the created pipe.
4131             """
4132             # Example: see GEOM_TestAll.py
4133             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
4134             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4135             self._autoPublish(anObj, theName, "pipe")
4136             return anObj
4137
4138         ## Makes a thick solid from a face or a shell
4139         #  @param theShape Face or Shell to be thicken
4140         #  @param theThickness Thickness of the resulting solid
4141         #  @param theName Object name; when specified, this parameter is used
4142         #         for result publication in the study. Otherwise, if automatic
4143         #         publication is switched on, default value is used for result name.
4144         #
4145         #  @return New GEOM.GEOM_Object, containing the created solid
4146         #
4147         @ManageTransactions("PrimOp")
4148         def MakeThickSolid(self, theShape, theThickness, theName=None):
4149             """
4150             Make a thick solid from a face or a shell
4151
4152             Parameters:
4153                  theShape Face or Shell to be thicken
4154                  theThickness Thickness of the resulting solid
4155                  theName Object name; when specified, this parameter is used
4156                  for result publication in the study. Otherwise, if automatic
4157                  publication is switched on, default value is used for result name.
4158
4159             Returns:
4160                 New GEOM.GEOM_Object, containing the created solid
4161             """
4162             # Example: see GEOM_TestAll.py
4163             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
4164             RaiseIfFailed("MakeThickening", self.PrimOp)
4165             self._autoPublish(anObj, theName, "pipe")
4166             return anObj
4167
4168
4169         ## Modifies a face or a shell to make it a thick solid
4170         #  @param theShape Face or Shell to be thicken
4171         #  @param theThickness Thickness of the resulting solid
4172         #
4173         #  @return The modified shape
4174         #
4175         @ManageTransactions("PrimOp")
4176         def Thicken(self, theShape, theThickness):
4177             """
4178             Modifies a face or a shell to make it a thick solid
4179
4180             Parameters:
4181                 theBase Base shape to be extruded.
4182                 thePath Path shape to extrude the base shape along it.
4183                 theName Object name; when specified, this parameter is used
4184                         for result publication in the study. Otherwise, if automatic
4185                         publication is switched on, default value is used for result name.
4186
4187             Returns:
4188                 The modified shape
4189             """
4190             # Example: see GEOM_TestAll.py
4191             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
4192             RaiseIfFailed("MakeThickening", self.PrimOp)
4193             return anObj
4194
4195         ## Build a middle path of a pipe-like shape.
4196         #  The path shape can be a wire or an edge.
4197         #  @param theShape It can be closed or unclosed pipe-like shell
4198         #                  or a pipe-like solid.
4199         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4200         #                            should be wires or faces of theShape.
4201         #  @param theName Object name; when specified, this parameter is used
4202         #         for result publication in the study. Otherwise, if automatic
4203         #         publication is switched on, default value is used for result name.
4204         #
4205         #  @note It is not assumed that exact or approximate copy of theShape
4206         #        can be obtained by applying existing Pipe operation on the
4207         #        resulting "Path" wire taking theBase1 as the base - it is not
4208         #        always possible; though in some particular cases it might work
4209         #        it is not guaranteed. Thus, RestorePath function should not be
4210         #        considered as an exact reverse operation of the Pipe.
4211         #
4212         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4213         #                                source pipe's "path".
4214         #
4215         #  @ref tui_creation_pipe_path "Example"
4216         @ManageTransactions("PrimOp")
4217         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4218             """
4219             Build a middle path of a pipe-like shape.
4220             The path shape can be a wire or an edge.
4221
4222             Parameters:
4223                 theShape It can be closed or unclosed pipe-like shell
4224                          or a pipe-like solid.
4225                 theBase1, theBase2 Two bases of the supposed pipe. This
4226                                    should be wires or faces of theShape.
4227                 theName Object name; when specified, this parameter is used
4228                         for result publication in the study. Otherwise, if automatic
4229                         publication is switched on, default value is used for result name.
4230
4231             Returns:
4232                 New GEOM_Object, containing an edge or wire that represent
4233                                  source pipe's path.
4234             """
4235             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4236             RaiseIfFailed("RestorePath", self.PrimOp)
4237             self._autoPublish(anObj, theName, "path")
4238             return anObj
4239
4240         ## Build a middle path of a pipe-like shape.
4241         #  The path shape can be a wire or an edge.
4242         #  @param theShape It can be closed or unclosed pipe-like shell
4243         #                  or a pipe-like solid.
4244         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4245         #                                should be lists of edges of theShape.
4246         #  @param theName Object name; when specified, this parameter is used
4247         #         for result publication in the study. Otherwise, if automatic
4248         #         publication is switched on, default value is used for result name.
4249         #
4250         #  @note It is not assumed that exact or approximate copy of theShape
4251         #        can be obtained by applying existing Pipe operation on the
4252         #        resulting "Path" wire taking theBase1 as the base - it is not
4253         #        always possible; though in some particular cases it might work
4254         #        it is not guaranteed. Thus, RestorePath function should not be
4255         #        considered as an exact reverse operation of the Pipe.
4256         #
4257         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4258         #                                source pipe's "path".
4259         #
4260         #  @ref tui_creation_pipe_path "Example"
4261         @ManageTransactions("PrimOp")
4262         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4263             """
4264             Build a middle path of a pipe-like shape.
4265             The path shape can be a wire or an edge.
4266
4267             Parameters:
4268                 theShape It can be closed or unclosed pipe-like shell
4269                          or a pipe-like solid.
4270                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4271                                        should be lists of edges of theShape.
4272                 theName Object name; when specified, this parameter is used
4273                         for result publication in the study. Otherwise, if automatic
4274                         publication is switched on, default value is used for result name.
4275
4276             Returns:
4277                 New GEOM_Object, containing an edge or wire that represent
4278                                  source pipe's path.
4279             """
4280             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4281             RaiseIfFailed("RestorePath", self.PrimOp)
4282             self._autoPublish(anObj, theName, "path")
4283             return anObj
4284
4285         # end of l3_complex
4286         ## @}
4287
4288         ## @addtogroup l3_advanced
4289         ## @{
4290
4291         ## Create a linear edge with specified ends.
4292         #  @param thePnt1 Point for the first end of edge.
4293         #  @param thePnt2 Point for the second end of edge.
4294         #  @param theName Object name; when specified, this parameter is used
4295         #         for result publication in the study. Otherwise, if automatic
4296         #         publication is switched on, default value is used for result name.
4297         #
4298         #  @return New GEOM.GEOM_Object, containing the created edge.
4299         #
4300         #  @ref tui_creation_edge "Example"
4301         @ManageTransactions("ShapesOp")
4302         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4303             """
4304             Create a linear edge with specified ends.
4305
4306             Parameters:
4307                 thePnt1 Point for the first end of edge.
4308                 thePnt2 Point for the second end of edge.
4309                 theName Object name; when specified, this parameter is used
4310                         for result publication in the study. Otherwise, if automatic
4311                         publication is switched on, default value is used for result name.
4312
4313             Returns:
4314                 New GEOM.GEOM_Object, containing the created edge.
4315             """
4316             # Example: see GEOM_TestAll.py
4317             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4318             RaiseIfFailed("MakeEdge", self.ShapesOp)
4319             self._autoPublish(anObj, theName, "edge")
4320             return anObj
4321
4322         ## Create a new edge, corresponding to the given length on the given curve.
4323         #  @param theRefCurve The referenced curve (edge).
4324         #  @param theLength Length on the referenced curve. It can be negative.
4325         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4326         #                       at the end of \a theRefCurve, close to the selected point.
4327         #                       If None, start from the first point of \a theRefCurve.
4328         #  @param theName Object name; when specified, this parameter is used
4329         #         for result publication in the study. Otherwise, if automatic
4330         #         publication is switched on, default value is used for result name.
4331         #
4332         #  @return New GEOM.GEOM_Object, containing the created edge.
4333         #
4334         #  @ref tui_creation_edge "Example"
4335         @ManageTransactions("ShapesOp")
4336         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4337             """
4338             Create a new edge, corresponding to the given length on the given curve.
4339
4340             Parameters:
4341                 theRefCurve The referenced curve (edge).
4342                 theLength Length on the referenced curve. It can be negative.
4343                 theStartPoint Any point can be selected for it, the new edge will begin
4344                               at the end of theRefCurve, close to the selected point.
4345                               If None, start from the first point of theRefCurve.
4346                 theName Object name; when specified, this parameter is used
4347                         for result publication in the study. Otherwise, if automatic
4348                         publication is switched on, default value is used for result name.
4349
4350             Returns:
4351                 New GEOM.GEOM_Object, containing the created edge.
4352             """
4353             # Example: see GEOM_TestAll.py
4354             theLength, Parameters = ParseParameters(theLength)
4355             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4356             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4357             anObj.SetParameters(Parameters)
4358             self._autoPublish(anObj, theName, "edge")
4359             return anObj
4360
4361         ## Create an edge from specified wire.
4362         #  @param theWire source Wire
4363         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4364         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4365         #  @param theName Object name; when specified, this parameter is used
4366         #         for result publication in the study. Otherwise, if automatic
4367         #         publication is switched on, default value is used for result name.
4368         #
4369         #  @return New GEOM.GEOM_Object, containing the created edge.
4370         #
4371         #  @ref tui_creation_edge "Example"
4372         @ManageTransactions("ShapesOp")
4373         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4374             """
4375             Create an edge from specified wire.
4376
4377             Parameters:
4378                 theWire source Wire
4379                 theLinearTolerance linear tolerance value (default = 1e-07)
4380                 theAngularTolerance angular tolerance value (default = 1e-12)
4381                 theName Object name; when specified, this parameter is used
4382                         for result publication in the study. Otherwise, if automatic
4383                         publication is switched on, default value is used for result name.
4384
4385             Returns:
4386                 New GEOM.GEOM_Object, containing the created edge.
4387             """
4388             # Example: see GEOM_TestAll.py
4389             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4390             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4391             self._autoPublish(anObj, theName, "edge")
4392             return anObj
4393
4394         ## Create a wire from the set of edges and wires.
4395         #  @param theEdgesAndWires List of edges and/or wires.
4396         #  @param theTolerance Maximum distance between vertices, that will be merged.
4397         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4398         #  @param theName Object name; when specified, this parameter is used
4399         #         for result publication in the study. Otherwise, if automatic
4400         #         publication is switched on, default value is used for result name.
4401         #
4402         #  @return New GEOM.GEOM_Object, containing the created wire.
4403         #
4404         #  @ref tui_creation_wire "Example"
4405         @ManageTransactions("ShapesOp")
4406         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4407             """
4408             Create a wire from the set of edges and wires.
4409
4410             Parameters:
4411                 theEdgesAndWires List of edges and/or wires.
4412                 theTolerance Maximum distance between vertices, that will be merged.
4413                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4414                 theName Object name; when specified, this parameter is used
4415                         for result publication in the study. Otherwise, if automatic
4416                         publication is switched on, default value is used for result name.
4417
4418             Returns:
4419                 New GEOM.GEOM_Object, containing the created wire.
4420             """
4421             # Example: see GEOM_TestAll.py
4422             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4423             RaiseIfFailed("MakeWire", self.ShapesOp)
4424             self._autoPublish(anObj, theName, "wire")
4425             return anObj
4426
4427         ## Create a face on the given wire.
4428         #  @param theWire closed Wire or Edge to build the face on.
4429         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4430         #                        If the tolerance of the obtained planar face is less
4431         #                        than 1e-06, this face will be returned, otherwise the
4432         #                        algorithm tries to build any suitable face on the given
4433         #                        wire and prints a warning message.
4434         #  @param theName Object name; when specified, this parameter is used
4435         #         for result publication in the study. Otherwise, if automatic
4436         #         publication is switched on, default value is used for result name.
4437         #
4438         #  @return New GEOM.GEOM_Object, containing the created face.
4439         #
4440         #  @ref tui_creation_face "Example"
4441         @ManageTransactions("ShapesOp")
4442         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4443             """
4444             Create a face on the given wire.
4445
4446             Parameters:
4447                 theWire closed Wire or Edge to build the face on.
4448                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4449                                If the tolerance of the obtained planar face is less
4450                                than 1e-06, this face will be returned, otherwise the
4451                                algorithm tries to build any suitable face on the given
4452                                wire and prints a warning message.
4453                 theName Object name; when specified, this parameter is used
4454                         for result publication in the study. Otherwise, if automatic
4455                         publication is switched on, default value is used for result name.
4456
4457             Returns:
4458                 New GEOM.GEOM_Object, containing the created face.
4459             """
4460             # Example: see GEOM_TestAll.py
4461             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4462             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4463                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4464             else:
4465                 RaiseIfFailed("MakeFace", self.ShapesOp)
4466             self._autoPublish(anObj, theName, "face")
4467             return anObj
4468
4469         ## Create a face on the given wires set.
4470         #  @param theWires List of closed wires or edges to build the face on.
4471         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4472         #                        If the tolerance of the obtained planar face is less
4473         #                        than 1e-06, this face will be returned, otherwise the
4474         #                        algorithm tries to build any suitable face on the given
4475         #                        wire and prints a warning message.
4476         #  @param theName Object name; when specified, this parameter is used
4477         #         for result publication in the study. Otherwise, if automatic
4478         #         publication is switched on, default value is used for result name.
4479         #
4480         #  @return New GEOM.GEOM_Object, containing the created face.
4481         #
4482         #  @ref tui_creation_face "Example"
4483         @ManageTransactions("ShapesOp")
4484         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4485             """
4486             Create a face on the given wires set.
4487
4488             Parameters:
4489                 theWires List of closed wires or edges to build the face on.
4490                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4491                                If the tolerance of the obtained planar face is less
4492                                than 1e-06, this face will be returned, otherwise the
4493                                algorithm tries to build any suitable face on the given
4494                                wire and prints a warning message.
4495                 theName Object name; when specified, this parameter is used
4496                         for result publication in the study. Otherwise, if automatic
4497                         publication is switched on, default value is used for result name.
4498
4499             Returns:
4500                 New GEOM.GEOM_Object, containing the created face.
4501             """
4502             # Example: see GEOM_TestAll.py
4503             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4504             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4505                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4506             else:
4507                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4508             self._autoPublish(anObj, theName, "face")
4509             return anObj
4510
4511         ## See MakeFaceWires() method for details.
4512         #
4513         #  @ref tui_creation_face "Example 1"
4514         #  \n @ref swig_MakeFaces  "Example 2"
4515         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4516             """
4517             See geompy.MakeFaceWires() method for details.
4518             """
4519             # Example: see GEOM_TestOthers.py
4520             # note: auto-publishing is done in self.MakeFaceWires()
4521             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4522             return anObj
4523
4524         ## Create a shell from the set of faces and shells.
4525         #  @param theFacesAndShells List of faces and/or shells.
4526         #  @param theName Object name; when specified, this parameter is used
4527         #         for result publication in the study. Otherwise, if automatic
4528         #         publication is switched on, default value is used for result name.
4529         #
4530         #  @return New GEOM.GEOM_Object, containing the created shell.
4531         #
4532         #  @ref tui_creation_shell "Example"
4533         @ManageTransactions("ShapesOp")
4534         def MakeShell(self, theFacesAndShells, theName=None):
4535             """
4536             Create a shell from the set of faces and shells.
4537
4538             Parameters:
4539                 theFacesAndShells List of faces and/or shells.
4540                 theName Object name; when specified, this parameter is used
4541                         for result publication in the study. Otherwise, if automatic
4542                         publication is switched on, default value is used for result name.
4543
4544             Returns:
4545                 New GEOM.GEOM_Object, containing the created shell.
4546             """
4547             # Example: see GEOM_TestAll.py
4548             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4549             RaiseIfFailed("MakeShell", self.ShapesOp)
4550             self._autoPublish(anObj, theName, "shell")
4551             return anObj
4552
4553         ## Create a solid, bounded by the given shells.
4554         #  @param theShells Sequence of bounding shells.
4555         #  @param theName Object name; when specified, this parameter is used
4556         #         for result publication in the study. Otherwise, if automatic
4557         #         publication is switched on, default value is used for result name.
4558         #
4559         #  @return New GEOM.GEOM_Object, containing the created solid.
4560         #
4561         #  @ref tui_creation_solid "Example"
4562         @ManageTransactions("ShapesOp")
4563         def MakeSolid(self, theShells, theName=None):
4564             """
4565             Create a solid, bounded by the given shells.
4566
4567             Parameters:
4568                 theShells Sequence of bounding shells.
4569                 theName Object name; when specified, this parameter is used
4570                         for result publication in the study. Otherwise, if automatic
4571                         publication is switched on, default value is used for result name.
4572
4573             Returns:
4574                 New GEOM.GEOM_Object, containing the created solid.
4575             """
4576             # Example: see GEOM_TestAll.py
4577             if len(theShells) == 1:
4578                 descr = self._IsGoodForSolid(theShells[0])
4579                 #if len(descr) > 0:
4580                 #    raise RuntimeError, "MakeSolidShells : " + descr
4581                 if descr == "WRN_SHAPE_UNCLOSED":
4582                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4583             anObj = self.ShapesOp.MakeSolidShells(theShells)
4584             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4585             self._autoPublish(anObj, theName, "solid")
4586             return anObj
4587
4588         ## Create a compound of the given shapes.
4589         #  @param theShapes List of shapes to put in compound.
4590         #  @param theName Object name; when specified, this parameter is used
4591         #         for result publication in the study. Otherwise, if automatic
4592         #         publication is switched on, default value is used for result name.
4593         #
4594         #  @return New GEOM.GEOM_Object, containing the created compound.
4595         #
4596         #  @ref tui_creation_compound "Example"
4597         @ManageTransactions("ShapesOp")
4598         def MakeCompound(self, theShapes, theName=None):
4599             """
4600             Create a compound of the given shapes.
4601
4602             Parameters:
4603                 theShapes List of shapes to put in compound.
4604                 theName Object name; when specified, this parameter is used
4605                         for result publication in the study. Otherwise, if automatic
4606                         publication is switched on, default value is used for result name.
4607
4608             Returns:
4609                 New GEOM.GEOM_Object, containing the created compound.
4610             """
4611             # Example: see GEOM_TestAll.py
4612             anObj = self.ShapesOp.MakeCompound(theShapes)
4613             RaiseIfFailed("MakeCompound", self.ShapesOp)
4614             self._autoPublish(anObj, theName, "compound")
4615             return anObj
4616
4617         # end of l3_advanced
4618         ## @}
4619
4620         ## @addtogroup l2_measure
4621         ## @{
4622
4623         ## Gives quantity of faces in the given shape.
4624         #  @param theShape Shape to count faces of.
4625         #  @return Quantity of faces.
4626         #
4627         #  @ref swig_NumberOf "Example"
4628         @ManageTransactions("ShapesOp")
4629         def NumberOfFaces(self, theShape):
4630             """
4631             Gives quantity of faces in the given shape.
4632
4633             Parameters:
4634                 theShape Shape to count faces of.
4635
4636             Returns:
4637                 Quantity of faces.
4638             """
4639             # Example: see GEOM_TestOthers.py
4640             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4641             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4642             return nb_faces
4643
4644         ## Gives quantity of edges in the given shape.
4645         #  @param theShape Shape to count edges of.
4646         #  @return Quantity of edges.
4647         #
4648         #  @ref swig_NumberOf "Example"
4649         @ManageTransactions("ShapesOp")
4650         def NumberOfEdges(self, theShape):
4651             """
4652             Gives quantity of edges in the given shape.
4653
4654             Parameters:
4655                 theShape Shape to count edges of.
4656
4657             Returns:
4658                 Quantity of edges.
4659             """
4660             # Example: see GEOM_TestOthers.py
4661             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4662             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4663             return nb_edges
4664
4665         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4666         #  @param theShape Shape to count sub-shapes of.
4667         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4668         #  @return Quantity of sub-shapes of given type.
4669         #
4670         #  @ref swig_NumberOf "Example"
4671         @ManageTransactions("ShapesOp")
4672         def NumberOfSubShapes(self, theShape, theShapeType):
4673             """
4674             Gives quantity of sub-shapes of type theShapeType in the given shape.
4675
4676             Parameters:
4677                 theShape Shape to count sub-shapes of.
4678                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4679
4680             Returns:
4681                 Quantity of sub-shapes of given type.
4682             """
4683             # Example: see GEOM_TestOthers.py
4684             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4685             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4686             return nb_ss
4687
4688         ## Gives quantity of solids in the given shape.
4689         #  @param theShape Shape to count solids in.
4690         #  @return Quantity of solids.
4691         #
4692         #  @ref swig_NumberOf "Example"
4693         @ManageTransactions("ShapesOp")
4694         def NumberOfSolids(self, theShape):
4695             """
4696             Gives quantity of solids in the given shape.
4697
4698             Parameters:
4699                 theShape Shape to count solids in.
4700
4701             Returns:
4702                 Quantity of solids.
4703             """
4704             # Example: see GEOM_TestOthers.py
4705             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4706             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4707             return nb_solids
4708
4709         # end of l2_measure
4710         ## @}
4711
4712         ## @addtogroup l3_healing
4713         ## @{
4714
4715         ## Reverses an orientation the given shape.
4716         #  @param theShape Shape to be reversed.
4717         #  @param theName Object name; when specified, this parameter is used
4718         #         for result publication in the study. Otherwise, if automatic
4719         #         publication is switched on, default value is used for result name.
4720         #
4721         #  @return The reversed copy of theShape.
4722         #
4723         #  @ref swig_ChangeOrientation "Example"
4724         @ManageTransactions("ShapesOp")
4725         def ChangeOrientation(self, theShape, theName=None):
4726             """
4727             Reverses an orientation the given shape.
4728
4729             Parameters:
4730                 theShape Shape to be reversed.
4731                 theName Object name; when specified, this parameter is used
4732                         for result publication in the study. Otherwise, if automatic
4733                         publication is switched on, default value is used for result name.
4734
4735             Returns:
4736                 The reversed copy of theShape.
4737             """
4738             # Example: see GEOM_TestAll.py
4739             anObj = self.ShapesOp.ChangeOrientation(theShape)
4740             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4741             self._autoPublish(anObj, theName, "reversed")
4742             return anObj
4743
4744         ## See ChangeOrientation() method for details.
4745         #
4746         #  @ref swig_OrientationChange "Example"
4747         def OrientationChange(self, theShape, theName=None):
4748             """
4749             See geompy.ChangeOrientation method for details.
4750             """
4751             # Example: see GEOM_TestOthers.py
4752             # note: auto-publishing is done in self.ChangeOrientation()
4753             anObj = self.ChangeOrientation(theShape, theName)
4754             return anObj
4755
4756         # end of l3_healing
4757         ## @}
4758
4759         ## @addtogroup l4_obtain
4760         ## @{
4761
4762         ## Retrieve all free faces from the given shape.
4763         #  Free face is a face, which is not shared between two shells of the shape.
4764         #  @param theShape Shape to find free faces in.
4765         #  @return List of IDs of all free faces, contained in theShape.
4766         #
4767         #  @ref tui_measurement_tools_page "Example"
4768         @ManageTransactions("ShapesOp")
4769         def GetFreeFacesIDs(self,theShape):
4770             """
4771             Retrieve all free faces from the given shape.
4772             Free face is a face, which is not shared between two shells of the shape.
4773
4774             Parameters:
4775                 theShape Shape to find free faces in.
4776
4777             Returns:
4778                 List of IDs of all free faces, contained in theShape.
4779             """
4780             # Example: see GEOM_TestOthers.py
4781             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4782             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4783             return anIDs
4784
4785         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4786         #  @param theShape1 Shape to find sub-shapes in.
4787         #  @param theShape2 Shape to find shared sub-shapes with.
4788         #  @param theShapeType Type of sub-shapes to be retrieved.
4789         #  @param theName Object name; when specified, this parameter is used
4790         #         for result publication in the study. Otherwise, if automatic
4791         #         publication is switched on, default value is used for result name.
4792         #
4793         #  @return List of sub-shapes of theShape1, shared with theShape2.
4794         #
4795         #  @ref swig_GetSharedShapes "Example"
4796         @ManageTransactions("ShapesOp")
4797         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4798             """
4799             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4800
4801             Parameters:
4802                 theShape1 Shape to find sub-shapes in.
4803                 theShape2 Shape to find shared sub-shapes with.
4804                 theShapeType Type of sub-shapes to be retrieved.
4805                 theName Object name; when specified, this parameter is used
4806                         for result publication in the study. Otherwise, if automatic
4807                         publication is switched on, default value is used for result name.
4808
4809             Returns:
4810                 List of sub-shapes of theShape1, shared with theShape2.
4811             """
4812             # Example: see GEOM_TestOthers.py
4813             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4814             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4815             self._autoPublish(aList, theName, "shared")
4816             return aList
4817
4818         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4819         #  @param theShapes Shapes to find common sub-shapes of.
4820         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4821         #  @param theName Object name; when specified, this parameter is used
4822         #         for result publication in the study. Otherwise, if automatic
4823         #         publication is switched on, default value is used for result name.
4824         #
4825         #  @return List of objects, that are sub-shapes of all given shapes.
4826         #
4827         #  @ref swig_GetSharedShapes "Example"
4828         @ManageTransactions("ShapesOp")
4829         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4830             """
4831             Get all sub-shapes, shared by all shapes in the list theShapes.
4832
4833             Parameters:
4834                 theShapes Shapes to find common sub-shapes of.
4835                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4836                 theName Object name; when specified, this parameter is used
4837                         for result publication in the study. Otherwise, if automatic
4838                         publication is switched on, default value is used for result name.
4839
4840             Returns:
4841                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4842             """
4843             # Example: see GEOM_TestOthers.py
4844             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4845             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4846             self._autoPublish(aList, theName, "shared")
4847             return aList
4848
4849         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4850         #  situated relatively the specified plane by the certain way,
4851         #  defined through <VAR>theState</VAR> parameter.
4852         #  @param theShape Shape to find sub-shapes of.
4853         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4854         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4855         #                direction and location of the plane to find shapes on.
4856         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4857         #  @param theName Object name; when specified, this parameter is used
4858         #         for result publication in the study. Otherwise, if automatic
4859         #         publication is switched on, default value is used for result name.
4860         #
4861         #  @return List of all found sub-shapes.
4862         #
4863         #  @ref swig_GetShapesOnPlane "Example"
4864         @ManageTransactions("ShapesOp")
4865         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4866             """
4867             Find in theShape all sub-shapes of type theShapeType,
4868             situated relatively the specified plane by the certain way,
4869             defined through theState parameter.
4870
4871             Parameters:
4872                 theShape Shape to find sub-shapes of.
4873                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4874                 theAx1 Vector (or line, or linear edge), specifying normal
4875                        direction and location of the plane to find shapes on.
4876                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4877                 theName Object name; when specified, this parameter is used
4878                         for result publication in the study. Otherwise, if automatic
4879                         publication is switched on, default value is used for result name.
4880
4881             Returns:
4882                 List of all found sub-shapes.
4883             """
4884             # Example: see GEOM_TestOthers.py
4885             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4886             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4887             self._autoPublish(aList, theName, "shapeOnPlane")
4888             return aList
4889
4890         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4891         #  situated relatively the specified plane by the certain way,
4892         #  defined through <VAR>theState</VAR> parameter.
4893         #  @param theShape Shape to find sub-shapes of.
4894         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4895         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4896         #                direction and location of the plane to find shapes on.
4897         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4898         #
4899         #  @return List of all found sub-shapes indices.
4900         #
4901         #  @ref swig_GetShapesOnPlaneIDs "Example"
4902         @ManageTransactions("ShapesOp")
4903         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4904             """
4905             Find in theShape all sub-shapes of type theShapeType,
4906             situated relatively the specified plane by the certain way,
4907             defined through theState parameter.
4908
4909             Parameters:
4910                 theShape Shape to find sub-shapes of.
4911                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4912                 theAx1 Vector (or line, or linear edge), specifying normal
4913                        direction and location of the plane to find shapes on.
4914                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4915
4916             Returns:
4917                 List of all found sub-shapes indices.
4918             """
4919             # Example: see GEOM_TestOthers.py
4920             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4921             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4922             return aList
4923
4924         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4925         #  situated relatively the specified plane by the certain way,
4926         #  defined through <VAR>theState</VAR> parameter.
4927         #  @param theShape Shape to find sub-shapes of.
4928         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4929         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4930         #                direction of the plane to find shapes on.
4931         #  @param thePnt Point specifying location of the plane to find shapes on.
4932         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4933         #  @param theName Object name; when specified, this parameter is used
4934         #         for result publication in the study. Otherwise, if automatic
4935         #         publication is switched on, default value is used for result name.
4936         #
4937         #  @return List of all found sub-shapes.
4938         #
4939         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4940         @ManageTransactions("ShapesOp")
4941         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4942             """
4943             Find in theShape all sub-shapes of type theShapeType,
4944             situated relatively the specified plane by the certain way,
4945             defined through theState parameter.
4946
4947             Parameters:
4948                 theShape Shape to find sub-shapes of.
4949                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4950                 theAx1 Vector (or line, or linear edge), specifying normal
4951                        direction and location of the plane to find shapes on.
4952                 thePnt Point specifying location of the plane to find shapes on.
4953                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4954                 theName Object name; when specified, this parameter is used
4955                         for result publication in the study. Otherwise, if automatic
4956                         publication is switched on, default value is used for result name.
4957
4958             Returns:
4959                 List of all found sub-shapes.
4960             """
4961             # Example: see GEOM_TestOthers.py
4962             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4963                                                                theAx1, thePnt, theState)
4964             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4965             self._autoPublish(aList, theName, "shapeOnPlane")
4966             return aList
4967
4968         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4969         #  situated relatively the specified plane by the certain way,
4970         #  defined through <VAR>theState</VAR> parameter.
4971         #  @param theShape Shape to find sub-shapes of.
4972         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4973         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4974         #                direction of the plane to find shapes on.
4975         #  @param thePnt Point specifying location of the plane to find shapes on.
4976         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4977         #
4978         #  @return List of all found sub-shapes indices.
4979         #
4980         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4981         @ManageTransactions("ShapesOp")
4982         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4983             """
4984             Find in theShape all sub-shapes of type theShapeType,
4985             situated relatively the specified plane by the certain way,
4986             defined through theState parameter.
4987
4988             Parameters:
4989                 theShape Shape to find sub-shapes of.
4990                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4991                 theAx1 Vector (or line, or linear edge), specifying normal
4992                        direction and location of the plane to find shapes on.
4993                 thePnt Point specifying location of the plane to find shapes on.
4994                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4995
4996             Returns:
4997                 List of all found sub-shapes indices.
4998             """
4999             # Example: see GEOM_TestOthers.py
5000             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5001                                                                   theAx1, thePnt, theState)
5002             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5003             return aList
5004
5005         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5006         #  the specified cylinder by the certain way, defined through \a theState parameter.
5007         #  @param theShape Shape to find sub-shapes of.
5008         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5009         #  @param theAxis Vector (or line, or linear edge), specifying
5010         #                 axis of the cylinder to find shapes on.
5011         #  @param theRadius Radius of the cylinder to find shapes on.
5012         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5013         #  @param theName Object name; when specified, this parameter is used
5014         #         for result publication in the study. Otherwise, if automatic
5015         #         publication is switched on, default value is used for result name.
5016         #
5017         #  @return List of all found sub-shapes.
5018         #
5019         #  @ref swig_GetShapesOnCylinder "Example"
5020         @ManageTransactions("ShapesOp")
5021         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5022             """
5023             Find in theShape all sub-shapes of type theShapeType, situated relatively
5024             the specified cylinder by the certain way, defined through theState parameter.
5025
5026             Parameters:
5027                 theShape Shape to find sub-shapes of.
5028                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5029                 theAxis Vector (or line, or linear edge), specifying
5030                         axis of the cylinder to find shapes on.
5031                 theRadius Radius of the cylinder to find shapes on.
5032                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5033                 theName Object name; when specified, this parameter is used
5034                         for result publication in the study. Otherwise, if automatic
5035                         publication is switched on, default value is used for result name.
5036
5037             Returns:
5038                 List of all found sub-shapes.
5039             """
5040             # Example: see GEOM_TestOthers.py
5041             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5042             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5043             self._autoPublish(aList, theName, "shapeOnCylinder")
5044             return aList
5045
5046         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5047         #  the specified cylinder by the certain way, defined through \a theState parameter.
5048         #  @param theShape Shape to find sub-shapes of.
5049         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5050         #  @param theAxis Vector (or line, or linear edge), specifying
5051         #                 axis of the cylinder to find shapes on.
5052         #  @param theRadius Radius of the cylinder to find shapes on.
5053         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5054         #
5055         #  @return List of all found sub-shapes indices.
5056         #
5057         #  @ref swig_GetShapesOnCylinderIDs "Example"
5058         @ManageTransactions("ShapesOp")
5059         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5060             """
5061             Find in theShape all sub-shapes of type theShapeType, situated relatively
5062             the specified cylinder by the certain way, defined through theState parameter.
5063
5064             Parameters:
5065                 theShape Shape to find sub-shapes of.
5066                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5067                 theAxis Vector (or line, or linear edge), specifying
5068                         axis of the cylinder to find shapes on.
5069                 theRadius Radius of the cylinder to find shapes on.
5070                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5071
5072             Returns:
5073                 List of all found sub-shapes indices.
5074             """
5075             # Example: see GEOM_TestOthers.py
5076             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5077             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5078             return aList
5079
5080         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5081         #  the specified cylinder by the certain way, defined through \a theState parameter.
5082         #  @param theShape Shape to find sub-shapes of.
5083         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5084         #  @param theAxis Vector (or line, or linear edge), specifying
5085         #                 axis of the cylinder to find shapes on.
5086         #  @param thePnt Point specifying location of the bottom of the cylinder.
5087         #  @param theRadius Radius of the cylinder to find shapes on.
5088         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5089         #  @param theName Object name; when specified, this parameter is used
5090         #         for result publication in the study. Otherwise, if automatic
5091         #         publication is switched on, default value is used for result name.
5092         #
5093         #  @return List of all found sub-shapes.
5094         #
5095         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5096         @ManageTransactions("ShapesOp")
5097         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5098             """
5099             Find in theShape all sub-shapes of type theShapeType, situated relatively
5100             the specified cylinder by the certain way, defined through theState parameter.
5101
5102             Parameters:
5103                 theShape Shape to find sub-shapes of.
5104                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5105                 theAxis Vector (or line, or linear edge), specifying
5106                         axis of the cylinder to find shapes on.
5107                 theRadius Radius of the cylinder to find shapes on.
5108                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5109                 theName Object name; when specified, this parameter is used
5110                         for result publication in the study. Otherwise, if automatic
5111                         publication is switched on, default value is used for result name.
5112
5113             Returns:
5114                 List of all found sub-shapes.
5115             """
5116             # Example: see GEOM_TestOthers.py
5117             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5118             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5119             self._autoPublish(aList, theName, "shapeOnCylinder")
5120             return aList
5121
5122         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5123         #  the specified cylinder by the certain way, defined through \a theState parameter.
5124         #  @param theShape Shape to find sub-shapes of.
5125         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5126         #  @param theAxis Vector (or line, or linear edge), specifying
5127         #                 axis of the cylinder to find shapes on.
5128         #  @param thePnt Point specifying location of the bottom of the cylinder.
5129         #  @param theRadius Radius of the cylinder to find shapes on.
5130         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5131         #
5132         #  @return List of all found sub-shapes indices
5133         #
5134         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5135         @ManageTransactions("ShapesOp")
5136         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5137             """
5138             Find in theShape all sub-shapes of type theShapeType, situated relatively
5139             the specified cylinder by the certain way, defined through theState parameter.
5140
5141             Parameters:
5142                 theShape Shape to find sub-shapes of.
5143                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5144                 theAxis Vector (or line, or linear edge), specifying
5145                         axis of the cylinder to find shapes on.
5146                 theRadius Radius of the cylinder to find shapes on.
5147                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5148
5149             Returns:
5150                 List of all found sub-shapes indices.
5151             """
5152             # Example: see GEOM_TestOthers.py
5153             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5154             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5155             return aList
5156
5157         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5158         #  the specified sphere by the certain way, defined through \a theState parameter.
5159         #  @param theShape Shape to find sub-shapes of.
5160         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5161         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5162         #  @param theRadius Radius of the sphere to find shapes on.
5163         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5164         #  @param theName Object name; when specified, this parameter is used
5165         #         for result publication in the study. Otherwise, if automatic
5166         #         publication is switched on, default value is used for result name.
5167         #
5168         #  @return List of all found sub-shapes.
5169         #
5170         #  @ref swig_GetShapesOnSphere "Example"
5171         @ManageTransactions("ShapesOp")
5172         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5173             """
5174             Find in theShape all sub-shapes of type theShapeType, situated relatively
5175             the specified sphere by the certain way, defined through theState parameter.
5176
5177             Parameters:
5178                 theShape Shape to find sub-shapes of.
5179                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5180                 theCenter Point, specifying center of the sphere to find shapes on.
5181                 theRadius Radius of the sphere to find shapes on.
5182                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5183                 theName Object name; when specified, this parameter is used
5184                         for result publication in the study. Otherwise, if automatic
5185                         publication is switched on, default value is used for result name.
5186
5187             Returns:
5188                 List of all found sub-shapes.
5189             """
5190             # Example: see GEOM_TestOthers.py
5191             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5192             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5193             self._autoPublish(aList, theName, "shapeOnSphere")
5194             return aList
5195
5196         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5197         #  the specified sphere by the certain way, defined through \a theState parameter.
5198         #  @param theShape Shape to find sub-shapes of.
5199         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5200         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5201         #  @param theRadius Radius of the sphere to find shapes on.
5202         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5203         #
5204         #  @return List of all found sub-shapes indices.
5205         #
5206         #  @ref swig_GetShapesOnSphereIDs "Example"
5207         @ManageTransactions("ShapesOp")
5208         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5209             """
5210             Find in theShape all sub-shapes of type theShapeType, situated relatively
5211             the specified sphere by the certain way, defined through theState parameter.
5212
5213             Parameters:
5214                 theShape Shape to find sub-shapes of.
5215                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5216                 theCenter Point, specifying center of the sphere to find shapes on.
5217                 theRadius Radius of the sphere to find shapes on.
5218                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5219
5220             Returns:
5221                 List of all found sub-shapes indices.
5222             """
5223             # Example: see GEOM_TestOthers.py
5224             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5225             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5226             return aList
5227
5228         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5229         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5230         #  @param theShape Shape to find sub-shapes of.
5231         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5232         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5233         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5234         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5235         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5236         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5237         #  @param theName Object name; when specified, this parameter is used
5238         #         for result publication in the study. Otherwise, if automatic
5239         #         publication is switched on, default value is used for result name.
5240         #
5241         #  @return List of all found sub-shapes.
5242         #
5243         #  @ref swig_GetShapesOnQuadrangle "Example"
5244         @ManageTransactions("ShapesOp")
5245         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5246                                   theTopLeftPoint, theTopRigthPoint,
5247                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5248             """
5249             Find in theShape all sub-shapes of type theShapeType, situated relatively
5250             the specified quadrangle by the certain way, defined through theState parameter.
5251
5252             Parameters:
5253                 theShape Shape to find sub-shapes of.
5254                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5255                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5256                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5257                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5258                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5259                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5260                 theName Object name; when specified, this parameter is used
5261                         for result publication in the study. Otherwise, if automatic
5262                         publication is switched on, default value is used for result name.
5263
5264             Returns:
5265                 List of all found sub-shapes.
5266             """
5267             # Example: see GEOM_TestOthers.py
5268             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5269                                                         theTopLeftPoint, theTopRigthPoint,
5270                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5271             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5272             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5273             return aList
5274
5275         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5276         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5277         #  @param theShape Shape to find sub-shapes of.
5278         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5279         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5280         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5281         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5282         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5283         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5284         #
5285         #  @return List of all found sub-shapes indices.
5286         #
5287         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5288         @ManageTransactions("ShapesOp")
5289         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5290                                      theTopLeftPoint, theTopRigthPoint,
5291                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5292             """
5293             Find in theShape all sub-shapes of type theShapeType, situated relatively
5294             the specified quadrangle by the certain way, defined through theState parameter.
5295
5296             Parameters:
5297                 theShape Shape to find sub-shapes of.
5298                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5299                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5300                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5301                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5302                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5303                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5304
5305             Returns:
5306                 List of all found sub-shapes indices.
5307             """
5308
5309             # Example: see GEOM_TestOthers.py
5310             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5311                                                            theTopLeftPoint, theTopRigthPoint,
5312                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5313             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5314             return aList
5315
5316         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5317         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5318         #  @param theBox Shape for relative comparing.
5319         #  @param theShape Shape to find sub-shapes of.
5320         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5321         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5322         #  @param theName Object name; when specified, this parameter is used
5323         #         for result publication in the study. Otherwise, if automatic
5324         #         publication is switched on, default value is used for result name.
5325         #
5326         #  @return List of all found sub-shapes.
5327         #
5328         #  @ref swig_GetShapesOnBox "Example"
5329         @ManageTransactions("ShapesOp")
5330         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5331             """
5332             Find in theShape all sub-shapes of type theShapeType, situated relatively
5333             the specified theBox by the certain way, defined through theState parameter.
5334
5335             Parameters:
5336                 theBox Shape for relative comparing.
5337                 theShape Shape to find sub-shapes of.
5338                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5339                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5340                 theName Object name; when specified, this parameter is used
5341                         for result publication in the study. Otherwise, if automatic
5342                         publication is switched on, default value is used for result name.
5343
5344             Returns:
5345                 List of all found sub-shapes.
5346             """
5347             # Example: see GEOM_TestOthers.py
5348             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5349             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5350             self._autoPublish(aList, theName, "shapeOnBox")
5351             return aList
5352
5353         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5354         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5355         #  @param theBox Shape for relative comparing.
5356         #  @param theShape Shape to find sub-shapes of.
5357         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5358         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5359         #
5360         #  @return List of all found sub-shapes indices.
5361         #
5362         #  @ref swig_GetShapesOnBoxIDs "Example"
5363         @ManageTransactions("ShapesOp")
5364         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5365             """
5366             Find in theShape all sub-shapes of type theShapeType, situated relatively
5367             the specified theBox by the certain way, defined through theState parameter.
5368
5369             Parameters:
5370                 theBox Shape for relative comparing.
5371                 theShape Shape to find sub-shapes of.
5372                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5373                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5374
5375             Returns:
5376                 List of all found sub-shapes indices.
5377             """
5378             # Example: see GEOM_TestOthers.py
5379             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5380             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5381             return aList
5382
5383         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5384         #  situated relatively the specified \a theCheckShape by the
5385         #  certain way, defined through \a theState parameter.
5386         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5387         #  @param theShape Shape to find sub-shapes of.
5388         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5389         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5390         #  @param theName Object name; when specified, this parameter is used
5391         #         for result publication in the study. Otherwise, if automatic
5392         #         publication is switched on, default value is used for result name.
5393         #
5394         #  @return List of all found sub-shapes.
5395         #
5396         #  @ref swig_GetShapesOnShape "Example"
5397         @ManageTransactions("ShapesOp")
5398         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5399             """
5400             Find in theShape all sub-shapes of type theShapeType,
5401             situated relatively the specified theCheckShape by the
5402             certain way, defined through theState parameter.
5403
5404             Parameters:
5405                 theCheckShape Shape for relative comparing. It must be a solid.
5406                 theShape Shape to find sub-shapes of.
5407                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5408                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5409                 theName Object name; when specified, this parameter is used
5410                         for result publication in the study. Otherwise, if automatic
5411                         publication is switched on, default value is used for result name.
5412
5413             Returns:
5414                 List of all found sub-shapes.
5415             """
5416             # Example: see GEOM_TestOthers.py
5417             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5418                                                    theShapeType, theState)
5419             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5420             self._autoPublish(aList, theName, "shapeOnShape")
5421             return aList
5422
5423         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5424         #  situated relatively the specified \a theCheckShape by the
5425         #  certain way, defined through \a theState parameter.
5426         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5427         #  @param theShape Shape to find sub-shapes of.
5428         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5429         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5430         #  @param theName Object name; when specified, this parameter is used
5431         #         for result publication in the study. Otherwise, if automatic
5432         #         publication is switched on, default value is used for result name.
5433         #
5434         #  @return All found sub-shapes as compound.
5435         #
5436         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5437         @ManageTransactions("ShapesOp")
5438         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5439             """
5440             Find in theShape all sub-shapes of type theShapeType,
5441             situated relatively the specified theCheckShape by the
5442             certain way, defined through theState parameter.
5443
5444             Parameters:
5445                 theCheckShape Shape for relative comparing. It must be a solid.
5446                 theShape Shape to find sub-shapes of.
5447                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5448                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5449                 theName Object name; when specified, this parameter is used
5450                         for result publication in the study. Otherwise, if automatic
5451                         publication is switched on, default value is used for result name.
5452
5453             Returns:
5454                 All found sub-shapes as compound.
5455             """
5456             # Example: see GEOM_TestOthers.py
5457             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5458                                                              theShapeType, theState)
5459             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5460             self._autoPublish(anObj, theName, "shapeOnShape")
5461             return anObj
5462
5463         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5464         #  situated relatively the specified \a theCheckShape by the
5465         #  certain way, defined through \a theState parameter.
5466         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5467         #  @param theShape Shape to find sub-shapes of.
5468         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5469         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5470         #
5471         #  @return List of all found sub-shapes indices.
5472         #
5473         #  @ref swig_GetShapesOnShapeIDs "Example"
5474         @ManageTransactions("ShapesOp")
5475         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5476             """
5477             Find in theShape all sub-shapes of type theShapeType,
5478             situated relatively the specified theCheckShape by the
5479             certain way, defined through theState parameter.
5480
5481             Parameters:
5482                 theCheckShape Shape for relative comparing. It must be a solid.
5483                 theShape Shape to find sub-shapes of.
5484                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5485                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5486
5487             Returns:
5488                 List of all found sub-shapes indices.
5489             """
5490             # Example: see GEOM_TestOthers.py
5491             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5492                                                       theShapeType, theState)
5493             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5494             return aList
5495
5496         ## Get sub-shape(s) of theShapeWhere, which are
5497         #  coincident with \a theShapeWhat or could be a part of it.
5498         #  @param theShapeWhere Shape to find sub-shapes of.
5499         #  @param theShapeWhat Shape, specifying what to find.
5500         #  @param isNewImplementation implementation of GetInPlace functionality
5501         #             (default = False, old alghorithm based on shape properties)
5502         #  @param theName Object name; when specified, this parameter is used
5503         #         for result publication in the study. Otherwise, if automatic
5504         #         publication is switched on, default value is used for result name.
5505         #
5506         #  @return Group of all found sub-shapes or a single found sub-shape.
5507         #
5508         #  @note This function has a restriction on argument shapes.
5509         #        If \a theShapeWhere has curved parts with significantly
5510         #        outstanding centres (i.e. the mass centre of a part is closer to
5511         #        \a theShapeWhat than to the part), such parts will not be found.
5512         #        @image html get_in_place_lost_part.png
5513         #
5514         #  @ref swig_GetInPlace "Example"
5515         @ManageTransactions("ShapesOp")
5516         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5517             """
5518             Get sub-shape(s) of theShapeWhere, which are
5519             coincident with  theShapeWhat or could be a part of it.
5520
5521             Parameters:
5522                 theShapeWhere Shape to find sub-shapes of.
5523                 theShapeWhat Shape, specifying what to find.
5524                 isNewImplementation Implementation of GetInPlace functionality
5525                                     (default = False, old alghorithm based on shape properties)
5526                 theName Object name; when specified, this parameter is used
5527                         for result publication in the study. Otherwise, if automatic
5528                         publication is switched on, default value is used for result name.
5529
5530             Returns:
5531                 Group of all found sub-shapes or a single found sub-shape.
5532
5533
5534             Note:
5535                 This function has a restriction on argument shapes.
5536                 If theShapeWhere has curved parts with significantly
5537                 outstanding centres (i.e. the mass centre of a part is closer to
5538                 theShapeWhat than to the part), such parts will not be found.
5539             """
5540             # Example: see GEOM_TestOthers.py
5541             anObj = None
5542             if isNewImplementation:
5543                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5544             else:
5545                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5546                 pass
5547             RaiseIfFailed("GetInPlace", self.ShapesOp)
5548             self._autoPublish(anObj, theName, "inplace")
5549             return anObj
5550
5551         ## Get sub-shape(s) of \a theShapeWhere, which are
5552         #  coincident with \a theShapeWhat or could be a part of it.
5553         #
5554         #  Implementation of this method is based on a saved history of an operation,
5555         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5556         #  arguments (an argument shape or a sub-shape of an argument shape).
5557         #  The operation could be the Partition or one of boolean operations,
5558         #  performed on simple shapes (not on compounds).
5559         #
5560         #  @param theShapeWhere Shape to find sub-shapes of.
5561         #  @param theShapeWhat Shape, specifying what to find (must be in the
5562         #                      building history of the ShapeWhere).
5563         #  @param theName Object name; when specified, this parameter is used
5564         #         for result publication in the study. Otherwise, if automatic
5565         #         publication is switched on, default value is used for result name.
5566         #
5567         #  @return Group of all found sub-shapes or a single found sub-shape.
5568         #
5569         #  @ref swig_GetInPlace "Example"
5570         @ManageTransactions("ShapesOp")
5571         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5572             """
5573             Implementation of this method is based on a saved history of an operation,
5574             produced theShapeWhere. The theShapeWhat must be among this operation's
5575             arguments (an argument shape or a sub-shape of an argument shape).
5576             The operation could be the Partition or one of boolean operations,
5577             performed on simple shapes (not on compounds).
5578
5579             Parameters:
5580                 theShapeWhere Shape to find sub-shapes of.
5581                 theShapeWhat Shape, specifying what to find (must be in the
5582                                 building history of the ShapeWhere).
5583                 theName Object name; when specified, this parameter is used
5584                         for result publication in the study. Otherwise, if automatic
5585                         publication is switched on, default value is used for result name.
5586
5587             Returns:
5588                 Group of all found sub-shapes or a single found sub-shape.
5589             """
5590             # Example: see GEOM_TestOthers.py
5591             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5592             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5593             self._autoPublish(anObj, theName, "inplace")
5594             return anObj
5595
5596         ## Get sub-shape of theShapeWhere, which is
5597         #  equal to \a theShapeWhat.
5598         #  @param theShapeWhere Shape to find sub-shape of.
5599         #  @param theShapeWhat Shape, specifying what to find.
5600         #  @param theName Object name; when specified, this parameter is used
5601         #         for result publication in the study. Otherwise, if automatic
5602         #         publication is switched on, default value is used for result name.
5603         #
5604         #  @return New GEOM.GEOM_Object for found sub-shape.
5605         #
5606         #  @ref swig_GetSame "Example"
5607         @ManageTransactions("ShapesOp")
5608         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5609             """
5610             Get sub-shape of theShapeWhere, which is
5611             equal to theShapeWhat.
5612
5613             Parameters:
5614                 theShapeWhere Shape to find sub-shape of.
5615                 theShapeWhat Shape, specifying what to find.
5616                 theName Object name; when specified, this parameter is used
5617                         for result publication in the study. Otherwise, if automatic
5618                         publication is switched on, default value is used for result name.
5619
5620             Returns:
5621                 New GEOM.GEOM_Object for found sub-shape.
5622             """
5623             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5624             RaiseIfFailed("GetSame", self.ShapesOp)
5625             self._autoPublish(anObj, theName, "sameShape")
5626             return anObj
5627
5628
5629         ## Get sub-shape indices of theShapeWhere, which is
5630         #  equal to \a theShapeWhat.
5631         #  @param theShapeWhere Shape to find sub-shape of.
5632         #  @param theShapeWhat Shape, specifying what to find.
5633         #  @return List of all found sub-shapes indices.
5634         #
5635         #  @ref swig_GetSame "Example"
5636         @ManageTransactions("ShapesOp")
5637         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5638             """
5639             Get sub-shape indices of theShapeWhere, which is
5640             equal to theShapeWhat.
5641
5642             Parameters:
5643                 theShapeWhere Shape to find sub-shape of.
5644                 theShapeWhat Shape, specifying what to find.
5645
5646             Returns:
5647                 List of all found sub-shapes indices.
5648             """
5649             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5650             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5651             return anObj
5652
5653
5654         # end of l4_obtain
5655         ## @}
5656
5657         ## @addtogroup l4_access
5658         ## @{
5659
5660         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5661         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5662         #  @param aShape Shape to get sub-shape of.
5663         #  @param ListOfID List of sub-shapes indices.
5664         #  @param theName Object name; when specified, this parameter is used
5665         #         for result publication in the study. Otherwise, if automatic
5666         #         publication is switched on, default value is used for result name.
5667         #
5668         #  @return Found sub-shape.
5669         #
5670         #  @ref swig_all_decompose "Example"
5671         def GetSubShape(self, aShape, ListOfID, theName=None):
5672             """
5673             Obtain a composite sub-shape of aShape, composed from sub-shapes
5674             of aShape, selected by their unique IDs inside aShape
5675
5676             Parameters:
5677                 aShape Shape to get sub-shape of.
5678                 ListOfID List of sub-shapes indices.
5679                 theName Object name; when specified, this parameter is used
5680                         for result publication in the study. Otherwise, if automatic
5681                         publication is switched on, default value is used for result name.
5682
5683             Returns:
5684                 Found sub-shape.
5685             """
5686             # Example: see GEOM_TestAll.py
5687             anObj = self.AddSubShape(aShape,ListOfID)
5688             self._autoPublish(anObj, theName, "subshape")
5689             return anObj
5690
5691         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5692         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5693         #  @param aShape Shape to get sub-shape of.
5694         #  @param aSubShape Sub-shapes of aShape.
5695         #  @return ID of found sub-shape.
5696         #
5697         #  @ref swig_all_decompose "Example"
5698         @ManageTransactions("LocalOp")
5699         def GetSubShapeID(self, aShape, aSubShape):
5700             """
5701             Obtain unique ID of sub-shape aSubShape inside aShape
5702             of aShape, selected by their unique IDs inside aShape
5703
5704             Parameters:
5705                aShape Shape to get sub-shape of.
5706                aSubShape Sub-shapes of aShape.
5707
5708             Returns:
5709                ID of found sub-shape.
5710             """
5711             # Example: see GEOM_TestAll.py
5712             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5713             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5714             return anID
5715
5716         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5717         #  This function is provided for performance purpose. The complexity is O(n) with n
5718         #  the number of subobjects of aShape
5719         #  @param aShape Shape to get sub-shape of.
5720         #  @param aSubShapes Sub-shapes of aShape.
5721         #  @return list of IDs of found sub-shapes.
5722         #
5723         #  @ref swig_all_decompose "Example"
5724         @ManageTransactions("ShapesOp")
5725         def GetSubShapesIDs(self, aShape, aSubShapes):
5726             """
5727             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5728             This function is provided for performance purpose. The complexity is O(n) with n
5729             the number of subobjects of aShape
5730
5731             Parameters:
5732                aShape Shape to get sub-shape of.
5733                aSubShapes Sub-shapes of aShape.
5734
5735             Returns:
5736                List of IDs of found sub-shape.
5737             """
5738             # Example: see GEOM_TestAll.py
5739             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5740             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5741             return anIDs
5742
5743         # end of l4_access
5744         ## @}
5745
5746         ## @addtogroup l4_decompose
5747         ## @{
5748
5749         ## Get all sub-shapes and groups of \a theShape,
5750         #  that were created already by any other methods.
5751         #  @param theShape Any shape.
5752         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5753         #                       returned, else all found sub-shapes and groups.
5754         #  @return List of existing sub-objects of \a theShape.
5755         #
5756         #  @ref swig_all_decompose "Example"
5757         @ManageTransactions("ShapesOp")
5758         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5759             """
5760             Get all sub-shapes and groups of theShape,
5761             that were created already by any other methods.
5762
5763             Parameters:
5764                 theShape Any shape.
5765                 theGroupsOnly If this parameter is TRUE, only groups will be
5766                                  returned, else all found sub-shapes and groups.
5767
5768             Returns:
5769                 List of existing sub-objects of theShape.
5770             """
5771             # Example: see GEOM_TestAll.py
5772             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5773             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5774             return ListObj
5775
5776         ## Get all groups of \a theShape,
5777         #  that were created already by any other methods.
5778         #  @param theShape Any shape.
5779         #  @return List of existing groups of \a theShape.
5780         #
5781         #  @ref swig_all_decompose "Example"
5782         @ManageTransactions("ShapesOp")
5783         def GetGroups(self, theShape):
5784             """
5785             Get all groups of theShape,
5786             that were created already by any other methods.
5787
5788             Parameters:
5789                 theShape Any shape.
5790
5791             Returns:
5792                 List of existing groups of theShape.
5793             """
5794             # Example: see GEOM_TestAll.py
5795             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5796             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5797             return ListObj
5798
5799         ## Explode a shape on sub-shapes of a given type.
5800         #  If the shape itself matches the type, it is also returned.
5801         #  @param aShape Shape to be exploded.
5802         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5803         #  @param theName Object name; when specified, this parameter is used
5804         #         for result publication in the study. Otherwise, if automatic
5805         #         publication is switched on, default value is used for result name.
5806         #
5807         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5808         #
5809         #  @ref swig_all_decompose "Example"
5810         @ManageTransactions("ShapesOp")
5811         def SubShapeAll(self, aShape, aType, theName=None):
5812             """
5813             Explode a shape on sub-shapes of a given type.
5814             If the shape itself matches the type, it is also returned.
5815
5816             Parameters:
5817                 aShape Shape to be exploded.
5818                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5819                 theName Object name; when specified, this parameter is used
5820                         for result publication in the study. Otherwise, if automatic
5821                         publication is switched on, default value is used for result name.
5822
5823             Returns:
5824                 List of sub-shapes of type theShapeType, contained in theShape.
5825             """
5826             # Example: see GEOM_TestAll.py
5827             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5828             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5829             self._autoPublish(ListObj, theName, "subshape")
5830             return ListObj
5831
5832         ## Explode a shape on sub-shapes of a given type.
5833         #  @param aShape Shape to be exploded.
5834         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5835         #  @return List of IDs of sub-shapes.
5836         #
5837         #  @ref swig_all_decompose "Example"
5838         @ManageTransactions("ShapesOp")
5839         def SubShapeAllIDs(self, aShape, aType):
5840             """
5841             Explode a shape on sub-shapes of a given type.
5842
5843             Parameters:
5844                 aShape Shape to be exploded (see geompy.ShapeType)
5845                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5846
5847             Returns:
5848                 List of IDs of sub-shapes.
5849             """
5850             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5851             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5852             return ListObj
5853
5854         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5855         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5856         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5857         #  @param aShape Shape to get sub-shape of.
5858         #  @param ListOfInd List of sub-shapes indices.
5859         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5860         #  @param theName Object name; when specified, this parameter is used
5861         #         for result publication in the study. Otherwise, if automatic
5862         #         publication is switched on, default value is used for result name.
5863         #
5864         #  @return A compound of sub-shapes of aShape.
5865         #
5866         #  @ref swig_all_decompose "Example"
5867         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5868             """
5869             Obtain a compound of sub-shapes of aShape,
5870             selected by their indices in list of all sub-shapes of type aType.
5871             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5872
5873             Parameters:
5874                 aShape Shape to get sub-shape of.
5875                 ListOfID List of sub-shapes indices.
5876                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5877                 theName Object name; when specified, this parameter is used
5878                         for result publication in the study. Otherwise, if automatic
5879                         publication is switched on, default value is used for result name.
5880
5881             Returns:
5882                 A compound of sub-shapes of aShape.
5883             """
5884             # Example: see GEOM_TestAll.py
5885             ListOfIDs = []
5886             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5887             for ind in ListOfInd:
5888                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5889             # note: auto-publishing is done in self.GetSubShape()
5890             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5891             return anObj
5892
5893         ## Explode a shape on sub-shapes of a given type.
5894         #  Sub-shapes will be sorted taking into account their gravity centers,
5895         #  to provide stable order of sub-shapes.
5896         #  If the shape itself matches the type, it is also returned.
5897         #  @param aShape Shape to be exploded.
5898         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5899         #  @param theName Object name; when specified, this parameter is used
5900         #         for result publication in the study. Otherwise, if automatic
5901         #         publication is switched on, default value is used for result name.
5902         #
5903         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5904         #
5905         #  @ref swig_SubShapeAllSorted "Example"
5906         @ManageTransactions("ShapesOp")
5907         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5908             """
5909             Explode a shape on sub-shapes of a given type.
5910             Sub-shapes will be sorted taking into account their gravity centers,
5911             to provide stable order of sub-shapes.
5912             If the shape itself matches the type, it is also returned.
5913
5914             Parameters:
5915                 aShape Shape to be exploded.
5916                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5917                 theName Object name; when specified, this parameter is used
5918                         for result publication in the study. Otherwise, if automatic
5919                         publication is switched on, default value is used for result name.
5920
5921             Returns:
5922                 List of sub-shapes of type theShapeType, contained in theShape.
5923             """
5924             # Example: see GEOM_TestAll.py
5925             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5926             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5927             self._autoPublish(ListObj, theName, "subshape")
5928             return ListObj
5929
5930         ## Explode a shape on sub-shapes of a given type.
5931         #  Sub-shapes will be sorted taking into account their gravity centers,
5932         #  to provide stable order of sub-shapes.
5933         #  @param aShape Shape to be exploded.
5934         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5935         #  @return List of IDs of sub-shapes.
5936         #
5937         #  @ref swig_all_decompose "Example"
5938         @ManageTransactions("ShapesOp")
5939         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5940             """
5941             Explode a shape on sub-shapes of a given type.
5942             Sub-shapes will be sorted taking into account their gravity centers,
5943             to provide stable order of sub-shapes.
5944
5945             Parameters:
5946                 aShape Shape to be exploded.
5947                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5948
5949             Returns:
5950                 List of IDs of sub-shapes.
5951             """
5952             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5953             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5954             return ListIDs
5955
5956         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5957         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5958         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5959         #  @param aShape Shape to get sub-shape of.
5960         #  @param ListOfInd List of sub-shapes indices.
5961         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5962         #  @param theName Object name; when specified, this parameter is used
5963         #         for result publication in the study. Otherwise, if automatic
5964         #         publication is switched on, default value is used for result name.
5965         #
5966         #  @return A compound of sub-shapes of aShape.
5967         #
5968         #  @ref swig_all_decompose "Example"
5969         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5970             """
5971             Obtain a compound of sub-shapes of aShape,
5972             selected by they indices in sorted list of all sub-shapes of type aType.
5973             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5974
5975             Parameters:
5976                 aShape Shape to get sub-shape of.
5977                 ListOfID List of sub-shapes indices.
5978                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5979                 theName Object name; when specified, this parameter is used
5980                         for result publication in the study. Otherwise, if automatic
5981                         publication is switched on, default value is used for result name.
5982
5983             Returns:
5984                 A compound of sub-shapes of aShape.
5985             """
5986             # Example: see GEOM_TestAll.py
5987             ListOfIDs = []
5988             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5989             for ind in ListOfInd:
5990                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5991             # note: auto-publishing is done in self.GetSubShape()
5992             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5993             return anObj
5994
5995         ## Extract shapes (excluding the main shape) of given type.
5996         #  @param aShape The shape.
5997         #  @param aType  The shape type (see ShapeType())
5998         #  @param isSorted Boolean flag to switch sorting on/off.
5999         #  @param theName Object name; when specified, this parameter is used
6000         #         for result publication in the study. Otherwise, if automatic
6001         #         publication is switched on, default value is used for result name.
6002         #
6003         #  @return List of sub-shapes of type aType, contained in aShape.
6004         #
6005         #  @ref swig_FilletChamfer "Example"
6006         @ManageTransactions("ShapesOp")
6007         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6008             """
6009             Extract shapes (excluding the main shape) of given type.
6010
6011             Parameters:
6012                 aShape The shape.
6013                 aType  The shape type (see geompy.ShapeType)
6014                 isSorted Boolean flag to switch sorting on/off.
6015                 theName Object name; when specified, this parameter is used
6016                         for result publication in the study. Otherwise, if automatic
6017                         publication is switched on, default value is used for result name.
6018
6019             Returns:
6020                 List of sub-shapes of type aType, contained in aShape.
6021             """
6022             # Example: see GEOM_TestAll.py
6023             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6024             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6025             self._autoPublish(ListObj, theName, "subshape")
6026             return ListObj
6027
6028         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6029         #  @param aShape Main shape.
6030         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6031         #  @param theName Object name; when specified, this parameter is used
6032         #         for result publication in the study. Otherwise, if automatic
6033         #         publication is switched on, default value is used for result name.
6034         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6035         #
6036         #  @ref swig_all_decompose "Example"
6037         @ManageTransactions("ShapesOp")
6038         def SubShapes(self, aShape, anIDs, theName=None):
6039             """
6040             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6041
6042             Parameters:
6043                 aShape Main shape.
6044                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6045                 theName Object name; when specified, this parameter is used
6046                         for result publication in the study. Otherwise, if automatic
6047                         publication is switched on, default value is used for result name.
6048
6049             Returns:
6050                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6051             """
6052             # Example: see GEOM_TestAll.py
6053             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6054             RaiseIfFailed("SubShapes", self.ShapesOp)
6055             self._autoPublish(ListObj, theName, "subshape")
6056             return ListObj
6057
6058         # end of l4_decompose
6059         ## @}
6060
6061         ## @addtogroup l4_decompose_d
6062         ## @{
6063
6064         ## Deprecated method
6065         #  It works like SubShapeAllSortedCentres(), but wrongly
6066         #  defines centres of faces, shells and solids.
6067         @ManageTransactions("ShapesOp")
6068         def SubShapeAllSorted(self, aShape, aType, theName=None):
6069             """
6070             Deprecated method
6071             It works like geompy.SubShapeAllSortedCentres, but wrongly
6072             defines centres of faces, shells and solids.
6073             """
6074             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6075             RaiseIfFailed("MakeExplode", self.ShapesOp)
6076             self._autoPublish(ListObj, theName, "subshape")
6077             return ListObj
6078
6079         ## Deprecated method
6080         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6081         #  defines centres of faces, shells and solids.
6082         @ManageTransactions("ShapesOp")
6083         def SubShapeAllSortedIDs(self, aShape, aType):
6084             """
6085             Deprecated method
6086             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6087             defines centres of faces, shells and solids.
6088             """
6089             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6090             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6091             return ListIDs
6092
6093         ## Deprecated method
6094         #  It works like SubShapeSortedCentres(), but has a bug
6095         #  (wrongly defines centres of faces, shells and solids).
6096         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6097             """
6098             Deprecated method
6099             It works like geompy.SubShapeSortedCentres, but has a bug
6100             (wrongly defines centres of faces, shells and solids).
6101             """
6102             ListOfIDs = []
6103             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6104             for ind in ListOfInd:
6105                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6106             # note: auto-publishing is done in self.GetSubShape()
6107             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6108             return anObj
6109
6110         # end of l4_decompose_d
6111         ## @}
6112
6113         ## @addtogroup l3_healing
6114         ## @{
6115
6116         ## Apply a sequence of Shape Healing operators to the given object.
6117         #  @param theShape Shape to be processed.
6118         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6119         #  @param theParameters List of names of parameters
6120         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6121         #  @param theValues List of values of parameters, in the same order
6122         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6123         #  @param theName Object name; when specified, this parameter is used
6124         #         for result publication in the study. Otherwise, if automatic
6125         #         publication is switched on, default value is used for result name.
6126         #
6127         #  <b> Operators and Parameters: </b> \n
6128         #
6129         #  * \b FixShape - corrects invalid shapes. \n
6130         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6131         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6132         #
6133         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6134         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6135         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6136         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6137         #
6138         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6139         #    surfaces in segments using a certain angle. \n
6140         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6141         #    if Angle=180, four if Angle=90, etc). \n
6142         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6143         #
6144         #  * \b SplitClosedFaces - splits closed faces in segments.
6145         #    The number of segments depends on the number of splitting points.\n
6146         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6147         #
6148         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6149         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6150         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6151         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6152         #   This and the previous parameters can take the following values:\n
6153         #   \b Parametric \b Continuity \n
6154         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6155         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6156         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6157         #    ruling out sharp edges).\n
6158         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6159         #       are of the same magnitude).\n
6160         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6161         #    or surfaces (d/du C(u)) are the same at junction. \n
6162         #   \b Geometric \b Continuity \n
6163         #   \b G1: first derivatives are proportional at junction.\n
6164         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6165         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6166         #   \b G2: first and second derivatives are proportional at junction.
6167         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6168         #    continuity requires that the underlying parameterization was continuous as well.
6169         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6170         #
6171         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6172         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6173         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6174         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6175         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6176         #       with the specified parameters.\n
6177         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6178         #       with the specified parameters.\n
6179         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6180         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6181         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6182         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6183         #
6184         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6185         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6186         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6187         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6188         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6189         #
6190         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6191         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6192         #
6193         #
6194         #  @return New GEOM.GEOM_Object, containing processed shape.
6195         #
6196         #  \n @ref tui_shape_processing "Example"
6197         @ManageTransactions("HealOp")
6198         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6199             """
6200             Apply a sequence of Shape Healing operators to the given object.
6201
6202             Parameters:
6203                 theShape Shape to be processed.
6204                 theValues List of values of parameters, in the same order
6205                           as parameters are listed in theParameters list.
6206                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6207                 theParameters List of names of parameters
6208                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6209                 theName Object name; when specified, this parameter is used
6210                         for result publication in the study. Otherwise, if automatic
6211                         publication is switched on, default value is used for result name.
6212
6213                 Operators and Parameters:
6214
6215                  * FixShape - corrects invalid shapes.
6216                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6217                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6218                  * FixFaceSize - removes small faces, such as spots and strips.
6219                      * FixFaceSize.Tolerance - defines minimum possible face size.
6220                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
6221                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6222                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6223                                 in segments using a certain angle.
6224                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6225                                           if Angle=180, four if Angle=90, etc).
6226                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6227                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6228                                       splitting points.
6229                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6230                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6231                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6232                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6233                      * SplitContinuity.CurveContinuity - required continuity for curves.
6234                        This and the previous parameters can take the following values:
6235
6236                        Parametric Continuity:
6237                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6238                                                    coincidental. The curves or surfaces may still meet at an angle,
6239                                                    giving rise to a sharp corner or edge).
6240                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6241                                                    are parallel, ruling out sharp edges).
6242                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6243                                                   or surfaces are of the same magnitude).
6244                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6245                           curves or surfaces (d/du C(u)) are the same at junction.
6246
6247                        Geometric Continuity:
6248                        G1: first derivatives are proportional at junction.
6249                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6250                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6251                        G2: first and second derivatives are proportional at junction. As the names imply,
6252                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6253                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6254                            geometric continuity of order n, but not vice-versa.
6255                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6256                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6257                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6258                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6259                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6260                                                         the specified parameters.
6261                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6262                                                         the specified parameters.
6263                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6264                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6265                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6266                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6267                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6268                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6269                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6270                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6271                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6272                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6273                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6274
6275             Returns:
6276                 New GEOM.GEOM_Object, containing processed shape.
6277
6278             Note: For more information look through SALOME Geometry User's Guide->
6279                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6280             """
6281             # Example: see GEOM_TestHealing.py
6282             theValues,Parameters = ParseList(theValues)
6283             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6284             # To avoid script failure in case of good argument shape
6285             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6286                 return theShape
6287             RaiseIfFailed("ProcessShape", self.HealOp)
6288             for string in (theOperators + theParameters):
6289                 Parameters = ":" + Parameters
6290                 pass
6291             anObj.SetParameters(Parameters)
6292             self._autoPublish(anObj, theName, "healed")
6293             return anObj
6294
6295         ## Remove faces from the given object (shape).
6296         #  @param theObject Shape to be processed.
6297         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6298         #                  removes ALL faces of the given object.
6299         #  @param theName Object name; when specified, this parameter is used
6300         #         for result publication in the study. Otherwise, if automatic
6301         #         publication is switched on, default value is used for result name.
6302         #
6303         #  @return New GEOM.GEOM_Object, containing processed shape.
6304         #
6305         #  @ref tui_suppress_faces "Example"
6306         @ManageTransactions("HealOp")
6307         def SuppressFaces(self, theObject, theFaces, theName=None):
6308             """
6309             Remove faces from the given object (shape).
6310
6311             Parameters:
6312                 theObject Shape to be processed.
6313                 theFaces Indices of faces to be removed, if EMPTY then the method
6314                          removes ALL faces of the given object.
6315                 theName Object name; when specified, this parameter is used
6316                         for result publication in the study. Otherwise, if automatic
6317                         publication is switched on, default value is used for result name.
6318
6319             Returns:
6320                 New GEOM.GEOM_Object, containing processed shape.
6321             """
6322             # Example: see GEOM_TestHealing.py
6323             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6324             RaiseIfFailed("SuppressFaces", self.HealOp)
6325             self._autoPublish(anObj, theName, "suppressFaces")
6326             return anObj
6327
6328         ## Sewing of faces into a single shell.
6329         #  @param ListShape Shapes to be processed.
6330         #  @param theTolerance Required tolerance value.
6331         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6332         #  @param theName Object name; when specified, this parameter is used
6333         #         for result publication in the study. Otherwise, if automatic
6334         #         publication is switched on, default value is used for result name.
6335         #
6336         #  @return New GEOM.GEOM_Object, containing a result shell.
6337         #
6338         #  @ref tui_sewing "Example"
6339         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6340             """
6341             Sewing of faces into a single shell.
6342
6343             Parameters:
6344                 ListShape Shapes to be processed.
6345                 theTolerance Required tolerance value.
6346                 AllowNonManifold Flag that allows non-manifold sewing.
6347                 theName Object name; when specified, this parameter is used
6348                         for result publication in the study. Otherwise, if automatic
6349                         publication is switched on, default value is used for result name.
6350
6351             Returns:
6352                 New GEOM.GEOM_Object, containing containing a result shell.
6353             """
6354             # Example: see GEOM_TestHealing.py
6355             # note: auto-publishing is done in self.Sew()
6356             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
6357             return anObj
6358
6359         ## Sewing of faces into a single shell.
6360         #  @param ListShape Shapes to be processed.
6361         #  @param theTolerance Required tolerance value.
6362         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6363         #  @param theName Object name; when specified, this parameter is used
6364         #         for result publication in the study. Otherwise, if automatic
6365         #         publication is switched on, default value is used for result name.
6366         #
6367         #  @return New GEOM.GEOM_Object, containing a result shell.
6368         @ManageTransactions("HealOp")
6369         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6370             """
6371             Sewing of faces into a single shell.
6372
6373             Parameters:
6374                 ListShape Shapes to be processed.
6375                 theTolerance Required tolerance value.
6376                 AllowNonManifold Flag that allows non-manifold sewing.
6377                 theName Object name; when specified, this parameter is used
6378                         for result publication in the study. Otherwise, if automatic
6379                         publication is switched on, default value is used for result name.
6380
6381             Returns:
6382                 New GEOM.GEOM_Object, containing a result shell.
6383             """
6384             # Example: see MakeSewing() above
6385             theTolerance,Parameters = ParseParameters(theTolerance)
6386             if AllowNonManifold:
6387                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
6388             else:
6389                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
6390             # To avoid script failure in case of good argument shape
6391             # (Fix of test cases geom/bugs11/L7,L8)
6392             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6393                 return anObj
6394             RaiseIfFailed("Sew", self.HealOp)
6395             anObj.SetParameters(Parameters)
6396             self._autoPublish(anObj, theName, "sewed")
6397             return anObj
6398
6399         ## Rebuild the topology of theCompound of solids by removing
6400         #  of the faces that are shared by several solids.
6401         #  @param theCompound Shape to be processed.
6402         #  @param theName Object name; when specified, this parameter is used
6403         #         for result publication in the study. Otherwise, if automatic
6404         #         publication is switched on, default value is used for result name.
6405         #
6406         #  @return New GEOM.GEOM_Object, containing processed shape.
6407         #
6408         #  @ref tui_remove_webs "Example"
6409         @ManageTransactions("HealOp")
6410         def RemoveInternalFaces (self, theCompound, theName=None):
6411             """
6412             Rebuild the topology of theCompound of solids by removing
6413             of the faces that are shared by several solids.
6414
6415             Parameters:
6416                 theCompound Shape to be processed.
6417                 theName Object name; when specified, this parameter is used
6418                         for result publication in the study. Otherwise, if automatic
6419                         publication is switched on, default value is used for result name.
6420
6421             Returns:
6422                 New GEOM.GEOM_Object, containing processed shape.
6423             """
6424             # Example: see GEOM_TestHealing.py
6425             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6426             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6427             self._autoPublish(anObj, theName, "removeWebs")
6428             return anObj
6429
6430         ## Remove internal wires and edges from the given object (face).
6431         #  @param theObject Shape to be processed.
6432         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6433         #                  removes ALL internal wires of the given object.
6434         #  @param theName Object name; when specified, this parameter is used
6435         #         for result publication in the study. Otherwise, if automatic
6436         #         publication is switched on, default value is used for result name.
6437         #
6438         #  @return New GEOM.GEOM_Object, containing processed shape.
6439         #
6440         #  @ref tui_suppress_internal_wires "Example"
6441         @ManageTransactions("HealOp")
6442         def SuppressInternalWires(self, theObject, theWires, theName=None):
6443             """
6444             Remove internal wires and edges from the given object (face).
6445
6446             Parameters:
6447                 theObject Shape to be processed.
6448                 theWires Indices of wires to be removed, if EMPTY then the method
6449                          removes ALL internal wires of the given object.
6450                 theName Object name; when specified, this parameter is used
6451                         for result publication in the study. Otherwise, if automatic
6452                         publication is switched on, default value is used for result name.
6453
6454             Returns:
6455                 New GEOM.GEOM_Object, containing processed shape.
6456             """
6457             # Example: see GEOM_TestHealing.py
6458             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6459             RaiseIfFailed("RemoveIntWires", self.HealOp)
6460             self._autoPublish(anObj, theName, "suppressWires")
6461             return anObj
6462
6463         ## Remove internal closed contours (holes) from the given object.
6464         #  @param theObject Shape to be processed.
6465         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6466         #                  removes ALL internal holes of the given object
6467         #  @param theName Object name; when specified, this parameter is used
6468         #         for result publication in the study. Otherwise, if automatic
6469         #         publication is switched on, default value is used for result name.
6470         #
6471         #  @return New GEOM.GEOM_Object, containing processed shape.
6472         #
6473         #  @ref tui_suppress_holes "Example"
6474         @ManageTransactions("HealOp")
6475         def SuppressHoles(self, theObject, theWires, theName=None):
6476             """
6477             Remove internal closed contours (holes) from the given object.
6478
6479             Parameters:
6480                 theObject Shape to be processed.
6481                 theWires Indices of wires to be removed, if EMPTY then the method
6482                          removes ALL internal holes of the given object
6483                 theName Object name; when specified, this parameter is used
6484                         for result publication in the study. Otherwise, if automatic
6485                         publication is switched on, default value is used for result name.
6486
6487             Returns:
6488                 New GEOM.GEOM_Object, containing processed shape.
6489             """
6490             # Example: see GEOM_TestHealing.py
6491             anObj = self.HealOp.FillHoles(theObject, theWires)
6492             RaiseIfFailed("FillHoles", self.HealOp)
6493             self._autoPublish(anObj, theName, "suppressHoles")
6494             return anObj
6495
6496         ## Close an open wire.
6497         #  @param theObject Shape to be processed.
6498         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6499         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6500         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6501         #                        If False : closure by creation of an edge between ends.
6502         #  @param theName Object name; when specified, this parameter is used
6503         #         for result publication in the study. Otherwise, if automatic
6504         #         publication is switched on, default value is used for result name.
6505         #
6506         #  @return New GEOM.GEOM_Object, containing processed shape.
6507         #
6508         #  @ref tui_close_contour "Example"
6509         @ManageTransactions("HealOp")
6510         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6511             """
6512             Close an open wire.
6513
6514             Parameters:
6515                 theObject Shape to be processed.
6516                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6517                          if [ ], then theObject itself is a wire.
6518                 isCommonVertex If True  : closure by creation of a common vertex,
6519                                If False : closure by creation of an edge between ends.
6520                 theName Object name; when specified, this parameter is used
6521                         for result publication in the study. Otherwise, if automatic
6522                         publication is switched on, default value is used for result name.
6523
6524             Returns:
6525                 New GEOM.GEOM_Object, containing processed shape.
6526             """
6527             # Example: see GEOM_TestHealing.py
6528             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6529             RaiseIfFailed("CloseContour", self.HealOp)
6530             self._autoPublish(anObj, theName, "closeContour")
6531             return anObj
6532
6533         ## Addition of a point to a given edge object.
6534         #  @param theObject Shape to be processed.
6535         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6536         #                      if -1, then theObject itself is the edge.
6537         #  @param theValue Value of parameter on edge or length parameter,
6538         #                  depending on \a isByParameter.
6539         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6540         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6541         #  @param theName Object name; when specified, this parameter is used
6542         #         for result publication in the study. Otherwise, if automatic
6543         #         publication is switched on, default value is used for result name.
6544         #
6545         #  @return New GEOM.GEOM_Object, containing processed shape.
6546         #
6547         #  @ref tui_add_point_on_edge "Example"
6548         @ManageTransactions("HealOp")
6549         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6550             """
6551             Addition of a point to a given edge object.
6552
6553             Parameters:
6554                 theObject Shape to be processed.
6555                 theEdgeIndex Index of edge to be divided within theObject's shape,
6556                              if -1, then theObject itself is the edge.
6557                 theValue Value of parameter on edge or length parameter,
6558                          depending on isByParameter.
6559                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6560                               if FALSE : theValue is treated as a length parameter [0..1]
6561                 theName Object name; when specified, this parameter is used
6562                         for result publication in the study. Otherwise, if automatic
6563                         publication is switched on, default value is used for result name.
6564
6565             Returns:
6566                 New GEOM.GEOM_Object, containing processed shape.
6567             """
6568             # Example: see GEOM_TestHealing.py
6569             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6570             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6571             RaiseIfFailed("DivideEdge", self.HealOp)
6572             anObj.SetParameters(Parameters)
6573             self._autoPublish(anObj, theName, "divideEdge")
6574             return anObj
6575
6576         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6577         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6578         #  @param theVertices A list of vertices to suppress. If the list
6579         #                     is empty, all vertices in a wire will be assumed.
6580         #  @param theName Object name; when specified, this parameter is used
6581         #         for result publication in the study. Otherwise, if automatic
6582         #         publication is switched on, default value is used for result name.
6583         #
6584         #  @return New GEOM.GEOM_Object with modified wire.
6585         #
6586         #  @ref tui_fuse_collinear_edges "Example"
6587         @ManageTransactions("HealOp")
6588         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6589             """
6590             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6591
6592             Parameters:
6593                 theWire Wire to minimize the number of C1 continuous edges in.
6594                 theVertices A list of vertices to suppress. If the list
6595                             is empty, all vertices in a wire will be assumed.
6596                 theName Object name; when specified, this parameter is used
6597                         for result publication in the study. Otherwise, if automatic
6598                         publication is switched on, default value is used for result name.
6599
6600             Returns:
6601                 New GEOM.GEOM_Object with modified wire.
6602             """
6603             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6604             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6605             self._autoPublish(anObj, theName, "fuseEdges")
6606             return anObj
6607
6608         ## Change orientation of the given object. Updates given shape.
6609         #  @param theObject Shape to be processed.
6610         #  @return Updated <var>theObject</var>
6611         #
6612         #  @ref swig_todo "Example"
6613         @ManageTransactions("HealOp")
6614         def ChangeOrientationShell(self,theObject):
6615             """
6616             Change orientation of the given object. Updates given shape.
6617
6618             Parameters:
6619                 theObject Shape to be processed.
6620
6621             Returns:
6622                 Updated theObject
6623             """
6624             theObject = self.HealOp.ChangeOrientation(theObject)
6625             RaiseIfFailed("ChangeOrientation", self.HealOp)
6626             pass
6627
6628         ## Change orientation of the given object.
6629         #  @param theObject Shape to be processed.
6630         #  @param theName Object name; when specified, this parameter is used
6631         #         for result publication in the study. Otherwise, if automatic
6632         #         publication is switched on, default value is used for result name.
6633         #
6634         #  @return New GEOM.GEOM_Object, containing processed shape.
6635         #
6636         #  @ref swig_todo "Example"
6637         @ManageTransactions("HealOp")
6638         def ChangeOrientationShellCopy(self, theObject, theName=None):
6639             """
6640             Change orientation of the given object.
6641
6642             Parameters:
6643                 theObject Shape to be processed.
6644                 theName Object name; when specified, this parameter is used
6645                         for result publication in the study. Otherwise, if automatic
6646                         publication is switched on, default value is used for result name.
6647
6648             Returns:
6649                 New GEOM.GEOM_Object, containing processed shape.
6650             """
6651             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6652             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6653             self._autoPublish(anObj, theName, "reversed")
6654             return anObj
6655
6656         ## Try to limit tolerance of the given object by value \a theTolerance.
6657         #  @param theObject Shape to be processed.
6658         #  @param theTolerance Required tolerance value.
6659         #  @param theName Object name; when specified, this parameter is used
6660         #         for result publication in the study. Otherwise, if automatic
6661         #         publication is switched on, default value is used for result name.
6662         #
6663         #  @return New GEOM.GEOM_Object, containing processed shape.
6664         #
6665         #  @ref tui_limit_tolerance "Example"
6666         @ManageTransactions("HealOp")
6667         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6668             """
6669             Try to limit tolerance of the given object by value theTolerance.
6670
6671             Parameters:
6672                 theObject Shape to be processed.
6673                 theTolerance Required tolerance value.
6674                 theName Object name; when specified, this parameter is used
6675                         for result publication in the study. Otherwise, if automatic
6676                         publication is switched on, default value is used for result name.
6677
6678             Returns:
6679                 New GEOM.GEOM_Object, containing processed shape.
6680             """
6681             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6682             RaiseIfFailed("LimitTolerance", self.HealOp)
6683             self._autoPublish(anObj, theName, "limitTolerance")
6684             return anObj
6685
6686         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6687         #  that constitute a free boundary of the given shape.
6688         #  @param theObject Shape to get free boundary of.
6689         #  @param theName Object name; when specified, this parameter is used
6690         #         for result publication in the study. Otherwise, if automatic
6691         #         publication is switched on, default value is used for result name.
6692         #
6693         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6694         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6695         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6696         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6697         #
6698         #  @ref tui_measurement_tools_page "Example"
6699         @ManageTransactions("HealOp")
6700         def GetFreeBoundary(self, theObject, theName=None):
6701             """
6702             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6703             that constitute a free boundary of the given shape.
6704
6705             Parameters:
6706                 theObject Shape to get free boundary of.
6707                 theName Object name; when specified, this parameter is used
6708                         for result publication in the study. Otherwise, if automatic
6709                         publication is switched on, default value is used for result name.
6710
6711             Returns:
6712                 [status, theClosedWires, theOpenWires]
6713                  status: FALSE, if an error(s) occured during the method execution.
6714                  theClosedWires: Closed wires on the free boundary of the given shape.
6715                  theOpenWires: Open wires on the free boundary of the given shape.
6716             """
6717             # Example: see GEOM_TestHealing.py
6718             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
6719             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6720             self._autoPublish(anObj[1], theName, "closedWire")
6721             self._autoPublish(anObj[2], theName, "openWire")
6722             return anObj
6723
6724         ## Replace coincident faces in \a theShapes by one face.
6725         #  @param theShapes Initial shapes, either a list or compound of shapes.
6726         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6727         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6728         #                         otherwise all initial shapes.
6729         #  @param theName Object name; when specified, this parameter is used
6730         #         for result publication in the study. Otherwise, if automatic
6731         #         publication is switched on, default value is used for result name.
6732         #
6733         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
6734         #
6735         #  @ref tui_glue_faces "Example"
6736         @ManageTransactions("ShapesOp")
6737         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
6738             """
6739             Replace coincident faces in theShapes by one face.
6740
6741             Parameters:
6742                 theShapes Initial shapes, either a list or compound of shapes.
6743                 theTolerance Maximum distance between faces, which can be considered as coincident.
6744                 doKeepNonSolids If FALSE, only solids will present in the result,
6745                                 otherwise all initial shapes.
6746                 theName Object name; when specified, this parameter is used
6747                         for result publication in the study. Otherwise, if automatic
6748                         publication is switched on, default value is used for result name.
6749
6750             Returns:
6751                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
6752             """
6753             # Example: see GEOM_Spanner.py
6754             theTolerance,Parameters = ParseParameters(theTolerance)
6755             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
6756             if anObj is None:
6757                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6758             anObj.SetParameters(Parameters)
6759             self._autoPublish(anObj, theName, "glueFaces")
6760             return anObj
6761
6762         ## Find coincident faces in \a theShapes for possible gluing.
6763         #  @param theShapes Initial shapes, either a list or compound of shapes.
6764         #  @param theTolerance Maximum distance between faces,
6765         #                      which can be considered as coincident.
6766         #  @param theName Object name; when specified, this parameter is used
6767         #         for result publication in the study. Otherwise, if automatic
6768         #         publication is switched on, default value is used for result name.
6769         #
6770         #  @return GEOM.ListOfGO
6771         #
6772         #  @ref tui_glue_faces "Example"
6773         @ManageTransactions("ShapesOp")
6774         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
6775             """
6776             Find coincident faces in theShapes for possible gluing.
6777
6778             Parameters:
6779                 theShapes Initial shapes, either a list or compound of shapes.
6780                 theTolerance Maximum distance between faces,
6781                              which can be considered as coincident.
6782                 theName Object name; when specified, this parameter is used
6783                         for result publication in the study. Otherwise, if automatic
6784                         publication is switched on, default value is used for result name.
6785
6786             Returns:
6787                 GEOM.ListOfGO
6788             """
6789             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
6790             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6791             self._autoPublish(anObj, theName, "facesToGlue")
6792             return anObj
6793
6794         ## Replace coincident faces in \a theShapes by one face
6795         #  in compliance with given list of faces
6796         #  @param theShapes Initial shapes, either a list or compound of shapes.
6797         #  @param theTolerance Maximum distance between faces,
6798         #                      which can be considered as coincident.
6799         #  @param theFaces List of faces for gluing.
6800         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6801         #                         otherwise all initial shapes.
6802         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6803         #                        will be glued, otherwise only the edges,
6804         #                        belonging to <VAR>theFaces</VAR>.
6805         #  @param theName Object name; when specified, this parameter is used
6806         #         for result publication in the study. Otherwise, if automatic
6807         #         publication is switched on, default value is used for result name.
6808         #
6809         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
6810         #
6811         #  @ref tui_glue_faces "Example"
6812         @ManageTransactions("ShapesOp")
6813         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
6814                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6815             """
6816             Replace coincident faces in theShapes by one face
6817             in compliance with given list of faces
6818
6819             Parameters:
6820                 theShapes theShapes Initial shapes, either a list or compound of shapes.
6821                 theTolerance Maximum distance between faces,
6822                              which can be considered as coincident.
6823                 theFaces List of faces for gluing.
6824                 doKeepNonSolids If FALSE, only solids will present in the result,
6825                                 otherwise all initial shapes.
6826                 doGlueAllEdges If TRUE, all coincident edges of theShape
6827                                will be glued, otherwise only the edges,
6828                                belonging to theFaces.
6829                 theName Object name; when specified, this parameter is used
6830                         for result publication in the study. Otherwise, if automatic
6831                         publication is switched on, default value is used for result name.
6832
6833             Returns:
6834                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
6835             """
6836             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, theFaces,
6837                                                       doKeepNonSolids, doGlueAllEdges)
6838             if anObj is None:
6839                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6840             self._autoPublish(anObj, theName, "glueFaces")
6841             return anObj
6842
6843         ## Replace coincident edges in \a theShapes by one edge.
6844         #  @param theShapes Initial shapes, either a list or compound of shapes.
6845         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6846         #  @param theName Object name; when specified, this parameter is used
6847         #         for result publication in the study. Otherwise, if automatic
6848         #         publication is switched on, default value is used for result name.
6849         #
6850         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
6851         #
6852         #  @ref tui_glue_edges "Example"
6853         @ManageTransactions("ShapesOp")
6854         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
6855             """
6856             Replace coincident edges in theShapes by one edge.
6857
6858             Parameters:
6859                 theShapes Initial shapes, either a list or compound of shapes.
6860                 theTolerance Maximum distance between edges, which can be considered as coincident.
6861                 theName Object name; when specified, this parameter is used
6862                         for result publication in the study. Otherwise, if automatic
6863                         publication is switched on, default value is used for result name.
6864
6865             Returns:
6866                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
6867             """
6868             theTolerance,Parameters = ParseParameters(theTolerance)
6869             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
6870             if anObj is None:
6871                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6872             anObj.SetParameters(Parameters)
6873             self._autoPublish(anObj, theName, "glueEdges")
6874             return anObj
6875
6876         ## Find coincident edges in \a theShapes for possible gluing.
6877         #  @param theShapes Initial shapes, either a list or compound of shapes.
6878         #  @param theTolerance Maximum distance between edges,
6879         #                      which can be considered as coincident.
6880         #  @param theName Object name; when specified, this parameter is used
6881         #         for result publication in the study. Otherwise, if automatic
6882         #         publication is switched on, default value is used for result name.
6883         #
6884         #  @return GEOM.ListOfGO
6885         #
6886         #  @ref tui_glue_edges "Example"
6887         @ManageTransactions("ShapesOp")
6888         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
6889             """
6890             Find coincident edges in theShapes for possible gluing.
6891
6892             Parameters:
6893                 theShapes Initial shapes, either a list or compound of shapes.
6894                 theTolerance Maximum distance between edges,
6895                              which can be considered as coincident.
6896                 theName Object name; when specified, this parameter is used
6897                         for result publication in the study. Otherwise, if automatic
6898                         publication is switched on, default value is used for result name.
6899
6900             Returns:
6901                 GEOM.ListOfGO
6902             """
6903             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
6904             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6905             self._autoPublish(anObj, theName, "edgesToGlue")
6906             return anObj
6907
6908         ## Replace coincident edges in theShapes by one edge
6909         #  in compliance with given list of edges.
6910         #  @param theShapes Initial shapes, either a list or compound of shapes.
6911         #  @param theTolerance Maximum distance between edges,
6912         #                      which can be considered as coincident.
6913         #  @param theEdges List of edges for gluing.
6914         #  @param theName Object name; when specified, this parameter is used
6915         #         for result publication in the study. Otherwise, if automatic
6916         #         publication is switched on, default value is used for result name.
6917         #
6918         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
6919         #
6920         #  @ref tui_glue_edges "Example"
6921         @ManageTransactions("ShapesOp")
6922         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
6923             """
6924             Replace coincident edges in theShapes by one edge
6925             in compliance with given list of edges.
6926
6927             Parameters:
6928                 theShapes Initial shapes, either a list or compound of shapes.
6929                 theTolerance Maximum distance between edges,
6930                              which can be considered as coincident.
6931                 theEdges List of edges for gluing.
6932                 theName Object name; when specified, this parameter is used
6933                         for result publication in the study. Otherwise, if automatic
6934                         publication is switched on, default value is used for result name.
6935
6936             Returns:
6937                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
6938             """
6939             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
6940             if anObj is None:
6941                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6942             self._autoPublish(anObj, theName, "glueEdges")
6943             return anObj
6944
6945         # end of l3_healing
6946         ## @}
6947
6948         ## @addtogroup l3_boolean Boolean Operations
6949         ## @{
6950
6951         # -----------------------------------------------------------------------------
6952         # Boolean (Common, Cut, Fuse, Section)
6953         # -----------------------------------------------------------------------------
6954
6955         ## Perform one of boolean operations on two given shapes.
6956         #  @param theShape1 First argument for boolean operation.
6957         #  @param theShape2 Second argument for boolean operation.
6958         #  @param theOperation Indicates the operation to be done:\n
6959         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6960         #  @param checkSelfInte The flag that tells if the arguments should
6961         #         be checked for self-intersection prior to the operation.
6962         #  @param theName Object name; when specified, this parameter is used
6963         #         for result publication in the study. Otherwise, if automatic
6964         #         publication is switched on, default value is used for result name.
6965         #
6966         #  @note This algorithm doesn't find all types of self-intersections.
6967         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6968         #        vertex/face and edge/face intersections. Face/face
6969         #        intersections detection is switched off as it is a
6970         #        time-consuming operation that gives an impact on performance.
6971         #        To find all self-intersections please use
6972         #        CheckSelfIntersections() method.
6973         #
6974         #  @return New GEOM.GEOM_Object, containing the result shape.
6975         #
6976         #  @ref tui_fuse "Example"
6977         @ManageTransactions("BoolOp")
6978         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
6979             """
6980             Perform one of boolean operations on two given shapes.
6981
6982             Parameters:
6983                 theShape1 First argument for boolean operation.
6984                 theShape2 Second argument for boolean operation.
6985                 theOperation Indicates the operation to be done:
6986                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6987                 checkSelfInte The flag that tells if the arguments should
6988                               be checked for self-intersection prior to
6989                               the operation.
6990                 theName Object name; when specified, this parameter is used
6991                         for result publication in the study. Otherwise, if automatic
6992                         publication is switched on, default value is used for result name.
6993
6994             Note:
6995                     This algorithm doesn't find all types of self-intersections.
6996                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6997                     vertex/face and edge/face intersections. Face/face
6998                     intersections detection is switched off as it is a
6999                     time-consuming operation that gives an impact on performance.
7000                     To find all self-intersections please use
7001                     CheckSelfIntersections() method.
7002
7003             Returns:
7004                 New GEOM.GEOM_Object, containing the result shape.
7005             """
7006             # Example: see GEOM_TestAll.py
7007             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7008             RaiseIfFailed("MakeBoolean", self.BoolOp)
7009             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7010             self._autoPublish(anObj, theName, def_names[theOperation])
7011             return anObj
7012
7013         ## Perform Common boolean operation on two given shapes.
7014         #  @param theShape1 First argument for boolean operation.
7015         #  @param theShape2 Second argument for boolean operation.
7016         #  @param checkSelfInte The flag that tells if the arguments should
7017         #         be checked for self-intersection prior to the operation.
7018         #  @param theName Object name; when specified, this parameter is used
7019         #         for result publication in the study. Otherwise, if automatic
7020         #         publication is switched on, default value is used for result name.
7021         #
7022         #  @note This algorithm doesn't find all types of self-intersections.
7023         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7024         #        vertex/face and edge/face intersections. Face/face
7025         #        intersections detection is switched off as it is a
7026         #        time-consuming operation that gives an impact on performance.
7027         #        To find all self-intersections please use
7028         #        CheckSelfIntersections() method.
7029         #
7030         #  @return New GEOM.GEOM_Object, containing the result shape.
7031         #
7032         #  @ref tui_common "Example 1"
7033         #  \n @ref swig_MakeCommon "Example 2"
7034         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7035             """
7036             Perform Common boolean operation on two given shapes.
7037
7038             Parameters:
7039                 theShape1 First argument for boolean operation.
7040                 theShape2 Second argument for boolean operation.
7041                 checkSelfInte The flag that tells if the arguments should
7042                               be checked for self-intersection prior to
7043                               the operation.
7044                 theName Object name; when specified, this parameter is used
7045                         for result publication in the study. Otherwise, if automatic
7046                         publication is switched on, default value is used for result name.
7047
7048             Note:
7049                     This algorithm doesn't find all types of self-intersections.
7050                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7051                     vertex/face and edge/face intersections. Face/face
7052                     intersections detection is switched off as it is a
7053                     time-consuming operation that gives an impact on performance.
7054                     To find all self-intersections please use
7055                     CheckSelfIntersections() method.
7056
7057             Returns:
7058                 New GEOM.GEOM_Object, containing the result shape.
7059             """
7060             # Example: see GEOM_TestOthers.py
7061             # note: auto-publishing is done in self.MakeBoolean()
7062             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7063
7064         ## Perform Cut boolean operation on two given shapes.
7065         #  @param theShape1 First argument for boolean operation.
7066         #  @param theShape2 Second argument for boolean operation.
7067         #  @param checkSelfInte The flag that tells if the arguments should
7068         #         be checked for self-intersection prior to the operation.
7069         #  @param theName Object name; when specified, this parameter is used
7070         #         for result publication in the study. Otherwise, if automatic
7071         #         publication is switched on, default value is used for result name.
7072         #
7073         #  @note This algorithm doesn't find all types of self-intersections.
7074         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7075         #        vertex/face and edge/face intersections. Face/face
7076         #        intersections detection is switched off as it is a
7077         #        time-consuming operation that gives an impact on performance.
7078         #        To find all self-intersections please use
7079         #        CheckSelfIntersections() method.
7080         #
7081         #  @return New GEOM.GEOM_Object, containing the result shape.
7082         #
7083         #  @ref tui_cut "Example 1"
7084         #  \n @ref swig_MakeCommon "Example 2"
7085         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7086             """
7087             Perform Cut boolean operation on two given shapes.
7088
7089             Parameters:
7090                 theShape1 First argument for boolean operation.
7091                 theShape2 Second argument for boolean operation.
7092                 checkSelfInte The flag that tells if the arguments should
7093                               be checked for self-intersection prior to
7094                               the operation.
7095                 theName Object name; when specified, this parameter is used
7096                         for result publication in the study. Otherwise, if automatic
7097                         publication is switched on, default value is used for result name.
7098
7099             Note:
7100                     This algorithm doesn't find all types of self-intersections.
7101                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7102                     vertex/face and edge/face intersections. Face/face
7103                     intersections detection is switched off as it is a
7104                     time-consuming operation that gives an impact on performance.
7105                     To find all self-intersections please use
7106                     CheckSelfIntersections() method.
7107
7108             Returns:
7109                 New GEOM.GEOM_Object, containing the result shape.
7110
7111             """
7112             # Example: see GEOM_TestOthers.py
7113             # note: auto-publishing is done in self.MakeBoolean()
7114             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7115
7116         ## Perform Fuse boolean operation on two given shapes.
7117         #  @param theShape1 First argument for boolean operation.
7118         #  @param theShape2 Second argument for boolean operation.
7119         #  @param checkSelfInte The flag that tells if the arguments should
7120         #         be checked for self-intersection prior to the operation.
7121         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7122         #         operation should be performed during the operation.
7123         #  @param theName Object name; when specified, this parameter is used
7124         #         for result publication in the study. Otherwise, if automatic
7125         #         publication is switched on, default value is used for result name.
7126         #
7127         #  @note This algorithm doesn't find all types of self-intersections.
7128         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7129         #        vertex/face and edge/face intersections. Face/face
7130         #        intersections detection is switched off as it is a
7131         #        time-consuming operation that gives an impact on performance.
7132         #        To find all self-intersections please use
7133         #        CheckSelfIntersections() method.
7134         #
7135         #  @return New GEOM.GEOM_Object, containing the result shape.
7136         #
7137         #  @ref tui_fuse "Example 1"
7138         #  \n @ref swig_MakeCommon "Example 2"
7139         @ManageTransactions("BoolOp")
7140         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7141                      rmExtraEdges=False, theName=None):
7142             """
7143             Perform Fuse boolean operation on two given shapes.
7144
7145             Parameters:
7146                 theShape1 First argument for boolean operation.
7147                 theShape2 Second argument for boolean operation.
7148                 checkSelfInte The flag that tells if the arguments should
7149                               be checked for self-intersection prior to
7150                               the operation.
7151                 rmExtraEdges The flag that tells if Remove Extra Edges
7152                              operation should be performed during the operation.
7153                 theName Object name; when specified, this parameter is used
7154                         for result publication in the study. Otherwise, if automatic
7155                         publication is switched on, default value is used for result name.
7156
7157             Note:
7158                     This algorithm doesn't find all types of self-intersections.
7159                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7160                     vertex/face and edge/face intersections. Face/face
7161                     intersections detection is switched off as it is a
7162                     time-consuming operation that gives an impact on performance.
7163                     To find all self-intersections please use
7164                     CheckSelfIntersections() method.
7165
7166             Returns:
7167                 New GEOM.GEOM_Object, containing the result shape.
7168
7169             """
7170             # Example: see GEOM_TestOthers.py
7171             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7172                                          checkSelfInte, rmExtraEdges)
7173             RaiseIfFailed("MakeFuse", self.BoolOp)
7174             self._autoPublish(anObj, theName, "fuse")
7175             return anObj
7176
7177         ## Perform Section boolean operation on two given shapes.
7178         #  @param theShape1 First argument for boolean operation.
7179         #  @param theShape2 Second argument for boolean operation.
7180         #  @param checkSelfInte The flag that tells if the arguments should
7181         #         be checked for self-intersection prior to the operation.
7182         #  @param theName Object name; when specified, this parameter is used
7183         #         for result publication in the study. Otherwise, if automatic
7184         #         publication is switched on, default value is used for result name.
7185         #
7186         #  @note This algorithm doesn't find all types of self-intersections.
7187         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7188         #        vertex/face and edge/face intersections. Face/face
7189         #        intersections detection is switched off as it is a
7190         #        time-consuming operation that gives an impact on performance.
7191         #        To find all self-intersections please use
7192         #        CheckSelfIntersections() method.
7193         #
7194         #  @return New GEOM.GEOM_Object, containing the result shape.
7195         #
7196         #  @ref tui_section "Example 1"
7197         #  \n @ref swig_MakeCommon "Example 2"
7198         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7199             """
7200             Perform Section boolean operation on two given shapes.
7201
7202             Parameters:
7203                 theShape1 First argument for boolean operation.
7204                 theShape2 Second argument for boolean operation.
7205                 checkSelfInte The flag that tells if the arguments should
7206                               be checked for self-intersection prior to
7207                               the operation.
7208                 theName Object name; when specified, this parameter is used
7209                         for result publication in the study. Otherwise, if automatic
7210                         publication is switched on, default value is used for result name.
7211
7212             Note:
7213                     This algorithm doesn't find all types of self-intersections.
7214                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7215                     vertex/face and edge/face intersections. Face/face
7216                     intersections detection is switched off as it is a
7217                     time-consuming operation that gives an impact on performance.
7218                     To find all self-intersections please use
7219                     CheckSelfIntersections() method.
7220
7221             Returns:
7222                 New GEOM.GEOM_Object, containing the result shape.
7223
7224             """
7225             # Example: see GEOM_TestOthers.py
7226             # note: auto-publishing is done in self.MakeBoolean()
7227             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7228
7229         ## Perform Fuse boolean operation on the list of shapes.
7230         #  @param theShapesList Shapes to be fused.
7231         #  @param checkSelfInte The flag that tells if the arguments should
7232         #         be checked for self-intersection prior to the operation.
7233         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7234         #         operation should be performed during the operation.
7235         #  @param theName Object name; when specified, this parameter is used
7236         #         for result publication in the study. Otherwise, if automatic
7237         #         publication is switched on, default value is used for result name.
7238         #
7239         #  @note This algorithm doesn't find all types of self-intersections.
7240         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7241         #        vertex/face and edge/face intersections. Face/face
7242         #        intersections detection is switched off as it is a
7243         #        time-consuming operation that gives an impact on performance.
7244         #        To find all self-intersections please use
7245         #        CheckSelfIntersections() method.
7246         #
7247         #  @return New GEOM.GEOM_Object, containing the result shape.
7248         #
7249         #  @ref tui_fuse "Example 1"
7250         #  \n @ref swig_MakeCommon "Example 2"
7251         @ManageTransactions("BoolOp")
7252         def MakeFuseList(self, theShapesList, checkSelfInte=False,
7253                          rmExtraEdges=False, theName=None):
7254             """
7255             Perform Fuse boolean operation on the list of shapes.
7256
7257             Parameters:
7258                 theShapesList Shapes to be fused.
7259                 checkSelfInte The flag that tells if the arguments should
7260                               be checked for self-intersection prior to
7261                               the operation.
7262                 rmExtraEdges The flag that tells if Remove Extra Edges
7263                              operation should be performed during the operation.
7264                 theName Object name; when specified, this parameter is used
7265                         for result publication in the study. Otherwise, if automatic
7266                         publication is switched on, default value is used for result name.
7267
7268             Note:
7269                     This algorithm doesn't find all types of self-intersections.
7270                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7271                     vertex/face and edge/face intersections. Face/face
7272                     intersections detection is switched off as it is a
7273                     time-consuming operation that gives an impact on performance.
7274                     To find all self-intersections please use
7275                     CheckSelfIntersections() method.
7276
7277             Returns:
7278                 New GEOM.GEOM_Object, containing the result shape.
7279
7280             """
7281             # Example: see GEOM_TestOthers.py
7282             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
7283                                              rmExtraEdges)
7284             RaiseIfFailed("MakeFuseList", self.BoolOp)
7285             self._autoPublish(anObj, theName, "fuse")
7286             return anObj
7287
7288         ## Perform Common boolean operation on the list of shapes.
7289         #  @param theShapesList Shapes for Common operation.
7290         #  @param checkSelfInte The flag that tells if the arguments should
7291         #         be checked for self-intersection prior to the operation.
7292         #  @param theName Object name; when specified, this parameter is used
7293         #         for result publication in the study. Otherwise, if automatic
7294         #         publication is switched on, default value is used for result name.
7295         #
7296         #  @note This algorithm doesn't find all types of self-intersections.
7297         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7298         #        vertex/face and edge/face intersections. Face/face
7299         #        intersections detection is switched off as it is a
7300         #        time-consuming operation that gives an impact on performance.
7301         #        To find all self-intersections please use
7302         #        CheckSelfIntersections() method.
7303         #
7304         #  @return New GEOM.GEOM_Object, containing the result shape.
7305         #
7306         #  @ref tui_common "Example 1"
7307         #  \n @ref swig_MakeCommon "Example 2"
7308         @ManageTransactions("BoolOp")
7309         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7310             """
7311             Perform Common boolean operation on the list of shapes.
7312
7313             Parameters:
7314                 theShapesList Shapes for Common operation.
7315                 checkSelfInte The flag that tells if the arguments should
7316                               be checked for self-intersection prior to
7317                               the operation.
7318                 theName Object name; when specified, this parameter is used
7319                         for result publication in the study. Otherwise, if automatic
7320                         publication is switched on, default value is used for result name.
7321
7322             Note:
7323                     This algorithm doesn't find all types of self-intersections.
7324                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7325                     vertex/face and edge/face intersections. Face/face
7326                     intersections detection is switched off as it is a
7327                     time-consuming operation that gives an impact on performance.
7328                     To find all self-intersections please use
7329                     CheckSelfIntersections() method.
7330
7331             Returns:
7332                 New GEOM.GEOM_Object, containing the result shape.
7333
7334             """
7335             # Example: see GEOM_TestOthers.py
7336             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7337             RaiseIfFailed("MakeCommonList", self.BoolOp)
7338             self._autoPublish(anObj, theName, "common")
7339             return anObj
7340
7341         ## Perform Cut boolean operation on one object and the list of tools.
7342         #  @param theMainShape The object of the operation.
7343         #  @param theShapesList The list of tools of the operation.
7344         #  @param checkSelfInte The flag that tells if the arguments should
7345         #         be checked for self-intersection prior to the operation.
7346         #  @param theName Object name; when specified, this parameter is used
7347         #         for result publication in the study. Otherwise, if automatic
7348         #         publication is switched on, default value is used for result name.
7349         #
7350         #  @note This algorithm doesn't find all types of self-intersections.
7351         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7352         #        vertex/face and edge/face intersections. Face/face
7353         #        intersections detection is switched off as it is a
7354         #        time-consuming operation that gives an impact on performance.
7355         #        To find all self-intersections please use
7356         #        CheckSelfIntersections() method.
7357         #
7358         #  @return New GEOM.GEOM_Object, containing the result shape.
7359         #
7360         #  @ref tui_cut "Example 1"
7361         #  \n @ref swig_MakeCommon "Example 2"
7362         @ManageTransactions("BoolOp")
7363         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7364             """
7365             Perform Cut boolean operation on one object and the list of tools.
7366
7367             Parameters:
7368                 theMainShape The object of the operation.
7369                 theShapesList The list of tools of the operation.
7370                 checkSelfInte The flag that tells if the arguments should
7371                               be checked for self-intersection prior to
7372                               the operation.
7373                 theName Object name; when specified, this parameter is used
7374                         for result publication in the study. Otherwise, if automatic
7375                         publication is switched on, default value is used for result name.
7376
7377             Note:
7378                     This algorithm doesn't find all types of self-intersections.
7379                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7380                     vertex/face and edge/face intersections. Face/face
7381                     intersections detection is switched off as it is a
7382                     time-consuming operation that gives an impact on performance.
7383                     To find all self-intersections please use
7384                     CheckSelfIntersections() method.
7385
7386             Returns:
7387                 New GEOM.GEOM_Object, containing the result shape.
7388
7389             """
7390             # Example: see GEOM_TestOthers.py
7391             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7392             RaiseIfFailed("MakeCutList", self.BoolOp)
7393             self._autoPublish(anObj, theName, "cut")
7394             return anObj
7395
7396         # end of l3_boolean
7397         ## @}
7398
7399         ## @addtogroup l3_basic_op
7400         ## @{
7401
7402         ## Perform partition operation.
7403         #  @param ListShapes Shapes to be intersected.
7404         #  @param ListTools Shapes to intersect theShapes.
7405         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7406         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7407         #         type will be detected automatically.
7408         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7409         #                             target type (equal to Limit) are kept in the result,
7410         #                             else standalone shapes of lower dimension
7411         #                             are kept also (if they exist).
7412         #
7413         #  @param theName Object name; when specified, this parameter is used
7414         #         for result publication in the study. Otherwise, if automatic
7415         #         publication is switched on, default value is used for result name.
7416         #
7417         #  @note Each compound from ListShapes and ListTools will be exploded
7418         #        in order to avoid possible intersection between shapes from this compound.
7419         #
7420         #  After implementation new version of PartitionAlgo (October 2006)
7421         #  other parameters are ignored by current functionality. They are kept
7422         #  in this function only for support old versions.
7423         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7424         #         Each shape from theKeepInside must belong to theShapes also.
7425         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7426         #         Each shape from theRemoveInside must belong to theShapes also.
7427         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7428         #      @param ListMaterials Material indices for each shape. Make sence,
7429         #         only if theRemoveWebs is TRUE.
7430         #
7431         #  @return New GEOM.GEOM_Object, containing the result shapes.
7432         #
7433         #  @ref tui_partition "Example"
7434         @ManageTransactions("BoolOp")
7435         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7436                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7437                           KeepNonlimitShapes=0, theName=None):
7438             """
7439             Perform partition operation.
7440
7441             Parameters:
7442                 ListShapes Shapes to be intersected.
7443                 ListTools Shapes to intersect theShapes.
7444                 Limit Type of resulting shapes (see geompy.ShapeType)
7445                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7446                       type will be detected automatically.
7447                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7448                                     target type (equal to Limit) are kept in the result,
7449                                     else standalone shapes of lower dimension
7450                                     are kept also (if they exist).
7451
7452                 theName Object name; when specified, this parameter is used
7453                         for result publication in the study. Otherwise, if automatic
7454                         publication is switched on, default value is used for result name.
7455             Note:
7456                     Each compound from ListShapes and ListTools will be exploded
7457                     in order to avoid possible intersection between shapes from
7458                     this compound.
7459
7460             After implementation new version of PartitionAlgo (October 2006) other
7461             parameters are ignored by current functionality. They are kept in this
7462             function only for support old versions.
7463
7464             Ignored parameters:
7465                 ListKeepInside Shapes, outside which the results will be deleted.
7466                                Each shape from theKeepInside must belong to theShapes also.
7467                 ListRemoveInside Shapes, inside which the results will be deleted.
7468                                  Each shape from theRemoveInside must belong to theShapes also.
7469                 RemoveWebs If TRUE, perform Glue 3D algorithm.
7470                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
7471
7472             Returns:
7473                 New GEOM.GEOM_Object, containing the result shapes.
7474             """
7475             # Example: see GEOM_TestAll.py
7476             if Limit == self.ShapeType["AUTO"]:
7477                 # automatic detection of the most appropriate shape limit type
7478                 lim = GEOM.SHAPE
7479                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7480                 Limit = EnumToLong(lim)
7481                 pass
7482             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
7483                                               ListKeepInside, ListRemoveInside,
7484                                               Limit, RemoveWebs, ListMaterials,
7485                                               KeepNonlimitShapes);
7486             RaiseIfFailed("MakePartition", self.BoolOp)
7487             self._autoPublish(anObj, theName, "partition")
7488             return anObj
7489
7490         ## Perform partition operation.
7491         #  This method may be useful if it is needed to make a partition for
7492         #  compound contains nonintersected shapes. Performance will be better
7493         #  since intersection between shapes from compound is not performed.
7494         #
7495         #  Description of all parameters as in previous method MakePartition().
7496         #  One additional parameter is provided:
7497         #  @param checkSelfInte The flag that tells if the arguments should
7498         #         be checked for self-intersection prior to the operation.
7499         #
7500         #  @note This algorithm doesn't find all types of self-intersections.
7501         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7502         #        vertex/face and edge/face intersections. Face/face
7503         #        intersections detection is switched off as it is a
7504         #        time-consuming operation that gives an impact on performance.
7505         #        To find all self-intersections please use
7506         #        CheckSelfIntersections() method.
7507         #
7508         #  @note Passed compounds (via ListShapes or via ListTools)
7509         #           have to consist of nonintersecting shapes.
7510         #
7511         #  @return New GEOM.GEOM_Object, containing the result shapes.
7512         #
7513         #  @ref swig_todo "Example"
7514         @ManageTransactions("BoolOp")
7515         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
7516                                                  ListKeepInside=[], ListRemoveInside=[],
7517                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
7518                                                  ListMaterials=[], KeepNonlimitShapes=0,
7519                                                  checkSelfInte=False, theName=None):
7520             """
7521             Perform partition operation.
7522             This method may be useful if it is needed to make a partition for
7523             compound contains nonintersected shapes. Performance will be better
7524             since intersection between shapes from compound is not performed.
7525
7526             Parameters:
7527                 Description of all parameters as in method geompy.MakePartition.
7528                 One additional parameter is provided:
7529                 checkSelfInte The flag that tells if the arguments should
7530                               be checked for self-intersection prior to
7531                               the operation.
7532
7533             Note:
7534                     This algorithm doesn't find all types of self-intersections.
7535                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7536                     vertex/face and edge/face intersections. Face/face
7537                     intersections detection is switched off as it is a
7538                     time-consuming operation that gives an impact on performance.
7539                     To find all self-intersections please use
7540                     CheckSelfIntersections() method.
7541
7542             NOTE:
7543                 Passed compounds (via ListShapes or via ListTools)
7544                 have to consist of nonintersecting shapes.
7545
7546             Returns:
7547                 New GEOM.GEOM_Object, containing the result shapes.
7548             """
7549             if Limit == self.ShapeType["AUTO"]:
7550                 # automatic detection of the most appropriate shape limit type
7551                 lim = GEOM.SHAPE
7552                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7553                 Limit = EnumToLong(lim)
7554                 pass
7555             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7556                                                                      ListKeepInside, ListRemoveInside,
7557                                                                      Limit, RemoveWebs, ListMaterials,
7558                                                                      KeepNonlimitShapes, checkSelfInte);
7559             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7560             self._autoPublish(anObj, theName, "partition")
7561             return anObj
7562
7563         ## See method MakePartition() for more information.
7564         #
7565         #  @ref tui_partition "Example 1"
7566         #  \n @ref swig_Partition "Example 2"
7567         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7568                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7569                       KeepNonlimitShapes=0, theName=None):
7570             """
7571             See method geompy.MakePartition for more information.
7572             """
7573             # Example: see GEOM_TestOthers.py
7574             # note: auto-publishing is done in self.MakePartition()
7575             anObj = self.MakePartition(ListShapes, ListTools,
7576                                        ListKeepInside, ListRemoveInside,
7577                                        Limit, RemoveWebs, ListMaterials,
7578                                        KeepNonlimitShapes, theName);
7579             return anObj
7580
7581         ## Perform partition of the Shape with the Plane
7582         #  @param theShape Shape to be intersected.
7583         #  @param thePlane Tool shape, to intersect theShape.
7584         #  @param theName Object name; when specified, this parameter is used
7585         #         for result publication in the study. Otherwise, if automatic
7586         #         publication is switched on, default value is used for result name.
7587         #
7588         #  @return New GEOM.GEOM_Object, containing the result shape.
7589         #
7590         #  @ref tui_partition "Example"
7591         @ManageTransactions("BoolOp")
7592         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7593             """
7594             Perform partition of the Shape with the Plane
7595
7596             Parameters:
7597                 theShape Shape to be intersected.
7598                 thePlane Tool shape, to intersect theShape.
7599                 theName Object name; when specified, this parameter is used
7600                         for result publication in the study. Otherwise, if automatic
7601                         publication is switched on, default value is used for result name.
7602
7603             Returns:
7604                 New GEOM.GEOM_Object, containing the result shape.
7605             """
7606             # Example: see GEOM_TestAll.py
7607             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7608             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7609             self._autoPublish(anObj, theName, "partition")
7610             return anObj
7611
7612         # end of l3_basic_op
7613         ## @}
7614
7615         ## @addtogroup l3_transform
7616         ## @{
7617
7618         ## Translate the given object along the vector, specified
7619         #  by its end points.
7620         #  @param theObject The object to be translated.
7621         #  @param thePoint1 Start point of translation vector.
7622         #  @param thePoint2 End point of translation vector.
7623         #  @param theCopy Flag used to translate object itself or create a copy.
7624         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7625         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7626         @ManageTransactions("TrsfOp")
7627         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7628             """
7629             Translate the given object along the vector, specified by its end points.
7630
7631             Parameters:
7632                 theObject The object to be translated.
7633                 thePoint1 Start point of translation vector.
7634                 thePoint2 End point of translation vector.
7635                 theCopy Flag used to translate object itself or create a copy.
7636
7637             Returns:
7638                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7639                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7640             """
7641             if theCopy:
7642                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7643             else:
7644                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7645             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7646             return anObj
7647
7648         ## Translate the given object along the vector, specified
7649         #  by its end points, creating its copy before the translation.
7650         #  @param theObject The object to be translated.
7651         #  @param thePoint1 Start point of translation vector.
7652         #  @param thePoint2 End point of translation vector.
7653         #  @param theName Object name; when specified, this parameter is used
7654         #         for result publication in the study. Otherwise, if automatic
7655         #         publication is switched on, default value is used for result name.
7656         #
7657         #  @return New GEOM.GEOM_Object, containing the translated object.
7658         #
7659         #  @ref tui_translation "Example 1"
7660         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7661         @ManageTransactions("TrsfOp")
7662         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7663             """
7664             Translate the given object along the vector, specified
7665             by its end points, creating its copy before the translation.
7666
7667             Parameters:
7668                 theObject The object to be translated.
7669                 thePoint1 Start point of translation vector.
7670                 thePoint2 End point of translation vector.
7671                 theName Object name; when specified, this parameter is used
7672                         for result publication in the study. Otherwise, if automatic
7673                         publication is switched on, default value is used for result name.
7674
7675             Returns:
7676                 New GEOM.GEOM_Object, containing the translated object.
7677             """
7678             # Example: see GEOM_TestAll.py
7679             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7680             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7681             self._autoPublish(anObj, theName, "translated")
7682             return anObj
7683
7684         ## Translate the given object along the vector, specified by its components.
7685         #  @param theObject The object to be translated.
7686         #  @param theDX,theDY,theDZ Components of translation vector.
7687         #  @param theCopy Flag used to translate object itself or create a copy.
7688         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7689         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7690         #
7691         #  @ref tui_translation "Example"
7692         @ManageTransactions("TrsfOp")
7693         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7694             """
7695             Translate the given object along the vector, specified by its components.
7696
7697             Parameters:
7698                 theObject The object to be translated.
7699                 theDX,theDY,theDZ Components of translation vector.
7700                 theCopy Flag used to translate object itself or create a copy.
7701
7702             Returns:
7703                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7704                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7705             """
7706             # Example: see GEOM_TestAll.py
7707             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7708             if theCopy:
7709                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7710             else:
7711                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7712             anObj.SetParameters(Parameters)
7713             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7714             return anObj
7715
7716         ## Translate the given object along the vector, specified
7717         #  by its components, creating its copy before the translation.
7718         #  @param theObject The object to be translated.
7719         #  @param theDX,theDY,theDZ Components of translation vector.
7720         #  @param theName Object name; when specified, this parameter is used
7721         #         for result publication in the study. Otherwise, if automatic
7722         #         publication is switched on, default value is used for result name.
7723         #
7724         #  @return New GEOM.GEOM_Object, containing the translated object.
7725         #
7726         #  @ref tui_translation "Example"
7727         @ManageTransactions("TrsfOp")
7728         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7729             """
7730             Translate the given object along the vector, specified
7731             by its components, creating its copy before the translation.
7732
7733             Parameters:
7734                 theObject The object to be translated.
7735                 theDX,theDY,theDZ Components of translation vector.
7736                 theName Object name; when specified, this parameter is used
7737                         for result publication in the study. Otherwise, if automatic
7738                         publication is switched on, default value is used for result name.
7739
7740             Returns:
7741                 New GEOM.GEOM_Object, containing the translated object.
7742             """
7743             # Example: see GEOM_TestAll.py
7744             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7745             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7746             anObj.SetParameters(Parameters)
7747             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7748             self._autoPublish(anObj, theName, "translated")
7749             return anObj
7750
7751         ## Translate the given object along the given vector.
7752         #  @param theObject The object to be translated.
7753         #  @param theVector The translation vector.
7754         #  @param theCopy Flag used to translate object itself or create a copy.
7755         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7756         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7757         @ManageTransactions("TrsfOp")
7758         def TranslateVector(self, theObject, theVector, theCopy=False):
7759             """
7760             Translate the given object along the given vector.
7761
7762             Parameters:
7763                 theObject The object to be translated.
7764                 theVector The translation vector.
7765                 theCopy Flag used to translate object itself or create a copy.
7766
7767             Returns:
7768                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7769                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7770             """
7771             if theCopy:
7772                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7773             else:
7774                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7775             RaiseIfFailed("TranslateVector", self.TrsfOp)
7776             return anObj
7777
7778         ## Translate the given object along the given vector,
7779         #  creating its copy before the translation.
7780         #  @param theObject The object to be translated.
7781         #  @param theVector The translation vector.
7782         #  @param theName Object name; when specified, this parameter is used
7783         #         for result publication in the study. Otherwise, if automatic
7784         #         publication is switched on, default value is used for result name.
7785         #
7786         #  @return New GEOM.GEOM_Object, containing the translated object.
7787         #
7788         #  @ref tui_translation "Example"
7789         @ManageTransactions("TrsfOp")
7790         def MakeTranslationVector(self, theObject, theVector, theName=None):
7791             """
7792             Translate the given object along the given vector,
7793             creating its copy before the translation.
7794
7795             Parameters:
7796                 theObject The object to be translated.
7797                 theVector The translation vector.
7798                 theName Object name; when specified, this parameter is used
7799                         for result publication in the study. Otherwise, if automatic
7800                         publication is switched on, default value is used for result name.
7801
7802             Returns:
7803                 New GEOM.GEOM_Object, containing the translated object.
7804             """
7805             # Example: see GEOM_TestAll.py
7806             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7807             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7808             self._autoPublish(anObj, theName, "translated")
7809             return anObj
7810
7811         ## Translate the given object along the given vector on given distance.
7812         #  @param theObject The object to be translated.
7813         #  @param theVector The translation vector.
7814         #  @param theDistance The translation distance.
7815         #  @param theCopy Flag used to translate object itself or create a copy.
7816         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7817         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7818         #
7819         #  @ref tui_translation "Example"
7820         @ManageTransactions("TrsfOp")
7821         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7822             """
7823             Translate the given object along the given vector on given distance.
7824
7825             Parameters:
7826                 theObject The object to be translated.
7827                 theVector The translation vector.
7828                 theDistance The translation distance.
7829                 theCopy Flag used to translate object itself or create a copy.
7830
7831             Returns:
7832                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7833                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7834             """
7835             # Example: see GEOM_TestAll.py
7836             theDistance,Parameters = ParseParameters(theDistance)
7837             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7838             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7839             anObj.SetParameters(Parameters)
7840             return anObj
7841
7842         ## Translate the given object along the given vector on given distance,
7843         #  creating its copy before the translation.
7844         #  @param theObject The object to be translated.
7845         #  @param theVector The translation vector.
7846         #  @param theDistance The translation distance.
7847         #  @param theName Object name; when specified, this parameter is used
7848         #         for result publication in the study. Otherwise, if automatic
7849         #         publication is switched on, default value is used for result name.
7850         #
7851         #  @return New GEOM.GEOM_Object, containing the translated object.
7852         #
7853         #  @ref tui_translation "Example"
7854         @ManageTransactions("TrsfOp")
7855         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7856             """
7857             Translate the given object along the given vector on given distance,
7858             creating its copy before the translation.
7859
7860             Parameters:
7861                 theObject The object to be translated.
7862                 theVector The translation vector.
7863                 theDistance The translation distance.
7864                 theName Object name; when specified, this parameter is used
7865                         for result publication in the study. Otherwise, if automatic
7866                         publication is switched on, default value is used for result name.
7867
7868             Returns:
7869                 New GEOM.GEOM_Object, containing the translated object.
7870             """
7871             # Example: see GEOM_TestAll.py
7872             theDistance,Parameters = ParseParameters(theDistance)
7873             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7874             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7875             anObj.SetParameters(Parameters)
7876             self._autoPublish(anObj, theName, "translated")
7877             return anObj
7878
7879         ## Rotate the given object around the given axis on the given angle.
7880         #  @param theObject The object to be rotated.
7881         #  @param theAxis Rotation axis.
7882         #  @param theAngle Rotation angle in radians.
7883         #  @param theCopy Flag used to rotate object itself or create a copy.
7884         #
7885         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7886         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7887         #
7888         #  @ref tui_rotation "Example"
7889         @ManageTransactions("TrsfOp")
7890         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7891             """
7892             Rotate the given object around the given axis on the given angle.
7893
7894             Parameters:
7895                 theObject The object to be rotated.
7896                 theAxis Rotation axis.
7897                 theAngle Rotation angle in radians.
7898                 theCopy Flag used to rotate object itself or create a copy.
7899
7900             Returns:
7901                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7902                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7903             """
7904             # Example: see GEOM_TestAll.py
7905             flag = False
7906             if isinstance(theAngle,str):
7907                 flag = True
7908             theAngle, Parameters = ParseParameters(theAngle)
7909             if flag:
7910                 theAngle = theAngle*math.pi/180.0
7911             if theCopy:
7912                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7913             else:
7914                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7915             RaiseIfFailed("Rotate", self.TrsfOp)
7916             anObj.SetParameters(Parameters)
7917             return anObj
7918
7919         ## Rotate the given object around the given axis
7920         #  on the given angle, creating its copy before the rotation.
7921         #  @param theObject The object to be rotated.
7922         #  @param theAxis Rotation axis.
7923         #  @param theAngle Rotation angle in radians.
7924         #  @param theName Object name; when specified, this parameter is used
7925         #         for result publication in the study. Otherwise, if automatic
7926         #         publication is switched on, default value is used for result name.
7927         #
7928         #  @return New GEOM.GEOM_Object, containing the rotated object.
7929         #
7930         #  @ref tui_rotation "Example"
7931         @ManageTransactions("TrsfOp")
7932         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7933             """
7934             Rotate the given object around the given axis
7935             on the given angle, creating its copy before the rotatation.
7936
7937             Parameters:
7938                 theObject The object to be rotated.
7939                 theAxis Rotation axis.
7940                 theAngle Rotation angle in radians.
7941                 theName Object name; when specified, this parameter is used
7942                         for result publication in the study. Otherwise, if automatic
7943                         publication is switched on, default value is used for result name.
7944
7945             Returns:
7946                 New GEOM.GEOM_Object, containing the rotated object.
7947             """
7948             # Example: see GEOM_TestAll.py
7949             flag = False
7950             if isinstance(theAngle,str):
7951                 flag = True
7952             theAngle, Parameters = ParseParameters(theAngle)
7953             if flag:
7954                 theAngle = theAngle*math.pi/180.0
7955             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7956             RaiseIfFailed("RotateCopy", self.TrsfOp)
7957             anObj.SetParameters(Parameters)
7958             self._autoPublish(anObj, theName, "rotated")
7959             return anObj
7960
7961         ## Rotate given object around vector perpendicular to plane
7962         #  containing three points.
7963         #  @param theObject The object to be rotated.
7964         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7965         #  containing the three points.
7966         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7967         #  @param theCopy Flag used to rotate object itself or create a copy.
7968         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7969         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7970         @ManageTransactions("TrsfOp")
7971         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7972             """
7973             Rotate given object around vector perpendicular to plane
7974             containing three points.
7975
7976             Parameters:
7977                 theObject The object to be rotated.
7978                 theCentPoint central point  the axis is the vector perpendicular to the plane
7979                              containing the three points.
7980                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7981                 theCopy Flag used to rotate object itself or create a copy.
7982
7983             Returns:
7984                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7985                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7986             """
7987             if theCopy:
7988                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7989             else:
7990                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7991             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7992             return anObj
7993
7994         ## Rotate given object around vector perpendicular to plane
7995         #  containing three points, creating its copy before the rotatation.
7996         #  @param theObject The object to be rotated.
7997         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7998         #  containing the three points.
7999         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8000         #  @param theName Object name; when specified, this parameter is used
8001         #         for result publication in the study. Otherwise, if automatic
8002         #         publication is switched on, default value is used for result name.
8003         #
8004         #  @return New GEOM.GEOM_Object, containing the rotated object.
8005         #
8006         #  @ref tui_rotation "Example"
8007         @ManageTransactions("TrsfOp")
8008         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8009             """
8010             Rotate given object around vector perpendicular to plane
8011             containing three points, creating its copy before the rotatation.
8012
8013             Parameters:
8014                 theObject The object to be rotated.
8015                 theCentPoint central point  the axis is the vector perpendicular to the plane
8016                              containing the three points.
8017                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8018                 theName Object name; when specified, this parameter is used
8019                         for result publication in the study. Otherwise, if automatic
8020                         publication is switched on, default value is used for result name.
8021
8022             Returns:
8023                 New GEOM.GEOM_Object, containing the rotated object.
8024             """
8025             # Example: see GEOM_TestAll.py
8026             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8027             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8028             self._autoPublish(anObj, theName, "rotated")
8029             return anObj
8030
8031         ## Scale the given object by the specified factor.
8032         #  @param theObject The object to be scaled.
8033         #  @param thePoint Center point for scaling.
8034         #                  Passing None for it means scaling relatively the origin of global CS.
8035         #  @param theFactor Scaling factor value.
8036         #  @param theCopy Flag used to scale object itself or create a copy.
8037         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8038         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8039         @ManageTransactions("TrsfOp")
8040         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8041             """
8042             Scale the given object by the specified factor.
8043
8044             Parameters:
8045                 theObject The object to be scaled.
8046                 thePoint Center point for scaling.
8047                          Passing None for it means scaling relatively the origin of global CS.
8048                 theFactor Scaling factor value.
8049                 theCopy Flag used to scale object itself or create a copy.
8050
8051             Returns:
8052                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8053                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8054             """
8055             # Example: see GEOM_TestAll.py
8056             theFactor, Parameters = ParseParameters(theFactor)
8057             if theCopy:
8058                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8059             else:
8060                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8061             RaiseIfFailed("Scale", self.TrsfOp)
8062             anObj.SetParameters(Parameters)
8063             return anObj
8064
8065         ## Scale the given object by the factor, creating its copy before the scaling.
8066         #  @param theObject The object to be scaled.
8067         #  @param thePoint Center point for scaling.
8068         #                  Passing None for it means scaling relatively the origin of global CS.
8069         #  @param theFactor Scaling factor value.
8070         #  @param theName Object name; when specified, this parameter is used
8071         #         for result publication in the study. Otherwise, if automatic
8072         #         publication is switched on, default value is used for result name.
8073         #
8074         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8075         #
8076         #  @ref tui_scale "Example"
8077         @ManageTransactions("TrsfOp")
8078         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8079             """
8080             Scale the given object by the factor, creating its copy before the scaling.
8081
8082             Parameters:
8083                 theObject The object to be scaled.
8084                 thePoint Center point for scaling.
8085                          Passing None for it means scaling relatively the origin of global CS.
8086                 theFactor Scaling factor value.
8087                 theName Object name; when specified, this parameter is used
8088                         for result publication in the study. Otherwise, if automatic
8089                         publication is switched on, default value is used for result name.
8090
8091             Returns:
8092                 New GEOM.GEOM_Object, containing the scaled shape.
8093             """
8094             # Example: see GEOM_TestAll.py
8095             theFactor, Parameters = ParseParameters(theFactor)
8096             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8097             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8098             anObj.SetParameters(Parameters)
8099             self._autoPublish(anObj, theName, "scaled")
8100             return anObj
8101
8102         ## Scale the given object by different factors along coordinate axes.
8103         #  @param theObject The object to be scaled.
8104         #  @param thePoint Center point for scaling.
8105         #                  Passing None for it means scaling relatively the origin of global CS.
8106         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8107         #  @param theCopy Flag used to scale object itself or create a copy.
8108         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8109         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8110         @ManageTransactions("TrsfOp")
8111         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8112             """
8113             Scale the given object by different factors along coordinate axes.
8114
8115             Parameters:
8116                 theObject The object to be scaled.
8117                 thePoint Center point for scaling.
8118                             Passing None for it means scaling relatively the origin of global CS.
8119                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8120                 theCopy Flag used to scale object itself or create a copy.
8121
8122             Returns:
8123                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8124                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8125             """
8126             # Example: see GEOM_TestAll.py
8127             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8128             if theCopy:
8129                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8130                                                             theFactorX, theFactorY, theFactorZ)
8131             else:
8132                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8133                                                         theFactorX, theFactorY, theFactorZ)
8134             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8135             anObj.SetParameters(Parameters)
8136             return anObj
8137
8138         ## Scale the given object by different factors along coordinate axes,
8139         #  creating its copy before the scaling.
8140         #  @param theObject The object to be scaled.
8141         #  @param thePoint Center point for scaling.
8142         #                  Passing None for it means scaling relatively the origin of global CS.
8143         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8144         #  @param theName Object name; when specified, this parameter is used
8145         #         for result publication in the study. Otherwise, if automatic
8146         #         publication is switched on, default value is used for result name.
8147         #
8148         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8149         #
8150         #  @ref swig_scale "Example"
8151         @ManageTransactions("TrsfOp")
8152         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8153             """
8154             Scale the given object by different factors along coordinate axes,
8155             creating its copy before the scaling.
8156
8157             Parameters:
8158                 theObject The object to be scaled.
8159                 thePoint Center point for scaling.
8160                             Passing None for it means scaling relatively the origin of global CS.
8161                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8162                 theName Object name; when specified, this parameter is used
8163                         for result publication in the study. Otherwise, if automatic
8164                         publication is switched on, default value is used for result name.
8165
8166             Returns:
8167                 New GEOM.GEOM_Object, containing the scaled shape.
8168             """
8169             # Example: see GEOM_TestAll.py
8170             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8171             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8172                                                         theFactorX, theFactorY, theFactorZ)
8173             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8174             anObj.SetParameters(Parameters)
8175             self._autoPublish(anObj, theName, "scaled")
8176             return anObj
8177
8178         ## Mirror an object relatively the given plane.
8179         #  @param theObject The object to be mirrored.
8180         #  @param thePlane Plane of symmetry.
8181         #  @param theCopy Flag used to mirror object itself or create a copy.
8182         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8183         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8184         @ManageTransactions("TrsfOp")
8185         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8186             """
8187             Mirror an object relatively the given plane.
8188
8189             Parameters:
8190                 theObject The object to be mirrored.
8191                 thePlane Plane of symmetry.
8192                 theCopy Flag used to mirror object itself or create a copy.
8193
8194             Returns:
8195                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8196                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8197             """
8198             if theCopy:
8199                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8200             else:
8201                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8202             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8203             return anObj
8204
8205         ## Create an object, symmetrical
8206         #  to the given one relatively the given plane.
8207         #  @param theObject The object to be mirrored.
8208         #  @param thePlane Plane of symmetry.
8209         #  @param theName Object name; when specified, this parameter is used
8210         #         for result publication in the study. Otherwise, if automatic
8211         #         publication is switched on, default value is used for result name.
8212         #
8213         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8214         #
8215         #  @ref tui_mirror "Example"
8216         @ManageTransactions("TrsfOp")
8217         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8218             """
8219             Create an object, symmetrical to the given one relatively the given plane.
8220
8221             Parameters:
8222                 theObject The object to be mirrored.
8223                 thePlane Plane of symmetry.
8224                 theName Object name; when specified, this parameter is used
8225                         for result publication in the study. Otherwise, if automatic
8226                         publication is switched on, default value is used for result name.
8227
8228             Returns:
8229                 New GEOM.GEOM_Object, containing the mirrored shape.
8230             """
8231             # Example: see GEOM_TestAll.py
8232             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8233             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
8234             self._autoPublish(anObj, theName, "mirrored")
8235             return anObj
8236
8237         ## Mirror an object relatively the given axis.
8238         #  @param theObject The object to be mirrored.
8239         #  @param theAxis Axis of symmetry.
8240         #  @param theCopy Flag used to mirror object itself or create a copy.
8241         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8242         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8243         @ManageTransactions("TrsfOp")
8244         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
8245             """
8246             Mirror an object relatively the given axis.
8247
8248             Parameters:
8249                 theObject The object to be mirrored.
8250                 theAxis Axis of symmetry.
8251                 theCopy Flag used to mirror object itself or create a copy.
8252
8253             Returns:
8254                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8255                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8256             """
8257             if theCopy:
8258                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8259             else:
8260                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
8261             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
8262             return anObj
8263
8264         ## Create an object, symmetrical
8265         #  to the given one relatively the given axis.
8266         #  @param theObject The object to be mirrored.
8267         #  @param theAxis Axis of symmetry.
8268         #  @param theName Object name; when specified, this parameter is used
8269         #         for result publication in the study. Otherwise, if automatic
8270         #         publication is switched on, default value is used for result name.
8271         #
8272         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8273         #
8274         #  @ref tui_mirror "Example"
8275         @ManageTransactions("TrsfOp")
8276         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
8277             """
8278             Create an object, symmetrical to the given one relatively the given axis.
8279
8280             Parameters:
8281                 theObject The object to be mirrored.
8282                 theAxis Axis of symmetry.
8283                 theName Object name; when specified, this parameter is used
8284                         for result publication in the study. Otherwise, if automatic
8285                         publication is switched on, default value is used for result name.
8286
8287             Returns:
8288                 New GEOM.GEOM_Object, containing the mirrored shape.
8289             """
8290             # Example: see GEOM_TestAll.py
8291             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8292             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
8293             self._autoPublish(anObj, theName, "mirrored")
8294             return anObj
8295
8296         ## Mirror an object relatively the given point.
8297         #  @param theObject The object to be mirrored.
8298         #  @param thePoint Point of symmetry.
8299         #  @param theCopy Flag used to mirror object itself or create a copy.
8300         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8301         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8302         @ManageTransactions("TrsfOp")
8303         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8304             """
8305             Mirror an object relatively the given point.
8306
8307             Parameters:
8308                 theObject The object to be mirrored.
8309                 thePoint Point of symmetry.
8310                 theCopy Flag used to mirror object itself or create a copy.
8311
8312             Returns:
8313                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8314                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8315             """
8316             # Example: see GEOM_TestAll.py
8317             if theCopy:
8318                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8319             else:
8320                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8321             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8322             return anObj
8323
8324         ## Create an object, symmetrical
8325         #  to the given one relatively the given point.
8326         #  @param theObject The object to be mirrored.
8327         #  @param thePoint Point of symmetry.
8328         #  @param theName Object name; when specified, this parameter is used
8329         #         for result publication in the study. Otherwise, if automatic
8330         #         publication is switched on, default value is used for result name.
8331         #
8332         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8333         #
8334         #  @ref tui_mirror "Example"
8335         @ManageTransactions("TrsfOp")
8336         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8337             """
8338             Create an object, symmetrical
8339             to the given one relatively the given point.
8340
8341             Parameters:
8342                 theObject The object to be mirrored.
8343                 thePoint Point of symmetry.
8344                 theName Object name; when specified, this parameter is used
8345                         for result publication in the study. Otherwise, if automatic
8346                         publication is switched on, default value is used for result name.
8347
8348             Returns:
8349                 New GEOM.GEOM_Object, containing the mirrored shape.
8350             """
8351             # Example: see GEOM_TestAll.py
8352             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8353             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8354             self._autoPublish(anObj, theName, "mirrored")
8355             return anObj
8356
8357         ## Modify the location of the given object.
8358         #  @param theObject The object to be displaced.
8359         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8360         #                     If \a theStartLCS is NULL, displacement
8361         #                     will be performed from global CS.\n
8362         #                     If \a theObject itself is used as \a theStartLCS,
8363         #                     its location will be changed to \a theEndLCS.
8364         #  @param theEndLCS Coordinate system to perform displacement to it.
8365         #  @param theCopy Flag used to displace object itself or create a copy.
8366         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8367         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8368         @ManageTransactions("TrsfOp")
8369         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8370             """
8371             Modify the Location of the given object by LCS, creating its copy before the setting.
8372
8373             Parameters:
8374                 theObject The object to be displaced.
8375                 theStartLCS Coordinate system to perform displacement from it.
8376                             If theStartLCS is NULL, displacement
8377                             will be performed from global CS.
8378                             If theObject itself is used as theStartLCS,
8379                             its location will be changed to theEndLCS.
8380                 theEndLCS Coordinate system to perform displacement to it.
8381                 theCopy Flag used to displace object itself or create a copy.
8382
8383             Returns:
8384                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8385                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8386             """
8387             # Example: see GEOM_TestAll.py
8388             if theCopy:
8389                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8390             else:
8391                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8392             RaiseIfFailed("Displace", self.TrsfOp)
8393             return anObj
8394
8395         ## Modify the Location of the given object by LCS,
8396         #  creating its copy before the setting.
8397         #  @param theObject The object to be displaced.
8398         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8399         #                     If \a theStartLCS is NULL, displacement
8400         #                     will be performed from global CS.\n
8401         #                     If \a theObject itself is used as \a theStartLCS,
8402         #                     its location will be changed to \a theEndLCS.
8403         #  @param theEndLCS Coordinate system to perform displacement to it.
8404         #  @param theName Object name; when specified, this parameter is used
8405         #         for result publication in the study. Otherwise, if automatic
8406         #         publication is switched on, default value is used for result name.
8407         #
8408         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8409         #
8410         #  @ref tui_modify_location "Example"
8411         @ManageTransactions("TrsfOp")
8412         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8413             """
8414             Modify the Location of the given object by LCS, creating its copy before the setting.
8415
8416             Parameters:
8417                 theObject The object to be displaced.
8418                 theStartLCS Coordinate system to perform displacement from it.
8419                             If theStartLCS is NULL, displacement
8420                             will be performed from global CS.
8421                             If theObject itself is used as theStartLCS,
8422                             its location will be changed to theEndLCS.
8423                 theEndLCS Coordinate system to perform displacement to it.
8424                 theName Object name; when specified, this parameter is used
8425                         for result publication in the study. Otherwise, if automatic
8426                         publication is switched on, default value is used for result name.
8427
8428             Returns:
8429                 New GEOM.GEOM_Object, containing the displaced shape.
8430
8431             Example of usage:
8432                 # create local coordinate systems
8433                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8434                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8435                 # modify the location of the given object
8436                 position = geompy.MakePosition(cylinder, cs1, cs2)
8437             """
8438             # Example: see GEOM_TestAll.py
8439             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8440             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8441             self._autoPublish(anObj, theName, "displaced")
8442             return anObj
8443
8444         ## Modify the Location of the given object by Path.
8445         #  @param  theObject The object to be displaced.
8446         #  @param  thePath Wire or Edge along that the object will be translated.
8447         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
8448         #  @param  theCopy is to create a copy objects if true.
8449         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
8450         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
8451         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
8452         #
8453         #  @ref tui_modify_location "Example"
8454         @ManageTransactions("TrsfOp")
8455         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
8456             """
8457             Modify the Location of the given object by Path.
8458
8459             Parameters:
8460                  theObject The object to be displaced.
8461                  thePath Wire or Edge along that the object will be translated.
8462                  theDistance progress of Path (0 = start location, 1 = end of path location).
8463                  theCopy is to create a copy objects if true.
8464                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8465
8466             Returns:
8467                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
8468                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
8469
8470             Example of usage:
8471                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
8472             """
8473             # Example: see GEOM_TestAll.py
8474             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
8475             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8476             return anObj
8477
8478         ## Modify the Location of the given object by Path, creating its copy before the operation.
8479         #  @param theObject The object to be displaced.
8480         #  @param thePath Wire or Edge along that the object will be translated.
8481         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
8482         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
8483         #  @param theName Object name; when specified, this parameter is used
8484         #         for result publication in the study. Otherwise, if automatic
8485         #         publication is switched on, default value is used for result name.
8486         #
8487         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8488         @ManageTransactions("TrsfOp")
8489         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
8490             """
8491             Modify the Location of the given object by Path, creating its copy before the operation.
8492
8493             Parameters:
8494                  theObject The object to be displaced.
8495                  thePath Wire or Edge along that the object will be translated.
8496                  theDistance progress of Path (0 = start location, 1 = end of path location).
8497                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8498                  theName Object name; when specified, this parameter is used
8499                          for result publication in the study. Otherwise, if automatic
8500                          publication is switched on, default value is used for result name.
8501
8502             Returns:
8503                 New GEOM.GEOM_Object, containing the displaced shape.
8504             """
8505             # Example: see GEOM_TestAll.py
8506             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
8507             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8508             self._autoPublish(anObj, theName, "displaced")
8509             return anObj
8510
8511         ## Offset given shape.
8512         #  @param theObject The base object for the offset.
8513         #  @param theOffset Offset value.
8514         #  @param theCopy Flag used to offset object itself or create a copy.
8515         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8516         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
8517         @ManageTransactions("TrsfOp")
8518         def Offset(self, theObject, theOffset, theCopy=False):
8519             """
8520             Offset given shape.
8521
8522             Parameters:
8523                 theObject The base object for the offset.
8524                 theOffset Offset value.
8525                 theCopy Flag used to offset object itself or create a copy.
8526
8527             Returns:
8528                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8529                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8530             """
8531             theOffset, Parameters = ParseParameters(theOffset)
8532             if theCopy:
8533                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8534             else:
8535                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8536             RaiseIfFailed("Offset", self.TrsfOp)
8537             anObj.SetParameters(Parameters)
8538             return anObj
8539
8540         ## Create new object as offset of the given one.
8541         #  @param theObject The base object for the offset.
8542         #  @param theOffset Offset value.
8543         #  @param theName Object name; when specified, this parameter is used
8544         #         for result publication in the study. Otherwise, if automatic
8545         #         publication is switched on, default value is used for result name.
8546         #
8547         #  @return New GEOM.GEOM_Object, containing the offset object.
8548         #
8549         #  @ref tui_offset "Example"
8550         @ManageTransactions("TrsfOp")
8551         def MakeOffset(self, theObject, theOffset, theName=None):
8552             """
8553             Create new object as offset of the given one.
8554
8555             Parameters:
8556                 theObject The base object for the offset.
8557                 theOffset Offset value.
8558                 theName Object name; when specified, this parameter is used
8559                         for result publication in the study. Otherwise, if automatic
8560                         publication is switched on, default value is used for result name.
8561
8562             Returns:
8563                 New GEOM.GEOM_Object, containing the offset object.
8564
8565             Example of usage:
8566                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8567                  # create a new object as offset of the given object
8568                  offset = geompy.MakeOffset(box, 70.)
8569             """
8570             # Example: see GEOM_TestAll.py
8571             theOffset, Parameters = ParseParameters(theOffset)
8572             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8573             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8574             anObj.SetParameters(Parameters)
8575             self._autoPublish(anObj, theName, "offset")
8576             return anObj
8577
8578         ## Create new object as projection of the given one on a 2D surface.
8579         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8580         #  @param theTarget The target object. It can be planar or cylindrical face.
8581         #  @param theName Object name; when specified, this parameter is used
8582         #         for result publication in the study. Otherwise, if automatic
8583         #         publication is switched on, default value is used for result name.
8584         #
8585         #  @return New GEOM.GEOM_Object, containing the projection.
8586         #
8587         #  @ref tui_projection "Example"
8588         @ManageTransactions("TrsfOp")
8589         def MakeProjection(self, theSource, theTarget, theName=None):
8590             """
8591             Create new object as projection of the given one on a 2D surface.
8592
8593             Parameters:
8594                 theSource The source object for the projection. It can be a point, edge or wire.
8595                 theTarget The target object. It can be planar or cylindrical face.
8596                 theName Object name; when specified, this parameter is used
8597                         for result publication in the study. Otherwise, if automatic
8598                         publication is switched on, default value is used for result name.
8599
8600             Returns:
8601                 New GEOM.GEOM_Object, containing the projection.
8602             """
8603             # Example: see GEOM_TestAll.py
8604             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8605             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8606             self._autoPublish(anObj, theName, "projection")
8607             return anObj
8608
8609         ## Create a projection projection of the given point on a wire or an edge.
8610         #  If there are no solutions or there are 2 or more solutions It throws an
8611         #  exception.
8612         #  @param thePoint the point to be projected.
8613         #  @param theWire the wire. The edge is accepted as well.
8614         #  @param theName Object name; when specified, this parameter is used
8615         #         for result publication in the study. Otherwise, if automatic
8616         #         publication is switched on, default value is used for result name.
8617         #
8618         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8619         #  \n \a u: The parameter of projection point on edge.
8620         #  \n \a PointOnEdge: The projection point.
8621         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8622         #
8623         #  @ref tui_projection "Example"
8624         @ManageTransactions("TrsfOp")
8625         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8626             """
8627             Create a projection projection of the given point on a wire or an edge.
8628             If there are no solutions or there are 2 or more solutions It throws an
8629             exception.
8630
8631             Parameters:
8632                 thePoint the point to be projected.
8633                 theWire the wire. The edge is accepted as well.
8634                 theName Object name; when specified, this parameter is used
8635                         for result publication in the study. Otherwise, if automatic
8636                         publication is switched on, default value is used for result name.
8637
8638             Returns:
8639                 [u, PointOnEdge, EdgeInWireIndex]
8640                  u: The parameter of projection point on edge.
8641                  PointOnEdge: The projection point.
8642                  EdgeInWireIndex: The index of an edge in a wire.
8643             """
8644             # Example: see GEOM_TestAll.py
8645             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
8646             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
8647             self._autoPublish(anObj[1], theName, "projection")
8648             return anObj
8649
8650         # -----------------------------------------------------------------------------
8651         # Patterns
8652         # -----------------------------------------------------------------------------
8653
8654         ## Translate the given object along the given vector a given number times
8655         #  @param theObject The object to be translated.
8656         #  @param theVector Direction of the translation. DX if None.
8657         #  @param theStep Distance to translate on.
8658         #  @param theNbTimes Quantity of translations to be done.
8659         #  @param theName Object name; when specified, this parameter is used
8660         #         for result publication in the study. Otherwise, if automatic
8661         #         publication is switched on, default value is used for result name.
8662         #
8663         #  @return New GEOM.GEOM_Object, containing compound of all
8664         #          the shapes, obtained after each translation.
8665         #
8666         #  @ref tui_multi_translation "Example"
8667         @ManageTransactions("TrsfOp")
8668         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8669             """
8670             Translate the given object along the given vector a given number times
8671
8672             Parameters:
8673                 theObject The object to be translated.
8674                 theVector Direction of the translation. DX if None.
8675                 theStep Distance to translate on.
8676                 theNbTimes Quantity of translations to be done.
8677                 theName Object name; when specified, this parameter is used
8678                         for result publication in the study. Otherwise, if automatic
8679                         publication is switched on, default value is used for result name.
8680
8681             Returns:
8682                 New GEOM.GEOM_Object, containing compound of all
8683                 the shapes, obtained after each translation.
8684
8685             Example of usage:
8686                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8687             """
8688             # Example: see GEOM_TestAll.py
8689             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8690             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8691             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8692             anObj.SetParameters(Parameters)
8693             self._autoPublish(anObj, theName, "multitranslation")
8694             return anObj
8695
8696         ## Conseqently apply two specified translations to theObject specified number of times.
8697         #  @param theObject The object to be translated.
8698         #  @param theVector1 Direction of the first translation. DX if None.
8699         #  @param theStep1 Step of the first translation.
8700         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8701         #  @param theVector2 Direction of the second translation. DY if None.
8702         #  @param theStep2 Step of the second translation.
8703         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8704         #  @param theName Object name; when specified, this parameter is used
8705         #         for result publication in the study. Otherwise, if automatic
8706         #         publication is switched on, default value is used for result name.
8707         #
8708         #  @return New GEOM.GEOM_Object, containing compound of all
8709         #          the shapes, obtained after each translation.
8710         #
8711         #  @ref tui_multi_translation "Example"
8712         @ManageTransactions("TrsfOp")
8713         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8714                                    theVector2, theStep2, theNbTimes2, theName=None):
8715             """
8716             Conseqently apply two specified translations to theObject specified number of times.
8717
8718             Parameters:
8719                 theObject The object to be translated.
8720                 theVector1 Direction of the first translation. DX if None.
8721                 theStep1 Step of the first translation.
8722                 theNbTimes1 Quantity of translations to be done along theVector1.
8723                 theVector2 Direction of the second translation. DY if None.
8724                 theStep2 Step of the second translation.
8725                 theNbTimes2 Quantity of translations to be done along theVector2.
8726                 theName Object name; when specified, this parameter is used
8727                         for result publication in the study. Otherwise, if automatic
8728                         publication is switched on, default value is used for result name.
8729
8730             Returns:
8731                 New GEOM.GEOM_Object, containing compound of all
8732                 the shapes, obtained after each translation.
8733
8734             Example of usage:
8735                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8736             """
8737             # Example: see GEOM_TestAll.py
8738             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8739             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8740                                                  theVector2, theStep2, theNbTimes2)
8741             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8742             anObj.SetParameters(Parameters)
8743             self._autoPublish(anObj, theName, "multitranslation")
8744             return anObj
8745
8746         ## Rotate the given object around the given axis a given number times.
8747         #  Rotation angle will be 2*PI/theNbTimes.
8748         #  @param theObject The object to be rotated.
8749         #  @param theAxis The rotation axis. DZ if None.
8750         #  @param theNbTimes Quantity of rotations to be done.
8751         #  @param theName Object name; when specified, this parameter is used
8752         #         for result publication in the study. Otherwise, if automatic
8753         #         publication is switched on, default value is used for result name.
8754         #
8755         #  @return New GEOM.GEOM_Object, containing compound of all the
8756         #          shapes, obtained after each rotation.
8757         #
8758         #  @ref tui_multi_rotation "Example"
8759         @ManageTransactions("TrsfOp")
8760         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8761             """
8762             Rotate the given object around the given axis a given number times.
8763             Rotation angle will be 2*PI/theNbTimes.
8764
8765             Parameters:
8766                 theObject The object to be rotated.
8767                 theAxis The rotation axis. DZ if None.
8768                 theNbTimes Quantity of rotations to be done.
8769                 theName Object name; when specified, this parameter is used
8770                         for result publication in the study. Otherwise, if automatic
8771                         publication is switched on, default value is used for result name.
8772
8773             Returns:
8774                 New GEOM.GEOM_Object, containing compound of all the
8775                 shapes, obtained after each rotation.
8776
8777             Example of usage:
8778                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8779             """
8780             # Example: see GEOM_TestAll.py
8781             theNbTimes, Parameters = ParseParameters(theNbTimes)
8782             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8783             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8784             anObj.SetParameters(Parameters)
8785             self._autoPublish(anObj, theName, "multirotation")
8786             return anObj
8787
8788         ## Rotate the given object around the given axis
8789         #  a given number times on the given angle.
8790         #  @param theObject The object to be rotated.
8791         #  @param theAxis The rotation axis. DZ if None.
8792         #  @param theAngleStep Rotation angle in radians.
8793         #  @param theNbTimes Quantity of rotations to be done.
8794         #  @param theName Object name; when specified, this parameter is used
8795         #         for result publication in the study. Otherwise, if automatic
8796         #         publication is switched on, default value is used for result name.
8797         #
8798         #  @return New GEOM.GEOM_Object, containing compound of all the
8799         #          shapes, obtained after each rotation.
8800         #
8801         #  @ref tui_multi_rotation "Example"
8802         @ManageTransactions("TrsfOp")
8803         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8804             """
8805             Rotate the given object around the given axis
8806             a given number times on the given angle.
8807
8808             Parameters:
8809                 theObject The object to be rotated.
8810                 theAxis The rotation axis. DZ if None.
8811                 theAngleStep Rotation angle in radians.
8812                 theNbTimes Quantity of rotations to be done.
8813                 theName Object name; when specified, this parameter is used
8814                         for result publication in the study. Otherwise, if automatic
8815                         publication is switched on, default value is used for result name.
8816
8817             Returns:
8818                 New GEOM.GEOM_Object, containing compound of all the
8819                 shapes, obtained after each rotation.
8820
8821             Example of usage:
8822                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8823             """
8824             # Example: see GEOM_TestAll.py
8825             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8826             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8827             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8828             anObj.SetParameters(Parameters)
8829             self._autoPublish(anObj, theName, "multirotation")
8830             return anObj
8831
8832         ## Rotate the given object around the given axis a given
8833         #  number times and multi-translate each rotation result.
8834         #  Rotation angle will be 2*PI/theNbTimes1.
8835         #  Translation direction passes through center of gravity
8836         #  of rotated shape and its projection on the rotation axis.
8837         #  @param theObject The object to be rotated.
8838         #  @param theAxis Rotation axis. DZ if None.
8839         #  @param theNbTimes1 Quantity of rotations to be done.
8840         #  @param theRadialStep Translation distance.
8841         #  @param theNbTimes2 Quantity of translations to be done.
8842         #  @param theName Object name; when specified, this parameter is used
8843         #         for result publication in the study. Otherwise, if automatic
8844         #         publication is switched on, default value is used for result name.
8845         #
8846         #  @return New GEOM.GEOM_Object, containing compound of all the
8847         #          shapes, obtained after each transformation.
8848         #
8849         #  @ref tui_multi_rotation "Example"
8850         @ManageTransactions("TrsfOp")
8851         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8852             """
8853             Rotate the given object around the
8854             given axis on the given angle a given number
8855             times and multi-translate each rotation result.
8856             Translation direction passes through center of gravity
8857             of rotated shape and its projection on the rotation axis.
8858
8859             Parameters:
8860                 theObject The object to be rotated.
8861                 theAxis Rotation axis. DZ if None.
8862                 theNbTimes1 Quantity of rotations to be done.
8863                 theRadialStep Translation distance.
8864                 theNbTimes2 Quantity of translations to be done.
8865                 theName Object name; when specified, this parameter is used
8866                         for result publication in the study. Otherwise, if automatic
8867                         publication is switched on, default value is used for result name.
8868
8869             Returns:
8870                 New GEOM.GEOM_Object, containing compound of all the
8871                 shapes, obtained after each transformation.
8872
8873             Example of usage:
8874                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8875             """
8876             # Example: see GEOM_TestAll.py
8877             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8878             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8879             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8880             anObj.SetParameters(Parameters)
8881             self._autoPublish(anObj, theName, "multirotation")
8882             return anObj
8883
8884         ## Rotate the given object around the
8885         #  given axis on the given angle a given number
8886         #  times and multi-translate each rotation result.
8887         #  Translation direction passes through center of gravity
8888         #  of rotated shape and its projection on the rotation axis.
8889         #  @param theObject The object to be rotated.
8890         #  @param theAxis Rotation axis. DZ if None.
8891         #  @param theAngleStep Rotation angle in radians.
8892         #  @param theNbTimes1 Quantity of rotations to be done.
8893         #  @param theRadialStep Translation distance.
8894         #  @param theNbTimes2 Quantity of translations to be done.
8895         #  @param theName Object name; when specified, this parameter is used
8896         #         for result publication in the study. Otherwise, if automatic
8897         #         publication is switched on, default value is used for result name.
8898         #
8899         #  @return New GEOM.GEOM_Object, containing compound of all the
8900         #          shapes, obtained after each transformation.
8901         #
8902         #  @ref tui_multi_rotation "Example"
8903         @ManageTransactions("TrsfOp")
8904         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8905             """
8906             Rotate the given object around the
8907             given axis on the given angle a given number
8908             times and multi-translate each rotation result.
8909             Translation direction passes through center of gravity
8910             of rotated shape and its projection on the rotation axis.
8911
8912             Parameters:
8913                 theObject The object to be rotated.
8914                 theAxis Rotation axis. DZ if None.
8915                 theAngleStep Rotation angle in radians.
8916                 theNbTimes1 Quantity of rotations to be done.
8917                 theRadialStep Translation distance.
8918                 theNbTimes2 Quantity of translations to be done.
8919                 theName Object name; when specified, this parameter is used
8920                         for result publication in the study. Otherwise, if automatic
8921                         publication is switched on, default value is used for result name.
8922
8923             Returns:
8924                 New GEOM.GEOM_Object, containing compound of all the
8925                 shapes, obtained after each transformation.
8926
8927             Example of usage:
8928                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8929             """
8930             # Example: see GEOM_TestAll.py
8931             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8932             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8933             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8934             anObj.SetParameters(Parameters)
8935             self._autoPublish(anObj, theName, "multirotation")
8936             return anObj
8937
8938         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8939         #
8940         #  @ref swig_MakeMultiRotation "Example"
8941         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8942             """
8943             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8944
8945             Example of usage:
8946                 pz = geompy.MakeVertex(0, 0, 100)
8947                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8948                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8949             """
8950             # Example: see GEOM_TestOthers.py
8951             aVec = self.MakeLine(aPoint,aDir)
8952             # note: auto-publishing is done in self.MultiRotate1D()
8953             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8954             return anObj
8955
8956         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8957         #
8958         #  @ref swig_MakeMultiRotation "Example"
8959         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8960             """
8961             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8962
8963             Example of usage:
8964                 pz = geompy.MakeVertex(0, 0, 100)
8965                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8966                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8967             """
8968             # Example: see GEOM_TestOthers.py
8969             aVec = self.MakeLine(aPoint,aDir)
8970             # note: auto-publishing is done in self.MultiRotate1D()
8971             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8972             return anObj
8973
8974         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8975         #
8976         #  @ref swig_MakeMultiRotation "Example"
8977         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8978             """
8979             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8980
8981             Example of usage:
8982                 pz = geompy.MakeVertex(0, 0, 100)
8983                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8984                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8985             """
8986             # Example: see GEOM_TestOthers.py
8987             aVec = self.MakeLine(aPoint,aDir)
8988             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8989             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8990             return anObj
8991
8992         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8993         #
8994         #  @ref swig_MakeMultiRotation "Example"
8995         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8996             """
8997             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8998
8999             Example of usage:
9000                 pz = geompy.MakeVertex(0, 0, 100)
9001                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9002                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9003             """
9004             # Example: see GEOM_TestOthers.py
9005             aVec = self.MakeLine(aPoint,aDir)
9006             # note: auto-publishing is done in self.MultiRotate2D()
9007             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9008             return anObj
9009
9010         # end of l3_transform
9011         ## @}
9012
9013         ## @addtogroup l3_transform_d
9014         ## @{
9015
9016         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9017         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9018             """
9019             Deprecated method. Use MultiRotate1DNbTimes instead.
9020             """
9021             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
9022             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9023
9024         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9025         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9026         @ManageTransactions("TrsfOp")
9027         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9028             """
9029             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9030             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9031
9032             Example of usage:
9033                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9034             """
9035             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
9036             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9037             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9038             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9039             anObj.SetParameters(Parameters)
9040             self._autoPublish(anObj, theName, "multirotation")
9041             return anObj
9042
9043         ## The same, as MultiRotate1D(), but axis is given by direction and point
9044         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9045         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9046             """
9047             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9048             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9049
9050             Example of usage:
9051                 pz = geompy.MakeVertex(0, 0, 100)
9052                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9053                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9054             """
9055             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
9056             aVec = self.MakeLine(aPoint,aDir)
9057             # note: auto-publishing is done in self.MultiRotate1D()
9058             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9059             return anObj
9060
9061         ## The same, as MultiRotate2D(), but axis is given by direction and point
9062         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9063         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9064             """
9065             The same, as MultiRotate2D(), but axis is given by direction and point
9066             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9067
9068             Example of usage:
9069                 pz = geompy.MakeVertex(0, 0, 100)
9070                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9071                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
9072             """
9073             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
9074             aVec = self.MakeLine(aPoint,aDir)
9075             # note: auto-publishing is done in self.MultiRotate2D()
9076             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9077             return anObj
9078
9079         # end of l3_transform_d
9080         ## @}
9081
9082         ## @addtogroup l3_local
9083         ## @{
9084
9085         ## Perform a fillet on all edges of the given shape.
9086         #  @param theShape Shape, to perform fillet on.
9087         #  @param theR Fillet radius.
9088         #  @param theName Object name; when specified, this parameter is used
9089         #         for result publication in the study. Otherwise, if automatic
9090         #         publication is switched on, default value is used for result name.
9091         #
9092         #  @return New GEOM.GEOM_Object, containing the result shape.
9093         #
9094         #  @ref tui_fillet "Example 1"
9095         #  \n @ref swig_MakeFilletAll "Example 2"
9096         @ManageTransactions("LocalOp")
9097         def MakeFilletAll(self, theShape, theR, theName=None):
9098             """
9099             Perform a fillet on all edges of the given shape.
9100
9101             Parameters:
9102                 theShape Shape, to perform fillet on.
9103                 theR Fillet radius.
9104                 theName Object name; when specified, this parameter is used
9105                         for result publication in the study. Otherwise, if automatic
9106                         publication is switched on, default value is used for result name.
9107
9108             Returns:
9109                 New GEOM.GEOM_Object, containing the result shape.
9110
9111             Example of usage:
9112                filletall = geompy.MakeFilletAll(prism, 10.)
9113             """
9114             # Example: see GEOM_TestOthers.py
9115             theR,Parameters = ParseParameters(theR)
9116             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
9117             RaiseIfFailed("MakeFilletAll", self.LocalOp)
9118             anObj.SetParameters(Parameters)
9119             self._autoPublish(anObj, theName, "fillet")
9120             return anObj
9121
9122         ## Perform a fillet on the specified edges/faces of the given shape
9123         #  @param theShape Shape, to perform fillet on.
9124         #  @param theR Fillet radius.
9125         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
9126         #  @param theListShapes Global indices of edges/faces to perform fillet on.
9127         #  @param theName Object name; when specified, this parameter is used
9128         #         for result publication in the study. Otherwise, if automatic
9129         #         publication is switched on, default value is used for result name.
9130         #
9131         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9132         #
9133         #  @return New GEOM.GEOM_Object, containing the result shape.
9134         #
9135         #  @ref tui_fillet "Example"
9136         @ManageTransactions("LocalOp")
9137         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
9138             """
9139             Perform a fillet on the specified edges/faces of the given shape
9140
9141             Parameters:
9142                 theShape Shape, to perform fillet on.
9143                 theR Fillet radius.
9144                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
9145                 theListShapes Global indices of edges/faces to perform fillet on.
9146                 theName Object name; when specified, this parameter is used
9147                         for result publication in the study. Otherwise, if automatic
9148                         publication is switched on, default value is used for result name.
9149
9150             Note:
9151                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9152
9153             Returns:
9154                 New GEOM.GEOM_Object, containing the result shape.
9155
9156             Example of usage:
9157                 # get the list of IDs (IDList) for the fillet
9158                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9159                 IDlist_e = []
9160                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9161                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9162                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9163                 # make a fillet on the specified edges of the given shape
9164                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
9165             """
9166             # Example: see GEOM_TestAll.py
9167             theR,Parameters = ParseParameters(theR)
9168             anObj = None
9169             if theShapeType == self.ShapeType["EDGE"]:
9170                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
9171                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
9172             else:
9173                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
9174                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
9175             anObj.SetParameters(Parameters)
9176             self._autoPublish(anObj, theName, "fillet")
9177             return anObj
9178
9179         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
9180         @ManageTransactions("LocalOp")
9181         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
9182             """
9183             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
9184
9185             Example of usage:
9186                 # get the list of IDs (IDList) for the fillet
9187                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9188                 IDlist_e = []
9189                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9190                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9191                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9192                 # make a fillet on the specified edges of the given shape
9193                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
9194             """
9195             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
9196             anObj = None
9197             if theShapeType == self.ShapeType["EDGE"]:
9198                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
9199                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
9200             else:
9201                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
9202                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
9203             anObj.SetParameters(Parameters)
9204             self._autoPublish(anObj, theName, "fillet")
9205             return anObj
9206
9207         ## Perform a fillet on the specified edges of the given shape
9208         #  @param theShape  Wire Shape to perform fillet on.
9209         #  @param theR  Fillet radius.
9210         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9211         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
9212         #    \note The list of vertices could be empty,
9213         #          in this case fillet will done done at all vertices in wire
9214         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
9215         #         by the length of the edges, nearest to the fillet vertex.
9216         #         But sometimes the next edge is C1 continuous with the one, nearest to
9217         #         the fillet point, and such two (or more) edges can be united to allow
9218         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
9219         #         thus ignoring the secant vertex (vertices).
9220         #  @param theName Object name; when specified, this parameter is used
9221         #         for result publication in the study. Otherwise, if automatic
9222         #         publication is switched on, default value is used for result name.
9223         #
9224         #  @return New GEOM.GEOM_Object, containing the result shape.
9225         #
9226         #  @ref tui_fillet2d "Example"
9227         @ManageTransactions("LocalOp")
9228         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
9229             """
9230             Perform a fillet on the specified edges of the given shape
9231
9232             Parameters:
9233                 theShape  Wire Shape to perform fillet on.
9234                 theR  Fillet radius.
9235                 theListOfVertexes Global indices of vertexes to perform fillet on.
9236                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
9237                     by the length of the edges, nearest to the fillet vertex.
9238                     But sometimes the next edge is C1 continuous with the one, nearest to
9239                     the fillet point, and such two (or more) edges can be united to allow
9240                     bigger radius. Set this flag to TRUE to allow collinear edges union,
9241                     thus ignoring the secant vertex (vertices).
9242                 theName Object name; when specified, this parameter is used
9243                         for result publication in the study. Otherwise, if automatic
9244                         publication is switched on, default value is used for result name.
9245             Note:
9246                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9247
9248                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
9249
9250             Returns:
9251                 New GEOM.GEOM_Object, containing the result shape.
9252
9253             Example of usage:
9254                 # create wire
9255                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
9256                 # make fillet at given wire vertices with giver radius
9257                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
9258             """
9259             # Example: see GEOM_TestAll.py
9260             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
9261             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
9262             RaiseIfFailed("MakeFillet1D", self.LocalOp)
9263             anObj.SetParameters(Parameters)
9264             self._autoPublish(anObj, theName, "fillet")
9265             return anObj
9266
9267         ## Perform a fillet at the specified vertices of the given face/shell.
9268         #  @param theShape Face or Shell shape to perform fillet on.
9269         #  @param theR Fillet radius.
9270         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9271         #  @param theName Object name; when specified, this parameter is used
9272         #         for result publication in the study. Otherwise, if automatic
9273         #         publication is switched on, default value is used for result name.
9274         #
9275         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9276         #
9277         #  @return New GEOM.GEOM_Object, containing the result shape.
9278         #
9279         #  @ref tui_fillet2d "Example"
9280         @ManageTransactions("LocalOp")
9281         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
9282             """
9283             Perform a fillet at the specified vertices of the given face/shell.
9284
9285             Parameters:
9286                 theShape  Face or Shell shape to perform fillet on.
9287                 theR  Fillet radius.
9288                 theListOfVertexes Global indices of vertexes to perform fillet on.
9289                 theName Object name; when specified, this parameter is used
9290                         for result publication in the study. Otherwise, if automatic
9291                         publication is switched on, default value is used for result name.
9292             Note:
9293                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9294
9295             Returns:
9296                 New GEOM.GEOM_Object, containing the result shape.
9297
9298             Example of usage:
9299                 face = geompy.MakeFaceHW(100, 100, 1)
9300                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
9301             """
9302             # Example: see GEOM_TestAll.py
9303             theR,Parameters = ParseParameters(theR)
9304             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
9305             RaiseIfFailed("MakeFillet2D", self.LocalOp)
9306             anObj.SetParameters(Parameters)
9307             self._autoPublish(anObj, theName, "fillet")
9308             return anObj
9309
9310         ## Perform a symmetric chamfer on all edges of the given shape.
9311         #  @param theShape Shape, to perform chamfer on.
9312         #  @param theD Chamfer size along each face.
9313         #  @param theName Object name; when specified, this parameter is used
9314         #         for result publication in the study. Otherwise, if automatic
9315         #         publication is switched on, default value is used for result name.
9316         #
9317         #  @return New GEOM.GEOM_Object, containing the result shape.
9318         #
9319         #  @ref tui_chamfer "Example 1"
9320         #  \n @ref swig_MakeChamferAll "Example 2"
9321         @ManageTransactions("LocalOp")
9322         def MakeChamferAll(self, theShape, theD, theName=None):
9323             """
9324             Perform a symmetric chamfer on all edges of the given shape.
9325
9326             Parameters:
9327                 theShape Shape, to perform chamfer on.
9328                 theD Chamfer size along each face.
9329                 theName Object name; when specified, this parameter is used
9330                         for result publication in the study. Otherwise, if automatic
9331                         publication is switched on, default value is used for result name.
9332
9333             Returns:
9334                 New GEOM.GEOM_Object, containing the result shape.
9335
9336             Example of usage:
9337                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9338             """
9339             # Example: see GEOM_TestOthers.py
9340             theD,Parameters = ParseParameters(theD)
9341             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9342             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9343             anObj.SetParameters(Parameters)
9344             self._autoPublish(anObj, theName, "chamfer")
9345             return anObj
9346
9347         ## Perform a chamfer on edges, common to the specified faces,
9348         #  with distance D1 on the Face1
9349         #  @param theShape Shape, to perform chamfer on.
9350         #  @param theD1 Chamfer size along \a theFace1.
9351         #  @param theD2 Chamfer size along \a theFace2.
9352         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9353         #  @param theName Object name; when specified, this parameter is used
9354         #         for result publication in the study. Otherwise, if automatic
9355         #         publication is switched on, default value is used for result name.
9356         #
9357         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9358         #
9359         #  @return New GEOM.GEOM_Object, containing the result shape.
9360         #
9361         #  @ref tui_chamfer "Example"
9362         @ManageTransactions("LocalOp")
9363         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9364             """
9365             Perform a chamfer on edges, common to the specified faces,
9366             with distance D1 on the Face1
9367
9368             Parameters:
9369                 theShape Shape, to perform chamfer on.
9370                 theD1 Chamfer size along theFace1.
9371                 theD2 Chamfer size along theFace2.
9372                 theFace1,theFace2 Global indices of two faces of theShape.
9373                 theName Object name; when specified, this parameter is used
9374                         for result publication in the study. Otherwise, if automatic
9375                         publication is switched on, default value is used for result name.
9376
9377             Note:
9378                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9379
9380             Returns:
9381                 New GEOM.GEOM_Object, containing the result shape.
9382
9383             Example of usage:
9384                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9385                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9386                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9387                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
9388             """
9389             # Example: see GEOM_TestAll.py
9390             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9391             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
9392             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
9393             anObj.SetParameters(Parameters)
9394             self._autoPublish(anObj, theName, "chamfer")
9395             return anObj
9396
9397         ## Perform a chamfer on edges
9398         #  @param theShape Shape, to perform chamfer on.
9399         #  @param theD Chamfer length
9400         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9401         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9402         #  @param theName Object name; when specified, this parameter is used
9403         #         for result publication in the study. Otherwise, if automatic
9404         #         publication is switched on, default value is used for result name.
9405         #
9406         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9407         #
9408         #  @return New GEOM.GEOM_Object, containing the result shape.
9409         @ManageTransactions("LocalOp")
9410         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
9411             """
9412             Perform a chamfer on edges
9413
9414             Parameters:
9415                 theShape Shape, to perform chamfer on.
9416                 theD1 Chamfer size along theFace1.
9417                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
9418                 theFace1,theFace2 Global indices of two faces of theShape.
9419                 theName Object name; when specified, this parameter is used
9420                         for result publication in the study. Otherwise, if automatic
9421                         publication is switched on, default value is used for result name.
9422
9423             Note:
9424                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9425
9426             Returns:
9427                 New GEOM.GEOM_Object, containing the result shape.
9428
9429             Example of usage:
9430                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9431                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9432                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9433                 ang = 30
9434                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
9435             """
9436             flag = False
9437             if isinstance(theAngle,str):
9438                 flag = True
9439             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9440             if flag:
9441                 theAngle = theAngle*math.pi/180.0
9442             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
9443             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
9444             anObj.SetParameters(Parameters)
9445             self._autoPublish(anObj, theName, "chamfer")
9446             return anObj
9447
9448         ## Perform a chamfer on all edges of the specified faces,
9449         #  with distance D1 on the first specified face (if several for one edge)
9450         #  @param theShape Shape, to perform chamfer on.
9451         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
9452         #               connected to the edge, are in \a theFaces, \a theD1
9453         #               will be get along face, which is nearer to \a theFaces beginning.
9454         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
9455         #  @param theFaces Sequence of global indices of faces of \a theShape.
9456         #  @param theName Object name; when specified, this parameter is used
9457         #         for result publication in the study. Otherwise, if automatic
9458         #         publication is switched on, default value is used for result name.
9459         #
9460         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9461         #
9462         #  @return New GEOM.GEOM_Object, containing the result shape.
9463         #
9464         #  @ref tui_chamfer "Example"
9465         @ManageTransactions("LocalOp")
9466         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
9467             """
9468             Perform a chamfer on all edges of the specified faces,
9469             with distance D1 on the first specified face (if several for one edge)
9470
9471             Parameters:
9472                 theShape Shape, to perform chamfer on.
9473                 theD1 Chamfer size along face from  theFaces. If both faces,
9474                       connected to the edge, are in theFaces, theD1
9475                       will be get along face, which is nearer to theFaces beginning.
9476                 theD2 Chamfer size along another of two faces, connected to the edge.
9477                 theFaces Sequence of global indices of faces of theShape.
9478                 theName Object name; when specified, this parameter is used
9479                         for result publication in the study. Otherwise, if automatic
9480                         publication is switched on, default value is used for result name.
9481
9482             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
9483
9484             Returns:
9485                 New GEOM.GEOM_Object, containing the result shape.
9486             """
9487             # Example: see GEOM_TestAll.py
9488             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9489             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
9490             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
9491             anObj.SetParameters(Parameters)
9492             self._autoPublish(anObj, theName, "chamfer")
9493             return anObj
9494
9495         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
9496         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9497         #
9498         #  @ref swig_FilletChamfer "Example"
9499         @ManageTransactions("LocalOp")
9500         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
9501             """
9502             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
9503             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9504             """
9505             flag = False
9506             if isinstance(theAngle,str):
9507                 flag = True
9508             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9509             if flag:
9510                 theAngle = theAngle*math.pi/180.0
9511             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
9512             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
9513             anObj.SetParameters(Parameters)
9514             self._autoPublish(anObj, theName, "chamfer")
9515             return anObj
9516
9517         ## Perform a chamfer on edges,
9518         #  with distance D1 on the first specified face (if several for one edge)
9519         #  @param theShape Shape, to perform chamfer on.
9520         #  @param theD1,theD2 Chamfer size
9521         #  @param theEdges Sequence of edges of \a theShape.
9522         #  @param theName Object name; when specified, this parameter is used
9523         #         for result publication in the study. Otherwise, if automatic
9524         #         publication is switched on, default value is used for result name.
9525         #
9526         #  @return New GEOM.GEOM_Object, containing the result shape.
9527         #
9528         #  @ref swig_FilletChamfer "Example"
9529         @ManageTransactions("LocalOp")
9530         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
9531             """
9532             Perform a chamfer on edges,
9533             with distance D1 on the first specified face (if several for one edge)
9534
9535             Parameters:
9536                 theShape Shape, to perform chamfer on.
9537                 theD1,theD2 Chamfer size
9538                 theEdges Sequence of edges of theShape.
9539                 theName Object name; when specified, this parameter is used
9540                         for result publication in the study. Otherwise, if automatic
9541                         publication is switched on, default value is used for result name.
9542
9543             Returns:
9544                 New GEOM.GEOM_Object, containing the result shape.
9545             """
9546             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9547             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
9548             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
9549             anObj.SetParameters(Parameters)
9550             self._autoPublish(anObj, theName, "chamfer")
9551             return anObj
9552
9553         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
9554         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9555         @ManageTransactions("LocalOp")
9556         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
9557             """
9558             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
9559             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9560             """
9561             flag = False
9562             if isinstance(theAngle,str):
9563                 flag = True
9564             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9565             if flag:
9566                 theAngle = theAngle*math.pi/180.0
9567             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
9568             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
9569             anObj.SetParameters(Parameters)
9570             self._autoPublish(anObj, theName, "chamfer")
9571             return anObj
9572
9573         ## @sa MakeChamferEdge(), MakeChamferFaces()
9574         #
9575         #  @ref swig_MakeChamfer "Example"
9576         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
9577             """
9578             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
9579             """
9580             # Example: see GEOM_TestOthers.py
9581             anObj = None
9582             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
9583             if aShapeType == self.ShapeType["EDGE"]:
9584                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
9585             else:
9586                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
9587             return anObj
9588
9589         ## Remove material from a solid by extrusion of the base shape on the given distance.
9590         #  @param theInit Shape to remove material from. It must be a solid or
9591         #  a compound made of a single solid.
9592         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9593         #  @param theH Prism dimension along the normal to theBase
9594         #  @param theAngle Draft angle in degrees.
9595         #  @param theName Object name; when specified, this parameter is used
9596         #         for result publication in the study. Otherwise, if automatic
9597         #         publication is switched on, default value is used for result name.
9598         #
9599         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
9600         #
9601         #  @ref tui_creation_prism "Example"
9602         @ManageTransactions("PrimOp")
9603         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9604             """
9605             Add material to a solid by extrusion of the base shape on the given distance.
9606
9607             Parameters:
9608                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9609                 theBase Closed edge or wire defining the base shape to be extruded.
9610                 theH Prism dimension along the normal  to theBase
9611                 theAngle Draft angle in degrees.
9612                 theName Object name; when specified, this parameter is used
9613                         for result publication in the study. Otherwise, if automatic
9614                         publication is switched on, default value is used for result name.
9615
9616             Returns:
9617                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9618             """
9619             # Example: see GEOM_TestAll.py
9620             #theH,Parameters = ParseParameters(theH)
9621             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9622             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9623             #anObj.SetParameters(Parameters)
9624             self._autoPublish(anObj, theName, "extrudedCut")
9625             return anObj
9626
9627         ## Add material to a solid by extrusion of the base shape on the given distance.
9628         #  @param theInit Shape to add material to. It must be a solid or
9629         #  a compound made of a single solid.
9630         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9631         #  @param theH Prism dimension along the normal to theBase
9632         #  @param theAngle Draft angle in degrees.
9633         #  @param theName Object name; when specified, this parameter is used
9634         #         for result publication in the study. Otherwise, if automatic
9635         #         publication is switched on, default value is used for result name.
9636         #
9637         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
9638         #
9639         #  @ref tui_creation_prism "Example"
9640         @ManageTransactions("PrimOp")
9641         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
9642             """
9643             Add material to a solid by extrusion of the base shape on the given distance.
9644
9645             Parameters:
9646                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
9647                 theBase Closed edge or wire defining the base shape to be extruded.
9648                 theH Prism dimension along the normal  to theBase
9649                 theAngle Draft angle in degrees.
9650                 theName Object name; when specified, this parameter is used
9651                         for result publication in the study. Otherwise, if automatic
9652                         publication is switched on, default value is used for result name.
9653
9654             Returns:
9655                 New GEOM.GEOM_Object,  containing the initial shape with added material.
9656             """
9657             # Example: see GEOM_TestAll.py
9658             #theH,Parameters = ParseParameters(theH)
9659             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
9660             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9661             #anObj.SetParameters(Parameters)
9662             self._autoPublish(anObj, theName, "extrudedBoss")
9663             return anObj
9664
9665         # end of l3_local
9666         ## @}
9667
9668         ## @addtogroup l3_basic_op
9669         ## @{
9670
9671         ## Perform an Archimde operation on the given shape with given parameters.
9672         #  The object presenting the resulting face is returned.
9673         #  @param theShape Shape to be put in water.
9674         #  @param theWeight Weight og the shape.
9675         #  @param theWaterDensity Density of the water.
9676         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
9677         #  @param theName Object name; when specified, this parameter is used
9678         #         for result publication in the study. Otherwise, if automatic
9679         #         publication is switched on, default value is used for result name.
9680         #
9681         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
9682         #          by a plane, corresponding to water level.
9683         #
9684         #  @ref tui_archimede "Example"
9685         @ManageTransactions("LocalOp")
9686         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9687             """
9688             Perform an Archimde operation on the given shape with given parameters.
9689             The object presenting the resulting face is returned.
9690
9691             Parameters:
9692                 theShape Shape to be put in water.
9693                 theWeight Weight og the shape.
9694                 theWaterDensity Density of the water.
9695                 theMeshDeflection Deflection of the mesh, using to compute the section.
9696                 theName Object name; when specified, this parameter is used
9697                         for result publication in the study. Otherwise, if automatic
9698                         publication is switched on, default value is used for result name.
9699
9700             Returns:
9701                 New GEOM.GEOM_Object, containing a section of theShape
9702                 by a plane, corresponding to water level.
9703             """
9704             # Example: see GEOM_TestAll.py
9705             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9706               theWeight,theWaterDensity,theMeshDeflection)
9707             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9708             RaiseIfFailed("MakeArchimede", self.LocalOp)
9709             anObj.SetParameters(Parameters)
9710             self._autoPublish(anObj, theName, "archimede")
9711             return anObj
9712
9713         # end of l3_basic_op
9714         ## @}
9715
9716         ## @addtogroup l2_measure
9717         ## @{
9718
9719         ## Get point coordinates
9720         #  @return [x, y, z]
9721         #
9722         #  @ref tui_measurement_tools_page "Example"
9723         @ManageTransactions("MeasuOp")
9724         def PointCoordinates(self,Point):
9725             """
9726             Get point coordinates
9727
9728             Returns:
9729                 [x, y, z]
9730             """
9731             # Example: see GEOM_TestMeasures.py
9732             aTuple = self.MeasuOp.PointCoordinates(Point)
9733             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9734             return aTuple
9735
9736         ## Get vector coordinates
9737         #  @return [x, y, z]
9738         #
9739         #  @ref tui_measurement_tools_page "Example"
9740         def VectorCoordinates(self,Vector):
9741             """
9742             Get vector coordinates
9743
9744             Returns:
9745                 [x, y, z]
9746             """
9747
9748             p1=self.GetFirstVertex(Vector)
9749             p2=self.GetLastVertex(Vector)
9750
9751             X1=self.PointCoordinates(p1)
9752             X2=self.PointCoordinates(p2)
9753
9754             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9755
9756
9757         ## Compute cross product
9758         #  @return vector w=u^v
9759         #
9760         #  @ref tui_measurement_tools_page "Example"
9761         def CrossProduct(self, Vector1, Vector2):
9762             """
9763             Compute cross product
9764
9765             Returns: vector w=u^v
9766             """
9767             u=self.VectorCoordinates(Vector1)
9768             v=self.VectorCoordinates(Vector2)
9769             w=self.MakeVectorDXDYDZ(u[1]*v[2]-u[2]*v[1], u[2]*v[0]-u[0]*v[2], u[0]*v[1]-u[1]*v[0])
9770
9771             return w
9772
9773         ## Compute cross product
9774         #  @return dot product  p=u.v
9775         #
9776         #  @ref tui_measurement_tools_page "Example"
9777         def DotProduct(self, Vector1, Vector2):
9778             """
9779             Compute cross product
9780
9781             Returns: dot product  p=u.v
9782             """
9783             u=self.VectorCoordinates(Vector1)
9784             v=self.VectorCoordinates(Vector2)
9785             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9786
9787             return p
9788
9789
9790         ## Get summarized length of all wires,
9791         #  area of surface and volume of the given shape.
9792         #  @param theShape Shape to define properties of.
9793         #  @return [theLength, theSurfArea, theVolume]\n
9794         #  theLength:   Summarized length of all wires of the given shape.\n
9795         #  theSurfArea: Area of surface of the given shape.\n
9796         #  theVolume:   Volume of the given shape.
9797         #
9798         #  @ref tui_measurement_tools_page "Example"
9799         @ManageTransactions("MeasuOp")
9800         def BasicProperties(self,theShape):
9801             """
9802             Get summarized length of all wires,
9803             area of surface and volume of the given shape.
9804
9805             Parameters:
9806                 theShape Shape to define properties of.
9807
9808             Returns:
9809                 [theLength, theSurfArea, theVolume]
9810                  theLength:   Summarized length of all wires of the given shape.
9811                  theSurfArea: Area of surface of the given shape.
9812                  theVolume:   Volume of the given shape.
9813             """
9814             # Example: see GEOM_TestMeasures.py
9815             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9816             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9817             return aTuple
9818
9819         ## Get parameters of bounding box of the given shape
9820         #  @param theShape Shape to obtain bounding box of.
9821         #  @param precise TRUE for precise computation; FALSE for fast one.
9822         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9823         #  Xmin,Xmax: Limits of shape along OX axis.
9824         #  Ymin,Ymax: Limits of shape along OY axis.
9825         #  Zmin,Zmax: Limits of shape along OZ axis.
9826         #
9827         #  @ref tui_measurement_tools_page "Example"
9828         @ManageTransactions("MeasuOp")
9829         def BoundingBox (self, theShape, precise=False):
9830             """
9831             Get parameters of bounding box of the given shape
9832
9833             Parameters:
9834                 theShape Shape to obtain bounding box of.
9835                 precise TRUE for precise computation; FALSE for fast one.
9836
9837             Returns:
9838                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9839                  Xmin,Xmax: Limits of shape along OX axis.
9840                  Ymin,Ymax: Limits of shape along OY axis.
9841                  Zmin,Zmax: Limits of shape along OZ axis.
9842             """
9843             # Example: see GEOM_TestMeasures.py
9844             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9845             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9846             return aTuple
9847
9848         ## Get bounding box of the given shape
9849         #  @param theShape Shape to obtain bounding box of.
9850         #  @param precise TRUE for precise computation; FALSE for fast one.
9851         #  @param theName Object name; when specified, this parameter is used
9852         #         for result publication in the study. Otherwise, if automatic
9853         #         publication is switched on, default value is used for result name.
9854         #
9855         #  @return New GEOM.GEOM_Object, containing the created box.
9856         #
9857         #  @ref tui_measurement_tools_page "Example"
9858         @ManageTransactions("MeasuOp")
9859         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9860             """
9861             Get bounding box of the given shape
9862
9863             Parameters:
9864                 theShape Shape to obtain bounding box of.
9865                 precise TRUE for precise computation; FALSE for fast one.
9866                 theName Object name; when specified, this parameter is used
9867                         for result publication in the study. Otherwise, if automatic
9868                         publication is switched on, default value is used for result name.
9869
9870             Returns:
9871                 New GEOM.GEOM_Object, containing the created box.
9872             """
9873             # Example: see GEOM_TestMeasures.py
9874             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9875             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9876             self._autoPublish(anObj, theName, "bndbox")
9877             return anObj
9878
9879         ## Get inertia matrix and moments of inertia of theShape.
9880         #  @param theShape Shape to calculate inertia of.
9881         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9882         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9883         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9884         #
9885         #  @ref tui_measurement_tools_page "Example"
9886         @ManageTransactions("MeasuOp")
9887         def Inertia(self,theShape):
9888             """
9889             Get inertia matrix and moments of inertia of theShape.
9890
9891             Parameters:
9892                 theShape Shape to calculate inertia of.
9893
9894             Returns:
9895                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9896                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9897                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9898             """
9899             # Example: see GEOM_TestMeasures.py
9900             aTuple = self.MeasuOp.GetInertia(theShape)
9901             RaiseIfFailed("GetInertia", self.MeasuOp)
9902             return aTuple
9903
9904         ## Get if coords are included in the shape (ST_IN or ST_ON)
9905         #  @param theShape Shape
9906         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9907         #  @param tolerance to be used (default is 1.0e-7)
9908         #  @return list_of_boolean = [res1, res2, ...]
9909         @ManageTransactions("MeasuOp")
9910         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9911             """
9912             Get if coords are included in the shape (ST_IN or ST_ON)
9913
9914             Parameters:
9915                 theShape Shape
9916                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9917                 tolerance to be used (default is 1.0e-7)
9918
9919             Returns:
9920                 list_of_boolean = [res1, res2, ...]
9921             """
9922             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9923
9924         ## Get minimal distance between the given shapes.
9925         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9926         #  @return Value of the minimal distance between the given shapes.
9927         #
9928         #  @ref tui_measurement_tools_page "Example"
9929         @ManageTransactions("MeasuOp")
9930         def MinDistance(self, theShape1, theShape2):
9931             """
9932             Get minimal distance between the given shapes.
9933
9934             Parameters:
9935                 theShape1,theShape2 Shapes to find minimal distance between.
9936
9937             Returns:
9938                 Value of the minimal distance between the given shapes.
9939             """
9940             # Example: see GEOM_TestMeasures.py
9941             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9942             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9943             return aTuple[0]
9944
9945         ## Get minimal distance between the given shapes.
9946         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9947         #  @return Value of the minimal distance between the given shapes, in form of list
9948         #          [Distance, DX, DY, DZ].
9949         #
9950         #  @ref swig_all_measure "Example"
9951         @ManageTransactions("MeasuOp")
9952         def MinDistanceComponents(self, theShape1, theShape2):
9953             """
9954             Get minimal distance between the given shapes.
9955
9956             Parameters:
9957                 theShape1,theShape2 Shapes to find minimal distance between.
9958
9959             Returns:
9960                 Value of the minimal distance between the given shapes, in form of list
9961                 [Distance, DX, DY, DZ]
9962             """
9963             # Example: see GEOM_TestMeasures.py
9964             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9965             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9966             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9967             return aRes
9968
9969         ## Get closest points of the given shapes.
9970         #  @param theShape1,theShape2 Shapes to find closest points of.
9971         #  @return The number of found solutions (-1 in case of infinite number of
9972         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9973         #
9974         #  @ref tui_measurement_tools_page "Example"
9975         @ManageTransactions("MeasuOp")
9976         def ClosestPoints (self, theShape1, theShape2):
9977             """
9978             Get closest points of the given shapes.
9979
9980             Parameters:
9981                 theShape1,theShape2 Shapes to find closest points of.
9982
9983             Returns:
9984                 The number of found solutions (-1 in case of infinite number of
9985                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9986             """
9987             # Example: see GEOM_TestMeasures.py
9988             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9989             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9990             return aTuple
9991
9992         ## Get angle between the given shapes in degrees.
9993         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9994         #  @note If both arguments are vectors, the angle is computed in accordance
9995         #        with their orientations, otherwise the minimum angle is computed.
9996         #  @return Value of the angle between the given shapes in degrees.
9997         #
9998         #  @ref tui_measurement_tools_page "Example"
9999         @ManageTransactions("MeasuOp")
10000         def GetAngle(self, theShape1, theShape2):
10001             """
10002             Get angle between the given shapes in degrees.
10003
10004             Parameters:
10005                 theShape1,theShape2 Lines or linear edges to find angle between.
10006
10007             Note:
10008                 If both arguments are vectors, the angle is computed in accordance
10009                 with their orientations, otherwise the minimum angle is computed.
10010
10011             Returns:
10012                 Value of the angle between the given shapes in degrees.
10013             """
10014             # Example: see GEOM_TestMeasures.py
10015             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10016             RaiseIfFailed("GetAngle", self.MeasuOp)
10017             return anAngle
10018
10019         ## Get angle between the given shapes in radians.
10020         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10021         #  @note If both arguments are vectors, the angle is computed in accordance
10022         #        with their orientations, otherwise the minimum angle is computed.
10023         #  @return Value of the angle between the given shapes in radians.
10024         #
10025         #  @ref tui_measurement_tools_page "Example"
10026         @ManageTransactions("MeasuOp")
10027         def GetAngleRadians(self, theShape1, theShape2):
10028             """
10029             Get angle between the given shapes in radians.
10030
10031             Parameters:
10032                 theShape1,theShape2 Lines or linear edges to find angle between.
10033
10034
10035             Note:
10036                 If both arguments are vectors, the angle is computed in accordance
10037                 with their orientations, otherwise the minimum angle is computed.
10038
10039             Returns:
10040                 Value of the angle between the given shapes in radians.
10041             """
10042             # Example: see GEOM_TestMeasures.py
10043             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10044             RaiseIfFailed("GetAngle", self.MeasuOp)
10045             return anAngle
10046
10047         ## Get angle between the given vectors in degrees.
10048         #  @param theShape1,theShape2 Vectors to find angle between.
10049         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10050         #                 if False, the opposite vector to the normal vector is used.
10051         #  @return Value of the angle between the given vectors in degrees.
10052         #
10053         #  @ref tui_measurement_tools_page "Example"
10054         @ManageTransactions("MeasuOp")
10055         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10056             """
10057             Get angle between the given vectors in degrees.
10058
10059             Parameters:
10060                 theShape1,theShape2 Vectors to find angle between.
10061                 theFlag If True, the normal vector is defined by the two vectors cross,
10062                         if False, the opposite vector to the normal vector is used.
10063
10064             Returns:
10065                 Value of the angle between the given vectors in degrees.
10066             """
10067             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
10068             if not theFlag:
10069                 anAngle = 360. - anAngle
10070             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
10071             return anAngle
10072
10073         ## The same as GetAngleVectors, but the result is in radians.
10074         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
10075             """
10076             Get angle between the given vectors in radians.
10077
10078             Parameters:
10079                 theShape1,theShape2 Vectors to find angle between.
10080                 theFlag If True, the normal vector is defined by the two vectors cross,
10081                         if False, the opposite vector to the normal vector is used.
10082
10083             Returns:
10084                 Value of the angle between the given vectors in radians.
10085             """
10086             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
10087             return anAngle
10088
10089         ## @name Curve Curvature Measurement
10090         #  Methods for receiving radius of curvature of curves
10091         #  in the given point
10092         ## @{
10093
10094         ## Measure curvature of a curve at a point, set by parameter.
10095         #  @param theCurve a curve.
10096         #  @param theParam parameter.
10097         #  @return radius of curvature of \a theCurve.
10098         #
10099         #  @ref swig_todo "Example"
10100         @ManageTransactions("MeasuOp")
10101         def CurveCurvatureByParam(self, theCurve, theParam):
10102             """
10103             Measure curvature of a curve at a point, set by parameter.
10104
10105             Parameters:
10106                 theCurve a curve.
10107                 theParam parameter.
10108
10109             Returns:
10110                 radius of curvature of theCurve.
10111             """
10112             # Example: see GEOM_TestMeasures.py
10113             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
10114             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
10115             return aCurv
10116
10117         ## Measure curvature of a curve at a point.
10118         #  @param theCurve a curve.
10119         #  @param thePoint given point.
10120         #  @return radius of curvature of \a theCurve.
10121         #
10122         #  @ref swig_todo "Example"
10123         @ManageTransactions("MeasuOp")
10124         def CurveCurvatureByPoint(self, theCurve, thePoint):
10125             """
10126             Measure curvature of a curve at a point.
10127
10128             Parameters:
10129                 theCurve a curve.
10130                 thePoint given point.
10131
10132             Returns:
10133                 radius of curvature of theCurve.
10134             """
10135             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
10136             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
10137             return aCurv
10138         ## @}
10139
10140         ## @name Surface Curvature Measurement
10141         #  Methods for receiving max and min radius of curvature of surfaces
10142         #  in the given point
10143         ## @{
10144
10145         ## Measure max radius of curvature of surface.
10146         #  @param theSurf the given surface.
10147         #  @param theUParam Value of U-parameter on the referenced surface.
10148         #  @param theVParam Value of V-parameter on the referenced surface.
10149         #  @return max radius of curvature of theSurf.
10150         #
10151         ## @ref swig_todo "Example"
10152         @ManageTransactions("MeasuOp")
10153         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10154             """
10155             Measure max radius of curvature of surface.
10156
10157             Parameters:
10158                 theSurf the given surface.
10159                 theUParam Value of U-parameter on the referenced surface.
10160                 theVParam Value of V-parameter on the referenced surface.
10161
10162             Returns:
10163                 max radius of curvature of theSurf.
10164             """
10165             # Example: see GEOM_TestMeasures.py
10166             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10167             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
10168             return aSurf
10169
10170         ## Measure max radius of curvature of surface in the given point
10171         #  @param theSurf the given surface.
10172         #  @param thePoint given point.
10173         #  @return max radius of curvature of theSurf.
10174         #
10175         ## @ref swig_todo "Example"
10176         @ManageTransactions("MeasuOp")
10177         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
10178             """
10179             Measure max radius of curvature of surface in the given point.
10180
10181             Parameters:
10182                 theSurf the given surface.
10183                 thePoint given point.
10184
10185             Returns:
10186                 max radius of curvature of theSurf.
10187             """
10188             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
10189             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
10190             return aSurf
10191
10192         ## Measure min radius of curvature of surface.
10193         #  @param theSurf the given surface.
10194         #  @param theUParam Value of U-parameter on the referenced surface.
10195         #  @param theVParam Value of V-parameter on the referenced surface.
10196         #  @return min radius of curvature of theSurf.
10197         #
10198         ## @ref swig_todo "Example"
10199         @ManageTransactions("MeasuOp")
10200         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10201             """
10202             Measure min radius of curvature of surface.
10203
10204             Parameters:
10205                 theSurf the given surface.
10206                 theUParam Value of U-parameter on the referenced surface.
10207                 theVParam Value of V-parameter on the referenced surface.
10208
10209             Returns:
10210                 Min radius of curvature of theSurf.
10211             """
10212             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10213             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
10214             return aSurf
10215
10216         ## Measure min radius of curvature of surface in the given point
10217         #  @param theSurf the given surface.
10218         #  @param thePoint given point.
10219         #  @return min radius of curvature of theSurf.
10220         #
10221         ## @ref swig_todo "Example"
10222         @ManageTransactions("MeasuOp")
10223         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
10224             """
10225             Measure min radius of curvature of surface in the given point.
10226
10227             Parameters:
10228                 theSurf the given surface.
10229                 thePoint given point.
10230
10231             Returns:
10232                 Min radius of curvature of theSurf.
10233             """
10234             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
10235             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
10236             return aSurf
10237         ## @}
10238
10239         ## Get min and max tolerances of sub-shapes of theShape
10240         #  @param theShape Shape, to get tolerances of.
10241         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
10242         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
10243         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
10244         #  VertMin,VertMax: Min and max tolerances of the vertices.
10245         #
10246         #  @ref tui_measurement_tools_page "Example"
10247         @ManageTransactions("MeasuOp")
10248         def Tolerance(self,theShape):
10249             """
10250             Get min and max tolerances of sub-shapes of theShape
10251
10252             Parameters:
10253                 theShape Shape, to get tolerances of.
10254
10255             Returns:
10256                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
10257                  FaceMin,FaceMax: Min and max tolerances of the faces.
10258                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
10259                  VertMin,VertMax: Min and max tolerances of the vertices.
10260             """
10261             # Example: see GEOM_TestMeasures.py
10262             aTuple = self.MeasuOp.GetTolerance(theShape)
10263             RaiseIfFailed("GetTolerance", self.MeasuOp)
10264             return aTuple
10265
10266         ## Obtain description of the given shape (number of sub-shapes of each type)
10267         #  @param theShape Shape to be described.
10268         #  @return Description of the given shape.
10269         #
10270         #  @ref tui_measurement_tools_page "Example"
10271         @ManageTransactions("MeasuOp")
10272         def WhatIs(self,theShape):
10273             """
10274             Obtain description of the given shape (number of sub-shapes of each type)
10275
10276             Parameters:
10277                 theShape Shape to be described.
10278
10279             Returns:
10280                 Description of the given shape.
10281             """
10282             # Example: see GEOM_TestMeasures.py
10283             aDescr = self.MeasuOp.WhatIs(theShape)
10284             RaiseIfFailed("WhatIs", self.MeasuOp)
10285             return aDescr
10286
10287         ## Obtain quantity of shapes of the given type in \a theShape.
10288         #  If \a theShape is of type \a theType, it is also counted.
10289         #  @param theShape Shape to be described.
10290         #  @param theType the given ShapeType().
10291         #  @return Quantity of shapes of type \a theType in \a theShape.
10292         #
10293         #  @ref tui_measurement_tools_page "Example"
10294         def NbShapes (self, theShape, theType):
10295             """
10296             Obtain quantity of shapes of the given type in theShape.
10297             If theShape is of type theType, it is also counted.
10298
10299             Parameters:
10300                 theShape Shape to be described.
10301                 theType the given geompy.ShapeType
10302
10303             Returns:
10304                 Quantity of shapes of type theType in theShape.
10305             """
10306             # Example: see GEOM_TestMeasures.py
10307             listSh = self.SubShapeAllIDs(theShape, theType)
10308             Nb = len(listSh)
10309             return Nb
10310
10311         ## Obtain quantity of shapes of each type in \a theShape.
10312         #  The \a theShape is also counted.
10313         #  @param theShape Shape to be described.
10314         #  @return Dictionary of ShapeType() with bound quantities of shapes.
10315         #
10316         #  @ref tui_measurement_tools_page "Example"
10317         def ShapeInfo (self, theShape):
10318             """
10319             Obtain quantity of shapes of each type in theShape.
10320             The theShape is also counted.
10321
10322             Parameters:
10323                 theShape Shape to be described.
10324
10325             Returns:
10326                 Dictionary of geompy.ShapeType with bound quantities of shapes.
10327             """
10328             # Example: see GEOM_TestMeasures.py
10329             aDict = {}
10330             for typeSh in self.ShapeType:
10331                 if typeSh in ( "AUTO", "SHAPE" ): continue
10332                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
10333                 Nb = len(listSh)
10334                 aDict[typeSh] = Nb
10335                 pass
10336             return aDict
10337
10338         def GetCreationInformation(self, theShape):
10339             info = theShape.GetCreationInformation()
10340             # operationName
10341             opName = info.operationName
10342             if not opName: opName = "no info available"
10343             res = "Operation: " + opName
10344             # parameters
10345             for parVal in info.params:
10346                 res += " \n %s = %s" % ( parVal.name, parVal.value )
10347             return res
10348
10349         ## Get a point, situated at the centre of mass of theShape.
10350         #  @param theShape Shape to define centre of mass of.
10351         #  @param theName Object name; when specified, this parameter is used
10352         #         for result publication in the study. Otherwise, if automatic
10353         #         publication is switched on, default value is used for result name.
10354         #
10355         #  @return New GEOM.GEOM_Object, containing the created point.
10356         #
10357         #  @ref tui_measurement_tools_page "Example"
10358         @ManageTransactions("MeasuOp")
10359         def MakeCDG(self, theShape, theName=None):
10360             """
10361             Get a point, situated at the centre of mass of theShape.
10362
10363             Parameters:
10364                 theShape Shape to define centre of mass of.
10365                 theName Object name; when specified, this parameter is used
10366                         for result publication in the study. Otherwise, if automatic
10367                         publication is switched on, default value is used for result name.
10368
10369             Returns:
10370                 New GEOM.GEOM_Object, containing the created point.
10371             """
10372             # Example: see GEOM_TestMeasures.py
10373             anObj = self.MeasuOp.GetCentreOfMass(theShape)
10374             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
10375             self._autoPublish(anObj, theName, "centerOfMass")
10376             return anObj
10377
10378         ## Get a vertex sub-shape by index depended with orientation.
10379         #  @param theShape Shape to find sub-shape.
10380         #  @param theIndex Index to find vertex by this index (starting from zero)
10381         #  @param theName Object name; when specified, this parameter is used
10382         #         for result publication in the study. Otherwise, if automatic
10383         #         publication is switched on, default value is used for result name.
10384         #
10385         #  @return New GEOM.GEOM_Object, containing the created vertex.
10386         #
10387         #  @ref tui_measurement_tools_page "Example"
10388         @ManageTransactions("MeasuOp")
10389         def GetVertexByIndex(self, theShape, theIndex, theName=None):
10390             """
10391             Get a vertex sub-shape by index depended with orientation.
10392
10393             Parameters:
10394                 theShape Shape to find sub-shape.
10395                 theIndex Index to find vertex by this index (starting from zero)
10396                 theName Object name; when specified, this parameter is used
10397                         for result publication in the study. Otherwise, if automatic
10398                         publication is switched on, default value is used for result name.
10399
10400             Returns:
10401                 New GEOM.GEOM_Object, containing the created vertex.
10402             """
10403             # Example: see GEOM_TestMeasures.py
10404             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
10405             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
10406             self._autoPublish(anObj, theName, "vertex")
10407             return anObj
10408
10409         ## Get the first vertex of wire/edge depended orientation.
10410         #  @param theShape Shape to find first vertex.
10411         #  @param theName Object name; when specified, this parameter is used
10412         #         for result publication in the study. Otherwise, if automatic
10413         #         publication is switched on, default value is used for result name.
10414         #
10415         #  @return New GEOM.GEOM_Object, containing the created vertex.
10416         #
10417         #  @ref tui_measurement_tools_page "Example"
10418         def GetFirstVertex(self, theShape, theName=None):
10419             """
10420             Get the first vertex of wire/edge depended orientation.
10421
10422             Parameters:
10423                 theShape Shape to find first vertex.
10424                 theName Object name; when specified, this parameter is used
10425                         for result publication in the study. Otherwise, if automatic
10426                         publication is switched on, default value is used for result name.
10427
10428             Returns:
10429                 New GEOM.GEOM_Object, containing the created vertex.
10430             """
10431             # Example: see GEOM_TestMeasures.py
10432             # note: auto-publishing is done in self.GetVertexByIndex()
10433             return self.GetVertexByIndex(theShape, 0, theName)
10434
10435         ## Get the last vertex of wire/edge depended orientation.
10436         #  @param theShape Shape to find last vertex.
10437         #  @param theName Object name; when specified, this parameter is used
10438         #         for result publication in the study. Otherwise, if automatic
10439         #         publication is switched on, default value is used for result name.
10440         #
10441         #  @return New GEOM.GEOM_Object, containing the created vertex.
10442         #
10443         #  @ref tui_measurement_tools_page "Example"
10444         def GetLastVertex(self, theShape, theName=None):
10445             """
10446             Get the last vertex of wire/edge depended orientation.
10447
10448             Parameters:
10449                 theShape Shape to find last vertex.
10450                 theName Object name; when specified, this parameter is used
10451                         for result publication in the study. Otherwise, if automatic
10452                         publication is switched on, default value is used for result name.
10453
10454             Returns:
10455                 New GEOM.GEOM_Object, containing the created vertex.
10456             """
10457             # Example: see GEOM_TestMeasures.py
10458             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
10459             # note: auto-publishing is done in self.GetVertexByIndex()
10460             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
10461
10462         ## Get a normale to the given face. If the point is not given,
10463         #  the normale is calculated at the center of mass.
10464         #  @param theFace Face to define normale of.
10465         #  @param theOptionalPoint Point to compute the normale at.
10466         #  @param theName Object name; when specified, this parameter is used
10467         #         for result publication in the study. Otherwise, if automatic
10468         #         publication is switched on, default value is used for result name.
10469         #
10470         #  @return New GEOM.GEOM_Object, containing the created vector.
10471         #
10472         #  @ref swig_todo "Example"
10473         @ManageTransactions("MeasuOp")
10474         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
10475             """
10476             Get a normale to the given face. If the point is not given,
10477             the normale is calculated at the center of mass.
10478
10479             Parameters:
10480                 theFace Face to define normale of.
10481                 theOptionalPoint Point to compute the normale at.
10482                 theName Object name; when specified, this parameter is used
10483                         for result publication in the study. Otherwise, if automatic
10484                         publication is switched on, default value is used for result name.
10485
10486             Returns:
10487                 New GEOM.GEOM_Object, containing the created vector.
10488             """
10489             # Example: see GEOM_TestMeasures.py
10490             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
10491             RaiseIfFailed("GetNormal", self.MeasuOp)
10492             self._autoPublish(anObj, theName, "normal")
10493             return anObj
10494
10495         ## Print shape errors obtained from CheckShape.
10496         #  @param theShape Shape that was checked.
10497         #  @param theShapeErrors the shape errors obtained by CheckShape.
10498         #  @param theReturnStatus If 0 the description of problem is printed.
10499         #                         If 1 the description of problem is returned.
10500         #  @return If theReturnStatus is equal to 1 the description is returned.
10501         #          Otherwise doesn't return anything.
10502         #
10503         #  @ref tui_measurement_tools_page "Example"
10504         @ManageTransactions("MeasuOp")
10505         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
10506             """
10507             Print shape errors obtained from CheckShape.
10508
10509             Parameters:
10510                 theShape Shape that was checked.
10511                 theShapeErrors the shape errors obtained by CheckShape.
10512                 theReturnStatus If 0 the description of problem is printed.
10513                                 If 1 the description of problem is returned.
10514
10515             Returns:
10516                 If theReturnStatus is equal to 1 the description is returned.
10517                   Otherwise doesn't return anything.
10518             """
10519             # Example: see GEOM_TestMeasures.py
10520             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
10521             if theReturnStatus == 1:
10522                 return Descr
10523             print Descr
10524             pass
10525
10526         ## Check a topology of the given shape.
10527         #  @param theShape Shape to check validity of.
10528         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
10529         #                        if TRUE, the shape's geometry will be checked also.
10530         #  @param theReturnStatus If 0 and if theShape is invalid, a description
10531         #                         of problem is printed.
10532         #                         If 1 isValid flag and the description of
10533         #                         problem is returned.
10534         #                         If 2 isValid flag and the list of error data
10535         #                         is returned.
10536         #  @return TRUE, if the shape "seems to be valid".
10537         #          If theShape is invalid, prints a description of problem.
10538         #          If theReturnStatus is equal to 1 the description is returned
10539         #          along with IsValid flag.
10540         #          If theReturnStatus is equal to 2 the list of error data is
10541         #          returned along with IsValid flag.
10542         #
10543         #  @ref tui_measurement_tools_page "Example"
10544         @ManageTransactions("MeasuOp")
10545         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
10546             """
10547             Check a topology of the given shape.
10548
10549             Parameters:
10550                 theShape Shape to check validity of.
10551                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
10552                                if TRUE, the shape's geometry will be checked also.
10553                 theReturnStatus If 0 and if theShape is invalid, a description
10554                                 of problem is printed.
10555                                 If 1 IsValid flag and the description of
10556                                 problem is returned.
10557                                 If 2 IsValid flag and the list of error data
10558                                 is returned.
10559
10560             Returns:
10561                 TRUE, if the shape "seems to be valid".
10562                 If theShape is invalid, prints a description of problem.
10563                 If theReturnStatus is equal to 1 the description is returned
10564                 along with IsValid flag.
10565                 If theReturnStatus is equal to 2 the list of error data is
10566                 returned along with IsValid flag.
10567             """
10568             # Example: see GEOM_TestMeasures.py
10569             if theIsCheckGeom:
10570                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
10571                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
10572             else:
10573                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
10574                 RaiseIfFailed("CheckShape", self.MeasuOp)
10575             if IsValid == 0:
10576                 if theReturnStatus == 0:
10577                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10578                     print Descr
10579             if theReturnStatus == 1:
10580               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10581               return (IsValid, Descr)
10582             elif theReturnStatus == 2:
10583               return (IsValid, ShapeErrors)
10584             return IsValid
10585
10586         ## Detect self-intersections in the given shape.
10587         #  @param theShape Shape to check.
10588         #  @return TRUE, if the shape contains no self-intersections.
10589         #
10590         #  @ref tui_measurement_tools_page "Example"
10591         @ManageTransactions("MeasuOp")
10592         def CheckSelfIntersections(self, theShape):
10593             """
10594             Detect self-intersections in the given shape.
10595
10596             Parameters:
10597                 theShape Shape to check.
10598
10599             Returns:
10600                 TRUE, if the shape contains no self-intersections.
10601             """
10602             # Example: see GEOM_TestMeasures.py
10603             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
10604             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
10605             return IsValid
10606
10607         ## Get position (LCS) of theShape.
10608         #
10609         #  Origin of the LCS is situated at the shape's center of mass.
10610         #  Axes of the LCS are obtained from shape's location or,
10611         #  if the shape is a planar face, from position of its plane.
10612         #
10613         #  @param theShape Shape to calculate position of.
10614         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10615         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
10616         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10617         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10618         #
10619         #  @ref swig_todo "Example"
10620         @ManageTransactions("MeasuOp")
10621         def GetPosition(self,theShape):
10622             """
10623             Get position (LCS) of theShape.
10624             Origin of the LCS is situated at the shape's center of mass.
10625             Axes of the LCS are obtained from shape's location or,
10626             if the shape is a planar face, from position of its plane.
10627
10628             Parameters:
10629                 theShape Shape to calculate position of.
10630
10631             Returns:
10632                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10633                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
10634                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10635                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10636             """
10637             # Example: see GEOM_TestMeasures.py
10638             aTuple = self.MeasuOp.GetPosition(theShape)
10639             RaiseIfFailed("GetPosition", self.MeasuOp)
10640             return aTuple
10641
10642         ## Get kind of theShape.
10643         #
10644         #  @param theShape Shape to get a kind of.
10645         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
10646         #          and a list of parameters, describing the shape.
10647         #  @note  Concrete meaning of each value, returned via \a theIntegers
10648         #         or \a theDoubles list depends on the kind() of the shape.
10649         #
10650         #  @ref swig_todo "Example"
10651         @ManageTransactions("MeasuOp")
10652         def KindOfShape(self,theShape):
10653             """
10654             Get kind of theShape.
10655
10656             Parameters:
10657                 theShape Shape to get a kind of.
10658
10659             Returns:
10660                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
10661                     and a list of parameters, describing the shape.
10662             Note:
10663                 Concrete meaning of each value, returned via theIntegers
10664                 or theDoubles list depends on the geompy.kind of the shape
10665             """
10666             # Example: see GEOM_TestMeasures.py
10667             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
10668             RaiseIfFailed("KindOfShape", self.MeasuOp)
10669
10670             aKind  = aRoughTuple[0]
10671             anInts = aRoughTuple[1]
10672             aDbls  = aRoughTuple[2]
10673
10674             # Now there is no exception from this rule:
10675             aKindTuple = [aKind] + aDbls + anInts
10676
10677             # If they are we will regroup parameters for such kind of shape.
10678             # For example:
10679             #if aKind == kind.SOME_KIND:
10680             #    #  SOME_KIND     int int double int double double
10681             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
10682
10683             return aKindTuple
10684
10685         ## Returns the string that describes if the shell is good for solid.
10686         #  This is a support method for MakeSolid.
10687         #
10688         #  @param theShell the shell to be checked.
10689         #  @return Returns a string that describes the shell validity for
10690         #          solid construction.
10691         @ManageTransactions("MeasuOp")
10692         def _IsGoodForSolid(self, theShell):
10693             """
10694             Returns the string that describes if the shell is good for solid.
10695             This is a support method for MakeSolid.
10696
10697             Parameter:
10698                 theShell the shell to be checked.
10699
10700             Returns:
10701                 Returns a string that describes the shell validity for
10702                 solid construction.
10703             """
10704             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
10705             return aDescr
10706
10707         # end of l2_measure
10708         ## @}
10709
10710         ## @addtogroup l2_import_export
10711         ## @{
10712
10713         ## Import a shape from the BREP, IGES, STEP or other file
10714         #  (depends on given format) with given name.
10715         #
10716         #  Note: this function is deprecated, it is kept for backward compatibility only
10717         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
10718         #
10719         #  @param theFileName The file, containing the shape.
10720         #  @param theFormatName Specify format for the file reading.
10721         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
10722         #         If format 'IGES_SCALE' is used instead of 'IGES' or
10723         #            format 'STEP_SCALE' is used instead of 'STEP',
10724         #            length unit will be set to 'meter' and result model will be scaled.
10725         #  @param theName Object name; when specified, this parameter is used
10726         #         for result publication in the study. Otherwise, if automatic
10727         #         publication is switched on, default value is used for result name.
10728         #
10729         #  @return New GEOM.GEOM_Object, containing the imported shape.
10730         #          If material names are imported it returns the list of
10731         #          objects. The first one is the imported object followed by
10732         #          material groups.
10733         #  @note Auto publishing is allowed for the shape itself. Imported
10734         #        material groups are not automatically published.
10735         #
10736         #  @ref swig_Import_Export "Example"
10737         @ManageTransactions("InsertOp")
10738         def ImportFile(self, theFileName, theFormatName, theName=None):
10739             """
10740             Import a shape from the BREP, IGES, STEP or other file
10741             (depends on given format) with given name.
10742
10743             Note: this function is deprecated, it is kept for backward compatibility only
10744             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
10745
10746             Parameters: 
10747                 theFileName The file, containing the shape.
10748                 theFormatName Specify format for the file reading.
10749                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
10750                     If format 'IGES_SCALE' is used instead of 'IGES' or
10751                        format 'STEP_SCALE' is used instead of 'STEP',
10752                        length unit will be set to 'meter' and result model will be scaled.
10753                 theName Object name; when specified, this parameter is used
10754                         for result publication in the study. Otherwise, if automatic
10755                         publication is switched on, default value is used for result name.
10756
10757             Returns:
10758                 New GEOM.GEOM_Object, containing the imported shape.
10759                 If material names are imported it returns the list of
10760                 objects. The first one is the imported object followed by
10761                 material groups.
10762             Note:
10763                 Auto publishing is allowed for the shape itself. Imported
10764                 material groups are not automatically published.
10765             """
10766             # Example: see GEOM_TestOthers.py
10767             print """
10768             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
10769             where <FormatName> is a name of desirable format for importing.
10770             """
10771             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
10772             RaiseIfFailed("ImportFile", self.InsertOp)
10773             aNbObj = len(aListObj)
10774             if aNbObj > 0:
10775                 self._autoPublish(aListObj[0], theName, "imported")
10776             if aNbObj == 1:
10777                 return aListObj[0]
10778             return aListObj
10779
10780         ## Deprecated analog of ImportFile()
10781         def Import(self, theFileName, theFormatName, theName=None):
10782             """
10783             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
10784             """
10785             # note: auto-publishing is done in self.ImportFile()
10786             return self.ImportFile(theFileName, theFormatName, theName)
10787
10788         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10789         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10790         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10791         #  @param theStream The BRep binary stream.
10792         #  @param theName Object name; when specified, this parameter is used
10793         #         for result publication in the study. Otherwise, if automatic
10794         #         publication is switched on, default value is used for result name.
10795         #
10796         #  @return New GEOM_Object, containing the shape, read from theStream.
10797         #
10798         #  @ref swig_Import_Export "Example"
10799         @ManageTransactions("InsertOp")
10800         def RestoreShape (self, theStream, theName=None):
10801             """
10802             Read a shape from the binary stream, containing its bounding representation (BRep).
10803
10804             Note:
10805                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10806
10807             Parameters:
10808                 theStream The BRep binary stream.
10809                 theName Object name; when specified, this parameter is used
10810                         for result publication in the study. Otherwise, if automatic
10811                         publication is switched on, default value is used for result name.
10812
10813             Returns:
10814                 New GEOM_Object, containing the shape, read from theStream.
10815             """
10816             # Example: see GEOM_TestOthers.py
10817             anObj = self.InsertOp.RestoreShape(theStream)
10818             RaiseIfFailed("RestoreShape", self.InsertOp)
10819             self._autoPublish(anObj, theName, "restored")
10820             return anObj
10821
10822         ## Export the given shape into a file with given name.
10823         #
10824         #  Note: this function is deprecated, it is kept for backward compatibility only
10825         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
10826         #
10827         #  @param theObject Shape to be stored in the file.
10828         #  @param theFileName Name of the file to store the given shape in.
10829         #  @param theFormatName Specify format for the shape storage.
10830         #         Available formats can be obtained with
10831         #         geompy.InsertOp.ExportTranslators()[0] method.
10832         #
10833         #  @ref swig_Import_Export "Example"
10834         @ManageTransactions("InsertOp")
10835         def Export(self, theObject, theFileName, theFormatName):
10836             """
10837             Export the given shape into a file with given name.
10838
10839             Note: this function is deprecated, it is kept for backward compatibility only
10840             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
10841             
10842             Parameters: 
10843                 theObject Shape to be stored in the file.
10844                 theFileName Name of the file to store the given shape in.
10845                 theFormatName Specify format for the shape storage.
10846                               Available formats can be obtained with
10847                               geompy.InsertOp.ExportTranslators()[0] method.
10848             """
10849             # Example: see GEOM_TestOthers.py
10850             print """
10851             WARNING: Function Export is deprecated, use Export<FormatName> instead,
10852             where <FormatName> is a name of desirable format for exporting.
10853             """
10854             self.InsertOp.Export(theObject, theFileName, theFormatName)
10855             if self.InsertOp.IsDone() == 0:
10856                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10857                 pass
10858             pass
10859
10860         # end of l2_import_export
10861         ## @}
10862
10863         ## @addtogroup l3_blocks
10864         ## @{
10865
10866         ## Create a quadrangle face from four edges. Order of Edges is not
10867         #  important. It is  not necessary that edges share the same vertex.
10868         #  @param E1,E2,E3,E4 Edges for the face bound.
10869         #  @param theName Object name; when specified, this parameter is used
10870         #         for result publication in the study. Otherwise, if automatic
10871         #         publication is switched on, default value is used for result name.
10872         #
10873         #  @return New GEOM.GEOM_Object, containing the created face.
10874         #
10875         #  @ref tui_building_by_blocks_page "Example"
10876         @ManageTransactions("BlocksOp")
10877         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10878             """
10879             Create a quadrangle face from four edges. Order of Edges is not
10880             important. It is  not necessary that edges share the same vertex.
10881
10882             Parameters:
10883                 E1,E2,E3,E4 Edges for the face bound.
10884                 theName Object name; when specified, this parameter is used
10885                         for result publication in the study. Otherwise, if automatic
10886                         publication is switched on, default value is used for result name.
10887
10888             Returns:
10889                 New GEOM.GEOM_Object, containing the created face.
10890
10891             Example of usage:
10892                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10893             """
10894             # Example: see GEOM_Spanner.py
10895             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10896             RaiseIfFailed("MakeQuad", self.BlocksOp)
10897             self._autoPublish(anObj, theName, "quad")
10898             return anObj
10899
10900         ## Create a quadrangle face on two edges.
10901         #  The missing edges will be built by creating the shortest ones.
10902         #  @param E1,E2 Two opposite edges for the face.
10903         #  @param theName Object name; when specified, this parameter is used
10904         #         for result publication in the study. Otherwise, if automatic
10905         #         publication is switched on, default value is used for result name.
10906         #
10907         #  @return New GEOM.GEOM_Object, containing the created face.
10908         #
10909         #  @ref tui_building_by_blocks_page "Example"
10910         @ManageTransactions("BlocksOp")
10911         def MakeQuad2Edges(self, E1, E2, theName=None):
10912             """
10913             Create a quadrangle face on two edges.
10914             The missing edges will be built by creating the shortest ones.
10915
10916             Parameters:
10917                 E1,E2 Two opposite edges for the face.
10918                 theName Object name; when specified, this parameter is used
10919                         for result publication in the study. Otherwise, if automatic
10920                         publication is switched on, default value is used for result name.
10921
10922             Returns:
10923                 New GEOM.GEOM_Object, containing the created face.
10924
10925             Example of usage:
10926                 # create vertices
10927                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10928                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10929                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10930                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10931                 # create edges
10932                 edge1 = geompy.MakeEdge(p1, p2)
10933                 edge2 = geompy.MakeEdge(p3, p4)
10934                 # create a quadrangle face from two edges
10935                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10936             """
10937             # Example: see GEOM_Spanner.py
10938             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10939             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10940             self._autoPublish(anObj, theName, "quad")
10941             return anObj
10942
10943         ## Create a quadrangle face with specified corners.
10944         #  The missing edges will be built by creating the shortest ones.
10945         #  @param V1,V2,V3,V4 Corner vertices for the face.
10946         #  @param theName Object name; when specified, this parameter is used
10947         #         for result publication in the study. Otherwise, if automatic
10948         #         publication is switched on, default value is used for result name.
10949         #
10950         #  @return New GEOM.GEOM_Object, containing the created face.
10951         #
10952         #  @ref tui_building_by_blocks_page "Example 1"
10953         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10954         @ManageTransactions("BlocksOp")
10955         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10956             """
10957             Create a quadrangle face with specified corners.
10958             The missing edges will be built by creating the shortest ones.
10959
10960             Parameters:
10961                 V1,V2,V3,V4 Corner vertices for the face.
10962                 theName Object name; when specified, this parameter is used
10963                         for result publication in the study. Otherwise, if automatic
10964                         publication is switched on, default value is used for result name.
10965
10966             Returns:
10967                 New GEOM.GEOM_Object, containing the created face.
10968
10969             Example of usage:
10970                 # create vertices
10971                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10972                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10973                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10974                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10975                 # create a quadrangle from four points in its corners
10976                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10977             """
10978             # Example: see GEOM_Spanner.py
10979             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10980             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10981             self._autoPublish(anObj, theName, "quad")
10982             return anObj
10983
10984         ## Create a hexahedral solid, bounded by the six given faces. Order of
10985         #  faces is not important. It is  not necessary that Faces share the same edge.
10986         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10987         #  @param theName Object name; when specified, this parameter is used
10988         #         for result publication in the study. Otherwise, if automatic
10989         #         publication is switched on, default value is used for result name.
10990         #
10991         #  @return New GEOM.GEOM_Object, containing the created solid.
10992         #
10993         #  @ref tui_building_by_blocks_page "Example 1"
10994         #  \n @ref swig_MakeHexa "Example 2"
10995         @ManageTransactions("BlocksOp")
10996         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10997             """
10998             Create a hexahedral solid, bounded by the six given faces. Order of
10999             faces is not important. It is  not necessary that Faces share the same edge.
11000
11001             Parameters:
11002                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11003                 theName Object name; when specified, this parameter is used
11004                         for result publication in the study. Otherwise, if automatic
11005                         publication is switched on, default value is used for result name.
11006
11007             Returns:
11008                 New GEOM.GEOM_Object, containing the created solid.
11009
11010             Example of usage:
11011                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
11012             """
11013             # Example: see GEOM_Spanner.py
11014             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
11015             RaiseIfFailed("MakeHexa", self.BlocksOp)
11016             self._autoPublish(anObj, theName, "hexa")
11017             return anObj
11018
11019         ## Create a hexahedral solid between two given faces.
11020         #  The missing faces will be built by creating the smallest ones.
11021         #  @param F1,F2 Two opposite faces for the hexahedral solid.
11022         #  @param theName Object name; when specified, this parameter is used
11023         #         for result publication in the study. Otherwise, if automatic
11024         #         publication is switched on, default value is used for result name.
11025         #
11026         #  @return New GEOM.GEOM_Object, containing the created solid.
11027         #
11028         #  @ref tui_building_by_blocks_page "Example 1"
11029         #  \n @ref swig_MakeHexa2Faces "Example 2"
11030         @ManageTransactions("BlocksOp")
11031         def MakeHexa2Faces(self, F1, F2, theName=None):
11032             """
11033             Create a hexahedral solid between two given faces.
11034             The missing faces will be built by creating the smallest ones.
11035
11036             Parameters:
11037                 F1,F2 Two opposite faces for the hexahedral solid.
11038                 theName Object name; when specified, this parameter is used
11039                         for result publication in the study. Otherwise, if automatic
11040                         publication is switched on, default value is used for result name.
11041
11042             Returns:
11043                 New GEOM.GEOM_Object, containing the created solid.
11044
11045             Example of usage:
11046                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
11047             """
11048             # Example: see GEOM_Spanner.py
11049             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
11050             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
11051             self._autoPublish(anObj, theName, "hexa")
11052             return anObj
11053
11054         # end of l3_blocks
11055         ## @}
11056
11057         ## @addtogroup l3_blocks_op
11058         ## @{
11059
11060         ## Get a vertex, found in the given shape by its coordinates.
11061         #  @param theShape Block or a compound of blocks.
11062         #  @param theX,theY,theZ Coordinates of the sought vertex.
11063         #  @param theEpsilon Maximum allowed distance between the resulting
11064         #                    vertex and point with the given coordinates.
11065         #  @param theName Object name; when specified, this parameter is used
11066         #         for result publication in the study. Otherwise, if automatic
11067         #         publication is switched on, default value is used for result name.
11068         #
11069         #  @return New GEOM.GEOM_Object, containing the found vertex.
11070         #
11071         #  @ref swig_GetPoint "Example"
11072         @ManageTransactions("BlocksOp")
11073         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
11074             """
11075             Get a vertex, found in the given shape by its coordinates.
11076
11077             Parameters:
11078                 theShape Block or a compound of blocks.
11079                 theX,theY,theZ Coordinates of the sought vertex.
11080                 theEpsilon Maximum allowed distance between the resulting
11081                            vertex and point with the given coordinates.
11082                 theName Object name; when specified, this parameter is used
11083                         for result publication in the study. Otherwise, if automatic
11084                         publication is switched on, default value is used for result name.
11085
11086             Returns:
11087                 New GEOM.GEOM_Object, containing the found vertex.
11088
11089             Example of usage:
11090                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
11091             """
11092             # Example: see GEOM_TestOthers.py
11093             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
11094             RaiseIfFailed("GetPoint", self.BlocksOp)
11095             self._autoPublish(anObj, theName, "vertex")
11096             return anObj
11097
11098         ## Find a vertex of the given shape, which has minimal distance to the given point.
11099         #  @param theShape Any shape.
11100         #  @param thePoint Point, close to the desired vertex.
11101         #  @param theName Object name; when specified, this parameter is used
11102         #         for result publication in the study. Otherwise, if automatic
11103         #         publication is switched on, default value is used for result name.
11104         #
11105         #  @return New GEOM.GEOM_Object, containing the found vertex.
11106         #
11107         #  @ref swig_GetVertexNearPoint "Example"
11108         @ManageTransactions("BlocksOp")
11109         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
11110             """
11111             Find a vertex of the given shape, which has minimal distance to the given point.
11112
11113             Parameters:
11114                 theShape Any shape.
11115                 thePoint Point, close to the desired vertex.
11116                 theName Object name; when specified, this parameter is used
11117                         for result publication in the study. Otherwise, if automatic
11118                         publication is switched on, default value is used for result name.
11119
11120             Returns:
11121                 New GEOM.GEOM_Object, containing the found vertex.
11122
11123             Example of usage:
11124                 pmidle = geompy.MakeVertex(50, 0, 50)
11125                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
11126             """
11127             # Example: see GEOM_TestOthers.py
11128             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
11129             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
11130             self._autoPublish(anObj, theName, "vertex")
11131             return anObj
11132
11133         ## Get an edge, found in the given shape by two given vertices.
11134         #  @param theShape Block or a compound of blocks.
11135         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
11136         #  @param theName Object name; when specified, this parameter is used
11137         #         for result publication in the study. Otherwise, if automatic
11138         #         publication is switched on, default value is used for result name.
11139         #
11140         #  @return New GEOM.GEOM_Object, containing the found edge.
11141         #
11142         #  @ref swig_GetEdge "Example"
11143         @ManageTransactions("BlocksOp")
11144         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
11145             """
11146             Get an edge, found in the given shape by two given vertices.
11147
11148             Parameters:
11149                 theShape Block or a compound of blocks.
11150                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
11151                 theName Object name; when specified, this parameter is used
11152                         for result publication in the study. Otherwise, if automatic
11153                         publication is switched on, default value is used for result name.
11154
11155             Returns:
11156                 New GEOM.GEOM_Object, containing the found edge.
11157             """
11158             # Example: see GEOM_Spanner.py
11159             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
11160             RaiseIfFailed("GetEdge", self.BlocksOp)
11161             self._autoPublish(anObj, theName, "edge")
11162             return anObj
11163
11164         ## Find an edge of the given shape, which has minimal distance to the given point.
11165         #  @param theShape Block or a compound of blocks.
11166         #  @param thePoint Point, close to the desired edge.
11167         #  @param theName Object name; when specified, this parameter is used
11168         #         for result publication in the study. Otherwise, if automatic
11169         #         publication is switched on, default value is used for result name.
11170         #
11171         #  @return New GEOM.GEOM_Object, containing the found edge.
11172         #
11173         #  @ref swig_GetEdgeNearPoint "Example"
11174         @ManageTransactions("BlocksOp")
11175         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
11176             """
11177             Find an edge of the given shape, which has minimal distance to the given point.
11178
11179             Parameters:
11180                 theShape Block or a compound of blocks.
11181                 thePoint Point, close to the desired edge.
11182                 theName Object name; when specified, this parameter is used
11183                         for result publication in the study. Otherwise, if automatic
11184                         publication is switched on, default value is used for result name.
11185
11186             Returns:
11187                 New GEOM.GEOM_Object, containing the found edge.
11188             """
11189             # Example: see GEOM_TestOthers.py
11190             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
11191             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
11192             self._autoPublish(anObj, theName, "edge")
11193             return anObj
11194
11195         ## Returns a face, found in the given shape by four given corner vertices.
11196         #  @param theShape Block or a compound of blocks.
11197         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11198         #  @param theName Object name; when specified, this parameter is used
11199         #         for result publication in the study. Otherwise, if automatic
11200         #         publication is switched on, default value is used for result name.
11201         #
11202         #  @return New GEOM.GEOM_Object, containing the found face.
11203         #
11204         #  @ref swig_todo "Example"
11205         @ManageTransactions("BlocksOp")
11206         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
11207             """
11208             Returns a face, found in the given shape by four given corner vertices.
11209
11210             Parameters:
11211                 theShape Block or a compound of blocks.
11212                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11213                 theName Object name; when specified, this parameter is used
11214                         for result publication in the study. Otherwise, if automatic
11215                         publication is switched on, default value is used for result name.
11216
11217             Returns:
11218                 New GEOM.GEOM_Object, containing the found face.
11219             """
11220             # Example: see GEOM_Spanner.py
11221             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
11222             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
11223             self._autoPublish(anObj, theName, "face")
11224             return anObj
11225
11226         ## Get a face of block, found in the given shape by two given edges.
11227         #  @param theShape Block or a compound of blocks.
11228         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
11229         #  @param theName Object name; when specified, this parameter is used
11230         #         for result publication in the study. Otherwise, if automatic
11231         #         publication is switched on, default value is used for result name.
11232         #
11233         #  @return New GEOM.GEOM_Object, containing the found face.
11234         #
11235         #  @ref swig_todo "Example"
11236         @ManageTransactions("BlocksOp")
11237         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
11238             """
11239             Get a face of block, found in the given shape by two given edges.
11240
11241             Parameters:
11242                 theShape Block or a compound of blocks.
11243                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
11244                 theName Object name; when specified, this parameter is used
11245                         for result publication in the study. Otherwise, if automatic
11246                         publication is switched on, default value is used for result name.
11247
11248             Returns:
11249                 New GEOM.GEOM_Object, containing the found face.
11250             """
11251             # Example: see GEOM_Spanner.py
11252             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
11253             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
11254             self._autoPublish(anObj, theName, "face")
11255             return anObj
11256
11257         ## Find a face, opposite to the given one in the given block.
11258         #  @param theBlock Must be a hexahedral solid.
11259         #  @param theFace Face of \a theBlock, opposite to the desired face.
11260         #  @param theName Object name; when specified, this parameter is used
11261         #         for result publication in the study. Otherwise, if automatic
11262         #         publication is switched on, default value is used for result name.
11263         #
11264         #  @return New GEOM.GEOM_Object, containing the found face.
11265         #
11266         #  @ref swig_GetOppositeFace "Example"
11267         @ManageTransactions("BlocksOp")
11268         def GetOppositeFace(self, theBlock, theFace, theName=None):
11269             """
11270             Find a face, opposite to the given one in the given block.
11271
11272             Parameters:
11273                 theBlock Must be a hexahedral solid.
11274                 theFace Face of theBlock, opposite to the desired face.
11275                 theName Object name; when specified, this parameter is used
11276                         for result publication in the study. Otherwise, if automatic
11277                         publication is switched on, default value is used for result name.
11278
11279             Returns:
11280                 New GEOM.GEOM_Object, containing the found face.
11281             """
11282             # Example: see GEOM_Spanner.py
11283             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
11284             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
11285             self._autoPublish(anObj, theName, "face")
11286             return anObj
11287
11288         ## Find a face of the given shape, which has minimal distance to the given point.
11289         #  @param theShape Block or a compound of blocks.
11290         #  @param thePoint Point, close to the desired face.
11291         #  @param theName Object name; when specified, this parameter is used
11292         #         for result publication in the study. Otherwise, if automatic
11293         #         publication is switched on, default value is used for result name.
11294         #
11295         #  @return New GEOM.GEOM_Object, containing the found face.
11296         #
11297         #  @ref swig_GetFaceNearPoint "Example"
11298         @ManageTransactions("BlocksOp")
11299         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
11300             """
11301             Find a face of the given shape, which has minimal distance to the given point.
11302
11303             Parameters:
11304                 theShape Block or a compound of blocks.
11305                 thePoint Point, close to the desired face.
11306                 theName Object name; when specified, this parameter is used
11307                         for result publication in the study. Otherwise, if automatic
11308                         publication is switched on, default value is used for result name.
11309
11310             Returns:
11311                 New GEOM.GEOM_Object, containing the found face.
11312             """
11313             # Example: see GEOM_Spanner.py
11314             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
11315             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
11316             self._autoPublish(anObj, theName, "face")
11317             return anObj
11318
11319         ## Find a face of block, whose outside normale has minimal angle with the given vector.
11320         #  @param theBlock Block or a compound of blocks.
11321         #  @param theVector Vector, close to the normale of the desired face.
11322         #  @param theName Object name; when specified, this parameter is used
11323         #         for result publication in the study. Otherwise, if automatic
11324         #         publication is switched on, default value is used for result name.
11325         #
11326         #  @return New GEOM.GEOM_Object, containing the found face.
11327         #
11328         #  @ref swig_todo "Example"
11329         @ManageTransactions("BlocksOp")
11330         def GetFaceByNormale(self, theBlock, theVector, theName=None):
11331             """
11332             Find a face of block, whose outside normale has minimal angle with the given vector.
11333
11334             Parameters:
11335                 theBlock Block or a compound of blocks.
11336                 theVector Vector, close to the normale of the desired face.
11337                 theName Object name; when specified, this parameter is used
11338                         for result publication in the study. Otherwise, if automatic
11339                         publication is switched on, default value is used for result name.
11340
11341             Returns:
11342                 New GEOM.GEOM_Object, containing the found face.
11343             """
11344             # Example: see GEOM_Spanner.py
11345             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
11346             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
11347             self._autoPublish(anObj, theName, "face")
11348             return anObj
11349
11350         ## Find all sub-shapes of type \a theShapeType of the given shape,
11351         #  which have minimal distance to the given point.
11352         #  @param theShape Any shape.
11353         #  @param thePoint Point, close to the desired shape.
11354         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
11355         #  @param theTolerance The tolerance for distances comparison. All shapes
11356         #                      with distances to the given point in interval
11357         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
11358         #  @param theName Object name; when specified, this parameter is used
11359         #         for result publication in the study. Otherwise, if automatic
11360         #         publication is switched on, default value is used for result name.
11361         #
11362         #  @return New GEOM_Object, containing a group of all found shapes.
11363         #
11364         #  @ref swig_GetShapesNearPoint "Example"
11365         @ManageTransactions("BlocksOp")
11366         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
11367             """
11368             Find all sub-shapes of type theShapeType of the given shape,
11369             which have minimal distance to the given point.
11370
11371             Parameters:
11372                 theShape Any shape.
11373                 thePoint Point, close to the desired shape.
11374                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
11375                 theTolerance The tolerance for distances comparison. All shapes
11376                                 with distances to the given point in interval
11377                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
11378                 theName Object name; when specified, this parameter is used
11379                         for result publication in the study. Otherwise, if automatic
11380                         publication is switched on, default value is used for result name.
11381
11382             Returns:
11383                 New GEOM_Object, containing a group of all found shapes.
11384             """
11385             # Example: see GEOM_TestOthers.py
11386             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
11387             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
11388             self._autoPublish(anObj, theName, "group")
11389             return anObj
11390
11391         # end of l3_blocks_op
11392         ## @}
11393
11394         ## @addtogroup l4_blocks_measure
11395         ## @{
11396
11397         ## Check, if the compound of blocks is given.
11398         #  To be considered as a compound of blocks, the
11399         #  given shape must satisfy the following conditions:
11400         #  - Each element of the compound should be a Block (6 faces and 12 edges).
11401         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11402         #  - The compound should be connexe.
11403         #  - The glue between two quadrangle faces should be applied.
11404         #  @param theCompound The compound to check.
11405         #  @return TRUE, if the given shape is a compound of blocks.
11406         #  If theCompound is not valid, prints all discovered errors.
11407         #
11408         #  @ref tui_measurement_tools_page "Example 1"
11409         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
11410         @ManageTransactions("BlocksOp")
11411         def CheckCompoundOfBlocks(self,theCompound):
11412             """
11413             Check, if the compound of blocks is given.
11414             To be considered as a compound of blocks, the
11415             given shape must satisfy the following conditions:
11416             - Each element of the compound should be a Block (6 faces and 12 edges).
11417             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11418             - The compound should be connexe.
11419             - The glue between two quadrangle faces should be applied.
11420
11421             Parameters:
11422                 theCompound The compound to check.
11423
11424             Returns:
11425                 TRUE, if the given shape is a compound of blocks.
11426                 If theCompound is not valid, prints all discovered errors.
11427             """
11428             # Example: see GEOM_Spanner.py
11429             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
11430             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
11431             if IsValid == 0:
11432                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
11433                 print Descr
11434             return IsValid
11435
11436         ## Retrieve all non blocks solids and faces from \a theShape.
11437         #  @param theShape The shape to explore.
11438         #  @param theName Object name; when specified, this parameter is used
11439         #         for result publication in the study. Otherwise, if automatic
11440         #         publication is switched on, default value is used for result name.
11441         #
11442         #  @return A tuple of two GEOM_Objects. The first object is a group of all
11443         #          non block solids (= not 6 faces, or with 6 faces, but with the
11444         #          presence of non-quadrangular faces). The second object is a
11445         #          group of all non quadrangular faces.
11446         #
11447         #  @ref tui_measurement_tools_page "Example 1"
11448         #  \n @ref swig_GetNonBlocks "Example 2"
11449         @ManageTransactions("BlocksOp")
11450         def GetNonBlocks (self, theShape, theName=None):
11451             """
11452             Retrieve all non blocks solids and faces from theShape.
11453
11454             Parameters:
11455                 theShape The shape to explore.
11456                 theName Object name; when specified, this parameter is used
11457                         for result publication in the study. Otherwise, if automatic
11458                         publication is switched on, default value is used for result name.
11459
11460             Returns:
11461                 A tuple of two GEOM_Objects. The first object is a group of all
11462                 non block solids (= not 6 faces, or with 6 faces, but with the
11463                 presence of non-quadrangular faces). The second object is a
11464                 group of all non quadrangular faces.
11465
11466             Usage:
11467                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
11468             """
11469             # Example: see GEOM_Spanner.py
11470             aTuple = self.BlocksOp.GetNonBlocks(theShape)
11471             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
11472             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
11473             return aTuple
11474
11475         ## Remove all seam and degenerated edges from \a theShape.
11476         #  Unite faces and edges, sharing one surface. It means that
11477         #  this faces must have references to one C++ surface object (handle).
11478         #  @param theShape The compound or single solid to remove irregular edges from.
11479         #  @param doUnionFaces If True, then unite faces. If False (the default value),
11480         #         do not unite faces.
11481         #  @param theName Object name; when specified, this parameter is used
11482         #         for result publication in the study. Otherwise, if automatic
11483         #         publication is switched on, default value is used for result name.
11484         #
11485         #  @return Improved shape.
11486         #
11487         #  @ref swig_RemoveExtraEdges "Example"
11488         @ManageTransactions("BlocksOp")
11489         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
11490             """
11491             Remove all seam and degenerated edges from theShape.
11492             Unite faces and edges, sharing one surface. It means that
11493             this faces must have references to one C++ surface object (handle).
11494
11495             Parameters:
11496                 theShape The compound or single solid to remove irregular edges from.
11497                 doUnionFaces If True, then unite faces. If False (the default value),
11498                              do not unite faces.
11499                 theName Object name; when specified, this parameter is used
11500                         for result publication in the study. Otherwise, if automatic
11501                         publication is switched on, default value is used for result name.
11502
11503             Returns:
11504                 Improved shape.
11505             """
11506             # Example: see GEOM_TestOthers.py
11507             nbFacesOptimum = -1 # -1 means do not unite faces
11508             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
11509             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
11510             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
11511             self._autoPublish(anObj, theName, "removeExtraEdges")
11512             return anObj
11513
11514         ## Performs union faces of \a theShape
11515         #  Unite faces sharing one surface. It means that
11516         #  these faces must have references to one C++ surface object (handle).
11517         #  @param theShape The compound or single solid that contains faces
11518         #         to perform union.
11519         #  @param theName Object name; when specified, this parameter is used
11520         #         for result publication in the study. Otherwise, if automatic
11521         #         publication is switched on, default value is used for result name.
11522         #
11523         #  @return Improved shape.
11524         #
11525         #  @ref swig_UnionFaces "Example"
11526         @ManageTransactions("BlocksOp")
11527         def UnionFaces(self, theShape, theName=None):
11528             """
11529             Performs union faces of theShape.
11530             Unite faces sharing one surface. It means that
11531             these faces must have references to one C++ surface object (handle).
11532
11533             Parameters:
11534                 theShape The compound or single solid that contains faces
11535                          to perform union.
11536                 theName Object name; when specified, this parameter is used
11537                         for result publication in the study. Otherwise, if automatic
11538                         publication is switched on, default value is used for result name.
11539
11540             Returns:
11541                 Improved shape.
11542             """
11543             # Example: see GEOM_TestOthers.py
11544             anObj = self.BlocksOp.UnionFaces(theShape)
11545             RaiseIfFailed("UnionFaces", self.BlocksOp)
11546             self._autoPublish(anObj, theName, "unionFaces")
11547             return anObj
11548
11549         ## Check, if the given shape is a blocks compound.
11550         #  Fix all detected errors.
11551         #    \note Single block can be also fixed by this method.
11552         #  @param theShape The compound to check and improve.
11553         #  @param theName Object name; when specified, this parameter is used
11554         #         for result publication in the study. Otherwise, if automatic
11555         #         publication is switched on, default value is used for result name.
11556         #
11557         #  @return Improved compound.
11558         #
11559         #  @ref swig_CheckAndImprove "Example"
11560         @ManageTransactions("BlocksOp")
11561         def CheckAndImprove(self, theShape, theName=None):
11562             """
11563             Check, if the given shape is a blocks compound.
11564             Fix all detected errors.
11565
11566             Note:
11567                 Single block can be also fixed by this method.
11568
11569             Parameters:
11570                 theShape The compound to check and improve.
11571                 theName Object name; when specified, this parameter is used
11572                         for result publication in the study. Otherwise, if automatic
11573                         publication is switched on, default value is used for result name.
11574
11575             Returns:
11576                 Improved compound.
11577             """
11578             # Example: see GEOM_TestOthers.py
11579             anObj = self.BlocksOp.CheckAndImprove(theShape)
11580             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
11581             self._autoPublish(anObj, theName, "improved")
11582             return anObj
11583
11584         # end of l4_blocks_measure
11585         ## @}
11586
11587         ## @addtogroup l3_blocks_op
11588         ## @{
11589
11590         ## Get all the blocks, contained in the given compound.
11591         #  @param theCompound The compound to explode.
11592         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
11593         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
11594         #  @param theName Object name; when specified, this parameter is used
11595         #         for result publication in the study. Otherwise, if automatic
11596         #         publication is switched on, default value is used for result name.
11597         #
11598         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11599         #
11600         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
11601         #
11602         #  @ref tui_explode_on_blocks "Example 1"
11603         #  \n @ref swig_MakeBlockExplode "Example 2"
11604         @ManageTransactions("BlocksOp")
11605         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
11606             """
11607             Get all the blocks, contained in the given compound.
11608
11609             Parameters:
11610                 theCompound The compound to explode.
11611                 theMinNbFaces If solid has lower number of faces, it is not a block.
11612                 theMaxNbFaces If solid has higher number of faces, it is not a block.
11613                 theName Object name; when specified, this parameter is used
11614                         for result publication in the study. Otherwise, if automatic
11615                         publication is switched on, default value is used for result name.
11616
11617             Note:
11618                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11619
11620             Returns:
11621                 List of GEOM.GEOM_Object, containing the retrieved blocks.
11622             """
11623             # Example: see GEOM_TestOthers.py
11624             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
11625             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
11626             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
11627             for anObj in aList:
11628                 anObj.SetParameters(Parameters)
11629                 pass
11630             self._autoPublish(aList, theName, "block")
11631             return aList
11632
11633         ## Find block, containing the given point inside its volume or on boundary.
11634         #  @param theCompound Compound, to find block in.
11635         #  @param thePoint Point, close to the desired block. If the point lays on
11636         #         boundary between some blocks, we return block with nearest center.
11637         #  @param theName Object name; when specified, this parameter is used
11638         #         for result publication in the study. Otherwise, if automatic
11639         #         publication is switched on, default value is used for result name.
11640         #
11641         #  @return New GEOM.GEOM_Object, containing the found block.
11642         #
11643         #  @ref swig_todo "Example"
11644         @ManageTransactions("BlocksOp")
11645         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
11646             """
11647             Find block, containing the given point inside its volume or on boundary.
11648
11649             Parameters:
11650                 theCompound Compound, to find block in.
11651                 thePoint Point, close to the desired block. If the point lays on
11652                          boundary between some blocks, we return block with nearest center.
11653                 theName Object name; when specified, this parameter is used
11654                         for result publication in the study. Otherwise, if automatic
11655                         publication is switched on, default value is used for result name.
11656
11657             Returns:
11658                 New GEOM.GEOM_Object, containing the found block.
11659             """
11660             # Example: see GEOM_Spanner.py
11661             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
11662             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
11663             self._autoPublish(anObj, theName, "block")
11664             return anObj
11665
11666         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11667         #  @param theCompound Compound, to find block in.
11668         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
11669         #  @param theName Object name; when specified, this parameter is used
11670         #         for result publication in the study. Otherwise, if automatic
11671         #         publication is switched on, default value is used for result name.
11672         #
11673         #  @return New GEOM.GEOM_Object, containing the found block.
11674         #
11675         #  @ref swig_GetBlockByParts "Example"
11676         @ManageTransactions("BlocksOp")
11677         def GetBlockByParts(self, theCompound, theParts, theName=None):
11678             """
11679              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11680
11681              Parameters:
11682                 theCompound Compound, to find block in.
11683                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11684                 theName Object name; when specified, this parameter is used
11685                         for result publication in the study. Otherwise, if automatic
11686                         publication is switched on, default value is used for result name.
11687
11688             Returns:
11689                 New GEOM_Object, containing the found block.
11690             """
11691             # Example: see GEOM_TestOthers.py
11692             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11693             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11694             self._autoPublish(anObj, theName, "block")
11695             return anObj
11696
11697         ## Return all blocks, containing all the elements, passed as the parts.
11698         #  @param theCompound Compound, to find blocks in.
11699         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11700         #  @param theName Object name; when specified, this parameter is used
11701         #         for result publication in the study. Otherwise, if automatic
11702         #         publication is switched on, default value is used for result name.
11703         #
11704         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11705         #
11706         #  @ref swig_todo "Example"
11707         @ManageTransactions("BlocksOp")
11708         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11709             """
11710             Return all blocks, containing all the elements, passed as the parts.
11711
11712             Parameters:
11713                 theCompound Compound, to find blocks in.
11714                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11715                 theName Object name; when specified, this parameter is used
11716                         for result publication in the study. Otherwise, if automatic
11717                         publication is switched on, default value is used for result name.
11718
11719             Returns:
11720                 List of GEOM.GEOM_Object, containing the found blocks.
11721             """
11722             # Example: see GEOM_Spanner.py
11723             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11724             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11725             self._autoPublish(aList, theName, "block")
11726             return aList
11727
11728         ## Multi-transformate block and glue the result.
11729         #  Transformation is defined so, as to superpose direction faces.
11730         #  @param Block Hexahedral solid to be multi-transformed.
11731         #  @param DirFace1 ID of First direction face.
11732         #  @param DirFace2 ID of Second direction face.
11733         #  @param NbTimes Quantity of transformations to be done.
11734         #  @param theName Object name; when specified, this parameter is used
11735         #         for result publication in the study. Otherwise, if automatic
11736         #         publication is switched on, default value is used for result name.
11737         #
11738         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11739         #
11740         #  @return New GEOM.GEOM_Object, containing the result shape.
11741         #
11742         #  @ref tui_multi_transformation "Example"
11743         @ManageTransactions("BlocksOp")
11744         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11745             """
11746             Multi-transformate block and glue the result.
11747             Transformation is defined so, as to superpose direction faces.
11748
11749             Parameters:
11750                 Block Hexahedral solid to be multi-transformed.
11751                 DirFace1 ID of First direction face.
11752                 DirFace2 ID of Second direction face.
11753                 NbTimes Quantity of transformations to be done.
11754                 theName Object name; when specified, this parameter is used
11755                         for result publication in the study. Otherwise, if automatic
11756                         publication is switched on, default value is used for result name.
11757
11758             Note:
11759                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11760
11761             Returns:
11762                 New GEOM.GEOM_Object, containing the result shape.
11763             """
11764             # Example: see GEOM_Spanner.py
11765             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11766             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11767             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11768             anObj.SetParameters(Parameters)
11769             self._autoPublish(anObj, theName, "transformed")
11770             return anObj
11771
11772         ## Multi-transformate block and glue the result.
11773         #  @param Block Hexahedral solid to be multi-transformed.
11774         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11775         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11776         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11777         #  @param theName Object name; when specified, this parameter is used
11778         #         for result publication in the study. Otherwise, if automatic
11779         #         publication is switched on, default value is used for result name.
11780         #
11781         #  @return New GEOM.GEOM_Object, containing the result shape.
11782         #
11783         #  @ref tui_multi_transformation "Example"
11784         @ManageTransactions("BlocksOp")
11785         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11786                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11787             """
11788             Multi-transformate block and glue the result.
11789
11790             Parameters:
11791                 Block Hexahedral solid to be multi-transformed.
11792                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11793                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11794                 NbTimesU,NbTimesV Quantity of transformations to be done.
11795                 theName Object name; when specified, this parameter is used
11796                         for result publication in the study. Otherwise, if automatic
11797                         publication is switched on, default value is used for result name.
11798
11799             Returns:
11800                 New GEOM.GEOM_Object, containing the result shape.
11801             """
11802             # Example: see GEOM_Spanner.py
11803             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11804               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11805             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11806                                                             DirFace1V, DirFace2V, NbTimesV)
11807             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11808             anObj.SetParameters(Parameters)
11809             self._autoPublish(anObj, theName, "transformed")
11810             return anObj
11811
11812         ## Build all possible propagation groups.
11813         #  Propagation group is a set of all edges, opposite to one (main)
11814         #  edge of this group directly or through other opposite edges.
11815         #  Notion of Opposite Edge make sence only on quadrangle face.
11816         #  @param theShape Shape to build propagation groups on.
11817         #  @param theName Object name; when specified, this parameter is used
11818         #         for result publication in the study. Otherwise, if automatic
11819         #         publication is switched on, default value is used for result name.
11820         #
11821         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11822         #
11823         #  @ref swig_Propagate "Example"
11824         @ManageTransactions("BlocksOp")
11825         def Propagate(self, theShape, theName=None):
11826             """
11827             Build all possible propagation groups.
11828             Propagation group is a set of all edges, opposite to one (main)
11829             edge of this group directly or through other opposite edges.
11830             Notion of Opposite Edge make sence only on quadrangle face.
11831
11832             Parameters:
11833                 theShape Shape to build propagation groups on.
11834                 theName Object name; when specified, this parameter is used
11835                         for result publication in the study. Otherwise, if automatic
11836                         publication is switched on, default value is used for result name.
11837
11838             Returns:
11839                 List of GEOM.GEOM_Object, each of them is a propagation group.
11840             """
11841             # Example: see GEOM_TestOthers.py
11842             listChains = self.BlocksOp.Propagate(theShape)
11843             RaiseIfFailed("Propagate", self.BlocksOp)
11844             self._autoPublish(listChains, theName, "propagate")
11845             return listChains
11846
11847         # end of l3_blocks_op
11848         ## @}
11849
11850         ## @addtogroup l3_groups
11851         ## @{
11852
11853         ## Creates a new group which will store sub-shapes of theMainShape
11854         #  @param theMainShape is a GEOM object on which the group is selected
11855         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11856         #  @param theName Object name; when specified, this parameter is used
11857         #         for result publication in the study. Otherwise, if automatic
11858         #         publication is switched on, default value is used for result name.
11859         #
11860         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11861         #
11862         #  @ref tui_working_with_groups_page "Example 1"
11863         #  \n @ref swig_CreateGroup "Example 2"
11864         @ManageTransactions("GroupOp")
11865         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11866             """
11867             Creates a new group which will store sub-shapes of theMainShape
11868
11869             Parameters:
11870                theMainShape is a GEOM object on which the group is selected
11871                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11872                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11873                 theName Object name; when specified, this parameter is used
11874                         for result publication in the study. Otherwise, if automatic
11875                         publication is switched on, default value is used for result name.
11876
11877             Returns:
11878                a newly created GEOM group
11879
11880             Example of usage:
11881                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11882
11883             """
11884             # Example: see GEOM_TestOthers.py
11885             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11886             RaiseIfFailed("CreateGroup", self.GroupOp)
11887             self._autoPublish(anObj, theName, "group")
11888             return anObj
11889
11890         ## Adds a sub-object with ID theSubShapeId to the group
11891         #  @param theGroup is a GEOM group to which the new sub-shape is added
11892         #  @param theSubShapeID is a sub-shape ID in the main object.
11893         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11894         #
11895         #  @ref tui_working_with_groups_page "Example"
11896         @ManageTransactions("GroupOp")
11897         def AddObject(self,theGroup, theSubShapeID):
11898             """
11899             Adds a sub-object with ID theSubShapeId to the group
11900
11901             Parameters:
11902                 theGroup       is a GEOM group to which the new sub-shape is added
11903                 theSubShapeID  is a sub-shape ID in the main object.
11904
11905             Note:
11906                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11907             """
11908             # Example: see GEOM_TestOthers.py
11909             self.GroupOp.AddObject(theGroup, theSubShapeID)
11910             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11911                 RaiseIfFailed("AddObject", self.GroupOp)
11912                 pass
11913             pass
11914
11915         ## Removes a sub-object with ID \a theSubShapeId from the group
11916         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11917         #  @param theSubShapeID is a sub-shape ID in the main object.
11918         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11919         #
11920         #  @ref tui_working_with_groups_page "Example"
11921         @ManageTransactions("GroupOp")
11922         def RemoveObject(self,theGroup, theSubShapeID):
11923             """
11924             Removes a sub-object with ID theSubShapeId from the group
11925
11926             Parameters:
11927                 theGroup is a GEOM group from which the new sub-shape is removed
11928                 theSubShapeID is a sub-shape ID in the main object.
11929
11930             Note:
11931                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11932             """
11933             # Example: see GEOM_TestOthers.py
11934             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11935             RaiseIfFailed("RemoveObject", self.GroupOp)
11936             pass
11937
11938         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11939         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11940         #  @param theSubShapes is a list of sub-shapes to be added.
11941         #
11942         #  @ref tui_working_with_groups_page "Example"
11943         @ManageTransactions("GroupOp")
11944         def UnionList (self,theGroup, theSubShapes):
11945             """
11946             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11947
11948             Parameters:
11949                 theGroup is a GEOM group to which the new sub-shapes are added.
11950                 theSubShapes is a list of sub-shapes to be added.
11951             """
11952             # Example: see GEOM_TestOthers.py
11953             self.GroupOp.UnionList(theGroup, theSubShapes)
11954             RaiseIfFailed("UnionList", self.GroupOp)
11955             pass
11956
11957         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11958         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11959         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11960         #
11961         #  @ref swig_UnionIDs "Example"
11962         @ManageTransactions("GroupOp")
11963         def UnionIDs(self,theGroup, theSubShapes):
11964             """
11965             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11966
11967             Parameters:
11968                 theGroup is a GEOM group to which the new sub-shapes are added.
11969                 theSubShapes is a list of indices of sub-shapes to be added.
11970             """
11971             # Example: see GEOM_TestOthers.py
11972             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11973             RaiseIfFailed("UnionIDs", self.GroupOp)
11974             pass
11975
11976         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11977         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11978         #  @param theSubShapes is a list of sub-shapes to be removed.
11979         #
11980         #  @ref tui_working_with_groups_page "Example"
11981         @ManageTransactions("GroupOp")
11982         def DifferenceList (self,theGroup, theSubShapes):
11983             """
11984             Removes from the group all the given shapes. No errors, if some shapes are not included.
11985
11986             Parameters:
11987                 theGroup is a GEOM group from which the sub-shapes are removed.
11988                 theSubShapes is a list of sub-shapes to be removed.
11989             """
11990             # Example: see GEOM_TestOthers.py
11991             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11992             RaiseIfFailed("DifferenceList", self.GroupOp)
11993             pass
11994
11995         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11996         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11997         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11998         #
11999         #  @ref swig_DifferenceIDs "Example"
12000         @ManageTransactions("GroupOp")
12001         def DifferenceIDs(self,theGroup, theSubShapes):
12002             """
12003             Removes from the group all the given shapes. No errors, if some shapes are not included.
12004
12005             Parameters:
12006                 theGroup is a GEOM group from which the sub-shapes are removed.
12007                 theSubShapes is a list of indices of sub-shapes to be removed.
12008             """
12009             # Example: see GEOM_TestOthers.py
12010             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
12011             RaiseIfFailed("DifferenceIDs", self.GroupOp)
12012             pass
12013
12014         ## Union of two groups.
12015         #  New group is created. It will contain all entities
12016         #  which are present in groups theGroup1 and theGroup2.
12017         #  @param theGroup1, theGroup2 are the initial GEOM groups
12018         #                              to create the united group from.
12019         #  @param theName Object name; when specified, this parameter is used
12020         #         for result publication in the study. Otherwise, if automatic
12021         #         publication is switched on, default value is used for result name.
12022         #
12023         #  @return a newly created GEOM group.
12024         #
12025         #  @ref tui_union_groups_anchor "Example"
12026         @ManageTransactions("GroupOp")
12027         def UnionGroups (self, theGroup1, theGroup2, theName=None):
12028             """
12029             Union of two groups.
12030             New group is created. It will contain all entities
12031             which are present in groups theGroup1 and theGroup2.
12032
12033             Parameters:
12034                 theGroup1, theGroup2 are the initial GEOM groups
12035                                      to create the united group from.
12036                 theName Object name; when specified, this parameter is used
12037                         for result publication in the study. Otherwise, if automatic
12038                         publication is switched on, default value is used for result name.
12039
12040             Returns:
12041                 a newly created GEOM group.
12042             """
12043             # Example: see GEOM_TestOthers.py
12044             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
12045             RaiseIfFailed("UnionGroups", self.GroupOp)
12046             self._autoPublish(aGroup, theName, "group")
12047             return aGroup
12048
12049         ## Intersection of two groups.
12050         #  New group is created. It will contain only those entities
12051         #  which are present in both groups theGroup1 and theGroup2.
12052         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12053         #  @param theName Object name; when specified, this parameter is used
12054         #         for result publication in the study. Otherwise, if automatic
12055         #         publication is switched on, default value is used for result name.
12056         #
12057         #  @return a newly created GEOM group.
12058         #
12059         #  @ref tui_intersect_groups_anchor "Example"
12060         @ManageTransactions("GroupOp")
12061         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
12062             """
12063             Intersection of two groups.
12064             New group is created. It will contain only those entities
12065             which are present in both groups theGroup1 and theGroup2.
12066
12067             Parameters:
12068                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12069                 theName Object name; when specified, this parameter is used
12070                         for result publication in the study. Otherwise, if automatic
12071                         publication is switched on, default value is used for result name.
12072
12073             Returns:
12074                 a newly created GEOM group.
12075             """
12076             # Example: see GEOM_TestOthers.py
12077             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
12078             RaiseIfFailed("IntersectGroups", self.GroupOp)
12079             self._autoPublish(aGroup, theName, "group")
12080             return aGroup
12081
12082         ## Cut of two groups.
12083         #  New group is created. It will contain entities which are
12084         #  present in group theGroup1 but are not present in group theGroup2.
12085         #  @param theGroup1 is a GEOM group to include elements of.
12086         #  @param theGroup2 is a GEOM group to exclude elements of.
12087         #  @param theName Object name; when specified, this parameter is used
12088         #         for result publication in the study. Otherwise, if automatic
12089         #         publication is switched on, default value is used for result name.
12090         #
12091         #  @return a newly created GEOM group.
12092         #
12093         #  @ref tui_cut_groups_anchor "Example"
12094         @ManageTransactions("GroupOp")
12095         def CutGroups (self, theGroup1, theGroup2, theName=None):
12096             """
12097             Cut of two groups.
12098             New group is created. It will contain entities which are
12099             present in group theGroup1 but are not present in group theGroup2.
12100
12101             Parameters:
12102                 theGroup1 is a GEOM group to include elements of.
12103                 theGroup2 is a GEOM group to exclude elements of.
12104                 theName Object name; when specified, this parameter is used
12105                         for result publication in the study. Otherwise, if automatic
12106                         publication is switched on, default value is used for result name.
12107
12108             Returns:
12109                 a newly created GEOM group.
12110             """
12111             # Example: see GEOM_TestOthers.py
12112             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
12113             RaiseIfFailed("CutGroups", self.GroupOp)
12114             self._autoPublish(aGroup, theName, "group")
12115             return aGroup
12116
12117         ## Union of list of groups.
12118         #  New group is created. It will contain all entities that are
12119         #  present in groups listed in theGList.
12120         #  @param theGList is a list of GEOM groups to create the united group from.
12121         #  @param theName Object name; when specified, this parameter is used
12122         #         for result publication in the study. Otherwise, if automatic
12123         #         publication is switched on, default value is used for result name.
12124         #
12125         #  @return a newly created GEOM group.
12126         #
12127         #  @ref tui_union_groups_anchor "Example"
12128         @ManageTransactions("GroupOp")
12129         def UnionListOfGroups (self, theGList, theName=None):
12130             """
12131             Union of list of groups.
12132             New group is created. It will contain all entities that are
12133             present in groups listed in theGList.
12134
12135             Parameters:
12136                 theGList is a list of GEOM groups to create the united group from.
12137                 theName Object name; when specified, this parameter is used
12138                         for result publication in the study. Otherwise, if automatic
12139                         publication is switched on, default value is used for result name.
12140
12141             Returns:
12142                 a newly created GEOM group.
12143             """
12144             # Example: see GEOM_TestOthers.py
12145             aGroup = self.GroupOp.UnionListOfGroups(theGList)
12146             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
12147             self._autoPublish(aGroup, theName, "group")
12148             return aGroup
12149
12150         ## Cut of lists of groups.
12151         #  New group is created. It will contain only entities
12152         #  which are present in groups listed in theGList.
12153         #  @param theGList is a list of GEOM groups to include elements of.
12154         #  @param theName Object name; when specified, this parameter is used
12155         #         for result publication in the study. Otherwise, if automatic
12156         #         publication is switched on, default value is used for result name.
12157         #
12158         #  @return a newly created GEOM group.
12159         #
12160         #  @ref tui_intersect_groups_anchor "Example"
12161         @ManageTransactions("GroupOp")
12162         def IntersectListOfGroups (self, theGList, theName=None):
12163             """
12164             Cut of lists of groups.
12165             New group is created. It will contain only entities
12166             which are present in groups listed in theGList.
12167
12168             Parameters:
12169                 theGList is a list of GEOM groups to include elements of.
12170                 theName Object name; when specified, this parameter is used
12171                         for result publication in the study. Otherwise, if automatic
12172                         publication is switched on, default value is used for result name.
12173
12174             Returns:
12175                 a newly created GEOM group.
12176             """
12177             # Example: see GEOM_TestOthers.py
12178             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
12179             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
12180             self._autoPublish(aGroup, theName, "group")
12181             return aGroup
12182
12183         ## Cut of lists of groups.
12184         #  New group is created. It will contain only entities
12185         #  which are present in groups listed in theGList1 but
12186         #  are not present in groups from theGList2.
12187         #  @param theGList1 is a list of GEOM groups to include elements of.
12188         #  @param theGList2 is a list of GEOM groups to exclude elements of.
12189         #  @param theName Object name; when specified, this parameter is used
12190         #         for result publication in the study. Otherwise, if automatic
12191         #         publication is switched on, default value is used for result name.
12192         #
12193         #  @return a newly created GEOM group.
12194         #
12195         #  @ref tui_cut_groups_anchor "Example"
12196         @ManageTransactions("GroupOp")
12197         def CutListOfGroups (self, theGList1, theGList2, theName=None):
12198             """
12199             Cut of lists of groups.
12200             New group is created. It will contain only entities
12201             which are present in groups listed in theGList1 but
12202             are not present in groups from theGList2.
12203
12204             Parameters:
12205                 theGList1 is a list of GEOM groups to include elements of.
12206                 theGList2 is a list of GEOM groups to exclude elements of.
12207                 theName Object name; when specified, this parameter is used
12208                         for result publication in the study. Otherwise, if automatic
12209                         publication is switched on, default value is used for result name.
12210
12211             Returns:
12212                 a newly created GEOM group.
12213             """
12214             # Example: see GEOM_TestOthers.py
12215             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
12216             RaiseIfFailed("CutListOfGroups", self.GroupOp)
12217             self._autoPublish(aGroup, theName, "group")
12218             return aGroup
12219
12220         ## Returns a list of sub-objects ID stored in the group
12221         #  @param theGroup is a GEOM group for which a list of IDs is requested
12222         #
12223         #  @ref swig_GetObjectIDs "Example"
12224         @ManageTransactions("GroupOp")
12225         def GetObjectIDs(self,theGroup):
12226             """
12227             Returns a list of sub-objects ID stored in the group
12228
12229             Parameters:
12230                 theGroup is a GEOM group for which a list of IDs is requested
12231             """
12232             # Example: see GEOM_TestOthers.py
12233             ListIDs = self.GroupOp.GetObjects(theGroup)
12234             RaiseIfFailed("GetObjects", self.GroupOp)
12235             return ListIDs
12236
12237         ## Returns a type of sub-objects stored in the group
12238         #  @param theGroup is a GEOM group which type is returned.
12239         #
12240         #  @ref swig_GetType "Example"
12241         @ManageTransactions("GroupOp")
12242         def GetType(self,theGroup):
12243             """
12244             Returns a type of sub-objects stored in the group
12245
12246             Parameters:
12247                 theGroup is a GEOM group which type is returned.
12248             """
12249             # Example: see GEOM_TestOthers.py
12250             aType = self.GroupOp.GetType(theGroup)
12251             RaiseIfFailed("GetType", self.GroupOp)
12252             return aType
12253
12254         ## Convert a type of geom object from id to string value
12255         #  @param theId is a GEOM obect type id.
12256         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12257         #  @ref swig_GetType "Example"
12258         def ShapeIdToType(self, theId):
12259             """
12260             Convert a type of geom object from id to string value
12261
12262             Parameters:
12263                 theId is a GEOM obect type id.
12264
12265             Returns:
12266                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12267             """
12268             if theId == 0:
12269                 return "COPY"
12270             if theId == 1:
12271                 return "IMPORT"
12272             if theId == 2:
12273                 return "POINT"
12274             if theId == 3:
12275                 return "VECTOR"
12276             if theId == 4:
12277                 return "PLANE"
12278             if theId == 5:
12279                 return "LINE"
12280             if theId == 6:
12281                 return "TORUS"
12282             if theId == 7:
12283                 return "BOX"
12284             if theId == 8:
12285                 return "CYLINDER"
12286             if theId == 9:
12287                 return "CONE"
12288             if theId == 10:
12289                 return "SPHERE"
12290             if theId == 11:
12291                 return "PRISM"
12292             if theId == 12:
12293                 return "REVOLUTION"
12294             if theId == 13:
12295                 return "BOOLEAN"
12296             if theId == 14:
12297                 return "PARTITION"
12298             if theId == 15:
12299                 return "POLYLINE"
12300             if theId == 16:
12301                 return "CIRCLE"
12302             if theId == 17:
12303                 return "SPLINE"
12304             if theId == 18:
12305                 return "ELLIPSE"
12306             if theId == 19:
12307                 return "CIRC_ARC"
12308             if theId == 20:
12309                 return "FILLET"
12310             if theId == 21:
12311                 return "CHAMFER"
12312             if theId == 22:
12313                 return "EDGE"
12314             if theId == 23:
12315                 return "WIRE"
12316             if theId == 24:
12317                 return "FACE"
12318             if theId == 25:
12319                 return "SHELL"
12320             if theId == 26:
12321                 return "SOLID"
12322             if theId == 27:
12323                 return "COMPOUND"
12324             if theId == 28:
12325                 return "SUBSHAPE"
12326             if theId == 29:
12327                 return "PIPE"
12328             if theId == 30:
12329                 return "ARCHIMEDE"
12330             if theId == 31:
12331                 return "FILLING"
12332             if theId == 32:
12333                 return "EXPLODE"
12334             if theId == 33:
12335                 return "GLUED"
12336             if theId == 34:
12337                 return "SKETCHER"
12338             if theId == 35:
12339                 return "CDG"
12340             if theId == 36:
12341                 return "FREE_BOUNDS"
12342             if theId == 37:
12343                 return "GROUP"
12344             if theId == 38:
12345                 return "BLOCK"
12346             if theId == 39:
12347                 return "MARKER"
12348             if theId == 40:
12349                 return "THRUSECTIONS"
12350             if theId == 41:
12351                 return "COMPOUNDFILTER"
12352             if theId == 42:
12353                 return "SHAPES_ON_SHAPE"
12354             if theId == 43:
12355                 return "ELLIPSE_ARC"
12356             if theId == 44:
12357                 return "3DSKETCHER"
12358             if theId == 45:
12359                 return "FILLET_2D"
12360             if theId == 46:
12361                 return "FILLET_1D"
12362             if theId == 201:
12363                 return "PIPETSHAPE"
12364             return "Shape Id not exist."
12365
12366         ## Returns a main shape associated with the group
12367         #  @param theGroup is a GEOM group for which a main shape object is requested
12368         #  @return a GEOM object which is a main shape for theGroup
12369         #
12370         #  @ref swig_GetMainShape "Example"
12371         @ManageTransactions("GroupOp")
12372         def GetMainShape(self,theGroup):
12373             """
12374             Returns a main shape associated with the group
12375
12376             Parameters:
12377                 theGroup is a GEOM group for which a main shape object is requested
12378
12379             Returns:
12380                 a GEOM object which is a main shape for theGroup
12381
12382             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
12383             """
12384             # Example: see GEOM_TestOthers.py
12385             anObj = self.GroupOp.GetMainShape(theGroup)
12386             RaiseIfFailed("GetMainShape", self.GroupOp)
12387             return anObj
12388
12389         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
12390         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12391         #  @param theShape given shape (see GEOM.GEOM_Object)
12392         #  @param min_length minimum length of edges of theShape
12393         #  @param max_length maximum length of edges of theShape
12394         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12395         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12396         #  @param theName Object name; when specified, this parameter is used
12397         #         for result publication in the study. Otherwise, if automatic
12398         #         publication is switched on, default value is used for result name.
12399         #
12400         #  @return a newly created GEOM group of edges
12401         #
12402         #  @@ref swig_todo "Example"
12403         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
12404             """
12405             Create group of edges of theShape, whose length is in range [min_length, max_length].
12406             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12407
12408             Parameters:
12409                 theShape given shape
12410                 min_length minimum length of edges of theShape
12411                 max_length maximum length of edges of theShape
12412                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12413                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12414                 theName Object name; when specified, this parameter is used
12415                         for result publication in the study. Otherwise, if automatic
12416                         publication is switched on, default value is used for result name.
12417
12418              Returns:
12419                 a newly created GEOM group of edges.
12420             """
12421             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
12422             edges_in_range = []
12423             for edge in edges:
12424                 Props = self.BasicProperties(edge)
12425                 if min_length <= Props[0] and Props[0] <= max_length:
12426                     if (not include_min) and (min_length == Props[0]):
12427                         skip = 1
12428                     else:
12429                         if (not include_max) and (Props[0] == max_length):
12430                             skip = 1
12431                         else:
12432                             edges_in_range.append(edge)
12433
12434             if len(edges_in_range) <= 0:
12435                 print "No edges found by given criteria"
12436                 return None
12437
12438             # note: auto-publishing is done in self.CreateGroup()
12439             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
12440             self.UnionList(group_edges, edges_in_range)
12441
12442             return group_edges
12443
12444         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
12445         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12446         #  @param min_length minimum length of edges of selected shape
12447         #  @param max_length maximum length of edges of selected shape
12448         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12449         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12450         #  @return a newly created GEOM group of edges
12451         #  @ref swig_todo "Example"
12452         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
12453             """
12454             Create group of edges of selected shape, whose length is in range [min_length, max_length].
12455             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12456
12457             Parameters:
12458                 min_length minimum length of edges of selected shape
12459                 max_length maximum length of edges of selected shape
12460                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12461                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12462
12463              Returns:
12464                 a newly created GEOM group of edges.
12465             """
12466             nb_selected = sg.SelectedCount()
12467             if nb_selected < 1:
12468                 print "Select a shape before calling this function, please."
12469                 return 0
12470             if nb_selected > 1:
12471                 print "Only one shape must be selected"
12472                 return 0
12473
12474             id_shape = sg.getSelected(0)
12475             shape = IDToObject( id_shape )
12476
12477             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
12478
12479             left_str  = " < "
12480             right_str = " < "
12481             if include_min: left_str  = " <= "
12482             if include_max: right_str  = " <= "
12483
12484             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
12485                                     + left_str + "length" + right_str + `max_length`)
12486
12487             sg.updateObjBrowser(1)
12488
12489             return group_edges
12490
12491         # end of l3_groups
12492         ## @}
12493
12494         #@@ insert new functions before this line @@ do not remove this line @@#
12495
12496         ## Create a copy of the given object
12497         #
12498         #  @param theOriginal geometry object for copy
12499         #  @param theName Object name; when specified, this parameter is used
12500         #         for result publication in the study. Otherwise, if automatic
12501         #         publication is switched on, default value is used for result name.
12502         #
12503         #  @return New GEOM_Object, containing the copied shape.
12504         #
12505         #  @ingroup l1_geomBuilder_auxiliary
12506         #  @ref swig_MakeCopy "Example"
12507         @ManageTransactions("InsertOp")
12508         def MakeCopy(self, theOriginal, theName=None):
12509             """
12510             Create a copy of the given object
12511
12512             Parameters:
12513                 theOriginal geometry object for copy
12514                 theName Object name; when specified, this parameter is used
12515                         for result publication in the study. Otherwise, if automatic
12516                         publication is switched on, default value is used for result name.
12517
12518             Returns:
12519                 New GEOM_Object, containing the copied shape.
12520
12521             Example of usage: Copy = geompy.MakeCopy(Box)
12522             """
12523             # Example: see GEOM_TestAll.py
12524             anObj = self.InsertOp.MakeCopy(theOriginal)
12525             RaiseIfFailed("MakeCopy", self.InsertOp)
12526             self._autoPublish(anObj, theName, "copy")
12527             return anObj
12528
12529         ## Add Path to load python scripts from
12530         #  @param Path a path to load python scripts from
12531         #  @ingroup l1_geomBuilder_auxiliary
12532         def addPath(self,Path):
12533             """
12534             Add Path to load python scripts from
12535
12536             Parameters:
12537                 Path a path to load python scripts from
12538             """
12539             if (sys.path.count(Path) < 1):
12540                 sys.path.append(Path)
12541                 pass
12542             pass
12543
12544         ## Load marker texture from the file
12545         #  @param Path a path to the texture file
12546         #  @return unique texture identifier
12547         #  @ingroup l1_geomBuilder_auxiliary
12548         @ManageTransactions("InsertOp")
12549         def LoadTexture(self, Path):
12550             """
12551             Load marker texture from the file
12552
12553             Parameters:
12554                 Path a path to the texture file
12555
12556             Returns:
12557                 unique texture identifier
12558             """
12559             # Example: see GEOM_TestAll.py
12560             ID = self.InsertOp.LoadTexture(Path)
12561             RaiseIfFailed("LoadTexture", self.InsertOp)
12562             return ID
12563
12564         ## Get internal name of the object based on its study entry
12565         #  @note This method does not provide an unique identifier of the geometry object.
12566         #  @note This is internal function of GEOM component, though it can be used outside it for
12567         #  appropriate reason (e.g. for identification of geometry object).
12568         #  @param obj geometry object
12569         #  @return unique object identifier
12570         #  @ingroup l1_geomBuilder_auxiliary
12571         def getObjectID(self, obj):
12572             """
12573             Get internal name of the object based on its study entry.
12574             Note: this method does not provide an unique identifier of the geometry object.
12575             It is an internal function of GEOM component, though it can be used outside GEOM for
12576             appropriate reason (e.g. for identification of geometry object).
12577
12578             Parameters:
12579                 obj geometry object
12580
12581             Returns:
12582                 unique object identifier
12583             """
12584             ID = ""
12585             entry = salome.ObjectToID(obj)
12586             if entry is not None:
12587                 lst = entry.split(":")
12588                 if len(lst) > 0:
12589                     ID = lst[-1] # -1 means last item in the list
12590                     return "GEOM_" + ID
12591             return ID
12592
12593
12594
12595         ## Add marker texture. @a Width and @a Height parameters
12596         #  specify width and height of the texture in pixels.
12597         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12598         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12599         #  parameter should be unpacked string, in which '1' symbols represent opaque
12600         #  pixels and '0' represent transparent pixels of the texture bitmap.
12601         #
12602         #  @param Width texture width in pixels
12603         #  @param Height texture height in pixels
12604         #  @param Texture texture data
12605         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12606         #  @return unique texture identifier
12607         #  @ingroup l1_geomBuilder_auxiliary
12608         @ManageTransactions("InsertOp")
12609         def AddTexture(self, Width, Height, Texture, RowData=False):
12610             """
12611             Add marker texture. Width and Height parameters
12612             specify width and height of the texture in pixels.
12613             If RowData is True, Texture parameter should represent texture data
12614             packed into the byte array. If RowData is False (default), Texture
12615             parameter should be unpacked string, in which '1' symbols represent opaque
12616             pixels and '0' represent transparent pixels of the texture bitmap.
12617
12618             Parameters:
12619                 Width texture width in pixels
12620                 Height texture height in pixels
12621                 Texture texture data
12622                 RowData if True, Texture data are packed in the byte stream
12623
12624             Returns:
12625                 return unique texture identifier
12626             """
12627             if not RowData: Texture = PackData(Texture)
12628             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12629             RaiseIfFailed("AddTexture", self.InsertOp)
12630             return ID
12631
12632         ## Creates a new folder object. It is a container for any GEOM objects.
12633         #  @param Name name of the container
12634         #  @param Father parent object. If None,
12635         #         folder under 'Geometry' root object will be created.
12636         #  @return a new created folder
12637         #  @ingroup l1_publish_data
12638         def NewFolder(self, Name, Father=None):
12639             """
12640             Create a new folder object. It is an auxiliary container for any GEOM objects.
12641
12642             Parameters:
12643                 Name name of the container
12644                 Father parent object. If None,
12645                 folder under 'Geometry' root object will be created.
12646
12647             Returns:
12648                 a new created folder
12649             """
12650             if not Father: Father = self.father
12651             return self.CreateFolder(Name, Father)
12652
12653         ## Move object to the specified folder
12654         #  @param Object object to move
12655         #  @param Folder target folder
12656         #  @ingroup l1_publish_data
12657         def PutToFolder(self, Object, Folder):
12658             """
12659             Move object to the specified folder
12660
12661             Parameters:
12662                 Object object to move
12663                 Folder target folder
12664             """
12665             self.MoveToFolder(Object, Folder)
12666             pass
12667
12668         ## Move list of objects to the specified folder
12669         #  @param ListOfSO list of objects to move
12670         #  @param Folder target folder
12671         #  @ingroup l1_publish_data
12672         def PutListToFolder(self, ListOfSO, Folder):
12673             """
12674             Move list of objects to the specified folder
12675
12676             Parameters:
12677                 ListOfSO list of objects to move
12678                 Folder target folder
12679             """
12680             self.MoveListToFolder(ListOfSO, Folder)
12681             pass
12682
12683         ## @addtogroup l2_field
12684         ## @{
12685
12686         ## Creates a field
12687         #  @param shape the shape the field lies on
12688         #  @param name the field name
12689         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
12690         #  @param dimension dimension of the shape the field lies on
12691         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12692         #  @param componentNames names of components
12693         #  @return a created field
12694         @ManageTransactions("FieldOp")
12695         def CreateField(self, shape, name, type, dimension, componentNames):
12696             """
12697             Creates a field
12698
12699             Parameters:
12700                 shape the shape the field lies on
12701                 name  the field name
12702                 type  type of field data
12703                 dimension dimension of the shape the field lies on
12704                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12705                 componentNames names of components
12706
12707             Returns:
12708                 a created field
12709             """
12710             if isinstance( type, int ):
12711                 if type < 0 or type > 3:
12712                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
12713                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
12714
12715             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
12716             RaiseIfFailed("CreateField", self.FieldOp)
12717             global geom
12718             geom._autoPublish( f, "", name)
12719             return f
12720
12721         ## Removes a field from the GEOM component
12722         #  @param field the field to remove
12723         def RemoveField(self, field):
12724             "Removes a field from the GEOM component"
12725             global geom
12726             if isinstance( field, GEOM._objref_GEOM_Field ):
12727                 geom.RemoveObject( field )
12728             elif isinstance( field, geomField ):
12729                 geom.RemoveObject( field.field )
12730             else:
12731                 raise RuntimeError, "RemoveField() : the object is not a field"
12732             return
12733
12734         ## Returns number of fields on a shape
12735         @ManageTransactions("FieldOp")
12736         def CountFields(self, shape):
12737             "Returns number of fields on a shape"
12738             nb = self.FieldOp.CountFields( shape )
12739             RaiseIfFailed("CountFields", self.FieldOp)
12740             return nb
12741
12742         ## Returns all fields on a shape
12743         @ManageTransactions("FieldOp")
12744         def GetFields(self, shape):
12745             "Returns all fields on a shape"
12746             ff = self.FieldOp.GetFields( shape )
12747             RaiseIfFailed("GetFields", self.FieldOp)
12748             return ff
12749
12750         ## Returns a field on a shape by its name
12751         @ManageTransactions("FieldOp")
12752         def GetField(self, shape, name):
12753             "Returns a field on a shape by its name"
12754             f = self.FieldOp.GetField( shape, name )
12755             RaiseIfFailed("GetField", self.FieldOp)
12756             return f
12757
12758         # end of l2_field
12759         ## @}
12760
12761
12762 import omniORB
12763 # Register the new proxy for GEOM_Gen
12764 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12765
12766
12767 ## Field on Geometry
12768 #  @ingroup l2_field
12769 class geomField( GEOM._objref_GEOM_Field ):
12770
12771     def __init__(self):
12772         GEOM._objref_GEOM_Field.__init__(self)
12773         self.field = GEOM._objref_GEOM_Field
12774         return
12775
12776     ## Returns the shape the field lies on
12777     def getShape(self):
12778         "Returns the shape the field lies on"
12779         return self.field.GetShape(self)
12780
12781     ## Returns the field name
12782     def getName(self):
12783         "Returns the field name"
12784         return self.field.GetName(self)
12785
12786     ## Returns type of field data as integer [0-3]
12787     def getType(self):
12788         "Returns type of field data"
12789         return self.field.GetDataType(self)._v
12790
12791     ## Returns type of field data:
12792     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
12793     def getTypeEnum(self):
12794         "Returns type of field data"
12795         return self.field.GetDataType(self)
12796
12797     ## Returns dimension of the shape the field lies on:
12798     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12799     def getDimension(self):
12800         """Returns dimension of the shape the field lies on:
12801         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
12802         return self.field.GetDimension(self)
12803
12804     ## Returns names of components
12805     def getComponents(self):
12806         "Returns names of components"
12807         return self.field.GetComponents(self)
12808
12809     ## Adds a time step to the field
12810     #  @param step the time step number further used as the step identifier
12811     #  @param stamp the time step time
12812     #  @param values the values of the time step
12813     def addStep(self, step, stamp, values):
12814         "Adds a time step to the field"
12815         stp = self.field.AddStep( self, step, stamp )
12816         if not stp:
12817             raise RuntimeError, \
12818                   "Field.addStep() : Error: step %s already exists in this field"%step
12819         global geom
12820         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
12821         self.setValues( step, values )
12822         return stp
12823
12824     ## Remove a time step from the field
12825     def removeStep(self,step):
12826         "Remove a time step from the field"
12827         stepSO = None
12828         try:
12829             stepObj = self.field.GetStep( self, step )
12830             if stepObj:
12831                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
12832         except:
12833             #import traceback
12834             #traceback.print_exc()
12835             pass
12836         self.field.RemoveStep( self, step )
12837         if stepSO:
12838             geom.myBuilder.RemoveObjectWithChildren( stepSO )
12839         return
12840
12841     ## Returns number of time steps in the field
12842     def countSteps(self):
12843         "Returns number of time steps in the field"
12844         return self.field.CountSteps(self)
12845
12846     ## Returns a list of time step IDs in the field
12847     def getSteps(self):
12848         "Returns a list of time step IDs in the field"
12849         return self.field.GetSteps(self)
12850
12851     ## Returns a time step by its ID
12852     def getStep(self,step):
12853         "Returns a time step by its ID"
12854         stp = self.field.GetStep(self, step)
12855         if not stp:
12856             raise RuntimeError, "Step %s is missing from this field"%step
12857         return stp
12858
12859     ## Returns the time of the field step
12860     def getStamp(self,step):
12861         "Returns the time of the field step"
12862         return self.getStep(step).GetStamp()
12863
12864     ## Changes the time of the field step
12865     def setStamp(self, step, stamp):
12866         "Changes the time of the field step"
12867         return self.getStep(step).SetStamp(stamp)
12868
12869     ## Returns values of the field step
12870     def getValues(self, step):
12871         "Returns values of the field step"
12872         return self.getStep(step).GetValues()
12873
12874     ## Changes values of the field step
12875     def setValues(self, step, values):
12876         "Changes values of the field step"
12877         stp = self.getStep(step)
12878         errBeg = "Field.setValues(values) : Error: "
12879         try:
12880             ok = stp.SetValues( values )
12881         except Exception, e:
12882             excStr = str(e)
12883             if excStr.find("WrongPythonType") > 0:
12884                 raise RuntimeError, errBeg +\
12885                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
12886             raise RuntimeError, errBeg + str(e)
12887         if not ok:
12888             nbOK = self.field.GetArraySize(self)
12889             nbKO = len(values)
12890             if nbOK != nbKO:
12891                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
12892             else:
12893                 raise RuntimeError, errBeg + "failed"
12894         return
12895
12896     pass # end of class geomField
12897
12898 # Register the new proxy for GEOM_Field
12899 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
12900
12901
12902 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
12903 #  interface to GEOM operations.
12904 #
12905 #  Typical use is:
12906 #  \code
12907 #    import salome
12908 #    salome.salome_init()
12909 #    from salome.geom import geomBuilder
12910 #    geompy = geomBuilder.New(salome.myStudy)
12911 #  \endcode
12912 #  @param  study     SALOME study, generally obtained by salome.myStudy.
12913 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12914 #  @return geomBuilder instance
12915 def New( study, instance=None):
12916     """
12917     Create a new geomBuilder instance.The geomBuilder class provides the Python
12918     interface to GEOM operations.
12919
12920     Typical use is:
12921         import salome
12922         salome.salome_init()
12923         from salome.geom import geomBuilder
12924         geompy = geomBuilder.New(salome.myStudy)
12925
12926     Parameters:
12927         study     SALOME study, generally obtained by salome.myStudy.
12928         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12929     Returns:
12930         geomBuilder instance
12931     """
12932     #print "New geomBuilder ", study, instance
12933     global engine
12934     global geom
12935     global doLcc
12936     engine = instance
12937     if engine is None:
12938       doLcc = True
12939     geom = geomBuilder()
12940     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
12941     geom.init_geom(study)
12942     return geom
12943
12944
12945 # Register methods from the plug-ins in the geomBuilder class 
12946 plugins_var = os.environ.get( "GEOM_PluginsList" )
12947
12948 plugins = None
12949 if plugins_var is not None:
12950     plugins = plugins_var.split( ":" )
12951     plugins=filter(lambda x: len(x)>0, plugins)
12952 if plugins is not None:
12953     for pluginName in plugins:
12954         pluginBuilderName = pluginName + "Builder"
12955         try:
12956             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
12957         except Exception, e:
12958             from salome_utils import verbose
12959             print "Exception while loading %s: %s" % ( pluginBuilderName, e )
12960             continue
12961         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
12962         plugin = eval( pluginBuilderName )
12963         
12964         # add methods from plugin module to the geomBuilder class
12965         for k in dir( plugin ):
12966             if k[0] == '_': continue
12967             method = getattr( plugin, k )
12968             if type( method ).__name__ == 'function':
12969                 if not hasattr( geomBuilder, k ):
12970                     setattr( geomBuilder, k, method )
12971                 pass
12972             pass
12973         del pluginName
12974         pass
12975     pass