Salome HOME
Synchronize adm files
[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
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 ## Information about closed/unclosed state of shell or wire
521 #  @ingroup l1_geomBuilder_auxiliary
522 class info:
523     """
524     Information about closed/unclosed state of shell or wire
525     """
526     UNKNOWN  = 0
527     CLOSED   = 1
528     UNCLOSED = 2
529
530 ## Private class used to bind calls of plugin operations to geomBuilder
531 class PluginOperation:
532   def __init__(self, operation, function):
533     self.operation = operation
534     self.function = function
535     pass
536
537   @ManageTransactions("operation")
538   def __call__(self, *args):
539     res = self.function(self.operation, *args)
540     RaiseIfFailed(self.function.__name__, self.operation)
541     return res
542
543 # Warning: geom is a singleton
544 geom = None
545 engine = None
546 doLcc = False
547 created = False
548
549 class geomBuilder(object, GEOM._objref_GEOM_Gen):
550
551         ## Enumeration ShapeType as a dictionary. \n
552         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
553         #  @ingroup l1_geomBuilder_auxiliary
554         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
555
556         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
557         #  and a list of parameters, describing the shape.
558         #  List of parameters, describing the shape:
559         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
560         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
561         #
562         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
563         #
564         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
565         #
566         #  - SPHERE:       [xc yc zc            R]
567         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
568         #  - BOX:          [xc yc zc                      ax ay az]
569         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
570         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
571         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
572         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
573         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
574         #
575         #  - SPHERE2D:     [xc yc zc            R]
576         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
577         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
578         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
579         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
580         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
581         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
582         #  - PLANE:        [xo yo zo  dx dy dz]
583         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
584         #  - FACE:                                       [nb_edges  nb_vertices]
585         #
586         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
587         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
588         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
589         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
590         #  - LINE:         [xo yo zo  dx dy dz]
591         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
592         #  - EDGE:                                                 [nb_vertices]
593         #
594         #  - VERTEX:       [x  y  z]
595         #  @ingroup l1_geomBuilder_auxiliary
596         kind = GEOM.GEOM_IKindOfShape
597
598         def __new__(cls):
599             global engine
600             global geom
601             global doLcc
602             global created
603             #print "==== __new__ ", engine, geom, doLcc, created
604             if geom is None:
605                 # geom engine is either retrieved from engine, or created
606                 geom = engine
607                 # Following test avoids a recursive loop
608                 if doLcc:
609                     if geom is not None:
610                         # geom engine not created: existing engine found
611                         doLcc = False
612                     if doLcc and not created:
613                         doLcc = False
614                         # FindOrLoadComponent called:
615                         # 1. CORBA resolution of server
616                         # 2. the __new__ method is called again
617                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
618                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
619                         #print "====1 ",geom
620                 else:
621                     # FindOrLoadComponent not called
622                     if geom is None:
623                         # geomBuilder instance is created from lcc.FindOrLoadComponent
624                         #print "==== super ", engine, geom, doLcc, created
625                         geom = super(geomBuilder,cls).__new__(cls)
626                         #print "====2 ",geom
627                     else:
628                         # geom engine not created: existing engine found
629                         #print "==== existing ", engine, geom, doLcc, created
630                         pass
631                 #print "return geom 1 ", geom
632                 return geom
633
634             #print "return geom 2 ", geom
635             return geom
636
637         def __init__(self):
638             global created
639             #print "-------- geomBuilder __init__ --- ", created, self
640             if not created:
641               created = True
642               GEOM._objref_GEOM_Gen.__init__(self)
643               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
644               self.myBuilder = None
645               self.myStudyId = 0
646               self.father    = None
647
648               self.BasicOp  = None
649               self.CurvesOp = None
650               self.PrimOp   = None
651               self.ShapesOp = None
652               self.HealOp   = None
653               self.InsertOp = None
654               self.BoolOp   = None
655               self.TrsfOp   = None
656               self.LocalOp  = None
657               self.MeasuOp  = None
658               self.BlocksOp = None
659               self.GroupOp  = None
660               self.AdvOp    = None
661               self.FieldOp  = None
662             pass
663
664         ## Process object publication in the study, as follows:
665         #  - if @a theName is specified (not None), the object is published in the study
666         #    with this name, not taking into account "auto-publishing" option;
667         #  - if @a theName is NOT specified, the object is published in the study
668         #    (using default name, which can be customized using @a theDefaultName parameter)
669         #    only if auto-publishing is switched on.
670         #
671         #  @param theObj  object, a subject for publishing
672         #  @param theName object name for study
673         #  @param theDefaultName default name for the auto-publishing
674         #
675         #  @sa addToStudyAuto()
676         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
677             # ---
678             def _item_name(_names, _defname, _idx=-1):
679                 if not _names: _names = _defname
680                 if type(_names) in [types.ListType, types.TupleType]:
681                     if _idx >= 0:
682                         if _idx >= len(_names) or not _names[_idx]:
683                             if type(_defname) not in [types.ListType, types.TupleType]:
684                                 _name = "%s_%d"%(_defname, _idx+1)
685                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
686                                 _name = _defname[_idx]
687                             else:
688                                 _name = "%noname_%d"%(dn, _idx+1)
689                             pass
690                         else:
691                             _name = _names[_idx]
692                         pass
693                     else:
694                         # must be wrong  usage
695                         _name = _names[0]
696                     pass
697                 else:
698                     if _idx >= 0:
699                         _name = "%s_%d"%(_names, _idx+1)
700                     else:
701                         _name = _names
702                     pass
703                 return _name
704             # ---
705             def _publish( _name, _obj ):
706                 fatherObj = None
707                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
708                     fatherObj = _obj.GetShape()
709                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
710                     fatherObj = _obj.GetField()
711                 elif not _obj.IsMainShape():
712                     fatherObj = _obj.GetMainShape()
713                     pass
714                 if fatherObj and fatherObj.GetStudyEntry():
715                     self.addToStudyInFather(fatherObj, _obj, _name)
716                 else:
717                     self.addToStudy(_obj, _name)
718                     pass
719                 return
720             # ---
721             if not theObj:
722                 return # null object
723             if not theName and not self.myMaxNbSubShapesAllowed:
724                 return # nothing to do: auto-publishing is disabled
725             if not theName and not theDefaultName:
726                 return # neither theName nor theDefaultName is given
727             import types
728             if type(theObj) in [types.ListType, types.TupleType]:
729                 # list of objects is being published
730                 idx = 0
731                 for obj in theObj:
732                     if not obj: continue # bad object
733                     name = _item_name(theName, theDefaultName, idx)
734                     _publish( name, obj )
735                     idx = idx+1
736                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
737                     pass
738                 pass
739             else:
740                 # single object is published
741                 name = _item_name(theName, theDefaultName)
742                 _publish( name, theObj )
743             pass
744
745         ## @addtogroup l1_geomBuilder_auxiliary
746         ## @{
747         def init_geom(self,theStudy):
748             self.myStudy = theStudy
749             self.myStudyId = self.myStudy._get_StudyId()
750             self.myBuilder = self.myStudy.NewBuilder()
751             self.father = self.myStudy.FindComponent("GEOM")
752             notebook.myStudy = theStudy
753             if self.father is None:
754                 self.father = self.myBuilder.NewComponent("GEOM")
755                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
756                 FName = A1._narrow(SALOMEDS.AttributeName)
757                 FName.SetValue("Geometry")
758                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
759                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
760                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
761                 self.myBuilder.DefineComponentInstance(self.father,self)
762                 pass
763             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
764             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
765             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
766             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
767             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
768             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
769             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
770             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
771             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
772             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
773             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
774             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
775             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
776
777             # The below line is a right way to map all plugin functions to geomBuilder,
778             # but AdvancedOperations are already mapped, that is why this line is commented
779             # and presents here only as an axample
780             #self.AdvOp    = self.GetPluginOperations (self.myStudyId, "AdvancedEngine")
781
782             # self.AdvOp is used by functions MakePipeTShape*, MakeDividedDisk, etc.
783             self.AdvOp = GEOM._objref_GEOM_Gen.GetPluginOperations (self, self.myStudyId, "AdvancedEngine")
784
785             # set GEOM as root in the use case tree
786             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
787             self.myUseCaseBuilder.SetRootCurrent()
788             self.myUseCaseBuilder.Append(self.father)
789             pass
790
791         def GetPluginOperations(self, studyID, libraryName):
792             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
793             if op:
794                 # bind methods of operations to self
795                 methods = op.__class__.__dict__['__methods__']
796                 avoid_methods = self.BasicOp.__class__.__dict__['__methods__']
797                 for meth_name in methods:
798                     if not meth_name in avoid_methods: # avoid basic methods
799                         function = getattr(op.__class__, meth_name)
800                         if callable(function):
801                             #self.__dict__[meth_name] = self.__PluginOperation(op, function)
802                             self.__dict__[meth_name] = PluginOperation(op, function)
803             return op
804
805         ## Enable / disable results auto-publishing
806         #
807         #  The automatic publishing is managed in the following way:
808         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
809         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
810         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
811         #  value passed as parameter has the same effect.
812         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
813         #  maximum number of sub-shapes allowed for publishing is set to specified value.
814         #
815         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
816         #  @ingroup l1_publish_data
817         def addToStudyAuto(self, maxNbSubShapes=-1):
818             """
819             Enable / disable results auto-publishing
820
821             The automatic publishing is managed in the following way:
822             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
823             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
824             maximum number of sub-shapes allowed for publishing is unlimited; any negative
825             value passed as parameter has the same effect.
826             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
827             maximum number of sub-shapes allowed for publishing is set to this value.
828
829             Parameters:
830                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
831
832             Example of usage:
833                 geompy.addToStudyAuto()   # enable auto-publishing
834                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
835                 geompy.addToStudyAuto(0)  # disable auto-publishing
836             """
837             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
838             pass
839
840         ## Dump component to the Python script
841         #  This method overrides IDL function to allow default values for the parameters.
842         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
843             """
844             Dump component to the Python script
845             This method overrides IDL function to allow default values for the parameters.
846             """
847             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
848
849         ## Get name for sub-shape aSubObj of shape aMainObj
850         #
851         # @ref swig_SubShapeName "Example"
852         @ManageTransactions("ShapesOp")
853         def SubShapeName(self,aSubObj, aMainObj):
854             """
855             Get name for sub-shape aSubObj of shape aMainObj
856             """
857             # Example: see GEOM_TestAll.py
858
859             #aSubId  = orb.object_to_string(aSubObj)
860             #aMainId = orb.object_to_string(aMainObj)
861             #index = gg.getIndexTopology(aSubId, aMainId)
862             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
863             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
864             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
865             return name
866
867         ## Publish in study aShape with name aName
868         #
869         #  \param aShape the shape to be published
870         #  \param aName  the name for the shape
871         #  \param doRestoreSubShapes if True, finds and publishes also
872         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
873         #         and published sub-shapes of arguments
874         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
875         #                                                  these arguments description
876         #  \return study entry of the published shape in form of string
877         #
878         #  @ingroup l1_publish_data
879         #  @ref swig_all_addtostudy "Example"
880         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
881                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
882             """
883             Publish in study aShape with name aName
884
885             Parameters:
886                 aShape the shape to be published
887                 aName  the name for the shape
888                 doRestoreSubShapes if True, finds and publishes also
889                                    sub-shapes of aShape, corresponding to its arguments
890                                    and published sub-shapes of arguments
891                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
892                                                          these arguments description
893
894             Returns:
895                 study entry of the published shape in form of string
896
897             Example of usage:
898                 id_block1 = geompy.addToStudy(Block1, "Block 1")
899             """
900             # Example: see GEOM_TestAll.py
901             try:
902                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
903                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
904                 if doRestoreSubShapes:
905                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
906                                             theFindMethod, theInheritFirstArg, True )
907             except:
908                 print "addToStudy() failed"
909                 return ""
910             return aShape.GetStudyEntry()
911
912         ## Publish in study aShape with name aName as sub-object of previously published aFather
913         #  \param aFather previously published object
914         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
915         #  \param aName  the name for the shape
916         #
917         #  \return study entry of the published shape in form of string
918         #
919         #  @ingroup l1_publish_data
920         #  @ref swig_all_addtostudyInFather "Example"
921         def addToStudyInFather(self, aFather, aShape, aName):
922             """
923             Publish in study aShape with name aName as sub-object of previously published aFather
924
925             Parameters:
926                 aFather previously published object
927                 aShape the shape to be published as sub-object of aFather
928                 aName  the name for the shape
929
930             Returns:
931                 study entry of the published shape in form of string
932             """
933             # Example: see GEOM_TestAll.py
934             try:
935                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
936                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
937             except:
938                 print "addToStudyInFather() failed"
939                 return ""
940             return aShape.GetStudyEntry()
941
942         ## Unpublish object in study
943         #
944         #  \param obj the object to be unpublished
945         def hideInStudy(self, obj):
946             """
947             Unpublish object in study
948
949             Parameters:
950                 obj the object to be unpublished
951             """
952             ior = salome.orb.object_to_string(obj)
953             aSObject = self.myStudy.FindObjectIOR(ior)
954             if aSObject is not None:
955                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
956                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
957                 drwAttribute.SetDrawable(False)
958                 # hide references if any
959                 vso = self.myStudy.FindDependances(aSObject);
960                 for refObj in vso :
961                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
962                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
963                     drwAttribute.SetDrawable(False)
964                     pass
965                 pass
966
967         # end of l1_geomBuilder_auxiliary
968         ## @}
969
970         ## @addtogroup l3_restore_ss
971         ## @{
972
973         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
974         #  To be used from python scripts out of addToStudy() (non-default usage)
975         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
976         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
977         #                   If this list is empty, all operation arguments will be published
978         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
979         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
980         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
981         #                            Do not publish sub-shapes in place of arguments, but only
982         #                            in place of sub-shapes of the first argument,
983         #                            because the whole shape corresponds to the first argument.
984         #                            Mainly to be used after transformations, but it also can be
985         #                            usefull after partition with one object shape, and some other
986         #                            operations, where only the first argument has to be considered.
987         #                            If theObject has only one argument shape, this flag is automatically
988         #                            considered as True, not regarding really passed value.
989         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
990         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
991         #  \return list of published sub-shapes
992         #
993         #  @ref tui_restore_prs_params "Example"
994         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
995                               theInheritFirstArg=False, theAddPrefix=True):
996             """
997             Publish sub-shapes, standing for arguments and sub-shapes of arguments
998             To be used from python scripts out of geompy.addToStudy (non-default usage)
999
1000             Parameters:
1001                 theObject published GEOM.GEOM_Object, arguments of which will be published
1002                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1003                           If this list is empty, all operation arguments will be published
1004                 theFindMethod method to search sub-shapes, corresponding to arguments and
1005                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
1006                 theInheritFirstArg set properties of the first argument for theObject.
1007                                    Do not publish sub-shapes in place of arguments, but only
1008                                    in place of sub-shapes of the first argument,
1009                                    because the whole shape corresponds to the first argument.
1010                                    Mainly to be used after transformations, but it also can be
1011                                    usefull after partition with one object shape, and some other
1012                                    operations, where only the first argument has to be considered.
1013                                    If theObject has only one argument shape, this flag is automatically
1014                                    considered as True, not regarding really passed value.
1015                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1016                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1017             Returns:
1018                 list of published sub-shapes
1019             """
1020             # Example: see GEOM_TestAll.py
1021             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
1022                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1023
1024         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1025         #  To be used from python scripts out of addToStudy() (non-default usage)
1026         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1027         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1028         #                   If this list is empty, all operation arguments will be published
1029         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1030         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1031         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1032         #                            Do not publish sub-shapes in place of arguments, but only
1033         #                            in place of sub-shapes of the first argument,
1034         #                            because the whole shape corresponds to the first argument.
1035         #                            Mainly to be used after transformations, but it also can be
1036         #                            usefull after partition with one object shape, and some other
1037         #                            operations, where only the first argument has to be considered.
1038         #                            If theObject has only one argument shape, this flag is automatically
1039         #                            considered as True, not regarding really passed value.
1040         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1041         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1042         #  \return list of published sub-shapes
1043         #
1044         #  @ref tui_restore_prs_params "Example"
1045         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1046                                    theInheritFirstArg=False, theAddPrefix=True):
1047             """
1048             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1049             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1050
1051             Parameters:
1052                 theObject published GEOM.GEOM_Object, arguments of which will be published
1053                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1054                           If this list is empty, all operation arguments will be published
1055                 theFindMethod method to search sub-shapes, corresponding to arguments and
1056                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1057                 theInheritFirstArg set properties of the first argument for theObject.
1058                                    Do not publish sub-shapes in place of arguments, but only
1059                                    in place of sub-shapes of the first argument,
1060                                    because the whole shape corresponds to the first argument.
1061                                    Mainly to be used after transformations, but it also can be
1062                                    usefull after partition with one object shape, and some other
1063                                    operations, where only the first argument has to be considered.
1064                                    If theObject has only one argument shape, this flag is automatically
1065                                    considered as True, not regarding really passed value.
1066                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1067                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1068
1069             Returns:
1070                 list of published sub-shapes
1071             """
1072             # Example: see GEOM_TestAll.py
1073             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1074                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1075
1076         # end of l3_restore_ss
1077         ## @}
1078
1079         ## @addtogroup l3_basic_go
1080         ## @{
1081
1082         ## Create point by three coordinates.
1083         #  @param theX The X coordinate of the point.
1084         #  @param theY The Y coordinate of the point.
1085         #  @param theZ The Z coordinate of the point.
1086         #  @param theName Object name; when specified, this parameter is used
1087         #         for result publication in the study. Otherwise, if automatic
1088         #         publication is switched on, default value is used for result name.
1089         #
1090         #  @return New GEOM.GEOM_Object, containing the created point.
1091         #
1092         #  @ref tui_creation_point "Example"
1093         @ManageTransactions("BasicOp")
1094         def MakeVertex(self, theX, theY, theZ, theName=None):
1095             """
1096             Create point by three coordinates.
1097
1098             Parameters:
1099                 theX The X coordinate of the point.
1100                 theY The Y coordinate of the point.
1101                 theZ The Z coordinate of the point.
1102                 theName Object name; when specified, this parameter is used
1103                         for result publication in the study. Otherwise, if automatic
1104                         publication is switched on, default value is used for result name.
1105
1106             Returns:
1107                 New GEOM.GEOM_Object, containing the created point.
1108             """
1109             # Example: see GEOM_TestAll.py
1110             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1111             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1112             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1113             anObj.SetParameters(Parameters)
1114             self._autoPublish(anObj, theName, "vertex")
1115             return anObj
1116
1117         ## Create a point, distant from the referenced point
1118         #  on the given distances along the coordinate axes.
1119         #  @param theReference The referenced point.
1120         #  @param theX Displacement from the referenced point along OX axis.
1121         #  @param theY Displacement from the referenced point along OY axis.
1122         #  @param theZ Displacement from the referenced point along OZ axis.
1123         #  @param theName Object name; when specified, this parameter is used
1124         #         for result publication in the study. Otherwise, if automatic
1125         #         publication is switched on, default value is used for result name.
1126         #
1127         #  @return New GEOM.GEOM_Object, containing the created point.
1128         #
1129         #  @ref tui_creation_point "Example"
1130         @ManageTransactions("BasicOp")
1131         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1132             """
1133             Create a point, distant from the referenced point
1134             on the given distances along the coordinate axes.
1135
1136             Parameters:
1137                 theReference The referenced point.
1138                 theX Displacement from the referenced point along OX axis.
1139                 theY Displacement from the referenced point along OY axis.
1140                 theZ Displacement from the referenced point along OZ axis.
1141                 theName Object name; when specified, this parameter is used
1142                         for result publication in the study. Otherwise, if automatic
1143                         publication is switched on, default value is used for result name.
1144
1145             Returns:
1146                 New GEOM.GEOM_Object, containing the created point.
1147             """
1148             # Example: see GEOM_TestAll.py
1149             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1150             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1151             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1152             anObj.SetParameters(Parameters)
1153             self._autoPublish(anObj, theName, "vertex")
1154             return anObj
1155
1156         ## Create a point, corresponding to the given parameter on the given curve.
1157         #  @param theRefCurve The referenced curve.
1158         #  @param theParameter Value of parameter on the referenced curve.
1159         #  @param theName Object name; when specified, this parameter is used
1160         #         for result publication in the study. Otherwise, if automatic
1161         #         publication is switched on, default value is used for result name.
1162         #
1163         #  @return New GEOM.GEOM_Object, containing the created point.
1164         #
1165         #  @ref tui_creation_point "Example"
1166         @ManageTransactions("BasicOp")
1167         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1168             """
1169             Create a point, corresponding to the given parameter on the given curve.
1170
1171             Parameters:
1172                 theRefCurve The referenced curve.
1173                 theParameter Value of parameter on the referenced curve.
1174                 theName Object name; when specified, this parameter is used
1175                         for result publication in the study. Otherwise, if automatic
1176                         publication is switched on, default value is used for result name.
1177
1178             Returns:
1179                 New GEOM.GEOM_Object, containing the created point.
1180
1181             Example of usage:
1182                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1183             """
1184             # Example: see GEOM_TestAll.py
1185             theParameter, Parameters = ParseParameters(theParameter)
1186             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1187             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1188             anObj.SetParameters(Parameters)
1189             self._autoPublish(anObj, theName, "vertex")
1190             return anObj
1191
1192         ## Create a point by projection give coordinates on the given curve
1193         #  @param theRefCurve The referenced curve.
1194         #  @param theX X-coordinate in 3D space
1195         #  @param theY Y-coordinate in 3D space
1196         #  @param theZ Z-coordinate in 3D space
1197         #  @param theName Object name; when specified, this parameter is used
1198         #         for result publication in the study. Otherwise, if automatic
1199         #         publication is switched on, default value is used for result name.
1200         #
1201         #  @return New GEOM.GEOM_Object, containing the created point.
1202         #
1203         #  @ref tui_creation_point "Example"
1204         @ManageTransactions("BasicOp")
1205         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1206             """
1207             Create a point by projection give coordinates on the given curve
1208
1209             Parameters:
1210                 theRefCurve The referenced curve.
1211                 theX X-coordinate in 3D space
1212                 theY Y-coordinate in 3D space
1213                 theZ Z-coordinate in 3D space
1214                 theName Object name; when specified, this parameter is used
1215                         for result publication in the study. Otherwise, if automatic
1216                         publication is switched on, default value is used for result name.
1217
1218             Returns:
1219                 New GEOM.GEOM_Object, containing the created point.
1220
1221             Example of usage:
1222                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1223             """
1224             # Example: see GEOM_TestAll.py
1225             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1226             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1227             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1228             anObj.SetParameters(Parameters)
1229             self._autoPublish(anObj, theName, "vertex")
1230             return anObj
1231
1232         ## Create a point, corresponding to the given length on the given curve.
1233         #  @param theRefCurve The referenced curve.
1234         #  @param theLength Length on the referenced curve. It can be negative.
1235         #  @param theStartPoint Point allowing to choose the direction for the calculation
1236         #                       of the length. If None, start from the first point of theRefCurve.
1237         #  @param theName Object name; when specified, this parameter is used
1238         #         for result publication in the study. Otherwise, if automatic
1239         #         publication is switched on, default value is used for result name.
1240         #
1241         #  @return New GEOM.GEOM_Object, containing the created point.
1242         #
1243         #  @ref tui_creation_point "Example"
1244         @ManageTransactions("BasicOp")
1245         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1246             """
1247             Create a point, corresponding to the given length on the given curve.
1248
1249             Parameters:
1250                 theRefCurve The referenced curve.
1251                 theLength Length on the referenced curve. It can be negative.
1252                 theStartPoint Point allowing to choose the direction for the calculation
1253                               of the length. If None, start from the first point of theRefCurve.
1254                 theName Object name; when specified, this parameter is used
1255                         for result publication in the study. Otherwise, if automatic
1256                         publication is switched on, default value is used for result name.
1257
1258             Returns:
1259                 New GEOM.GEOM_Object, containing the created point.
1260             """
1261             # Example: see GEOM_TestAll.py
1262             theLength, Parameters = ParseParameters(theLength)
1263             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1264             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1265             anObj.SetParameters(Parameters)
1266             self._autoPublish(anObj, theName, "vertex")
1267             return anObj
1268
1269         ## Create a point, corresponding to the given parameters on the
1270         #    given surface.
1271         #  @param theRefSurf The referenced surface.
1272         #  @param theUParameter Value of U-parameter on the referenced surface.
1273         #  @param theVParameter Value of V-parameter on the referenced surface.
1274         #  @param theName Object name; when specified, this parameter is used
1275         #         for result publication in the study. Otherwise, if automatic
1276         #         publication is switched on, default value is used for result name.
1277         #
1278         #  @return New GEOM.GEOM_Object, containing the created point.
1279         #
1280         #  @ref swig_MakeVertexOnSurface "Example"
1281         @ManageTransactions("BasicOp")
1282         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1283             """
1284             Create a point, corresponding to the given parameters on the
1285             given surface.
1286
1287             Parameters:
1288                 theRefSurf The referenced surface.
1289                 theUParameter Value of U-parameter on the referenced surface.
1290                 theVParameter Value of V-parameter on the referenced surface.
1291                 theName Object name; when specified, this parameter is used
1292                         for result publication in the study. Otherwise, if automatic
1293                         publication is switched on, default value is used for result name.
1294
1295             Returns:
1296                 New GEOM.GEOM_Object, containing the created point.
1297
1298             Example of usage:
1299                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1300             """
1301             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1302             # Example: see GEOM_TestAll.py
1303             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1304             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1305             anObj.SetParameters(Parameters);
1306             self._autoPublish(anObj, theName, "vertex")
1307             return anObj
1308
1309         ## Create a point by projection give coordinates on the given surface
1310         #  @param theRefSurf The referenced surface.
1311         #  @param theX X-coordinate in 3D space
1312         #  @param theY Y-coordinate in 3D space
1313         #  @param theZ Z-coordinate in 3D space
1314         #  @param theName Object name; when specified, this parameter is used
1315         #         for result publication in the study. Otherwise, if automatic
1316         #         publication is switched on, default value is used for result name.
1317         #
1318         #  @return New GEOM.GEOM_Object, containing the created point.
1319         #
1320         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1321         @ManageTransactions("BasicOp")
1322         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1323             """
1324             Create a point by projection give coordinates on the given surface
1325
1326             Parameters:
1327                 theRefSurf The referenced surface.
1328                 theX X-coordinate in 3D space
1329                 theY Y-coordinate in 3D space
1330                 theZ Z-coordinate in 3D space
1331                 theName Object name; when specified, this parameter is used
1332                         for result publication in the study. Otherwise, if automatic
1333                         publication is switched on, default value is used for result name.
1334
1335             Returns:
1336                 New GEOM.GEOM_Object, containing the created point.
1337
1338             Example of usage:
1339                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1340             """
1341             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1342             # Example: see GEOM_TestAll.py
1343             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1344             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1345             anObj.SetParameters(Parameters);
1346             self._autoPublish(anObj, theName, "vertex")
1347             return anObj
1348
1349         ## Create a point, which lays on the given face.
1350         #  The point will lay in arbitrary place of the face.
1351         #  The only condition on it is a non-zero distance to the face boundary.
1352         #  Such point can be used to uniquely identify the face inside any
1353         #  shape in case, when the shape does not contain overlapped faces.
1354         #  @param theFace The referenced face.
1355         #  @param theName Object name; when specified, this parameter is used
1356         #         for result publication in the study. Otherwise, if automatic
1357         #         publication is switched on, default value is used for result name.
1358         #
1359         #  @return New GEOM.GEOM_Object, containing the created point.
1360         #
1361         #  @ref swig_MakeVertexInsideFace "Example"
1362         @ManageTransactions("BasicOp")
1363         def MakeVertexInsideFace (self, theFace, theName=None):
1364             """
1365             Create a point, which lays on the given face.
1366             The point will lay in arbitrary place of the face.
1367             The only condition on it is a non-zero distance to the face boundary.
1368             Such point can be used to uniquely identify the face inside any
1369             shape in case, when the shape does not contain overlapped faces.
1370
1371             Parameters:
1372                 theFace The referenced face.
1373                 theName Object name; when specified, this parameter is used
1374                         for result publication in the study. Otherwise, if automatic
1375                         publication is switched on, default value is used for result name.
1376
1377             Returns:
1378                 New GEOM.GEOM_Object, containing the created point.
1379
1380             Example of usage:
1381                 p_on_face = geompy.MakeVertexInsideFace(Face)
1382             """
1383             # Example: see GEOM_TestAll.py
1384             anObj = self.BasicOp.MakePointOnFace(theFace)
1385             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1386             self._autoPublish(anObj, theName, "vertex")
1387             return anObj
1388
1389         ## Create a point on intersection of two lines.
1390         #  @param theRefLine1, theRefLine2 The referenced lines.
1391         #  @param theName Object name; when specified, this parameter is used
1392         #         for result publication in the study. Otherwise, if automatic
1393         #         publication is switched on, default value is used for result name.
1394         #
1395         #  @return New GEOM.GEOM_Object, containing the created point.
1396         #
1397         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1398         @ManageTransactions("BasicOp")
1399         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1400             """
1401             Create a point on intersection of two lines.
1402
1403             Parameters:
1404                 theRefLine1, theRefLine2 The referenced lines.
1405                 theName Object name; when specified, this parameter is used
1406                         for result publication in the study. Otherwise, if automatic
1407                         publication is switched on, default value is used for result name.
1408
1409             Returns:
1410                 New GEOM.GEOM_Object, containing the created point.
1411             """
1412             # Example: see GEOM_TestAll.py
1413             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1414             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1415             self._autoPublish(anObj, theName, "vertex")
1416             return anObj
1417
1418         ## Create a tangent, corresponding to the given parameter on the given curve.
1419         #  @param theRefCurve The referenced curve.
1420         #  @param theParameter Value of parameter on the referenced curve.
1421         #  @param theName Object name; when specified, this parameter is used
1422         #         for result publication in the study. Otherwise, if automatic
1423         #         publication is switched on, default value is used for result name.
1424         #
1425         #  @return New GEOM.GEOM_Object, containing the created tangent.
1426         #
1427         #  @ref swig_MakeTangentOnCurve "Example"
1428         @ManageTransactions("BasicOp")
1429         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1430             """
1431             Create a tangent, corresponding to the given parameter on the given curve.
1432
1433             Parameters:
1434                 theRefCurve The referenced curve.
1435                 theParameter Value of parameter on the referenced curve.
1436                 theName Object name; when specified, this parameter is used
1437                         for result publication in the study. Otherwise, if automatic
1438                         publication is switched on, default value is used for result name.
1439
1440             Returns:
1441                 New GEOM.GEOM_Object, containing the created tangent.
1442
1443             Example of usage:
1444                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1445             """
1446             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1447             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1448             self._autoPublish(anObj, theName, "tangent")
1449             return anObj
1450
1451         ## Create a tangent plane, corresponding to the given parameter on the given face.
1452         #  @param theFace The face for which tangent plane should be built.
1453         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1454         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1455         #  @param theTrimSize the size of plane.
1456         #  @param theName Object name; when specified, this parameter is used
1457         #         for result publication in the study. Otherwise, if automatic
1458         #         publication is switched on, default value is used for result name.
1459         #
1460         #  @return New GEOM.GEOM_Object, containing the created tangent.
1461         #
1462         #  @ref swig_MakeTangentPlaneOnFace "Example"
1463         @ManageTransactions("BasicOp")
1464         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1465             """
1466             Create a tangent plane, corresponding to the given parameter on the given face.
1467
1468             Parameters:
1469                 theFace The face for which tangent plane should be built.
1470                 theParameterV vertical value of the center point (0.0 - 1.0).
1471                 theParameterU horisontal value of the center point (0.0 - 1.0).
1472                 theTrimSize the size of plane.
1473                 theName Object name; when specified, this parameter is used
1474                         for result publication in the study. Otherwise, if automatic
1475                         publication is switched on, default value is used for result name.
1476
1477            Returns:
1478                 New GEOM.GEOM_Object, containing the created tangent.
1479
1480            Example of usage:
1481                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1482             """
1483             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1484             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1485             self._autoPublish(anObj, theName, "tangent")
1486             return anObj
1487
1488         ## Create a vector with the given components.
1489         #  @param theDX X component of the vector.
1490         #  @param theDY Y component of the vector.
1491         #  @param theDZ Z component of the vector.
1492         #  @param theName Object name; when specified, this parameter is used
1493         #         for result publication in the study. Otherwise, if automatic
1494         #         publication is switched on, default value is used for result name.
1495         #
1496         #  @return New GEOM.GEOM_Object, containing the created vector.
1497         #
1498         #  @ref tui_creation_vector "Example"
1499         @ManageTransactions("BasicOp")
1500         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1501             """
1502             Create a vector with the given components.
1503
1504             Parameters:
1505                 theDX X component of the vector.
1506                 theDY Y component of the vector.
1507                 theDZ Z component of the vector.
1508                 theName Object name; when specified, this parameter is used
1509                         for result publication in the study. Otherwise, if automatic
1510                         publication is switched on, default value is used for result name.
1511
1512             Returns:
1513                 New GEOM.GEOM_Object, containing the created vector.
1514             """
1515             # Example: see GEOM_TestAll.py
1516             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1517             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1518             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1519             anObj.SetParameters(Parameters)
1520             self._autoPublish(anObj, theName, "vector")
1521             return anObj
1522
1523         ## Create a vector between two points.
1524         #  @param thePnt1 Start point for the vector.
1525         #  @param thePnt2 End point for the vector.
1526         #  @param theName Object name; when specified, this parameter is used
1527         #         for result publication in the study. Otherwise, if automatic
1528         #         publication is switched on, default value is used for result name.
1529         #
1530         #  @return New GEOM.GEOM_Object, containing the created vector.
1531         #
1532         #  @ref tui_creation_vector "Example"
1533         @ManageTransactions("BasicOp")
1534         def MakeVector(self, thePnt1, thePnt2, theName=None):
1535             """
1536             Create a vector between two points.
1537
1538             Parameters:
1539                 thePnt1 Start point for the vector.
1540                 thePnt2 End point for the vector.
1541                 theName Object name; when specified, this parameter is used
1542                         for result publication in the study. Otherwise, if automatic
1543                         publication is switched on, default value is used for result name.
1544
1545             Returns:
1546                 New GEOM.GEOM_Object, containing the created vector.
1547             """
1548             # Example: see GEOM_TestAll.py
1549             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1550             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1551             self._autoPublish(anObj, theName, "vector")
1552             return anObj
1553
1554         ## Create a line, passing through the given point
1555         #  and parrallel to the given direction
1556         #  @param thePnt Point. The resulting line will pass through it.
1557         #  @param theDir Direction. The resulting line will be parallel to it.
1558         #  @param theName Object name; when specified, this parameter is used
1559         #         for result publication in the study. Otherwise, if automatic
1560         #         publication is switched on, default value is used for result name.
1561         #
1562         #  @return New GEOM.GEOM_Object, containing the created line.
1563         #
1564         #  @ref tui_creation_line "Example"
1565         @ManageTransactions("BasicOp")
1566         def MakeLine(self, thePnt, theDir, theName=None):
1567             """
1568             Create a line, passing through the given point
1569             and parrallel to the given direction
1570
1571             Parameters:
1572                 thePnt Point. The resulting line will pass through it.
1573                 theDir Direction. The resulting line will be parallel to it.
1574                 theName Object name; when specified, this parameter is used
1575                         for result publication in the study. Otherwise, if automatic
1576                         publication is switched on, default value is used for result name.
1577
1578             Returns:
1579                 New GEOM.GEOM_Object, containing the created line.
1580             """
1581             # Example: see GEOM_TestAll.py
1582             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1583             RaiseIfFailed("MakeLine", self.BasicOp)
1584             self._autoPublish(anObj, theName, "line")
1585             return anObj
1586
1587         ## Create a line, passing through the given points
1588         #  @param thePnt1 First of two points, defining the line.
1589         #  @param thePnt2 Second of two points, defining the line.
1590         #  @param theName Object name; when specified, this parameter is used
1591         #         for result publication in the study. Otherwise, if automatic
1592         #         publication is switched on, default value is used for result name.
1593         #
1594         #  @return New GEOM.GEOM_Object, containing the created line.
1595         #
1596         #  @ref tui_creation_line "Example"
1597         @ManageTransactions("BasicOp")
1598         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1599             """
1600             Create a line, passing through the given points
1601
1602             Parameters:
1603                 thePnt1 First of two points, defining the line.
1604                 thePnt2 Second of two points, defining the line.
1605                 theName Object name; when specified, this parameter is used
1606                         for result publication in the study. Otherwise, if automatic
1607                         publication is switched on, default value is used for result name.
1608
1609             Returns:
1610                 New GEOM.GEOM_Object, containing the created line.
1611             """
1612             # Example: see GEOM_TestAll.py
1613             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1614             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1615             self._autoPublish(anObj, theName, "line")
1616             return anObj
1617
1618         ## Create a line on two faces intersection.
1619         #  @param theFace1 First of two faces, defining the line.
1620         #  @param theFace2 Second of two faces, defining the line.
1621         #  @param theName Object name; when specified, this parameter is used
1622         #         for result publication in the study. Otherwise, if automatic
1623         #         publication is switched on, default value is used for result name.
1624         #
1625         #  @return New GEOM.GEOM_Object, containing the created line.
1626         #
1627         #  @ref swig_MakeLineTwoFaces "Example"
1628         @ManageTransactions("BasicOp")
1629         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1630             """
1631             Create a line on two faces intersection.
1632
1633             Parameters:
1634                 theFace1 First of two faces, defining the line.
1635                 theFace2 Second of two faces, defining the line.
1636                 theName Object name; when specified, this parameter is used
1637                         for result publication in the study. Otherwise, if automatic
1638                         publication is switched on, default value is used for result name.
1639
1640             Returns:
1641                 New GEOM.GEOM_Object, containing the created line.
1642             """
1643             # Example: see GEOM_TestAll.py
1644             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1645             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1646             self._autoPublish(anObj, theName, "line")
1647             return anObj
1648
1649         ## Create a plane, passing through the given point
1650         #  and normal to the given vector.
1651         #  @param thePnt Point, the plane has to pass through.
1652         #  @param theVec Vector, defining the plane normal direction.
1653         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1654         #  @param theName Object name; when specified, this parameter is used
1655         #         for result publication in the study. Otherwise, if automatic
1656         #         publication is switched on, default value is used for result name.
1657         #
1658         #  @return New GEOM.GEOM_Object, containing the created plane.
1659         #
1660         #  @ref tui_creation_plane "Example"
1661         @ManageTransactions("BasicOp")
1662         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1663             """
1664             Create a plane, passing through the given point
1665             and normal to the given vector.
1666
1667             Parameters:
1668                 thePnt Point, the plane has to pass through.
1669                 theVec Vector, defining the plane normal direction.
1670                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1671                 theName Object name; when specified, this parameter is used
1672                         for result publication in the study. Otherwise, if automatic
1673                         publication is switched on, default value is used for result name.
1674
1675             Returns:
1676                 New GEOM.GEOM_Object, containing the created plane.
1677             """
1678             # Example: see GEOM_TestAll.py
1679             theTrimSize, Parameters = ParseParameters(theTrimSize);
1680             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1681             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1682             anObj.SetParameters(Parameters)
1683             self._autoPublish(anObj, theName, "plane")
1684             return anObj
1685
1686         ## Create a plane, passing through the three given points
1687         #  @param thePnt1 First of three points, defining the plane.
1688         #  @param thePnt2 Second of three points, defining the plane.
1689         #  @param thePnt3 Fird of three points, defining the plane.
1690         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1691         #  @param theName Object name; when specified, this parameter is used
1692         #         for result publication in the study. Otherwise, if automatic
1693         #         publication is switched on, default value is used for result name.
1694         #
1695         #  @return New GEOM.GEOM_Object, containing the created plane.
1696         #
1697         #  @ref tui_creation_plane "Example"
1698         @ManageTransactions("BasicOp")
1699         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1700             """
1701             Create a plane, passing through the three given points
1702
1703             Parameters:
1704                 thePnt1 First of three points, defining the plane.
1705                 thePnt2 Second of three points, defining the plane.
1706                 thePnt3 Fird of three points, defining the plane.
1707                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1708                 theName Object name; when specified, this parameter is used
1709                         for result publication in the study. Otherwise, if automatic
1710                         publication is switched on, default value is used for result name.
1711
1712             Returns:
1713                 New GEOM.GEOM_Object, containing the created plane.
1714             """
1715             # Example: see GEOM_TestAll.py
1716             theTrimSize, Parameters = ParseParameters(theTrimSize);
1717             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1718             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1719             anObj.SetParameters(Parameters)
1720             self._autoPublish(anObj, theName, "plane")
1721             return anObj
1722
1723         ## Create a plane, similar to the existing one, but with another size of representing face.
1724         #  @param theFace Referenced plane or LCS(Marker).
1725         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1726         #  @param theName Object name; when specified, this parameter is used
1727         #         for result publication in the study. Otherwise, if automatic
1728         #         publication is switched on, default value is used for result name.
1729         #
1730         #  @return New GEOM.GEOM_Object, containing the created plane.
1731         #
1732         #  @ref tui_creation_plane "Example"
1733         @ManageTransactions("BasicOp")
1734         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1735             """
1736             Create a plane, similar to the existing one, but with another size of representing face.
1737
1738             Parameters:
1739                 theFace Referenced plane or LCS(Marker).
1740                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1741                 theName Object name; when specified, this parameter is used
1742                         for result publication in the study. Otherwise, if automatic
1743                         publication is switched on, default value is used for result name.
1744
1745             Returns:
1746                 New GEOM.GEOM_Object, containing the created plane.
1747             """
1748             # Example: see GEOM_TestAll.py
1749             theTrimSize, Parameters = ParseParameters(theTrimSize);
1750             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1751             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1752             anObj.SetParameters(Parameters)
1753             self._autoPublish(anObj, theName, "plane")
1754             return anObj
1755
1756         ## Create a plane, passing through the 2 vectors
1757         #  with center in a start point of the first vector.
1758         #  @param theVec1 Vector, defining center point and plane direction.
1759         #  @param theVec2 Vector, defining the plane normal direction.
1760         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1761         #  @param theName Object name; when specified, this parameter is used
1762         #         for result publication in the study. Otherwise, if automatic
1763         #         publication is switched on, default value is used for result name.
1764         #
1765         #  @return New GEOM.GEOM_Object, containing the created plane.
1766         #
1767         #  @ref tui_creation_plane "Example"
1768         @ManageTransactions("BasicOp")
1769         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1770             """
1771             Create a plane, passing through the 2 vectors
1772             with center in a start point of the first vector.
1773
1774             Parameters:
1775                 theVec1 Vector, defining center point and plane direction.
1776                 theVec2 Vector, defining the plane normal direction.
1777                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1778                 theName Object name; when specified, this parameter is used
1779                         for result publication in the study. Otherwise, if automatic
1780                         publication is switched on, default value is used for result name.
1781
1782             Returns:
1783                 New GEOM.GEOM_Object, containing the created plane.
1784             """
1785             # Example: see GEOM_TestAll.py
1786             theTrimSize, Parameters = ParseParameters(theTrimSize);
1787             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1788             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1789             anObj.SetParameters(Parameters)
1790             self._autoPublish(anObj, theName, "plane")
1791             return anObj
1792
1793         ## Create a plane, based on a Local coordinate system.
1794         #  @param theLCS  coordinate system, defining plane.
1795         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1796         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1797         #  @param theName Object name; when specified, this parameter is used
1798         #         for result publication in the study. Otherwise, if automatic
1799         #         publication is switched on, default value is used for result name.
1800         #
1801         #  @return New GEOM.GEOM_Object, containing the created plane.
1802         #
1803         #  @ref tui_creation_plane "Example"
1804         @ManageTransactions("BasicOp")
1805         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1806             """
1807             Create a plane, based on a Local coordinate system.
1808
1809            Parameters:
1810                 theLCS  coordinate system, defining plane.
1811                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1812                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1813                 theName Object name; when specified, this parameter is used
1814                         for result publication in the study. Otherwise, if automatic
1815                         publication is switched on, default value is used for result name.
1816
1817             Returns:
1818                 New GEOM.GEOM_Object, containing the created plane.
1819             """
1820             # Example: see GEOM_TestAll.py
1821             theTrimSize, Parameters = ParseParameters(theTrimSize);
1822             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1823             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1824             anObj.SetParameters(Parameters)
1825             self._autoPublish(anObj, theName, "plane")
1826             return anObj
1827
1828         ## Create a local coordinate system.
1829         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1830         #  @param XDX,XDY,XDZ Three components of OX direction
1831         #  @param YDX,YDY,YDZ Three components of OY direction
1832         #  @param theName Object name; when specified, this parameter is used
1833         #         for result publication in the study. Otherwise, if automatic
1834         #         publication is switched on, default value is used for result name.
1835         #
1836         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1837         #
1838         #  @ref swig_MakeMarker "Example"
1839         @ManageTransactions("BasicOp")
1840         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1841             """
1842             Create a local coordinate system.
1843
1844             Parameters:
1845                 OX,OY,OZ Three coordinates of coordinate system origin.
1846                 XDX,XDY,XDZ Three components of OX direction
1847                 YDX,YDY,YDZ Three components of OY direction
1848                 theName Object name; when specified, this parameter is used
1849                         for result publication in the study. Otherwise, if automatic
1850                         publication is switched on, default value is used for result name.
1851
1852             Returns:
1853                 New GEOM.GEOM_Object, containing the created coordinate system.
1854             """
1855             # Example: see GEOM_TestAll.py
1856             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1857             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1858             RaiseIfFailed("MakeMarker", self.BasicOp)
1859             anObj.SetParameters(Parameters)
1860             self._autoPublish(anObj, theName, "lcs")
1861             return anObj
1862
1863         ## Create a local coordinate system from shape.
1864         #  @param theShape The initial shape to detect the coordinate system.
1865         #  @param theName Object name; when specified, this parameter is used
1866         #         for result publication in the study. Otherwise, if automatic
1867         #         publication is switched on, default value is used for result name.
1868         #
1869         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1870         #
1871         #  @ref tui_creation_lcs "Example"
1872         @ManageTransactions("BasicOp")
1873         def MakeMarkerFromShape(self, theShape, theName=None):
1874             """
1875             Create a local coordinate system from shape.
1876
1877             Parameters:
1878                 theShape The initial shape to detect the coordinate system.
1879                 theName Object name; when specified, this parameter is used
1880                         for result publication in the study. Otherwise, if automatic
1881                         publication is switched on, default value is used for result name.
1882
1883             Returns:
1884                 New GEOM.GEOM_Object, containing the created coordinate system.
1885             """
1886             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1887             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1888             self._autoPublish(anObj, theName, "lcs")
1889             return anObj
1890
1891         ## Create a local coordinate system from point and two vectors.
1892         #  @param theOrigin Point of coordinate system origin.
1893         #  @param theXVec Vector of X direction
1894         #  @param theYVec Vector of Y direction
1895         #  @param theName Object name; when specified, this parameter is used
1896         #         for result publication in the study. Otherwise, if automatic
1897         #         publication is switched on, default value is used for result name.
1898         #
1899         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1900         #
1901         #  @ref tui_creation_lcs "Example"
1902         @ManageTransactions("BasicOp")
1903         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1904             """
1905             Create a local coordinate system from point and two vectors.
1906
1907             Parameters:
1908                 theOrigin Point of coordinate system origin.
1909                 theXVec Vector of X direction
1910                 theYVec Vector of Y direction
1911                 theName Object name; when specified, this parameter is used
1912                         for result publication in the study. Otherwise, if automatic
1913                         publication is switched on, default value is used for result name.
1914
1915             Returns:
1916                 New GEOM.GEOM_Object, containing the created coordinate system.
1917
1918             """
1919             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1920             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1921             self._autoPublish(anObj, theName, "lcs")
1922             return anObj
1923
1924         # end of l3_basic_go
1925         ## @}
1926
1927         ## @addtogroup l4_curves
1928         ## @{
1929
1930         ##  Create an arc of circle, passing through three given points.
1931         #  @param thePnt1 Start point of the arc.
1932         #  @param thePnt2 Middle point of the arc.
1933         #  @param thePnt3 End point of the arc.
1934         #  @param theName Object name; when specified, this parameter is used
1935         #         for result publication in the study. Otherwise, if automatic
1936         #         publication is switched on, default value is used for result name.
1937         #
1938         #  @return New GEOM.GEOM_Object, containing the created arc.
1939         #
1940         #  @ref swig_MakeArc "Example"
1941         @ManageTransactions("CurvesOp")
1942         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1943             """
1944             Create an arc of circle, passing through three given points.
1945
1946             Parameters:
1947                 thePnt1 Start point of the arc.
1948                 thePnt2 Middle point of the arc.
1949                 thePnt3 End point of the arc.
1950                 theName Object name; when specified, this parameter is used
1951                         for result publication in the study. Otherwise, if automatic
1952                         publication is switched on, default value is used for result name.
1953
1954             Returns:
1955                 New GEOM.GEOM_Object, containing the created arc.
1956             """
1957             # Example: see GEOM_TestAll.py
1958             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1959             RaiseIfFailed("MakeArc", self.CurvesOp)
1960             self._autoPublish(anObj, theName, "arc")
1961             return anObj
1962
1963         ##  Create an arc of circle from a center and 2 points.
1964         #  @param thePnt1 Center of the arc
1965         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1966         #  @param thePnt3 End point of the arc (Gives also a direction)
1967         #  @param theSense Orientation of the arc
1968         #  @param theName Object name; when specified, this parameter is used
1969         #         for result publication in the study. Otherwise, if automatic
1970         #         publication is switched on, default value is used for result name.
1971         #
1972         #  @return New GEOM.GEOM_Object, containing the created arc.
1973         #
1974         #  @ref swig_MakeArc "Example"
1975         @ManageTransactions("CurvesOp")
1976         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1977             """
1978             Create an arc of circle from a center and 2 points.
1979
1980             Parameters:
1981                 thePnt1 Center of the arc
1982                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1983                 thePnt3 End point of the arc (Gives also a direction)
1984                 theSense Orientation of the arc
1985                 theName Object name; when specified, this parameter is used
1986                         for result publication in the study. Otherwise, if automatic
1987                         publication is switched on, default value is used for result name.
1988
1989             Returns:
1990                 New GEOM.GEOM_Object, containing the created arc.
1991             """
1992             # Example: see GEOM_TestAll.py
1993             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1994             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1995             self._autoPublish(anObj, theName, "arc")
1996             return anObj
1997
1998         ##  Create an arc of ellipse, of center and two points.
1999         #  @param theCenter Center of the arc.
2000         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2001         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2002         #  @param theName Object name; when specified, this parameter is used
2003         #         for result publication in the study. Otherwise, if automatic
2004         #         publication is switched on, default value is used for result name.
2005         #
2006         #  @return New GEOM.GEOM_Object, containing the created arc.
2007         #
2008         #  @ref swig_MakeArc "Example"
2009         @ManageTransactions("CurvesOp")
2010         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2011             """
2012             Create an arc of ellipse, of center and two points.
2013
2014             Parameters:
2015                 theCenter Center of the arc.
2016                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2017                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2018                 theName Object name; when specified, this parameter is used
2019                         for result publication in the study. Otherwise, if automatic
2020                         publication is switched on, default value is used for result name.
2021
2022             Returns:
2023                 New GEOM.GEOM_Object, containing the created arc.
2024             """
2025             # Example: see GEOM_TestAll.py
2026             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2027             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2028             self._autoPublish(anObj, theName, "arc")
2029             return anObj
2030
2031         ## Create a circle with given center, normal vector and radius.
2032         #  @param thePnt Circle center.
2033         #  @param theVec Vector, normal to the plane of the circle.
2034         #  @param theR Circle radius.
2035         #  @param theName Object name; when specified, this parameter is used
2036         #         for result publication in the study. Otherwise, if automatic
2037         #         publication is switched on, default value is used for result name.
2038         #
2039         #  @return New GEOM.GEOM_Object, containing the created circle.
2040         #
2041         #  @ref tui_creation_circle "Example"
2042         @ManageTransactions("CurvesOp")
2043         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2044             """
2045             Create a circle with given center, normal vector and radius.
2046
2047             Parameters:
2048                 thePnt Circle center.
2049                 theVec Vector, normal to the plane of the circle.
2050                 theR Circle radius.
2051                 theName Object name; when specified, this parameter is used
2052                         for result publication in the study. Otherwise, if automatic
2053                         publication is switched on, default value is used for result name.
2054
2055             Returns:
2056                 New GEOM.GEOM_Object, containing the created circle.
2057             """
2058             # Example: see GEOM_TestAll.py
2059             theR, Parameters = ParseParameters(theR)
2060             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2061             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2062             anObj.SetParameters(Parameters)
2063             self._autoPublish(anObj, theName, "circle")
2064             return anObj
2065
2066         ## Create a circle with given radius.
2067         #  Center of the circle will be in the origin of global
2068         #  coordinate system and normal vector will be codirected with Z axis
2069         #  @param theR Circle radius.
2070         #  @param theName Object name; when specified, this parameter is used
2071         #         for result publication in the study. Otherwise, if automatic
2072         #         publication is switched on, default value is used for result name.
2073         #
2074         #  @return New GEOM.GEOM_Object, containing the created circle.
2075         @ManageTransactions("CurvesOp")
2076         def MakeCircleR(self, theR, theName=None):
2077             """
2078             Create a circle with given radius.
2079             Center of the circle will be in the origin of global
2080             coordinate system and normal vector will be codirected with Z axis
2081
2082             Parameters:
2083                 theR Circle radius.
2084                 theName Object name; when specified, this parameter is used
2085                         for result publication in the study. Otherwise, if automatic
2086                         publication is switched on, default value is used for result name.
2087
2088             Returns:
2089                 New GEOM.GEOM_Object, containing the created circle.
2090             """
2091             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2092             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2093             self._autoPublish(anObj, theName, "circle")
2094             return anObj
2095
2096         ## Create a circle, passing through three given points
2097         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2098         #  @param theName Object name; when specified, this parameter is used
2099         #         for result publication in the study. Otherwise, if automatic
2100         #         publication is switched on, default value is used for result name.
2101         #
2102         #  @return New GEOM.GEOM_Object, containing the created circle.
2103         #
2104         #  @ref tui_creation_circle "Example"
2105         @ManageTransactions("CurvesOp")
2106         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2107             """
2108             Create a circle, passing through three given points
2109
2110             Parameters:
2111                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2112                 theName Object name; when specified, this parameter is used
2113                         for result publication in the study. Otherwise, if automatic
2114                         publication is switched on, default value is used for result name.
2115
2116             Returns:
2117                 New GEOM.GEOM_Object, containing the created circle.
2118             """
2119             # Example: see GEOM_TestAll.py
2120             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2121             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2122             self._autoPublish(anObj, theName, "circle")
2123             return anObj
2124
2125         ## Create a circle, with given point1 as center,
2126         #  passing through the point2 as radius and laying in the plane,
2127         #  defined by all three given points.
2128         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2129         #  @param theName Object name; when specified, this parameter is used
2130         #         for result publication in the study. Otherwise, if automatic
2131         #         publication is switched on, default value is used for result name.
2132         #
2133         #  @return New GEOM.GEOM_Object, containing the created circle.
2134         #
2135         #  @ref swig_MakeCircle "Example"
2136         @ManageTransactions("CurvesOp")
2137         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2138             """
2139             Create a circle, with given point1 as center,
2140             passing through the point2 as radius and laying in the plane,
2141             defined by all three given points.
2142
2143             Parameters:
2144                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2145                 theName Object name; when specified, this parameter is used
2146                         for result publication in the study. Otherwise, if automatic
2147                         publication is switched on, default value is used for result name.
2148
2149             Returns:
2150                 New GEOM.GEOM_Object, containing the created circle.
2151             """
2152             # Example: see GEOM_example6.py
2153             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2154             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2155             self._autoPublish(anObj, theName, "circle")
2156             return anObj
2157
2158         ## Create an ellipse with given center, normal vector and radiuses.
2159         #  @param thePnt Ellipse center.
2160         #  @param theVec Vector, normal to the plane of the ellipse.
2161         #  @param theRMajor Major ellipse radius.
2162         #  @param theRMinor Minor ellipse radius.
2163         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2164         #  @param theName Object name; when specified, this parameter is used
2165         #         for result publication in the study. Otherwise, if automatic
2166         #         publication is switched on, default value is used for result name.
2167         #
2168         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2169         #
2170         #  @ref tui_creation_ellipse "Example"
2171         @ManageTransactions("CurvesOp")
2172         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2173             """
2174             Create an ellipse with given center, normal vector and radiuses.
2175
2176             Parameters:
2177                 thePnt Ellipse center.
2178                 theVec Vector, normal to the plane of the ellipse.
2179                 theRMajor Major ellipse radius.
2180                 theRMinor Minor ellipse radius.
2181                 theVecMaj Vector, direction of the ellipse's main axis.
2182                 theName Object name; when specified, this parameter is used
2183                         for result publication in the study. Otherwise, if automatic
2184                         publication is switched on, default value is used for result name.
2185
2186             Returns:
2187                 New GEOM.GEOM_Object, containing the created ellipse.
2188             """
2189             # Example: see GEOM_TestAll.py
2190             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2191             if theVecMaj is not None:
2192                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2193             else:
2194                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2195                 pass
2196             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2197             anObj.SetParameters(Parameters)
2198             self._autoPublish(anObj, theName, "ellipse")
2199             return anObj
2200
2201         ## Create an ellipse with given radiuses.
2202         #  Center of the ellipse will be in the origin of global
2203         #  coordinate system and normal vector will be codirected with Z axis
2204         #  @param theRMajor Major ellipse radius.
2205         #  @param theRMinor Minor ellipse radius.
2206         #  @param theName Object name; when specified, this parameter is used
2207         #         for result publication in the study. Otherwise, if automatic
2208         #         publication is switched on, default value is used for result name.
2209         #
2210         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2211         @ManageTransactions("CurvesOp")
2212         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2213             """
2214             Create an ellipse with given radiuses.
2215             Center of the ellipse will be in the origin of global
2216             coordinate system and normal vector will be codirected with Z axis
2217
2218             Parameters:
2219                 theRMajor Major ellipse radius.
2220                 theRMinor Minor ellipse radius.
2221                 theName Object name; when specified, this parameter is used
2222                         for result publication in the study. Otherwise, if automatic
2223                         publication is switched on, default value is used for result name.
2224
2225             Returns:
2226             New GEOM.GEOM_Object, containing the created ellipse.
2227             """
2228             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2229             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2230             self._autoPublish(anObj, theName, "ellipse")
2231             return anObj
2232
2233         ## Create a polyline on the set of points.
2234         #  @param thePoints Sequence of points for the polyline.
2235         #  @param theIsClosed If True, build a closed wire.
2236         #  @param theName Object name; when specified, this parameter is used
2237         #         for result publication in the study. Otherwise, if automatic
2238         #         publication is switched on, default value is used for result name.
2239         #
2240         #  @return New GEOM.GEOM_Object, containing the created polyline.
2241         #
2242         #  @ref tui_creation_curve "Example"
2243         @ManageTransactions("CurvesOp")
2244         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2245             """
2246             Create a polyline on the set of points.
2247
2248             Parameters:
2249                 thePoints Sequence of points for the polyline.
2250                 theIsClosed If True, build a closed wire.
2251                 theName Object name; when specified, this parameter is used
2252                         for result publication in the study. Otherwise, if automatic
2253                         publication is switched on, default value is used for result name.
2254
2255             Returns:
2256                 New GEOM.GEOM_Object, containing the created polyline.
2257             """
2258             # Example: see GEOM_TestAll.py
2259             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2260             RaiseIfFailed("MakePolyline", self.CurvesOp)
2261             self._autoPublish(anObj, theName, "polyline")
2262             return anObj
2263
2264         ## Create bezier curve on the set of points.
2265         #  @param thePoints Sequence of points for the bezier curve.
2266         #  @param theIsClosed If True, build a closed curve.
2267         #  @param theName Object name; when specified, this parameter is used
2268         #         for result publication in the study. Otherwise, if automatic
2269         #         publication is switched on, default value is used for result name.
2270         #
2271         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2272         #
2273         #  @ref tui_creation_curve "Example"
2274         @ManageTransactions("CurvesOp")
2275         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2276             """
2277             Create bezier curve on the set of points.
2278
2279             Parameters:
2280                 thePoints Sequence of points for the bezier curve.
2281                 theIsClosed If True, build a closed curve.
2282                 theName Object name; when specified, this parameter is used
2283                         for result publication in the study. Otherwise, if automatic
2284                         publication is switched on, default value is used for result name.
2285
2286             Returns:
2287                 New GEOM.GEOM_Object, containing the created bezier curve.
2288             """
2289             # Example: see GEOM_TestAll.py
2290             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2291             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2292             self._autoPublish(anObj, theName, "bezier")
2293             return anObj
2294
2295         ## Create B-Spline curve on the set of points.
2296         #  @param thePoints Sequence of points for the B-Spline curve.
2297         #  @param theIsClosed If True, build a closed curve.
2298         #  @param theDoReordering If TRUE, the algo does not follow the order of
2299         #                         \a thePoints but searches for the closest vertex.
2300         #  @param theName Object name; when specified, this parameter is used
2301         #         for result publication in the study. Otherwise, if automatic
2302         #         publication is switched on, default value is used for result name.
2303         #
2304         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2305         #
2306         #  @ref tui_creation_curve "Example"
2307         @ManageTransactions("CurvesOp")
2308         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2309             """
2310             Create B-Spline curve on the set of points.
2311
2312             Parameters:
2313                 thePoints Sequence of points for the B-Spline curve.
2314                 theIsClosed If True, build a closed curve.
2315                 theDoReordering If True, the algo does not follow the order of
2316                                 thePoints but searches for the closest vertex.
2317                 theName Object name; when specified, this parameter is used
2318                         for result publication in the study. Otherwise, if automatic
2319                         publication is switched on, default value is used for result name.
2320
2321             Returns:
2322                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2323             """
2324             # Example: see GEOM_TestAll.py
2325             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2326             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2327             self._autoPublish(anObj, theName, "bspline")
2328             return anObj
2329
2330         ## Create B-Spline curve on the set of points.
2331         #  @param thePoints Sequence of points for the B-Spline curve.
2332         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2333         #  @param theLastVec Vector object, defining the curve direction at its last point.
2334         #  @param theName Object name; when specified, this parameter is used
2335         #         for result publication in the study. Otherwise, if automatic
2336         #         publication is switched on, default value is used for result name.
2337         #
2338         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2339         #
2340         #  @ref tui_creation_curve "Example"
2341         @ManageTransactions("CurvesOp")
2342         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2343             """
2344             Create B-Spline curve on the set of points.
2345
2346             Parameters:
2347                 thePoints Sequence of points for the B-Spline curve.
2348                 theFirstVec Vector object, defining the curve direction at its first point.
2349                 theLastVec Vector object, defining the curve direction at its last point.
2350                 theName Object name; when specified, this parameter is used
2351                         for result publication in the study. Otherwise, if automatic
2352                         publication is switched on, default value is used for result name.
2353
2354             Returns:
2355                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2356             """
2357             # Example: see GEOM_TestAll.py
2358             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2359             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2360             self._autoPublish(anObj, theName, "bspline")
2361             return anObj
2362
2363         ## Creates a curve using the parametric definition of the basic points.
2364         #  @param thexExpr parametric equation of the coordinates X.
2365         #  @param theyExpr parametric equation of the coordinates Y.
2366         #  @param thezExpr parametric equation of the coordinates Z.
2367         #  @param theParamMin the minimal value of the parameter.
2368         #  @param theParamMax the maximum value of the parameter.
2369         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2370         #  @param theCurveType the type of the curve,
2371         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2372         #  @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.
2373         #  @param theName Object name; when specified, this parameter is used
2374         #         for result publication in the study. Otherwise, if automatic
2375         #         publication is switched on, default value is used for result name.
2376         #
2377         #  @return New GEOM.GEOM_Object, containing the created curve.
2378         #
2379         #  @ref tui_creation_curve "Example"
2380         @ManageTransactions("CurvesOp")
2381         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2382                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2383             """
2384             Creates a curve using the parametric definition of the basic points.
2385
2386             Parameters:
2387                 thexExpr parametric equation of the coordinates X.
2388                 theyExpr parametric equation of the coordinates Y.
2389                 thezExpr parametric equation of the coordinates Z.
2390                 theParamMin the minimal value of the parameter.
2391                 theParamMax the maximum value of the parameter.
2392                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2393                 theCurveType the type of the curve,
2394                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2395                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2396                              method is used which can lead to a bug.
2397                 theName Object name; when specified, this parameter is used
2398                         for result publication in the study. Otherwise, if automatic
2399                         publication is switched on, default value is used for result name.
2400
2401             Returns:
2402                 New GEOM.GEOM_Object, containing the created curve.
2403             """
2404             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2405             if theNewMethod:
2406               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2407             else:
2408               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2409             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2410             anObj.SetParameters(Parameters)
2411             self._autoPublish(anObj, theName, "curve")
2412             return anObj
2413
2414         ## Create an isoline curve on a face.
2415         #  @param theFace the face for which an isoline is created.
2416         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2417         #         creation.
2418         #  @param theParameter the U parameter for U-isoline or V parameter
2419         #         for V-isoline.
2420         #  @param theName Object name; when specified, this parameter is used
2421         #         for result publication in the study. Otherwise, if automatic
2422         #         publication is switched on, default value is used for result name.
2423         #
2424         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2425         #          a compound of edges.
2426         #
2427         #  @ref tui_creation_curve "Example"
2428         @ManageTransactions("CurvesOp")
2429         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2430             """
2431             Create an isoline curve on a face.
2432
2433             Parameters:
2434                 theFace the face for which an isoline is created.
2435                 IsUIsoline True for U-isoline creation; False for V-isoline
2436                            creation.
2437                 theParameter the U parameter for U-isoline or V parameter
2438                              for V-isoline.
2439                 theName Object name; when specified, this parameter is used
2440                         for result publication in the study. Otherwise, if automatic
2441                         publication is switched on, default value is used for result name.
2442
2443             Returns:
2444                 New GEOM.GEOM_Object, containing the created isoline edge or a
2445                 compound of edges.
2446             """
2447             # Example: see GEOM_TestAll.py
2448             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2449             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2450             if IsUIsoline:
2451                 self._autoPublish(anObj, theName, "U-Isoline")
2452             else:
2453                 self._autoPublish(anObj, theName, "V-Isoline")
2454             return anObj
2455
2456         # end of l4_curves
2457         ## @}
2458
2459         ## @addtogroup l3_sketcher
2460         ## @{
2461
2462         ## Create a sketcher (wire or face), following the textual description,
2463         #  passed through <VAR>theCommand</VAR> argument. \n
2464         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2465         #  Format of the description string have to be the following:
2466         #
2467         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2468         #
2469         #  Where:
2470         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2471         #  - CMD is one of
2472         #     - "R angle" : Set the direction by angle
2473         #     - "D dx dy" : Set the direction by DX & DY
2474         #     .
2475         #       \n
2476         #     - "TT x y" : Create segment by point at X & Y
2477         #     - "T dx dy" : Create segment by point with DX & DY
2478         #     - "L length" : Create segment by direction & Length
2479         #     - "IX x" : Create segment by direction & Intersect. X
2480         #     - "IY y" : Create segment by direction & Intersect. Y
2481         #     .
2482         #       \n
2483         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2484         #     - "AA x y": Create arc by point at X & Y
2485         #     - "A dx dy" : Create arc by point with DX & DY
2486         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2487         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2488         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2489         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2490         #     .
2491         #       \n
2492         #     - "WW" : Close Wire (to finish)
2493         #     - "WF" : Close Wire and build face (to finish)
2494         #     .
2495         #        \n
2496         #  - Flag1 (= reverse) is 0 or 2 ...
2497         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2498         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2499         #     .
2500         #        \n
2501         #  - Flag2 (= control tolerance) is 0 or 1 ...
2502         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2503         #     - if 1 the wire is built only if the end point is on the arc
2504         #       with a tolerance of 10^-7 on the distance else the creation fails
2505         #
2506         #  @param theCommand String, defining the sketcher in local
2507         #                    coordinates of the working plane.
2508         #  @param theWorkingPlane Nine double values, defining origin,
2509         #                         OZ and OX directions of the working plane.
2510         #  @param theName Object name; when specified, this parameter is used
2511         #         for result publication in the study. Otherwise, if automatic
2512         #         publication is switched on, default value is used for result name.
2513         #
2514         #  @return New GEOM.GEOM_Object, containing the created wire.
2515         #
2516         #  @ref tui_sketcher_page "Example"
2517         @ManageTransactions("CurvesOp")
2518         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2519             """
2520             Create a sketcher (wire or face), following the textual description, passed
2521             through theCommand argument.
2522             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2523             Format of the description string have to be the following:
2524                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2525             Where:
2526             - x1, y1 are coordinates of the first sketcher point (zero by default),
2527             - CMD is one of
2528                - "R angle" : Set the direction by angle
2529                - "D dx dy" : Set the direction by DX & DY
2530
2531                - "TT x y" : Create segment by point at X & Y
2532                - "T dx dy" : Create segment by point with DX & DY
2533                - "L length" : Create segment by direction & Length
2534                - "IX x" : Create segment by direction & Intersect. X
2535                - "IY y" : Create segment by direction & Intersect. Y
2536
2537                - "C radius length" : Create arc by direction, radius and length(in degree)
2538                - "AA x y": Create arc by point at X & Y
2539                - "A dx dy" : Create arc by point with DX & DY
2540                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2541                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2542                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2543                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2544
2545                - "WW" : Close Wire (to finish)
2546                - "WF" : Close Wire and build face (to finish)
2547
2548             - Flag1 (= reverse) is 0 or 2 ...
2549                - if 0 the drawn arc is the one of lower angle (< Pi)
2550                - if 2 the drawn arc ius the one of greater angle (> Pi)
2551
2552             - Flag2 (= control tolerance) is 0 or 1 ...
2553                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2554                - if 1 the wire is built only if the end point is on the arc
2555                  with a tolerance of 10^-7 on the distance else the creation fails
2556
2557             Parameters:
2558                 theCommand String, defining the sketcher in local
2559                            coordinates of the working plane.
2560                 theWorkingPlane Nine double values, defining origin,
2561                                 OZ and OX directions of the working plane.
2562                 theName Object name; when specified, this parameter is used
2563                         for result publication in the study. Otherwise, if automatic
2564                         publication is switched on, default value is used for result name.
2565
2566             Returns:
2567                 New GEOM.GEOM_Object, containing the created wire.
2568             """
2569             # Example: see GEOM_TestAll.py
2570             theCommand,Parameters = ParseSketcherCommand(theCommand)
2571             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2572             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2573             anObj.SetParameters(Parameters)
2574             self._autoPublish(anObj, theName, "wire")
2575             return anObj
2576
2577         ## Create a sketcher (wire or face), following the textual description,
2578         #  passed through <VAR>theCommand</VAR> argument. \n
2579         #  For format of the description string see MakeSketcher() method.\n
2580         #  @param theCommand String, defining the sketcher in local
2581         #                    coordinates of the working plane.
2582         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2583         #  @param theName Object name; when specified, this parameter is used
2584         #         for result publication in the study. Otherwise, if automatic
2585         #         publication is switched on, default value is used for result name.
2586         #
2587         #  @return New GEOM.GEOM_Object, containing the created wire.
2588         #
2589         #  @ref tui_sketcher_page "Example"
2590         @ManageTransactions("CurvesOp")
2591         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2592             """
2593             Create a sketcher (wire or face), following the textual description,
2594             passed through theCommand argument.
2595             For format of the description string see geompy.MakeSketcher() method.
2596
2597             Parameters:
2598                 theCommand String, defining the sketcher in local
2599                            coordinates of the working plane.
2600                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2601                 theName Object name; when specified, this parameter is used
2602                         for result publication in the study. Otherwise, if automatic
2603                         publication is switched on, default value is used for result name.
2604
2605             Returns:
2606                 New GEOM.GEOM_Object, containing the created wire.
2607             """
2608             theCommand,Parameters = ParseSketcherCommand(theCommand)
2609             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2610             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2611             anObj.SetParameters(Parameters)
2612             self._autoPublish(anObj, theName, "wire")
2613             return anObj
2614
2615         ## Obtain a 2D sketcher interface
2616         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2617         def Sketcher2D (self):
2618             """
2619             Obtain a 2D sketcher interface.
2620
2621             Example of usage:
2622                sk = geompy.Sketcher2D()
2623                sk.addPoint(20, 20)
2624                sk.addSegmentRelative(15, 70)
2625                sk.addSegmentPerpY(50)
2626                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2627                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2628                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2629                sk.close()
2630                Sketch_1 = sk.wire(geomObj_1)
2631             """
2632             sk = Sketcher2D (self)
2633             return sk
2634
2635         ## Create a sketcher wire, following the numerical description,
2636         #  passed through <VAR>theCoordinates</VAR> argument. \n
2637         #  @param theCoordinates double values, defining points to create a wire,
2638         #                                                      passing from it.
2639         #  @param theName Object name; when specified, this parameter is used
2640         #         for result publication in the study. Otherwise, if automatic
2641         #         publication is switched on, default value is used for result name.
2642         #
2643         #  @return New GEOM.GEOM_Object, containing the created wire.
2644         #
2645         #  @ref tui_3dsketcher_page "Example"
2646         @ManageTransactions("CurvesOp")
2647         def Make3DSketcher(self, theCoordinates, theName=None):
2648             """
2649             Create a sketcher wire, following the numerical description,
2650             passed through theCoordinates argument.
2651
2652             Parameters:
2653                 theCoordinates double values, defining points to create a wire,
2654                                passing from it.
2655                 theName Object name; when specified, this parameter is used
2656                         for result publication in the study. Otherwise, if automatic
2657                         publication is switched on, default value is used for result name.
2658
2659             Returns:
2660                 New GEOM_Object, containing the created wire.
2661             """
2662             theCoordinates,Parameters = ParseParameters(theCoordinates)
2663             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2664             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2665             anObj.SetParameters(Parameters)
2666             self._autoPublish(anObj, theName, "wire")
2667             return anObj
2668
2669         ## Obtain a 3D sketcher interface
2670         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2671         #
2672         #  @ref tui_3dsketcher_page "Example"
2673         def Sketcher3D (self):
2674             """
2675             Obtain a 3D sketcher interface.
2676
2677             Example of usage:
2678                 sk = geompy.Sketcher3D()
2679                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2680                 sk.addPointsRelative(0, 0, 130)
2681                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2682                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2683                 sk.close()
2684                 a3D_Sketcher_1 = sk.wire()
2685             """
2686             sk = Sketcher3D (self)
2687             return sk
2688
2689         # end of l3_sketcher
2690         ## @}
2691
2692         ## @addtogroup l3_3d_primitives
2693         ## @{
2694
2695         ## Create a box by coordinates of two opposite vertices.
2696         #
2697         #  @param x1,y1,z1 double values, defining first point it.
2698         #  @param x2,y2,z2 double values, defining first point it.
2699         #  @param theName Object name; when specified, this parameter is used
2700         #         for result publication in the study. Otherwise, if automatic
2701         #         publication is switched on, default value is used for result name.
2702         #
2703         #  @return New GEOM.GEOM_Object, containing the created box.
2704         #
2705         #  @ref tui_creation_box "Example"
2706         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2707             """
2708             Create a box by coordinates of two opposite vertices.
2709
2710             Parameters:
2711                 x1,y1,z1 double values, defining first point.
2712                 x2,y2,z2 double values, defining second point.
2713                 theName Object name; when specified, this parameter is used
2714                         for result publication in the study. Otherwise, if automatic
2715                         publication is switched on, default value is used for result name.
2716
2717             Returns:
2718                 New GEOM.GEOM_Object, containing the created box.
2719             """
2720             # Example: see GEOM_TestAll.py
2721             pnt1 = self.MakeVertex(x1,y1,z1)
2722             pnt2 = self.MakeVertex(x2,y2,z2)
2723             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2724             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2725
2726         ## Create a box with specified dimensions along the coordinate axes
2727         #  and with edges, parallel to the coordinate axes.
2728         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2729         #  @param theDX Length of Box edges, parallel to OX axis.
2730         #  @param theDY Length of Box edges, parallel to OY axis.
2731         #  @param theDZ Length of Box edges, parallel to OZ axis.
2732         #  @param theName Object name; when specified, this parameter is used
2733         #         for result publication in the study. Otherwise, if automatic
2734         #         publication is switched on, default value is used for result name.
2735         #
2736         #  @return New GEOM.GEOM_Object, containing the created box.
2737         #
2738         #  @ref tui_creation_box "Example"
2739         @ManageTransactions("PrimOp")
2740         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2741             """
2742             Create a box with specified dimensions along the coordinate axes
2743             and with edges, parallel to the coordinate axes.
2744             Center of the box will be at point (DX/2, DY/2, DZ/2).
2745
2746             Parameters:
2747                 theDX Length of Box edges, parallel to OX axis.
2748                 theDY Length of Box edges, parallel to OY axis.
2749                 theDZ Length of Box edges, parallel to OZ axis.
2750                 theName Object name; when specified, this parameter is used
2751                         for result publication in the study. Otherwise, if automatic
2752                         publication is switched on, default value is used for result name.
2753
2754             Returns:
2755                 New GEOM.GEOM_Object, containing the created box.
2756             """
2757             # Example: see GEOM_TestAll.py
2758             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2759             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2760             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2761             anObj.SetParameters(Parameters)
2762             self._autoPublish(anObj, theName, "box")
2763             return anObj
2764
2765         ## Create a box with two specified opposite vertices,
2766         #  and with edges, parallel to the coordinate axes
2767         #  @param thePnt1 First of two opposite vertices.
2768         #  @param thePnt2 Second of two opposite vertices.
2769         #  @param theName Object name; when specified, this parameter is used
2770         #         for result publication in the study. Otherwise, if automatic
2771         #         publication is switched on, default value is used for result name.
2772         #
2773         #  @return New GEOM.GEOM_Object, containing the created box.
2774         #
2775         #  @ref tui_creation_box "Example"
2776         @ManageTransactions("PrimOp")
2777         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2778             """
2779             Create a box with two specified opposite vertices,
2780             and with edges, parallel to the coordinate axes
2781
2782             Parameters:
2783                 thePnt1 First of two opposite vertices.
2784                 thePnt2 Second of two opposite vertices.
2785                 theName Object name; when specified, this parameter is used
2786                         for result publication in the study. Otherwise, if automatic
2787                         publication is switched on, default value is used for result name.
2788
2789             Returns:
2790                 New GEOM.GEOM_Object, containing the created box.
2791             """
2792             # Example: see GEOM_TestAll.py
2793             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2794             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2795             self._autoPublish(anObj, theName, "box")
2796             return anObj
2797
2798         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2799         #  @param theH height of Face.
2800         #  @param theW width of Face.
2801         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2802         #  @param theName Object name; when specified, this parameter is used
2803         #         for result publication in the study. Otherwise, if automatic
2804         #         publication is switched on, default value is used for result name.
2805         #
2806         #  @return New GEOM.GEOM_Object, containing the created face.
2807         #
2808         #  @ref tui_creation_face "Example"
2809         @ManageTransactions("PrimOp")
2810         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2811             """
2812             Create a face with specified dimensions with edges parallel to coordinate axes.
2813
2814             Parameters:
2815                 theH height of Face.
2816                 theW width of Face.
2817                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2818                 theName Object name; when specified, this parameter is used
2819                         for result publication in the study. Otherwise, if automatic
2820                         publication is switched on, default value is used for result name.
2821
2822             Returns:
2823                 New GEOM.GEOM_Object, containing the created face.
2824             """
2825             # Example: see GEOM_TestAll.py
2826             theH,theW,Parameters = ParseParameters(theH, theW)
2827             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2828             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2829             anObj.SetParameters(Parameters)
2830             self._autoPublish(anObj, theName, "rectangle")
2831             return anObj
2832
2833         ## Create a face from another plane and two sizes,
2834         #  vertical size and horisontal size.
2835         #  @param theObj   Normale vector to the creating face or
2836         #  the face object.
2837         #  @param theH     Height (vertical size).
2838         #  @param theW     Width (horisontal size).
2839         #  @param theName Object name; when specified, this parameter is used
2840         #         for result publication in the study. Otherwise, if automatic
2841         #         publication is switched on, default value is used for result name.
2842         #
2843         #  @return New GEOM.GEOM_Object, containing the created face.
2844         #
2845         #  @ref tui_creation_face "Example"
2846         @ManageTransactions("PrimOp")
2847         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2848             """
2849             Create a face from another plane and two sizes,
2850             vertical size and horisontal size.
2851
2852             Parameters:
2853                 theObj   Normale vector to the creating face or
2854                          the face object.
2855                 theH     Height (vertical size).
2856                 theW     Width (horisontal size).
2857                 theName Object name; when specified, this parameter is used
2858                         for result publication in the study. Otherwise, if automatic
2859                         publication is switched on, default value is used for result name.
2860
2861             Returns:
2862                 New GEOM_Object, containing the created face.
2863             """
2864             # Example: see GEOM_TestAll.py
2865             theH,theW,Parameters = ParseParameters(theH, theW)
2866             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2867             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2868             anObj.SetParameters(Parameters)
2869             self._autoPublish(anObj, theName, "rectangle")
2870             return anObj
2871
2872         ## Create a disk with given center, normal vector and radius.
2873         #  @param thePnt Disk center.
2874         #  @param theVec Vector, normal to the plane of the disk.
2875         #  @param theR Disk radius.
2876         #  @param theName Object name; when specified, this parameter is used
2877         #         for result publication in the study. Otherwise, if automatic
2878         #         publication is switched on, default value is used for result name.
2879         #
2880         #  @return New GEOM.GEOM_Object, containing the created disk.
2881         #
2882         #  @ref tui_creation_disk "Example"
2883         @ManageTransactions("PrimOp")
2884         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2885             """
2886             Create a disk with given center, normal vector and radius.
2887
2888             Parameters:
2889                 thePnt Disk center.
2890                 theVec Vector, normal to the plane of the disk.
2891                 theR Disk radius.
2892                 theName Object name; when specified, this parameter is used
2893                         for result publication in the study. Otherwise, if automatic
2894                         publication is switched on, default value is used for result name.
2895
2896             Returns:
2897                 New GEOM.GEOM_Object, containing the created disk.
2898             """
2899             # Example: see GEOM_TestAll.py
2900             theR,Parameters = ParseParameters(theR)
2901             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2902             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2903             anObj.SetParameters(Parameters)
2904             self._autoPublish(anObj, theName, "disk")
2905             return anObj
2906
2907         ## Create a disk, passing through three given points
2908         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2909         #  @param theName Object name; when specified, this parameter is used
2910         #         for result publication in the study. Otherwise, if automatic
2911         #         publication is switched on, default value is used for result name.
2912         #
2913         #  @return New GEOM.GEOM_Object, containing the created disk.
2914         #
2915         #  @ref tui_creation_disk "Example"
2916         @ManageTransactions("PrimOp")
2917         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2918             """
2919             Create a disk, passing through three given points
2920
2921             Parameters:
2922                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2923                 theName Object name; when specified, this parameter is used
2924                         for result publication in the study. Otherwise, if automatic
2925                         publication is switched on, default value is used for result name.
2926
2927             Returns:
2928                 New GEOM.GEOM_Object, containing the created disk.
2929             """
2930             # Example: see GEOM_TestAll.py
2931             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2932             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2933             self._autoPublish(anObj, theName, "disk")
2934             return anObj
2935
2936         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2937         #  @param theR Radius of Face.
2938         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2939         #  @param theName Object name; when specified, this parameter is used
2940         #         for result publication in the study. Otherwise, if automatic
2941         #         publication is switched on, default value is used for result name.
2942         #
2943         #  @return New GEOM.GEOM_Object, containing the created disk.
2944         #
2945         #  @ref tui_creation_face "Example"
2946         @ManageTransactions("PrimOp")
2947         def MakeDiskR(self, theR, theOrientation, theName=None):
2948             """
2949             Create a disk with specified dimensions along OX-OY coordinate axes.
2950
2951             Parameters:
2952                 theR Radius of Face.
2953                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2954                 theName Object name; when specified, this parameter is used
2955                         for result publication in the study. Otherwise, if automatic
2956                         publication is switched on, default value is used for result name.
2957
2958             Returns:
2959                 New GEOM.GEOM_Object, containing the created disk.
2960
2961             Example of usage:
2962                 Disk3 = geompy.MakeDiskR(100., 1)
2963             """
2964             # Example: see GEOM_TestAll.py
2965             theR,Parameters = ParseParameters(theR)
2966             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2967             RaiseIfFailed("MakeDiskR", self.PrimOp)
2968             anObj.SetParameters(Parameters)
2969             self._autoPublish(anObj, theName, "disk")
2970             return anObj
2971
2972         ## Create a cylinder with given base point, axis, radius and height.
2973         #  @param thePnt Central point of cylinder base.
2974         #  @param theAxis Cylinder axis.
2975         #  @param theR Cylinder radius.
2976         #  @param theH Cylinder height.
2977         #  @param theName Object name; when specified, this parameter is used
2978         #         for result publication in the study. Otherwise, if automatic
2979         #         publication is switched on, default value is used for result name.
2980         #
2981         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2982         #
2983         #  @ref tui_creation_cylinder "Example"
2984         @ManageTransactions("PrimOp")
2985         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2986             """
2987             Create a cylinder with given base point, axis, radius and height.
2988
2989             Parameters:
2990                 thePnt Central point of cylinder base.
2991                 theAxis Cylinder axis.
2992                 theR Cylinder radius.
2993                 theH Cylinder height.
2994                 theName Object name; when specified, this parameter is used
2995                         for result publication in the study. Otherwise, if automatic
2996                         publication is switched on, default value is used for result name.
2997
2998             Returns:
2999                 New GEOM.GEOM_Object, containing the created cylinder.
3000             """
3001             # Example: see GEOM_TestAll.py
3002             theR,theH,Parameters = ParseParameters(theR, theH)
3003             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3004             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3005             anObj.SetParameters(Parameters)
3006             self._autoPublish(anObj, theName, "cylinder")
3007             return anObj
3008
3009         ## Create a cylinder with given radius and height at
3010         #  the origin of coordinate system. Axis of the cylinder
3011         #  will be collinear to the OZ axis of the coordinate system.
3012         #  @param theR Cylinder radius.
3013         #  @param theH Cylinder height.
3014         #  @param theName Object name; when specified, this parameter is used
3015         #         for result publication in the study. Otherwise, if automatic
3016         #         publication is switched on, default value is used for result name.
3017         #
3018         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3019         #
3020         #  @ref tui_creation_cylinder "Example"
3021         @ManageTransactions("PrimOp")
3022         def MakeCylinderRH(self, theR, theH, theName=None):
3023             """
3024             Create a cylinder with given radius and height at
3025             the origin of coordinate system. Axis of the cylinder
3026             will be collinear to the OZ axis of the coordinate system.
3027
3028             Parameters:
3029                 theR Cylinder radius.
3030                 theH Cylinder height.
3031                 theName Object name; when specified, this parameter is used
3032                         for result publication in the study. Otherwise, if automatic
3033                         publication is switched on, default value is used for result name.
3034
3035             Returns:
3036                 New GEOM.GEOM_Object, containing the created cylinder.
3037             """
3038             # Example: see GEOM_TestAll.py
3039             theR,theH,Parameters = ParseParameters(theR, theH)
3040             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3041             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3042             anObj.SetParameters(Parameters)
3043             self._autoPublish(anObj, theName, "cylinder")
3044             return anObj
3045
3046         ## Create a sphere with given center and radius.
3047         #  @param thePnt Sphere center.
3048         #  @param theR Sphere radius.
3049         #  @param theName Object name; when specified, this parameter is used
3050         #         for result publication in the study. Otherwise, if automatic
3051         #         publication is switched on, default value is used for result name.
3052         #
3053         #  @return New GEOM.GEOM_Object, containing the created sphere.
3054         #
3055         #  @ref tui_creation_sphere "Example"
3056         @ManageTransactions("PrimOp")
3057         def MakeSpherePntR(self, thePnt, theR, theName=None):
3058             """
3059             Create a sphere with given center and radius.
3060
3061             Parameters:
3062                 thePnt Sphere center.
3063                 theR Sphere radius.
3064                 theName Object name; when specified, this parameter is used
3065                         for result publication in the study. Otherwise, if automatic
3066                         publication is switched on, default value is used for result name.
3067
3068             Returns:
3069                 New GEOM.GEOM_Object, containing the created sphere.
3070             """
3071             # Example: see GEOM_TestAll.py
3072             theR,Parameters = ParseParameters(theR)
3073             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3074             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3075             anObj.SetParameters(Parameters)
3076             self._autoPublish(anObj, theName, "sphere")
3077             return anObj
3078
3079         ## Create a sphere with given center and radius.
3080         #  @param x,y,z Coordinates of sphere center.
3081         #  @param theR Sphere radius.
3082         #  @param theName Object name; when specified, this parameter is used
3083         #         for result publication in the study. Otherwise, if automatic
3084         #         publication is switched on, default value is used for result name.
3085         #
3086         #  @return New GEOM.GEOM_Object, containing the created sphere.
3087         #
3088         #  @ref tui_creation_sphere "Example"
3089         def MakeSphere(self, x, y, z, theR, theName=None):
3090             """
3091             Create a sphere with given center and radius.
3092
3093             Parameters:
3094                 x,y,z Coordinates of sphere center.
3095                 theR Sphere radius.
3096                 theName Object name; when specified, this parameter is used
3097                         for result publication in the study. Otherwise, if automatic
3098                         publication is switched on, default value is used for result name.
3099
3100             Returns:
3101                 New GEOM.GEOM_Object, containing the created sphere.
3102             """
3103             # Example: see GEOM_TestAll.py
3104             point = self.MakeVertex(x, y, z)
3105             # note: auto-publishing is done in self.MakeSpherePntR()
3106             anObj = self.MakeSpherePntR(point, theR, theName)
3107             return anObj
3108
3109         ## Create a sphere with given radius at the origin of coordinate system.
3110         #  @param theR Sphere radius.
3111         #  @param theName Object name; when specified, this parameter is used
3112         #         for result publication in the study. Otherwise, if automatic
3113         #         publication is switched on, default value is used for result name.
3114         #
3115         #  @return New GEOM.GEOM_Object, containing the created sphere.
3116         #
3117         #  @ref tui_creation_sphere "Example"
3118         @ManageTransactions("PrimOp")
3119         def MakeSphereR(self, theR, theName=None):
3120             """
3121             Create a sphere with given radius at the origin of coordinate system.
3122
3123             Parameters:
3124                 theR Sphere radius.
3125                 theName Object name; when specified, this parameter is used
3126                         for result publication in the study. Otherwise, if automatic
3127                         publication is switched on, default value is used for result name.
3128
3129             Returns:
3130                 New GEOM.GEOM_Object, containing the created sphere.
3131             """
3132             # Example: see GEOM_TestAll.py
3133             theR,Parameters = ParseParameters(theR)
3134             anObj = self.PrimOp.MakeSphereR(theR)
3135             RaiseIfFailed("MakeSphereR", self.PrimOp)
3136             anObj.SetParameters(Parameters)
3137             self._autoPublish(anObj, theName, "sphere")
3138             return anObj
3139
3140         ## Create a cone with given base point, axis, height and radiuses.
3141         #  @param thePnt Central point of the first cone base.
3142         #  @param theAxis Cone axis.
3143         #  @param theR1 Radius of the first cone base.
3144         #  @param theR2 Radius of the second cone base.
3145         #    \note If both radiuses are non-zero, the cone will be truncated.
3146         #    \note If the radiuses are equal, a cylinder will be created instead.
3147         #  @param theH Cone height.
3148         #  @param theName Object name; when specified, this parameter is used
3149         #         for result publication in the study. Otherwise, if automatic
3150         #         publication is switched on, default value is used for result name.
3151         #
3152         #  @return New GEOM.GEOM_Object, containing the created cone.
3153         #
3154         #  @ref tui_creation_cone "Example"
3155         @ManageTransactions("PrimOp")
3156         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3157             """
3158             Create a cone with given base point, axis, height and radiuses.
3159
3160             Parameters:
3161                 thePnt Central point of the first cone base.
3162                 theAxis Cone axis.
3163                 theR1 Radius of the first cone base.
3164                 theR2 Radius of the second cone base.
3165                 theH Cone height.
3166                 theName Object name; when specified, this parameter is used
3167                         for result publication in the study. Otherwise, if automatic
3168                         publication is switched on, default value is used for result name.
3169
3170             Note:
3171                 If both radiuses are non-zero, the cone will be truncated.
3172                 If the radiuses are equal, a cylinder will be created instead.
3173
3174             Returns:
3175                 New GEOM.GEOM_Object, containing the created cone.
3176             """
3177             # Example: see GEOM_TestAll.py
3178             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3179             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3180             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3181             anObj.SetParameters(Parameters)
3182             self._autoPublish(anObj, theName, "cone")
3183             return anObj
3184
3185         ## Create a cone with given height and radiuses at
3186         #  the origin of coordinate system. Axis of the cone will
3187         #  be collinear to the OZ axis of the coordinate system.
3188         #  @param theR1 Radius of the first cone base.
3189         #  @param theR2 Radius of the second cone base.
3190         #    \note If both radiuses are non-zero, the cone will be truncated.
3191         #    \note If the radiuses are equal, a cylinder will be created instead.
3192         #  @param theH Cone height.
3193         #  @param theName Object name; when specified, this parameter is used
3194         #         for result publication in the study. Otherwise, if automatic
3195         #         publication is switched on, default value is used for result name.
3196         #
3197         #  @return New GEOM.GEOM_Object, containing the created cone.
3198         #
3199         #  @ref tui_creation_cone "Example"
3200         @ManageTransactions("PrimOp")
3201         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3202             """
3203             Create a cone with given height and radiuses at
3204             the origin of coordinate system. Axis of the cone will
3205             be collinear to the OZ axis of the coordinate system.
3206
3207             Parameters:
3208                 theR1 Radius of the first cone base.
3209                 theR2 Radius of the second cone base.
3210                 theH Cone height.
3211                 theName Object name; when specified, this parameter is used
3212                         for result publication in the study. Otherwise, if automatic
3213                         publication is switched on, default value is used for result name.
3214
3215             Note:
3216                 If both radiuses are non-zero, the cone will be truncated.
3217                 If the radiuses are equal, a cylinder will be created instead.
3218
3219             Returns:
3220                 New GEOM.GEOM_Object, containing the created cone.
3221             """
3222             # Example: see GEOM_TestAll.py
3223             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3224             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3225             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3226             anObj.SetParameters(Parameters)
3227             self._autoPublish(anObj, theName, "cone")
3228             return anObj
3229
3230         ## Create a torus with given center, normal vector and radiuses.
3231         #  @param thePnt Torus central point.
3232         #  @param theVec Torus axis of symmetry.
3233         #  @param theRMajor Torus major radius.
3234         #  @param theRMinor Torus minor radius.
3235         #  @param theName Object name; when specified, this parameter is used
3236         #         for result publication in the study. Otherwise, if automatic
3237         #         publication is switched on, default value is used for result name.
3238         #
3239         #  @return New GEOM.GEOM_Object, containing the created torus.
3240         #
3241         #  @ref tui_creation_torus "Example"
3242         @ManageTransactions("PrimOp")
3243         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3244             """
3245             Create a torus with given center, normal vector and radiuses.
3246
3247             Parameters:
3248                 thePnt Torus central point.
3249                 theVec Torus axis of symmetry.
3250                 theRMajor Torus major radius.
3251                 theRMinor Torus minor radius.
3252                 theName Object name; when specified, this parameter is used
3253                         for result publication in the study. Otherwise, if automatic
3254                         publication is switched on, default value is used for result name.
3255
3256            Returns:
3257                 New GEOM.GEOM_Object, containing the created torus.
3258             """
3259             # Example: see GEOM_TestAll.py
3260             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3261             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3262             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3263             anObj.SetParameters(Parameters)
3264             self._autoPublish(anObj, theName, "torus")
3265             return anObj
3266
3267         ## Create a torus with given radiuses at the origin of coordinate system.
3268         #  @param theRMajor Torus major radius.
3269         #  @param theRMinor Torus minor radius.
3270         #  @param theName Object name; when specified, this parameter is used
3271         #         for result publication in the study. Otherwise, if automatic
3272         #         publication is switched on, default value is used for result name.
3273         #
3274         #  @return New GEOM.GEOM_Object, containing the created torus.
3275         #
3276         #  @ref tui_creation_torus "Example"
3277         @ManageTransactions("PrimOp")
3278         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3279             """
3280            Create a torus with given radiuses at the origin of coordinate system.
3281
3282            Parameters:
3283                 theRMajor Torus major radius.
3284                 theRMinor Torus minor radius.
3285                 theName Object name; when specified, this parameter is used
3286                         for result publication in the study. Otherwise, if automatic
3287                         publication is switched on, default value is used for result name.
3288
3289            Returns:
3290                 New GEOM.GEOM_Object, containing the created torus.
3291             """
3292             # Example: see GEOM_TestAll.py
3293             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3294             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3295             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3296             anObj.SetParameters(Parameters)
3297             self._autoPublish(anObj, theName, "torus")
3298             return anObj
3299
3300         # end of l3_3d_primitives
3301         ## @}
3302
3303         ## @addtogroup l3_complex
3304         ## @{
3305
3306         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3307         #  @param theBase Base shape to be extruded.
3308         #  @param thePoint1 First end of extrusion vector.
3309         #  @param thePoint2 Second end of extrusion vector.
3310         #  @param theScaleFactor Use it to make prism with scaled second base.
3311         #                        Nagative value means not scaled second base.
3312         #  @param theName Object name; when specified, this parameter is used
3313         #         for result publication in the study. Otherwise, if automatic
3314         #         publication is switched on, default value is used for result name.
3315         #
3316         #  @return New GEOM.GEOM_Object, containing the created prism.
3317         #
3318         #  @ref tui_creation_prism "Example"
3319         @ManageTransactions("PrimOp")
3320         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3321             """
3322             Create a shape by extrusion of the base shape along a vector, defined by two points.
3323
3324             Parameters:
3325                 theBase Base shape to be extruded.
3326                 thePoint1 First end of extrusion vector.
3327                 thePoint2 Second end of extrusion vector.
3328                 theScaleFactor Use it to make prism with scaled second base.
3329                                Nagative value means not scaled second base.
3330                 theName Object name; when specified, this parameter is used
3331                         for result publication in the study. Otherwise, if automatic
3332                         publication is switched on, default value is used for result name.
3333
3334             Returns:
3335                 New GEOM.GEOM_Object, containing the created prism.
3336             """
3337             # Example: see GEOM_TestAll.py
3338             anObj = None
3339             Parameters = ""
3340             if theScaleFactor > 0:
3341                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3342                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3343             else:
3344                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3345             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3346             anObj.SetParameters(Parameters)
3347             self._autoPublish(anObj, theName, "prism")
3348             return anObj
3349
3350         ## Create a shape by extrusion of the base shape along a
3351         #  vector, defined by two points, in 2 Ways (forward/backward).
3352         #  @param theBase Base shape to be extruded.
3353         #  @param thePoint1 First end of extrusion vector.
3354         #  @param thePoint2 Second end of extrusion vector.
3355         #  @param theName Object name; when specified, this parameter is used
3356         #         for result publication in the study. Otherwise, if automatic
3357         #         publication is switched on, default value is used for result name.
3358         #
3359         #  @return New GEOM.GEOM_Object, containing the created prism.
3360         #
3361         #  @ref tui_creation_prism "Example"
3362         @ManageTransactions("PrimOp")
3363         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3364             """
3365             Create a shape by extrusion of the base shape along a
3366             vector, defined by two points, in 2 Ways (forward/backward).
3367
3368             Parameters:
3369                 theBase Base shape to be extruded.
3370                 thePoint1 First end of extrusion vector.
3371                 thePoint2 Second end of extrusion vector.
3372                 theName Object name; when specified, this parameter is used
3373                         for result publication in the study. Otherwise, if automatic
3374                         publication is switched on, default value is used for result name.
3375
3376             Returns:
3377                 New GEOM.GEOM_Object, containing the created prism.
3378             """
3379             # Example: see GEOM_TestAll.py
3380             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3381             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3382             self._autoPublish(anObj, theName, "prism")
3383             return anObj
3384
3385         ## Create a shape by extrusion of the base shape along the vector,
3386         #  i.e. all the space, transfixed by the base shape during its translation
3387         #  along the vector on the given distance.
3388         #  @param theBase Base shape to be extruded.
3389         #  @param theVec Direction of extrusion.
3390         #  @param theH Prism dimension along theVec.
3391         #  @param theScaleFactor Use it to make prism with scaled second base.
3392         #                        Negative value means not scaled second base.
3393         #  @param theName Object name; when specified, this parameter is used
3394         #         for result publication in the study. Otherwise, if automatic
3395         #         publication is switched on, default value is used for result name.
3396         #
3397         #  @return New GEOM.GEOM_Object, containing the created prism.
3398         #
3399         #  @ref tui_creation_prism "Example"
3400         @ManageTransactions("PrimOp")
3401         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3402             """
3403             Create a shape by extrusion of the base shape along the vector,
3404             i.e. all the space, transfixed by the base shape during its translation
3405             along the vector on the given distance.
3406
3407             Parameters:
3408                 theBase Base shape to be extruded.
3409                 theVec Direction of extrusion.
3410                 theH Prism dimension along theVec.
3411                 theScaleFactor Use it to make prism with scaled second base.
3412                                Negative value means not scaled second base.
3413                 theName Object name; when specified, this parameter is used
3414                         for result publication in the study. Otherwise, if automatic
3415                         publication is switched on, default value is used for result name.
3416
3417             Returns:
3418                 New GEOM.GEOM_Object, containing the created prism.
3419             """
3420             # Example: see GEOM_TestAll.py
3421             anObj = None
3422             Parameters = ""
3423             if theScaleFactor > 0:
3424                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3425                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3426             else:
3427                 theH,Parameters = ParseParameters(theH)
3428                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3429             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3430             anObj.SetParameters(Parameters)
3431             self._autoPublish(anObj, theName, "prism")
3432             return anObj
3433
3434         ## Create a shape by extrusion of the base shape along the vector,
3435         #  i.e. all the space, transfixed by the base shape during its translation
3436         #  along the vector on the given distance in 2 Ways (forward/backward).
3437         #  @param theBase Base shape to be extruded.
3438         #  @param theVec Direction of extrusion.
3439         #  @param theH Prism dimension along theVec in forward direction.
3440         #  @param theName Object name; when specified, this parameter is used
3441         #         for result publication in the study. Otherwise, if automatic
3442         #         publication is switched on, default value is used for result name.
3443         #
3444         #  @return New GEOM.GEOM_Object, containing the created prism.
3445         #
3446         #  @ref tui_creation_prism "Example"
3447         @ManageTransactions("PrimOp")
3448         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3449             """
3450             Create a shape by extrusion of the base shape along the vector,
3451             i.e. all the space, transfixed by the base shape during its translation
3452             along the vector on the given distance in 2 Ways (forward/backward).
3453
3454             Parameters:
3455                 theBase Base shape to be extruded.
3456                 theVec Direction of extrusion.
3457                 theH Prism dimension along theVec in forward direction.
3458                 theName Object name; when specified, this parameter is used
3459                         for result publication in the study. Otherwise, if automatic
3460                         publication is switched on, default value is used for result name.
3461
3462             Returns:
3463                 New GEOM.GEOM_Object, containing the created prism.
3464             """
3465             # Example: see GEOM_TestAll.py
3466             theH,Parameters = ParseParameters(theH)
3467             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3468             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3469             anObj.SetParameters(Parameters)
3470             self._autoPublish(anObj, theName, "prism")
3471             return anObj
3472
3473         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3474         #  @param theBase Base shape to be extruded.
3475         #  @param theDX, theDY, theDZ Directions of extrusion.
3476         #  @param theScaleFactor Use it to make prism with scaled second base.
3477         #                        Nagative value means not scaled second base.
3478         #  @param theName Object name; when specified, this parameter is used
3479         #         for result publication in the study. Otherwise, if automatic
3480         #         publication is switched on, default value is used for result name.
3481         #
3482         #  @return New GEOM.GEOM_Object, containing the created prism.
3483         #
3484         #  @ref tui_creation_prism "Example"
3485         @ManageTransactions("PrimOp")
3486         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3487             """
3488             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3489
3490             Parameters:
3491                 theBase Base shape to be extruded.
3492                 theDX, theDY, theDZ Directions of extrusion.
3493                 theScaleFactor Use it to make prism with scaled second base.
3494                                Nagative value means not scaled second base.
3495                 theName Object name; when specified, this parameter is used
3496                         for result publication in the study. Otherwise, if automatic
3497                         publication is switched on, default value is used for result name.
3498
3499             Returns:
3500                 New GEOM.GEOM_Object, containing the created prism.
3501             """
3502             # Example: see GEOM_TestAll.py
3503             anObj = None
3504             Parameters = ""
3505             if theScaleFactor > 0:
3506                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3507                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3508             else:
3509                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3510                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3511             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3512             anObj.SetParameters(Parameters)
3513             self._autoPublish(anObj, theName, "prism")
3514             return anObj
3515
3516         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3517         #  i.e. all the space, transfixed by the base shape during its translation
3518         #  along the vector on the given distance in 2 Ways (forward/backward).
3519         #  @param theBase Base shape to be extruded.
3520         #  @param theDX, theDY, theDZ Directions of extrusion.
3521         #  @param theName Object name; when specified, this parameter is used
3522         #         for result publication in the study. Otherwise, if automatic
3523         #         publication is switched on, default value is used for result name.
3524         #
3525         #  @return New GEOM.GEOM_Object, containing the created prism.
3526         #
3527         #  @ref tui_creation_prism "Example"
3528         @ManageTransactions("PrimOp")
3529         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3530             """
3531             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3532             i.e. all the space, transfixed by the base shape during its translation
3533             along the vector on the given distance in 2 Ways (forward/backward).
3534
3535             Parameters:
3536                 theBase Base shape to be extruded.
3537                 theDX, theDY, theDZ Directions of extrusion.
3538                 theName Object name; when specified, this parameter is used
3539                         for result publication in the study. Otherwise, if automatic
3540                         publication is switched on, default value is used for result name.
3541
3542             Returns:
3543                 New GEOM.GEOM_Object, containing the created prism.
3544             """
3545             # Example: see GEOM_TestAll.py
3546             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3547             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3548             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3549             anObj.SetParameters(Parameters)
3550             self._autoPublish(anObj, theName, "prism")
3551             return anObj
3552
3553         ## Create a shape by revolution of the base shape around the axis
3554         #  on the given angle, i.e. all the space, transfixed by the base
3555         #  shape during its rotation around the axis on the given angle.
3556         #  @param theBase Base shape to be rotated.
3557         #  @param theAxis Rotation axis.
3558         #  @param theAngle Rotation angle in radians.
3559         #  @param theName Object name; when specified, this parameter is used
3560         #         for result publication in the study. Otherwise, if automatic
3561         #         publication is switched on, default value is used for result name.
3562         #
3563         #  @return New GEOM.GEOM_Object, containing the created revolution.
3564         #
3565         #  @ref tui_creation_revolution "Example"
3566         @ManageTransactions("PrimOp")
3567         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3568             """
3569             Create a shape by revolution of the base shape around the axis
3570             on the given angle, i.e. all the space, transfixed by the base
3571             shape during its rotation around the axis on the given angle.
3572
3573             Parameters:
3574                 theBase Base shape to be rotated.
3575                 theAxis Rotation axis.
3576                 theAngle Rotation angle in radians.
3577                 theName Object name; when specified, this parameter is used
3578                         for result publication in the study. Otherwise, if automatic
3579                         publication is switched on, default value is used for result name.
3580
3581             Returns:
3582                 New GEOM.GEOM_Object, containing the created revolution.
3583             """
3584             # Example: see GEOM_TestAll.py
3585             theAngle,Parameters = ParseParameters(theAngle)
3586             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3587             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3588             anObj.SetParameters(Parameters)
3589             self._autoPublish(anObj, theName, "revolution")
3590             return anObj
3591
3592         ## Create a shape by revolution of the base shape around the axis
3593         #  on the given angle, i.e. all the space, transfixed by the base
3594         #  shape during its rotation around the axis on the given angle in
3595         #  both directions (forward/backward)
3596         #  @param theBase Base shape to be rotated.
3597         #  @param theAxis Rotation axis.
3598         #  @param theAngle Rotation angle in radians.
3599         #  @param theName Object name; when specified, this parameter is used
3600         #         for result publication in the study. Otherwise, if automatic
3601         #         publication is switched on, default value is used for result name.
3602         #
3603         #  @return New GEOM.GEOM_Object, containing the created revolution.
3604         #
3605         #  @ref tui_creation_revolution "Example"
3606         @ManageTransactions("PrimOp")
3607         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3608             """
3609             Create a shape by revolution of the base shape around the axis
3610             on the given angle, i.e. all the space, transfixed by the base
3611             shape during its rotation around the axis on the given angle in
3612             both directions (forward/backward).
3613
3614             Parameters:
3615                 theBase Base shape to be rotated.
3616                 theAxis Rotation axis.
3617                 theAngle Rotation angle in radians.
3618                 theName Object name; when specified, this parameter is used
3619                         for result publication in the study. Otherwise, if automatic
3620                         publication is switched on, default value is used for result name.
3621
3622             Returns:
3623                 New GEOM.GEOM_Object, containing the created revolution.
3624             """
3625             theAngle,Parameters = ParseParameters(theAngle)
3626             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3627             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3628             anObj.SetParameters(Parameters)
3629             self._autoPublish(anObj, theName, "revolution")
3630             return anObj
3631
3632         ## Create a filling from the given compound of contours.
3633         #  @param theShape the compound of contours
3634         #  @param theMinDeg a minimal degree of BSpline surface to create
3635         #  @param theMaxDeg a maximal degree of BSpline surface to create
3636         #  @param theTol2D a 2d tolerance to be reached
3637         #  @param theTol3D a 3d tolerance to be reached
3638         #  @param theNbIter a number of iteration of approximation algorithm
3639         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3640         #  @param isApprox if True, BSpline curves are generated in the process
3641         #                  of surface construction. By default it is False, that means
3642         #                  the surface is created using given curves. The usage of
3643         #                  Approximation makes the algorithm work slower, but allows
3644         #                  building the surface for rather complex cases.
3645         #  @param theName Object name; when specified, this parameter is used
3646         #         for result publication in the study. Otherwise, if automatic
3647         #         publication is switched on, default value is used for result name.
3648         #
3649         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3650         #
3651         #  @ref tui_creation_filling "Example"
3652         @ManageTransactions("PrimOp")
3653         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3654                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3655             """
3656             Create a filling from the given compound of contours.
3657
3658             Parameters:
3659                 theShape the compound of contours
3660                 theMinDeg a minimal degree of BSpline surface to create
3661                 theMaxDeg a maximal degree of BSpline surface to create
3662                 theTol2D a 2d tolerance to be reached
3663                 theTol3D a 3d tolerance to be reached
3664                 theNbIter a number of iteration of approximation algorithm
3665                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3666                 isApprox if True, BSpline curves are generated in the process
3667                          of surface construction. By default it is False, that means
3668                          the surface is created using given curves. The usage of
3669                          Approximation makes the algorithm work slower, but allows
3670                          building the surface for rather complex cases
3671                 theName Object name; when specified, this parameter is used
3672                         for result publication in the study. Otherwise, if automatic
3673                         publication is switched on, default value is used for result name.
3674
3675             Returns:
3676                 New GEOM.GEOM_Object, containing the created filling surface.
3677
3678             Example of usage:
3679                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3680             """
3681             # Example: see GEOM_TestAll.py
3682             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3683             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3684                                             theTol2D, theTol3D, theNbIter,
3685                                             theMethod, isApprox)
3686             RaiseIfFailed("MakeFilling", self.PrimOp)
3687             anObj.SetParameters(Parameters)
3688             self._autoPublish(anObj, theName, "filling")
3689             return anObj
3690
3691
3692         ## Create a filling from the given compound of contours.
3693         #  This method corresponds to MakeFilling with isApprox=True
3694         #  @param theShape the compound of contours
3695         #  @param theMinDeg a minimal degree of BSpline surface to create
3696         #  @param theMaxDeg a maximal degree of BSpline surface to create
3697         #  @param theTol3D a 3d tolerance to be reached
3698         #  @param theName Object name; when specified, this parameter is used
3699         #         for result publication in the study. Otherwise, if automatic
3700         #         publication is switched on, default value is used for result name.
3701         #
3702         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3703         #
3704         #  @ref tui_creation_filling "Example"
3705         @ManageTransactions("PrimOp")
3706         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3707             """
3708             Create a filling from the given compound of contours.
3709             This method corresponds to MakeFilling with isApprox=True
3710
3711             Parameters:
3712                 theShape the compound of contours
3713                 theMinDeg a minimal degree of BSpline surface to create
3714                 theMaxDeg a maximal degree of BSpline surface to create
3715                 theTol3D a 3d tolerance to be reached
3716                 theName Object name; when specified, this parameter is used
3717                         for result publication in the study. Otherwise, if automatic
3718                         publication is switched on, default value is used for result name.
3719
3720             Returns:
3721                 New GEOM.GEOM_Object, containing the created filling surface.
3722
3723             Example of usage:
3724                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3725             """
3726             # Example: see GEOM_TestAll.py
3727             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3728             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3729                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3730             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3731             anObj.SetParameters(Parameters)
3732             self._autoPublish(anObj, theName, "filling")
3733             return anObj
3734
3735         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3736         #  @param theSeqSections - set of specified sections.
3737         #  @param theModeSolid - mode defining building solid or shell
3738         #  @param thePreci - precision 3D used for smoothing
3739         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3740         #  @param theName Object name; when specified, this parameter is used
3741         #         for result publication in the study. Otherwise, if automatic
3742         #         publication is switched on, default value is used for result name.
3743         #
3744         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3745         #
3746         #  @ref swig_todo "Example"
3747         @ManageTransactions("PrimOp")
3748         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3749             """
3750             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3751
3752             Parameters:
3753                 theSeqSections - set of specified sections.
3754                 theModeSolid - mode defining building solid or shell
3755                 thePreci - precision 3D used for smoothing
3756                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3757                 theName Object name; when specified, this parameter is used
3758                         for result publication in the study. Otherwise, if automatic
3759                         publication is switched on, default value is used for result name.
3760
3761             Returns:
3762                 New GEOM.GEOM_Object, containing the created shell or solid.
3763             """
3764             # Example: see GEOM_TestAll.py
3765             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3766             RaiseIfFailed("MakeThruSections", self.PrimOp)
3767             self._autoPublish(anObj, theName, "filling")
3768             return anObj
3769
3770         ## Create a shape by extrusion of the base shape along
3771         #  the path shape. The path shape can be a wire or an edge.
3772         #  @param theBase Base shape to be extruded.
3773         #  @param thePath Path shape to extrude the base shape along it.
3774         #  @param theName Object name; when specified, this parameter is used
3775         #         for result publication in the study. Otherwise, if automatic
3776         #         publication is switched on, default value is used for result name.
3777         #
3778         #  @return New GEOM.GEOM_Object, containing the created pipe.
3779         #
3780         #  @ref tui_creation_pipe "Example"
3781         @ManageTransactions("PrimOp")
3782         def MakePipe(self, theBase, thePath, theName=None):
3783             """
3784             Create a shape by extrusion of the base shape along
3785             the path shape. The path shape can be a wire or an edge.
3786
3787             Parameters:
3788                 theBase Base shape to be extruded.
3789                 thePath Path shape to extrude the base shape along it.
3790                 theName Object name; when specified, this parameter is used
3791                         for result publication in the study. Otherwise, if automatic
3792                         publication is switched on, default value is used for result name.
3793
3794             Returns:
3795                 New GEOM.GEOM_Object, containing the created pipe.
3796             """
3797             # Example: see GEOM_TestAll.py
3798             anObj = self.PrimOp.MakePipe(theBase, thePath)
3799             RaiseIfFailed("MakePipe", self.PrimOp)
3800             self._autoPublish(anObj, theName, "pipe")
3801             return anObj
3802
3803         ## Create a shape by extrusion of the profile shape along
3804         #  the path shape. The path shape can be a wire or an edge.
3805         #  the several profiles can be specified in the several locations of path.
3806         #  @param theSeqBases - list of  Bases shape to be extruded.
3807         #  @param theLocations - list of locations on the path corresponding
3808         #                        specified list of the Bases shapes. Number of locations
3809         #                        should be equal to number of bases or list of locations can be empty.
3810         #  @param thePath - Path shape to extrude the base shape along it.
3811         #  @param theWithContact - the mode defining that the section is translated to be in
3812         #                          contact with the spine.
3813         #  @param theWithCorrection - defining that the section is rotated to be
3814         #                             orthogonal to the spine tangent in the correspondent point
3815         #  @param theName Object name; when specified, this parameter is used
3816         #         for result publication in the study. Otherwise, if automatic
3817         #         publication is switched on, default value is used for result name.
3818         #
3819         #  @return New GEOM.GEOM_Object, containing the created pipe.
3820         #
3821         #  @ref tui_creation_pipe_with_diff_sec "Example"
3822         @ManageTransactions("PrimOp")
3823         def MakePipeWithDifferentSections(self, theSeqBases,
3824                                           theLocations, thePath,
3825                                           theWithContact, theWithCorrection, theName=None):
3826             """
3827             Create a shape by extrusion of the profile shape along
3828             the path shape. The path shape can be a wire or an edge.
3829             the several profiles can be specified in the several locations of path.
3830
3831             Parameters:
3832                 theSeqBases - list of  Bases shape to be extruded.
3833                 theLocations - list of locations on the path corresponding
3834                                specified list of the Bases shapes. Number of locations
3835                                should be equal to number of bases or list of locations can be empty.
3836                 thePath - Path shape to extrude the base shape along it.
3837                 theWithContact - the mode defining that the section is translated to be in
3838                                  contact with the spine(0/1)
3839                 theWithCorrection - defining that the section is rotated to be
3840                                     orthogonal to the spine tangent in the correspondent point (0/1)
3841                 theName Object name; when specified, this parameter is used
3842                         for result publication in the study. Otherwise, if automatic
3843                         publication is switched on, default value is used for result name.
3844
3845             Returns:
3846                 New GEOM.GEOM_Object, containing the created pipe.
3847             """
3848             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3849                                                               theLocations, thePath,
3850                                                               theWithContact, theWithCorrection)
3851             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3852             self._autoPublish(anObj, theName, "pipe")
3853             return anObj
3854
3855         ## Create a shape by extrusion of the profile shape along
3856         #  the path shape. The path shape can be a wire or a edge.
3857         #  the several profiles can be specified in the several locations of path.
3858         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3859         #                       shell or face. If number of faces in neighbour sections
3860         #                       aren't coincided result solid between such sections will
3861         #                       be created using external boundaries of this shells.
3862         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3863         #                          This list is used for searching correspondences between
3864         #                          faces in the sections. Size of this list must be equal
3865         #                          to size of list of base shapes.
3866         #  @param theLocations - list of locations on the path corresponding
3867         #                        specified list of the Bases shapes. Number of locations
3868         #                        should be equal to number of bases. First and last
3869         #                        locations must be coincided with first and last vertexes
3870         #                        of path correspondingly.
3871         #  @param thePath - Path shape to extrude the base shape along it.
3872         #  @param theWithContact - the mode defining that the section is translated to be in
3873         #                          contact with the spine.
3874         #  @param theWithCorrection - defining that the section is rotated to be
3875         #                             orthogonal to the spine tangent in the correspondent point
3876         #  @param theName Object name; when specified, this parameter is used
3877         #         for result publication in the study. Otherwise, if automatic
3878         #         publication is switched on, default value is used for result name.
3879         #
3880         #  @return New GEOM.GEOM_Object, containing the created solids.
3881         #
3882         #  @ref tui_creation_pipe_with_shell_sec "Example"
3883         @ManageTransactions("PrimOp")
3884         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3885                                       theLocations, thePath,
3886                                       theWithContact, theWithCorrection, theName=None):
3887             """
3888             Create a shape by extrusion of the profile shape along
3889             the path shape. The path shape can be a wire or a edge.
3890             the several profiles can be specified in the several locations of path.
3891
3892             Parameters:
3893                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3894                               shell or face. If number of faces in neighbour sections
3895                               aren't coincided result solid between such sections will
3896                               be created using external boundaries of this shells.
3897                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3898                                  This list is used for searching correspondences between
3899                                  faces in the sections. Size of this list must be equal
3900                                  to size of list of base shapes.
3901                 theLocations - list of locations on the path corresponding
3902                                specified list of the Bases shapes. Number of locations
3903                                should be equal to number of bases. First and last
3904                                locations must be coincided with first and last vertexes
3905                                of path correspondingly.
3906                 thePath - Path shape to extrude the base shape along it.
3907                 theWithContact - the mode defining that the section is translated to be in
3908                                  contact with the spine (0/1)
3909                 theWithCorrection - defining that the section is rotated to be
3910                                     orthogonal to the spine tangent in the correspondent point (0/1)
3911                 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             Returns:
3916                 New GEOM.GEOM_Object, containing the created solids.
3917             """
3918             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3919                                                           theLocations, thePath,
3920                                                           theWithContact, theWithCorrection)
3921             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3922             self._autoPublish(anObj, theName, "pipe")
3923             return anObj
3924
3925         ## Create a shape by extrusion of the profile shape along
3926         #  the path shape. This function is used only for debug pipe
3927         #  functionality - it is a version of function MakePipeWithShellSections()
3928         #  which give a possibility to recieve information about
3929         #  creating pipe between each pair of sections step by step.
3930         @ManageTransactions("PrimOp")
3931         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3932                                              theLocations, thePath,
3933                                              theWithContact, theWithCorrection, theName=None):
3934             """
3935             Create a shape by extrusion of the profile shape along
3936             the path shape. This function is used only for debug pipe
3937             functionality - it is a version of previous function
3938             geompy.MakePipeWithShellSections() which give a possibility to
3939             recieve information about creating pipe between each pair of
3940             sections step by step.
3941             """
3942             res = []
3943             nbsect = len(theSeqBases)
3944             nbsubsect = len(theSeqSubBases)
3945             #print "nbsect = ",nbsect
3946             for i in range(1,nbsect):
3947                 #print "  i = ",i
3948                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3949                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3950                 tmpSeqSubBases = []
3951                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3952                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3953                                                               tmpLocations, thePath,
3954                                                               theWithContact, theWithCorrection)
3955                 if self.PrimOp.IsDone() == 0:
3956                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3957                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3958                     break
3959                 else:
3960                     print "Pipe between ",i," and ",i+1," sections is OK"
3961                     res.append(anObj)
3962                     pass
3963                 pass
3964
3965             resc = self.MakeCompound(res)
3966             #resc = self.MakeSewing(res, 0.001)
3967             #print "resc: ",resc
3968             self._autoPublish(resc, theName, "pipe")
3969             return resc
3970
3971         ## Create solids between given sections
3972         #  @param theSeqBases - list of sections (shell or face).
3973         #  @param theLocations - list of corresponding vertexes
3974         #  @param theName Object name; when specified, this parameter is used
3975         #         for result publication in the study. Otherwise, if automatic
3976         #         publication is switched on, default value is used for result name.
3977         #
3978         #  @return New GEOM.GEOM_Object, containing the created solids.
3979         #
3980         #  @ref tui_creation_pipe_without_path "Example"
3981         @ManageTransactions("PrimOp")
3982         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3983             """
3984             Create solids between given sections
3985
3986             Parameters:
3987                 theSeqBases - list of sections (shell or face).
3988                 theLocations - list of corresponding vertexes
3989                 theName Object name; when specified, this parameter is used
3990                         for result publication in the study. Otherwise, if automatic
3991                         publication is switched on, default value is used for result name.
3992
3993             Returns:
3994                 New GEOM.GEOM_Object, containing the created solids.
3995             """
3996             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3997             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3998             self._autoPublish(anObj, theName, "pipe")
3999             return anObj
4000
4001         ## Create a shape by extrusion of the base shape along
4002         #  the path shape with constant bi-normal direction along the given vector.
4003         #  The path shape can be a wire or an edge.
4004         #  @param theBase Base shape to be extruded.
4005         #  @param thePath Path shape to extrude the base shape along it.
4006         #  @param theVec Vector defines a constant binormal direction to keep the
4007         #                same angle beetween the direction and the sections
4008         #                along the sweep surface.
4009         #  @param theName Object name; when specified, this parameter is used
4010         #         for result publication in the study. Otherwise, if automatic
4011         #         publication is switched on, default value is used for result name.
4012         #
4013         #  @return New GEOM.GEOM_Object, containing the created pipe.
4014         #
4015         #  @ref tui_creation_pipe "Example"
4016         @ManageTransactions("PrimOp")
4017         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
4018             """
4019             Create a shape by extrusion of the base shape along
4020             the path shape with constant bi-normal direction along the given vector.
4021             The path shape can be a wire or an edge.
4022
4023             Parameters:
4024                 theBase Base shape to be extruded.
4025                 thePath Path shape to extrude the base shape along it.
4026                 theVec Vector defines a constant binormal direction to keep the
4027                        same angle beetween the direction and the sections
4028                        along the sweep surface.
4029                 theName Object name; when specified, this parameter is used
4030                         for result publication in the study. Otherwise, if automatic
4031                         publication is switched on, default value is used for result name.
4032
4033             Returns:
4034                 New GEOM.GEOM_Object, containing the created pipe.
4035             """
4036             # Example: see GEOM_TestAll.py
4037             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
4038             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4039             self._autoPublish(anObj, theName, "pipe")
4040             return anObj
4041
4042         ## Makes a thick solid from a face or a shell
4043         #  @param theShape Face or Shell to be thicken
4044         #  @param theThickness Thickness of the resulting solid
4045         #  @param theName Object name; when specified, this parameter is used
4046         #         for result publication in the study. Otherwise, if automatic
4047         #         publication is switched on, default value is used for result name.
4048         #
4049         #  @return New GEOM.GEOM_Object, containing the created solid
4050         #
4051         @ManageTransactions("PrimOp")
4052         def MakeThickSolid(self, theShape, theThickness, theName=None):
4053             """
4054             Make a thick solid from a face or a shell
4055
4056             Parameters:
4057                  theShape Face or Shell to be thicken
4058                  theThickness Thickness of the resulting solid
4059                  theName Object name; when specified, this parameter is used
4060                  for result publication in the study. Otherwise, if automatic
4061                  publication is switched on, default value is used for result name.
4062
4063             Returns:
4064                 New GEOM.GEOM_Object, containing the created solid
4065             """
4066             # Example: see GEOM_TestAll.py
4067             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
4068             RaiseIfFailed("MakeThickening", self.PrimOp)
4069             self._autoPublish(anObj, theName, "pipe")
4070             return anObj
4071
4072
4073         ## Modifies a face or a shell to make it a thick solid
4074         #  @param theShape Face or Shell to be thicken
4075         #  @param theThickness Thickness of the resulting solid
4076         #
4077         #  @return The modified shape
4078         #
4079         @ManageTransactions("PrimOp")
4080         def Thicken(self, theShape, theThickness):
4081             """
4082             Modifies a face or a shell to make it a thick solid
4083
4084             Parameters:
4085                 theBase Base shape to be extruded.
4086                 thePath Path shape to extrude the base shape along it.
4087                 theName Object name; when specified, this parameter is used
4088                         for result publication in the study. Otherwise, if automatic
4089                         publication is switched on, default value is used for result name.
4090
4091             Returns:
4092                 The modified shape
4093             """
4094             # Example: see GEOM_TestAll.py
4095             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
4096             RaiseIfFailed("MakeThickening", self.PrimOp)
4097             return anObj
4098
4099         ## Build a middle path of a pipe-like shape.
4100         #  The path shape can be a wire or an edge.
4101         #  @param theShape It can be closed or unclosed pipe-like shell
4102         #                  or a pipe-like solid.
4103         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4104         #                            should be wires or faces of theShape.
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         #  @note It is not assumed that exact or approximate copy of theShape
4110         #        can be obtained by applying existing Pipe operation on the
4111         #        resulting "Path" wire taking theBase1 as the base - it is not
4112         #        always possible; though in some particular cases it might work
4113         #        it is not guaranteed. Thus, RestorePath function should not be
4114         #        considered as an exact reverse operation of the Pipe.
4115         #
4116         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4117         #                                source pipe's "path".
4118         #
4119         #  @ref tui_creation_pipe_path "Example"
4120         @ManageTransactions("PrimOp")
4121         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4122             """
4123             Build a middle path of a pipe-like shape.
4124             The path shape can be a wire or an edge.
4125
4126             Parameters:
4127                 theShape It can be closed or unclosed pipe-like shell
4128                          or a pipe-like solid.
4129                 theBase1, theBase2 Two bases of the supposed pipe. This
4130                                    should be wires or faces of theShape.
4131                 theName Object name; when specified, this parameter is used
4132                         for result publication in the study. Otherwise, if automatic
4133                         publication is switched on, default value is used for result name.
4134
4135             Returns:
4136                 New GEOM_Object, containing an edge or wire that represent
4137                                  source pipe's path.
4138             """
4139             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4140             RaiseIfFailed("RestorePath", self.PrimOp)
4141             self._autoPublish(anObj, theName, "path")
4142             return anObj
4143
4144         ## Build a middle path of a pipe-like shape.
4145         #  The path shape can be a wire or an edge.
4146         #  @param theShape It can be closed or unclosed pipe-like shell
4147         #                  or a pipe-like solid.
4148         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4149         #                                should be lists of edges of theShape.
4150         #  @param theName Object name; when specified, this parameter is used
4151         #         for result publication in the study. Otherwise, if automatic
4152         #         publication is switched on, default value is used for result name.
4153         #
4154         #  @note It is not assumed that exact or approximate copy of theShape
4155         #        can be obtained by applying existing Pipe operation on the
4156         #        resulting "Path" wire taking theBase1 as the base - it is not
4157         #        always possible; though in some particular cases it might work
4158         #        it is not guaranteed. Thus, RestorePath function should not be
4159         #        considered as an exact reverse operation of the Pipe.
4160         #
4161         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4162         #                                source pipe's "path".
4163         #
4164         #  @ref tui_creation_pipe_path "Example"
4165         @ManageTransactions("PrimOp")
4166         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4167             """
4168             Build a middle path of a pipe-like shape.
4169             The path shape can be a wire or an edge.
4170
4171             Parameters:
4172                 theShape It can be closed or unclosed pipe-like shell
4173                          or a pipe-like solid.
4174                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4175                                        should be lists of edges of theShape.
4176                 theName Object name; when specified, this parameter is used
4177                         for result publication in the study. Otherwise, if automatic
4178                         publication is switched on, default value is used for result name.
4179
4180             Returns:
4181                 New GEOM_Object, containing an edge or wire that represent
4182                                  source pipe's path.
4183             """
4184             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4185             RaiseIfFailed("RestorePath", self.PrimOp)
4186             self._autoPublish(anObj, theName, "path")
4187             return anObj
4188
4189         # end of l3_complex
4190         ## @}
4191
4192         ## @addtogroup l3_advanced
4193         ## @{
4194
4195         ## Create a linear edge with specified ends.
4196         #  @param thePnt1 Point for the first end of edge.
4197         #  @param thePnt2 Point for the second end of edge.
4198         #  @param theName Object name; when specified, this parameter is used
4199         #         for result publication in the study. Otherwise, if automatic
4200         #         publication is switched on, default value is used for result name.
4201         #
4202         #  @return New GEOM.GEOM_Object, containing the created edge.
4203         #
4204         #  @ref tui_creation_edge "Example"
4205         @ManageTransactions("ShapesOp")
4206         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4207             """
4208             Create a linear edge with specified ends.
4209
4210             Parameters:
4211                 thePnt1 Point for the first end of edge.
4212                 thePnt2 Point for the second end of edge.
4213                 theName Object name; when specified, this parameter is used
4214                         for result publication in the study. Otherwise, if automatic
4215                         publication is switched on, default value is used for result name.
4216
4217             Returns:
4218                 New GEOM.GEOM_Object, containing the created edge.
4219             """
4220             # Example: see GEOM_TestAll.py
4221             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4222             RaiseIfFailed("MakeEdge", self.ShapesOp)
4223             self._autoPublish(anObj, theName, "edge")
4224             return anObj
4225
4226         ## Create a new edge, corresponding to the given length on the given curve.
4227         #  @param theRefCurve The referenced curve (edge).
4228         #  @param theLength Length on the referenced curve. It can be negative.
4229         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4230         #                       at the end of \a theRefCurve, close to the selected point.
4231         #                       If None, start from the first point of \a theRefCurve.
4232         #  @param theName Object name; when specified, this parameter is used
4233         #         for result publication in the study. Otherwise, if automatic
4234         #         publication is switched on, default value is used for result name.
4235         #
4236         #  @return New GEOM.GEOM_Object, containing the created edge.
4237         #
4238         #  @ref tui_creation_edge "Example"
4239         @ManageTransactions("ShapesOp")
4240         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4241             """
4242             Create a new edge, corresponding to the given length on the given curve.
4243
4244             Parameters:
4245                 theRefCurve The referenced curve (edge).
4246                 theLength Length on the referenced curve. It can be negative.
4247                 theStartPoint Any point can be selected for it, the new edge will begin
4248                               at the end of theRefCurve, close to the selected point.
4249                               If None, start from the first point of theRefCurve.
4250                 theName Object name; when specified, this parameter is used
4251                         for result publication in the study. Otherwise, if automatic
4252                         publication is switched on, default value is used for result name.
4253
4254             Returns:
4255                 New GEOM.GEOM_Object, containing the created edge.
4256             """
4257             # Example: see GEOM_TestAll.py
4258             theLength, Parameters = ParseParameters(theLength)
4259             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4260             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4261             anObj.SetParameters(Parameters)
4262             self._autoPublish(anObj, theName, "edge")
4263             return anObj
4264
4265         ## Create an edge from specified wire.
4266         #  @param theWire source Wire
4267         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4268         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4269         #  @param theName Object name; when specified, this parameter is used
4270         #         for result publication in the study. Otherwise, if automatic
4271         #         publication is switched on, default value is used for result name.
4272         #
4273         #  @return New GEOM.GEOM_Object, containing the created edge.
4274         #
4275         #  @ref tui_creation_edge "Example"
4276         @ManageTransactions("ShapesOp")
4277         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4278             """
4279             Create an edge from specified wire.
4280
4281             Parameters:
4282                 theWire source Wire
4283                 theLinearTolerance linear tolerance value (default = 1e-07)
4284                 theAngularTolerance angular tolerance value (default = 1e-12)
4285                 theName Object name; when specified, this parameter is used
4286                         for result publication in the study. Otherwise, if automatic
4287                         publication is switched on, default value is used for result name.
4288
4289             Returns:
4290                 New GEOM.GEOM_Object, containing the created edge.
4291             """
4292             # Example: see GEOM_TestAll.py
4293             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4294             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4295             self._autoPublish(anObj, theName, "edge")
4296             return anObj
4297
4298         ## Create a wire from the set of edges and wires.
4299         #  @param theEdgesAndWires List of edges and/or wires.
4300         #  @param theTolerance Maximum distance between vertices, that will be merged.
4301         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4302         #  @param theName Object name; when specified, this parameter is used
4303         #         for result publication in the study. Otherwise, if automatic
4304         #         publication is switched on, default value is used for result name.
4305         #
4306         #  @return New GEOM.GEOM_Object, containing the created wire.
4307         #
4308         #  @ref tui_creation_wire "Example"
4309         @ManageTransactions("ShapesOp")
4310         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4311             """
4312             Create a wire from the set of edges and wires.
4313
4314             Parameters:
4315                 theEdgesAndWires List of edges and/or wires.
4316                 theTolerance Maximum distance between vertices, that will be merged.
4317                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4318                 theName Object name; when specified, this parameter is used
4319                         for result publication in the study. Otherwise, if automatic
4320                         publication is switched on, default value is used for result name.
4321
4322             Returns:
4323                 New GEOM.GEOM_Object, containing the created wire.
4324             """
4325             # Example: see GEOM_TestAll.py
4326             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4327             RaiseIfFailed("MakeWire", self.ShapesOp)
4328             self._autoPublish(anObj, theName, "wire")
4329             return anObj
4330
4331         ## Create a face on the given wire.
4332         #  @param theWire closed Wire or Edge to build the face on.
4333         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4334         #                        If the tolerance of the obtained planar face is less
4335         #                        than 1e-06, this face will be returned, otherwise the
4336         #                        algorithm tries to build any suitable face on the given
4337         #                        wire and prints a warning message.
4338         #  @param theName Object name; when specified, this parameter is used
4339         #         for result publication in the study. Otherwise, if automatic
4340         #         publication is switched on, default value is used for result name.
4341         #
4342         #  @return New GEOM.GEOM_Object, containing the created face.
4343         #
4344         #  @ref tui_creation_face "Example"
4345         @ManageTransactions("ShapesOp")
4346         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4347             """
4348             Create a face on the given wire.
4349
4350             Parameters:
4351                 theWire closed Wire or Edge to build the face on.
4352                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4353                                If the tolerance of the obtained planar face is less
4354                                than 1e-06, this face will be returned, otherwise the
4355                                algorithm tries to build any suitable face on the given
4356                                wire and prints a warning message.
4357                 theName Object name; when specified, this parameter is used
4358                         for result publication in the study. Otherwise, if automatic
4359                         publication is switched on, default value is used for result name.
4360
4361             Returns:
4362                 New GEOM.GEOM_Object, containing the created face.
4363             """
4364             # Example: see GEOM_TestAll.py
4365             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4366             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4367                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4368             else:
4369                 RaiseIfFailed("MakeFace", self.ShapesOp)
4370             self._autoPublish(anObj, theName, "face")
4371             return anObj
4372
4373         ## Create a face on the given wires set.
4374         #  @param theWires List of closed wires or edges to build the face on.
4375         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4376         #                        If the tolerance of the obtained planar face is less
4377         #                        than 1e-06, this face will be returned, otherwise the
4378         #                        algorithm tries to build any suitable face on the given
4379         #                        wire and prints a warning message.
4380         #  @param theName Object name; when specified, this parameter is used
4381         #         for result publication in the study. Otherwise, if automatic
4382         #         publication is switched on, default value is used for result name.
4383         #
4384         #  @return New GEOM.GEOM_Object, containing the created face.
4385         #
4386         #  @ref tui_creation_face "Example"
4387         @ManageTransactions("ShapesOp")
4388         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4389             """
4390             Create a face on the given wires set.
4391
4392             Parameters:
4393                 theWires List of closed wires or edges to build the face on.
4394                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4395                                If the tolerance of the obtained planar face is less
4396                                than 1e-06, this face will be returned, otherwise the
4397                                algorithm tries to build any suitable face on the given
4398                                wire and prints a warning message.
4399                 theName Object name; when specified, this parameter is used
4400                         for result publication in the study. Otherwise, if automatic
4401                         publication is switched on, default value is used for result name.
4402
4403             Returns:
4404                 New GEOM.GEOM_Object, containing the created face.
4405             """
4406             # Example: see GEOM_TestAll.py
4407             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4408             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4409                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4410             else:
4411                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4412             self._autoPublish(anObj, theName, "face")
4413             return anObj
4414
4415         ## See MakeFaceWires() method for details.
4416         #
4417         #  @ref tui_creation_face "Example 1"
4418         #  \n @ref swig_MakeFaces  "Example 2"
4419         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4420             """
4421             See geompy.MakeFaceWires() method for details.
4422             """
4423             # Example: see GEOM_TestOthers.py
4424             # note: auto-publishing is done in self.MakeFaceWires()
4425             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4426             return anObj
4427
4428         ## Create a shell from the set of faces and shells.
4429         #  @param theFacesAndShells List of faces and/or shells.
4430         #  @param theName Object name; when specified, this parameter is used
4431         #         for result publication in the study. Otherwise, if automatic
4432         #         publication is switched on, default value is used for result name.
4433         #
4434         #  @return New GEOM.GEOM_Object, containing the created shell.
4435         #
4436         #  @ref tui_creation_shell "Example"
4437         @ManageTransactions("ShapesOp")
4438         def MakeShell(self, theFacesAndShells, theName=None):
4439             """
4440             Create a shell from the set of faces and shells.
4441
4442             Parameters:
4443                 theFacesAndShells List of faces and/or shells.
4444                 theName Object name; when specified, this parameter is used
4445                         for result publication in the study. Otherwise, if automatic
4446                         publication is switched on, default value is used for result name.
4447
4448             Returns:
4449                 New GEOM.GEOM_Object, containing the created shell.
4450             """
4451             # Example: see GEOM_TestAll.py
4452             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4453             RaiseIfFailed("MakeShell", self.ShapesOp)
4454             self._autoPublish(anObj, theName, "shell")
4455             return anObj
4456
4457         ## Create a solid, bounded by the given shells.
4458         #  @param theShells Sequence of bounding shells.
4459         #  @param theName Object name; when specified, this parameter is used
4460         #         for result publication in the study. Otherwise, if automatic
4461         #         publication is switched on, default value is used for result name.
4462         #
4463         #  @return New GEOM.GEOM_Object, containing the created solid.
4464         #
4465         #  @ref tui_creation_solid "Example"
4466         @ManageTransactions("ShapesOp")
4467         def MakeSolid(self, theShells, theName=None):
4468             """
4469             Create a solid, bounded by the given shells.
4470
4471             Parameters:
4472                 theShells Sequence of bounding shells.
4473                 theName Object name; when specified, this parameter is used
4474                         for result publication in the study. Otherwise, if automatic
4475                         publication is switched on, default value is used for result name.
4476
4477             Returns:
4478                 New GEOM.GEOM_Object, containing the created solid.
4479             """
4480             # Example: see GEOM_TestAll.py
4481             if len(theShells) == 1:
4482                 descr = self._IsGoodForSolid(theShells[0])
4483                 #if len(descr) > 0:
4484                 #    raise RuntimeError, "MakeSolidShells : " + descr
4485                 if descr == "WRN_SHAPE_UNCLOSED":
4486                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4487             anObj = self.ShapesOp.MakeSolidShells(theShells)
4488             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4489             self._autoPublish(anObj, theName, "solid")
4490             return anObj
4491
4492         ## Create a compound of the given shapes.
4493         #  @param theShapes List of shapes to put in compound.
4494         #  @param theName Object name; when specified, this parameter is used
4495         #         for result publication in the study. Otherwise, if automatic
4496         #         publication is switched on, default value is used for result name.
4497         #
4498         #  @return New GEOM.GEOM_Object, containing the created compound.
4499         #
4500         #  @ref tui_creation_compound "Example"
4501         @ManageTransactions("ShapesOp")
4502         def MakeCompound(self, theShapes, theName=None):
4503             """
4504             Create a compound of the given shapes.
4505
4506             Parameters:
4507                 theShapes List of shapes to put in compound.
4508                 theName Object name; when specified, this parameter is used
4509                         for result publication in the study. Otherwise, if automatic
4510                         publication is switched on, default value is used for result name.
4511
4512             Returns:
4513                 New GEOM.GEOM_Object, containing the created compound.
4514             """
4515             # Example: see GEOM_TestAll.py
4516             anObj = self.ShapesOp.MakeCompound(theShapes)
4517             RaiseIfFailed("MakeCompound", self.ShapesOp)
4518             self._autoPublish(anObj, theName, "compound")
4519             return anObj
4520
4521         # end of l3_advanced
4522         ## @}
4523
4524         ## @addtogroup l2_measure
4525         ## @{
4526
4527         ## Gives quantity of faces in the given shape.
4528         #  @param theShape Shape to count faces of.
4529         #  @return Quantity of faces.
4530         #
4531         #  @ref swig_NumberOf "Example"
4532         @ManageTransactions("ShapesOp")
4533         def NumberOfFaces(self, theShape):
4534             """
4535             Gives quantity of faces in the given shape.
4536
4537             Parameters:
4538                 theShape Shape to count faces of.
4539
4540             Returns:
4541                 Quantity of faces.
4542             """
4543             # Example: see GEOM_TestOthers.py
4544             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4545             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4546             return nb_faces
4547
4548         ## Gives quantity of edges in the given shape.
4549         #  @param theShape Shape to count edges of.
4550         #  @return Quantity of edges.
4551         #
4552         #  @ref swig_NumberOf "Example"
4553         @ManageTransactions("ShapesOp")
4554         def NumberOfEdges(self, theShape):
4555             """
4556             Gives quantity of edges in the given shape.
4557
4558             Parameters:
4559                 theShape Shape to count edges of.
4560
4561             Returns:
4562                 Quantity of edges.
4563             """
4564             # Example: see GEOM_TestOthers.py
4565             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4566             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4567             return nb_edges
4568
4569         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4570         #  @param theShape Shape to count sub-shapes of.
4571         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4572         #  @return Quantity of sub-shapes of given type.
4573         #
4574         #  @ref swig_NumberOf "Example"
4575         @ManageTransactions("ShapesOp")
4576         def NumberOfSubShapes(self, theShape, theShapeType):
4577             """
4578             Gives quantity of sub-shapes of type theShapeType in the given shape.
4579
4580             Parameters:
4581                 theShape Shape to count sub-shapes of.
4582                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4583
4584             Returns:
4585                 Quantity of sub-shapes of given type.
4586             """
4587             # Example: see GEOM_TestOthers.py
4588             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4589             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4590             return nb_ss
4591
4592         ## Gives quantity of solids in the given shape.
4593         #  @param theShape Shape to count solids in.
4594         #  @return Quantity of solids.
4595         #
4596         #  @ref swig_NumberOf "Example"
4597         @ManageTransactions("ShapesOp")
4598         def NumberOfSolids(self, theShape):
4599             """
4600             Gives quantity of solids in the given shape.
4601
4602             Parameters:
4603                 theShape Shape to count solids in.
4604
4605             Returns:
4606                 Quantity of solids.
4607             """
4608             # Example: see GEOM_TestOthers.py
4609             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4610             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4611             return nb_solids
4612
4613         # end of l2_measure
4614         ## @}
4615
4616         ## @addtogroup l3_healing
4617         ## @{
4618
4619         ## Reverses an orientation the given shape.
4620         #  @param theShape Shape to be reversed.
4621         #  @param theName Object name; when specified, this parameter is used
4622         #         for result publication in the study. Otherwise, if automatic
4623         #         publication is switched on, default value is used for result name.
4624         #
4625         #  @return The reversed copy of theShape.
4626         #
4627         #  @ref swig_ChangeOrientation "Example"
4628         @ManageTransactions("ShapesOp")
4629         def ChangeOrientation(self, theShape, theName=None):
4630             """
4631             Reverses an orientation the given shape.
4632
4633             Parameters:
4634                 theShape Shape to be reversed.
4635                 theName Object name; when specified, this parameter is used
4636                         for result publication in the study. Otherwise, if automatic
4637                         publication is switched on, default value is used for result name.
4638
4639             Returns:
4640                 The reversed copy of theShape.
4641             """
4642             # Example: see GEOM_TestAll.py
4643             anObj = self.ShapesOp.ChangeOrientation(theShape)
4644             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4645             self._autoPublish(anObj, theName, "reversed")
4646             return anObj
4647
4648         ## See ChangeOrientation() method for details.
4649         #
4650         #  @ref swig_OrientationChange "Example"
4651         def OrientationChange(self, theShape, theName=None):
4652             """
4653             See geompy.ChangeOrientation method for details.
4654             """
4655             # Example: see GEOM_TestOthers.py
4656             # note: auto-publishing is done in self.ChangeOrientation()
4657             anObj = self.ChangeOrientation(theShape, theName)
4658             return anObj
4659
4660         # end of l3_healing
4661         ## @}
4662
4663         ## @addtogroup l4_obtain
4664         ## @{
4665
4666         ## Retrieve all free faces from the given shape.
4667         #  Free face is a face, which is not shared between two shells of the shape.
4668         #  @param theShape Shape to find free faces in.
4669         #  @return List of IDs of all free faces, contained in theShape.
4670         #
4671         #  @ref tui_measurement_tools_page "Example"
4672         @ManageTransactions("ShapesOp")
4673         def GetFreeFacesIDs(self,theShape):
4674             """
4675             Retrieve all free faces from the given shape.
4676             Free face is a face, which is not shared between two shells of the shape.
4677
4678             Parameters:
4679                 theShape Shape to find free faces in.
4680
4681             Returns:
4682                 List of IDs of all free faces, contained in theShape.
4683             """
4684             # Example: see GEOM_TestOthers.py
4685             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4686             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4687             return anIDs
4688
4689         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4690         #  @param theShape1 Shape to find sub-shapes in.
4691         #  @param theShape2 Shape to find shared sub-shapes with.
4692         #  @param theShapeType Type of sub-shapes to be retrieved.
4693         #  @param theName Object name; when specified, this parameter is used
4694         #         for result publication in the study. Otherwise, if automatic
4695         #         publication is switched on, default value is used for result name.
4696         #
4697         #  @return List of sub-shapes of theShape1, shared with theShape2.
4698         #
4699         #  @ref swig_GetSharedShapes "Example"
4700         @ManageTransactions("ShapesOp")
4701         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4702             """
4703             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4704
4705             Parameters:
4706                 theShape1 Shape to find sub-shapes in.
4707                 theShape2 Shape to find shared sub-shapes with.
4708                 theShapeType Type of sub-shapes to be retrieved.
4709                 theName Object name; when specified, this parameter is used
4710                         for result publication in the study. Otherwise, if automatic
4711                         publication is switched on, default value is used for result name.
4712
4713             Returns:
4714                 List of sub-shapes of theShape1, shared with theShape2.
4715             """
4716             # Example: see GEOM_TestOthers.py
4717             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4718             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4719             self._autoPublish(aList, theName, "shared")
4720             return aList
4721
4722         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4723         #  @param theShapes Shapes to find common sub-shapes of.
4724         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4725         #  @param theName Object name; when specified, this parameter is used
4726         #         for result publication in the study. Otherwise, if automatic
4727         #         publication is switched on, default value is used for result name.
4728         #
4729         #  @return List of objects, that are sub-shapes of all given shapes.
4730         #
4731         #  @ref swig_GetSharedShapes "Example"
4732         @ManageTransactions("ShapesOp")
4733         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4734             """
4735             Get all sub-shapes, shared by all shapes in the list theShapes.
4736
4737             Parameters:
4738                 theShapes Shapes to find common sub-shapes of.
4739                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4740                 theName Object name; when specified, this parameter is used
4741                         for result publication in the study. Otherwise, if automatic
4742                         publication is switched on, default value is used for result name.
4743
4744             Returns:
4745                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4746             """
4747             # Example: see GEOM_TestOthers.py
4748             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4749             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4750             self._autoPublish(aList, theName, "shared")
4751             return aList
4752
4753         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4754         #  situated relatively the specified plane by the certain way,
4755         #  defined through <VAR>theState</VAR> parameter.
4756         #  @param theShape Shape to find sub-shapes of.
4757         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4758         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4759         #                direction and location of the plane to find shapes on.
4760         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4761         #  @param theName Object name; when specified, this parameter is used
4762         #         for result publication in the study. Otherwise, if automatic
4763         #         publication is switched on, default value is used for result name.
4764         #
4765         #  @return List of all found sub-shapes.
4766         #
4767         #  @ref swig_GetShapesOnPlane "Example"
4768         @ManageTransactions("ShapesOp")
4769         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4770             """
4771             Find in theShape all sub-shapes of type theShapeType,
4772             situated relatively the specified plane by the certain way,
4773             defined through theState parameter.
4774
4775             Parameters:
4776                 theShape Shape to find sub-shapes of.
4777                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4778                 theAx1 Vector (or line, or linear edge), specifying normal
4779                        direction and location of the plane to find shapes on.
4780                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4781                 theName Object name; when specified, this parameter is used
4782                         for result publication in the study. Otherwise, if automatic
4783                         publication is switched on, default value is used for result name.
4784
4785             Returns:
4786                 List of all found sub-shapes.
4787             """
4788             # Example: see GEOM_TestOthers.py
4789             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4790             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4791             self._autoPublish(aList, theName, "shapeOnPlane")
4792             return aList
4793
4794         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4795         #  situated relatively the specified plane by the certain way,
4796         #  defined through <VAR>theState</VAR> parameter.
4797         #  @param theShape Shape to find sub-shapes of.
4798         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4799         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4800         #                direction and location of the plane to find shapes on.
4801         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4802         #
4803         #  @return List of all found sub-shapes indices.
4804         #
4805         #  @ref swig_GetShapesOnPlaneIDs "Example"
4806         @ManageTransactions("ShapesOp")
4807         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4808             """
4809             Find in theShape all sub-shapes of type theShapeType,
4810             situated relatively the specified plane by the certain way,
4811             defined through theState parameter.
4812
4813             Parameters:
4814                 theShape Shape to find sub-shapes of.
4815                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4816                 theAx1 Vector (or line, or linear edge), specifying normal
4817                        direction and location of the plane to find shapes on.
4818                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4819
4820             Returns:
4821                 List of all found sub-shapes indices.
4822             """
4823             # Example: see GEOM_TestOthers.py
4824             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4825             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4826             return aList
4827
4828         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4829         #  situated relatively the specified plane by the certain way,
4830         #  defined through <VAR>theState</VAR> parameter.
4831         #  @param theShape Shape to find sub-shapes of.
4832         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4833         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4834         #                direction of the plane to find shapes on.
4835         #  @param thePnt Point specifying location of the plane to find shapes on.
4836         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4837         #  @param theName Object name; when specified, this parameter is used
4838         #         for result publication in the study. Otherwise, if automatic
4839         #         publication is switched on, default value is used for result name.
4840         #
4841         #  @return List of all found sub-shapes.
4842         #
4843         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4844         @ManageTransactions("ShapesOp")
4845         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4846             """
4847             Find in theShape all sub-shapes of type theShapeType,
4848             situated relatively the specified plane by the certain way,
4849             defined through theState parameter.
4850
4851             Parameters:
4852                 theShape Shape to find sub-shapes of.
4853                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4854                 theAx1 Vector (or line, or linear edge), specifying normal
4855                        direction and location of the plane to find shapes on.
4856                 thePnt Point specifying location of the plane to find shapes on.
4857                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4858                 theName Object name; when specified, this parameter is used
4859                         for result publication in the study. Otherwise, if automatic
4860                         publication is switched on, default value is used for result name.
4861
4862             Returns:
4863                 List of all found sub-shapes.
4864             """
4865             # Example: see GEOM_TestOthers.py
4866             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4867                                                                theAx1, thePnt, theState)
4868             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4869             self._autoPublish(aList, theName, "shapeOnPlane")
4870             return aList
4871
4872         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4873         #  situated relatively the specified plane by the certain way,
4874         #  defined through <VAR>theState</VAR> parameter.
4875         #  @param theShape Shape to find sub-shapes of.
4876         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4877         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4878         #                direction of the plane to find shapes on.
4879         #  @param thePnt Point specifying location of the plane to find shapes on.
4880         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4881         #
4882         #  @return List of all found sub-shapes indices.
4883         #
4884         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4885         @ManageTransactions("ShapesOp")
4886         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4887             """
4888             Find in theShape all sub-shapes of type theShapeType,
4889             situated relatively the specified plane by the certain way,
4890             defined through theState parameter.
4891
4892             Parameters:
4893                 theShape Shape to find sub-shapes of.
4894                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4895                 theAx1 Vector (or line, or linear edge), specifying normal
4896                        direction and location of the plane to find shapes on.
4897                 thePnt Point specifying location of the plane to find shapes on.
4898                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4899
4900             Returns:
4901                 List of all found sub-shapes indices.
4902             """
4903             # Example: see GEOM_TestOthers.py
4904             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4905                                                                   theAx1, thePnt, theState)
4906             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4907             return aList
4908
4909         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4910         #  the specified cylinder by the certain way, defined through \a theState parameter.
4911         #  @param theShape Shape to find sub-shapes of.
4912         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4913         #  @param theAxis Vector (or line, or linear edge), specifying
4914         #                 axis of the cylinder to find shapes on.
4915         #  @param theRadius Radius of the cylinder to find shapes on.
4916         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4917         #  @param theName Object name; when specified, this parameter is used
4918         #         for result publication in the study. Otherwise, if automatic
4919         #         publication is switched on, default value is used for result name.
4920         #
4921         #  @return List of all found sub-shapes.
4922         #
4923         #  @ref swig_GetShapesOnCylinder "Example"
4924         @ManageTransactions("ShapesOp")
4925         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4926             """
4927             Find in theShape all sub-shapes of type theShapeType, situated relatively
4928             the specified cylinder by the certain way, defined through theState parameter.
4929
4930             Parameters:
4931                 theShape Shape to find sub-shapes of.
4932                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4933                 theAxis Vector (or line, or linear edge), specifying
4934                         axis of the cylinder to find shapes on.
4935                 theRadius Radius of the cylinder to find shapes on.
4936                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4937                 theName Object name; when specified, this parameter is used
4938                         for result publication in the study. Otherwise, if automatic
4939                         publication is switched on, default value is used for result name.
4940
4941             Returns:
4942                 List of all found sub-shapes.
4943             """
4944             # Example: see GEOM_TestOthers.py
4945             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4946             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4947             self._autoPublish(aList, theName, "shapeOnCylinder")
4948             return aList
4949
4950         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4951         #  the specified cylinder by the certain way, defined through \a theState parameter.
4952         #  @param theShape Shape to find sub-shapes of.
4953         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4954         #  @param theAxis Vector (or line, or linear edge), specifying
4955         #                 axis of the cylinder to find shapes on.
4956         #  @param theRadius Radius of the cylinder to find shapes on.
4957         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4958         #
4959         #  @return List of all found sub-shapes indices.
4960         #
4961         #  @ref swig_GetShapesOnCylinderIDs "Example"
4962         @ManageTransactions("ShapesOp")
4963         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4964             """
4965             Find in theShape all sub-shapes of type theShapeType, situated relatively
4966             the specified cylinder by the certain way, defined through theState parameter.
4967
4968             Parameters:
4969                 theShape Shape to find sub-shapes of.
4970                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4971                 theAxis Vector (or line, or linear edge), specifying
4972                         axis of the cylinder to find shapes on.
4973                 theRadius Radius of the cylinder to find shapes on.
4974                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4975
4976             Returns:
4977                 List of all found sub-shapes indices.
4978             """
4979             # Example: see GEOM_TestOthers.py
4980             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4981             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4982             return aList
4983
4984         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4985         #  the specified cylinder by the certain way, defined through \a theState parameter.
4986         #  @param theShape Shape to find sub-shapes of.
4987         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4988         #  @param theAxis Vector (or line, or linear edge), specifying
4989         #                 axis of the cylinder to find shapes on.
4990         #  @param thePnt Point specifying location of the bottom of the cylinder.
4991         #  @param theRadius Radius of the cylinder to find shapes on.
4992         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4993         #  @param theName Object name; when specified, this parameter is used
4994         #         for result publication in the study. Otherwise, if automatic
4995         #         publication is switched on, default value is used for result name.
4996         #
4997         #  @return List of all found sub-shapes.
4998         #
4999         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5000         @ManageTransactions("ShapesOp")
5001         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5002             """
5003             Find in theShape all sub-shapes of type theShapeType, situated relatively
5004             the specified cylinder by the certain way, defined through theState parameter.
5005
5006             Parameters:
5007                 theShape Shape to find sub-shapes of.
5008                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5009                 theAxis Vector (or line, or linear edge), specifying
5010                         axis of the cylinder to find shapes on.
5011                 theRadius Radius of the cylinder to find shapes on.
5012                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5013                 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             Returns:
5018                 List of all found sub-shapes.
5019             """
5020             # Example: see GEOM_TestOthers.py
5021             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5022             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5023             self._autoPublish(aList, theName, "shapeOnCylinder")
5024             return aList
5025
5026         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5027         #  the specified cylinder by the certain way, defined through \a theState parameter.
5028         #  @param theShape Shape to find sub-shapes of.
5029         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5030         #  @param theAxis Vector (or line, or linear edge), specifying
5031         #                 axis of the cylinder to find shapes on.
5032         #  @param thePnt Point specifying location of the bottom of the cylinder.
5033         #  @param theRadius Radius of the cylinder to find shapes on.
5034         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5035         #
5036         #  @return List of all found sub-shapes indices
5037         #
5038         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5039         @ManageTransactions("ShapesOp")
5040         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5041             """
5042             Find in theShape all sub-shapes of type theShapeType, situated relatively
5043             the specified cylinder by the certain way, defined through theState parameter.
5044
5045             Parameters:
5046                 theShape Shape to find sub-shapes of.
5047                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5048                 theAxis Vector (or line, or linear edge), specifying
5049                         axis of the cylinder to find shapes on.
5050                 theRadius Radius of the cylinder to find shapes on.
5051                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5052
5053             Returns:
5054                 List of all found sub-shapes indices.
5055             """
5056             # Example: see GEOM_TestOthers.py
5057             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5058             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5059             return aList
5060
5061         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5062         #  the specified sphere by the certain way, defined through \a theState parameter.
5063         #  @param theShape Shape to find sub-shapes of.
5064         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5065         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5066         #  @param theRadius Radius of the sphere to find shapes on.
5067         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5068         #  @param theName Object name; when specified, this parameter is used
5069         #         for result publication in the study. Otherwise, if automatic
5070         #         publication is switched on, default value is used for result name.
5071         #
5072         #  @return List of all found sub-shapes.
5073         #
5074         #  @ref swig_GetShapesOnSphere "Example"
5075         @ManageTransactions("ShapesOp")
5076         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5077             """
5078             Find in theShape all sub-shapes of type theShapeType, situated relatively
5079             the specified sphere by the certain way, defined through theState parameter.
5080
5081             Parameters:
5082                 theShape Shape to find sub-shapes of.
5083                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5084                 theCenter Point, specifying center of the sphere to find shapes on.
5085                 theRadius Radius of the sphere to find shapes on.
5086                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5087                 theName Object name; when specified, this parameter is used
5088                         for result publication in the study. Otherwise, if automatic
5089                         publication is switched on, default value is used for result name.
5090
5091             Returns:
5092                 List of all found sub-shapes.
5093             """
5094             # Example: see GEOM_TestOthers.py
5095             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5096             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5097             self._autoPublish(aList, theName, "shapeOnSphere")
5098             return aList
5099
5100         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5101         #  the specified sphere by the certain way, defined through \a theState parameter.
5102         #  @param theShape Shape to find sub-shapes of.
5103         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5104         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5105         #  @param theRadius Radius of the sphere to find shapes on.
5106         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5107         #
5108         #  @return List of all found sub-shapes indices.
5109         #
5110         #  @ref swig_GetShapesOnSphereIDs "Example"
5111         @ManageTransactions("ShapesOp")
5112         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5113             """
5114             Find in theShape all sub-shapes of type theShapeType, situated relatively
5115             the specified sphere by the certain way, defined through theState parameter.
5116
5117             Parameters:
5118                 theShape Shape to find sub-shapes of.
5119                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5120                 theCenter Point, specifying center of the sphere to find shapes on.
5121                 theRadius Radius of the sphere to find shapes on.
5122                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5123
5124             Returns:
5125                 List of all found sub-shapes indices.
5126             """
5127             # Example: see GEOM_TestOthers.py
5128             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5129             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5130             return aList
5131
5132         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5133         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5134         #  @param theShape Shape to find sub-shapes of.
5135         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5136         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5137         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5138         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5139         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5140         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5141         #  @param theName Object name; when specified, this parameter is used
5142         #         for result publication in the study. Otherwise, if automatic
5143         #         publication is switched on, default value is used for result name.
5144         #
5145         #  @return List of all found sub-shapes.
5146         #
5147         #  @ref swig_GetShapesOnQuadrangle "Example"
5148         @ManageTransactions("ShapesOp")
5149         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5150                                   theTopLeftPoint, theTopRigthPoint,
5151                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5152             """
5153             Find in theShape all sub-shapes of type theShapeType, situated relatively
5154             the specified quadrangle by the certain way, defined through theState parameter.
5155
5156             Parameters:
5157                 theShape Shape to find sub-shapes of.
5158                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5159                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5160                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5161                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5162                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5163                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5164                 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             Returns:
5169                 List of all found sub-shapes.
5170             """
5171             # Example: see GEOM_TestOthers.py
5172             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5173                                                         theTopLeftPoint, theTopRigthPoint,
5174                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5175             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5176             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5177             return aList
5178
5179         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5180         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5181         #  @param theShape Shape to find sub-shapes of.
5182         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5183         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5184         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5185         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5186         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5187         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5188         #
5189         #  @return List of all found sub-shapes indices.
5190         #
5191         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5192         @ManageTransactions("ShapesOp")
5193         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5194                                      theTopLeftPoint, theTopRigthPoint,
5195                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5196             """
5197             Find in theShape all sub-shapes of type theShapeType, situated relatively
5198             the specified quadrangle by the certain way, defined through theState parameter.
5199
5200             Parameters:
5201                 theShape Shape to find sub-shapes of.
5202                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5203                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5204                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5205                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5206                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5207                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5208
5209             Returns:
5210                 List of all found sub-shapes indices.
5211             """
5212
5213             # Example: see GEOM_TestOthers.py
5214             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5215                                                            theTopLeftPoint, theTopRigthPoint,
5216                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5217             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5218             return aList
5219
5220         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5221         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5222         #  @param theBox Shape for relative comparing.
5223         #  @param theShape Shape to find sub-shapes of.
5224         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5225         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5226         #  @param theName Object name; when specified, this parameter is used
5227         #         for result publication in the study. Otherwise, if automatic
5228         #         publication is switched on, default value is used for result name.
5229         #
5230         #  @return List of all found sub-shapes.
5231         #
5232         #  @ref swig_GetShapesOnBox "Example"
5233         @ManageTransactions("ShapesOp")
5234         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5235             """
5236             Find in theShape all sub-shapes of type theShapeType, situated relatively
5237             the specified theBox by the certain way, defined through theState parameter.
5238
5239             Parameters:
5240                 theBox Shape for relative comparing.
5241                 theShape Shape to find sub-shapes of.
5242                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5243                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5244                 theName Object name; when specified, this parameter is used
5245                         for result publication in the study. Otherwise, if automatic
5246                         publication is switched on, default value is used for result name.
5247
5248             Returns:
5249                 List of all found sub-shapes.
5250             """
5251             # Example: see GEOM_TestOthers.py
5252             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5253             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5254             self._autoPublish(aList, theName, "shapeOnBox")
5255             return aList
5256
5257         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5258         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5259         #  @param theBox Shape for relative comparing.
5260         #  @param theShape Shape to find sub-shapes of.
5261         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5262         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5263         #
5264         #  @return List of all found sub-shapes indices.
5265         #
5266         #  @ref swig_GetShapesOnBoxIDs "Example"
5267         @ManageTransactions("ShapesOp")
5268         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5269             """
5270             Find in theShape all sub-shapes of type theShapeType, situated relatively
5271             the specified theBox by the certain way, defined through theState parameter.
5272
5273             Parameters:
5274                 theBox Shape for relative comparing.
5275                 theShape Shape to find sub-shapes of.
5276                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5277                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5278
5279             Returns:
5280                 List of all found sub-shapes indices.
5281             """
5282             # Example: see GEOM_TestOthers.py
5283             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5284             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5285             return aList
5286
5287         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5288         #  situated relatively the specified \a theCheckShape by the
5289         #  certain way, defined through \a theState parameter.
5290         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5291         #  @param theShape Shape to find sub-shapes of.
5292         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5293         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5294         #  @param theName Object name; when specified, this parameter is used
5295         #         for result publication in the study. Otherwise, if automatic
5296         #         publication is switched on, default value is used for result name.
5297         #
5298         #  @return List of all found sub-shapes.
5299         #
5300         #  @ref swig_GetShapesOnShape "Example"
5301         @ManageTransactions("ShapesOp")
5302         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5303             """
5304             Find in theShape all sub-shapes of type theShapeType,
5305             situated relatively the specified theCheckShape by the
5306             certain way, defined through theState parameter.
5307
5308             Parameters:
5309                 theCheckShape Shape for relative comparing. It must be a solid.
5310                 theShape Shape to find sub-shapes of.
5311                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5312                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5313                 theName Object name; when specified, this parameter is used
5314                         for result publication in the study. Otherwise, if automatic
5315                         publication is switched on, default value is used for result name.
5316
5317             Returns:
5318                 List of all found sub-shapes.
5319             """
5320             # Example: see GEOM_TestOthers.py
5321             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5322                                                    theShapeType, theState)
5323             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5324             self._autoPublish(aList, theName, "shapeOnShape")
5325             return aList
5326
5327         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5328         #  situated relatively the specified \a theCheckShape by the
5329         #  certain way, defined through \a theState parameter.
5330         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5331         #  @param theShape Shape to find sub-shapes of.
5332         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5333         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5334         #  @param theName Object name; when specified, this parameter is used
5335         #         for result publication in the study. Otherwise, if automatic
5336         #         publication is switched on, default value is used for result name.
5337         #
5338         #  @return All found sub-shapes as compound.
5339         #
5340         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5341         @ManageTransactions("ShapesOp")
5342         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5343             """
5344             Find in theShape all sub-shapes of type theShapeType,
5345             situated relatively the specified theCheckShape by the
5346             certain way, defined through theState parameter.
5347
5348             Parameters:
5349                 theCheckShape Shape for relative comparing. It must be a solid.
5350                 theShape Shape to find sub-shapes of.
5351                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5352                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5353                 theName Object name; when specified, this parameter is used
5354                         for result publication in the study. Otherwise, if automatic
5355                         publication is switched on, default value is used for result name.
5356
5357             Returns:
5358                 All found sub-shapes as compound.
5359             """
5360             # Example: see GEOM_TestOthers.py
5361             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5362                                                              theShapeType, theState)
5363             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5364             self._autoPublish(anObj, theName, "shapeOnShape")
5365             return anObj
5366
5367         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5368         #  situated relatively the specified \a theCheckShape by the
5369         #  certain way, defined through \a theState parameter.
5370         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5371         #  @param theShape Shape to find sub-shapes of.
5372         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5373         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5374         #
5375         #  @return List of all found sub-shapes indices.
5376         #
5377         #  @ref swig_GetShapesOnShapeIDs "Example"
5378         @ManageTransactions("ShapesOp")
5379         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5380             """
5381             Find in theShape all sub-shapes of type theShapeType,
5382             situated relatively the specified theCheckShape by the
5383             certain way, defined through theState parameter.
5384
5385             Parameters:
5386                 theCheckShape Shape for relative comparing. It must be a solid.
5387                 theShape Shape to find sub-shapes of.
5388                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5389                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5390
5391             Returns:
5392                 List of all found sub-shapes indices.
5393             """
5394             # Example: see GEOM_TestOthers.py
5395             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5396                                                       theShapeType, theState)
5397             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5398             return aList
5399
5400         ## Get sub-shape(s) of theShapeWhere, which are
5401         #  coincident with \a theShapeWhat or could be a part of it.
5402         #  @param theShapeWhere Shape to find sub-shapes of.
5403         #  @param theShapeWhat Shape, specifying what to find.
5404         #  @param isNewImplementation implementation of GetInPlace functionality
5405         #             (default = False, old alghorithm based on shape properties)
5406         #  @param theName Object name; when specified, this parameter is used
5407         #         for result publication in the study. Otherwise, if automatic
5408         #         publication is switched on, default value is used for result name.
5409         #
5410         #  @return Group of all found sub-shapes or a single found sub-shape.
5411         #
5412         #  @note This function has a restriction on argument shapes.
5413         #        If \a theShapeWhere has curved parts with significantly
5414         #        outstanding centres (i.e. the mass centre of a part is closer to
5415         #        \a theShapeWhat than to the part), such parts will not be found.
5416         #        @image html get_in_place_lost_part.png
5417         #
5418         #  @ref swig_GetInPlace "Example"
5419         @ManageTransactions("ShapesOp")
5420         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5421             """
5422             Get sub-shape(s) of theShapeWhere, which are
5423             coincident with  theShapeWhat or could be a part of it.
5424
5425             Parameters:
5426                 theShapeWhere Shape to find sub-shapes of.
5427                 theShapeWhat Shape, specifying what to find.
5428                 isNewImplementation Implementation of GetInPlace functionality
5429                                     (default = False, old alghorithm based on shape properties)
5430                 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             Returns:
5435                 Group of all found sub-shapes or a single found sub-shape.
5436
5437
5438             Note:
5439                 This function has a restriction on argument shapes.
5440                 If theShapeWhere has curved parts with significantly
5441                 outstanding centres (i.e. the mass centre of a part is closer to
5442                 theShapeWhat than to the part), such parts will not be found.
5443             """
5444             # Example: see GEOM_TestOthers.py
5445             anObj = None
5446             if isNewImplementation:
5447                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5448             else:
5449                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5450                 pass
5451             RaiseIfFailed("GetInPlace", self.ShapesOp)
5452             self._autoPublish(anObj, theName, "inplace")
5453             return anObj
5454
5455         ## Get sub-shape(s) of \a theShapeWhere, which are
5456         #  coincident with \a theShapeWhat or could be a part of it.
5457         #
5458         #  Implementation of this method is based on a saved history of an operation,
5459         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5460         #  arguments (an argument shape or a sub-shape of an argument shape).
5461         #  The operation could be the Partition or one of boolean operations,
5462         #  performed on simple shapes (not on compounds).
5463         #
5464         #  @param theShapeWhere Shape to find sub-shapes of.
5465         #  @param theShapeWhat Shape, specifying what to find (must be in the
5466         #                      building history of the ShapeWhere).
5467         #  @param theName Object name; when specified, this parameter is used
5468         #         for result publication in the study. Otherwise, if automatic
5469         #         publication is switched on, default value is used for result name.
5470         #
5471         #  @return Group of all found sub-shapes or a single found sub-shape.
5472         #
5473         #  @ref swig_GetInPlace "Example"
5474         @ManageTransactions("ShapesOp")
5475         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5476             """
5477             Implementation of this method is based on a saved history of an operation,
5478             produced theShapeWhere. The theShapeWhat must be among this operation's
5479             arguments (an argument shape or a sub-shape of an argument shape).
5480             The operation could be the Partition or one of boolean operations,
5481             performed on simple shapes (not on compounds).
5482
5483             Parameters:
5484                 theShapeWhere Shape to find sub-shapes of.
5485                 theShapeWhat Shape, specifying what to find (must be in the
5486                                 building history of the ShapeWhere).
5487                 theName Object name; when specified, this parameter is used
5488                         for result publication in the study. Otherwise, if automatic
5489                         publication is switched on, default value is used for result name.
5490
5491             Returns:
5492                 Group of all found sub-shapes or a single found sub-shape.
5493             """
5494             # Example: see GEOM_TestOthers.py
5495             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5496             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5497             self._autoPublish(anObj, theName, "inplace")
5498             return anObj
5499
5500         ## Get sub-shape of theShapeWhere, which is
5501         #  equal to \a theShapeWhat.
5502         #  @param theShapeWhere Shape to find sub-shape of.
5503         #  @param theShapeWhat Shape, specifying what to find.
5504         #  @param theName Object name; when specified, this parameter is used
5505         #         for result publication in the study. Otherwise, if automatic
5506         #         publication is switched on, default value is used for result name.
5507         #
5508         #  @return New GEOM.GEOM_Object for found sub-shape.
5509         #
5510         #  @ref swig_GetSame "Example"
5511         @ManageTransactions("ShapesOp")
5512         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5513             """
5514             Get sub-shape of theShapeWhere, which is
5515             equal to theShapeWhat.
5516
5517             Parameters:
5518                 theShapeWhere Shape to find sub-shape of.
5519                 theShapeWhat Shape, specifying what to find.
5520                 theName Object name; when specified, this parameter is used
5521                         for result publication in the study. Otherwise, if automatic
5522                         publication is switched on, default value is used for result name.
5523
5524             Returns:
5525                 New GEOM.GEOM_Object for found sub-shape.
5526             """
5527             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5528             RaiseIfFailed("GetSame", self.ShapesOp)
5529             self._autoPublish(anObj, theName, "sameShape")
5530             return anObj
5531
5532
5533         ## Get sub-shape indices of theShapeWhere, which is
5534         #  equal to \a theShapeWhat.
5535         #  @param theShapeWhere Shape to find sub-shape of.
5536         #  @param theShapeWhat Shape, specifying what to find.
5537         #  @return List of all found sub-shapes indices.
5538         #
5539         #  @ref swig_GetSame "Example"
5540         @ManageTransactions("ShapesOp")
5541         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5542             """
5543             Get sub-shape indices of theShapeWhere, which is
5544             equal to theShapeWhat.
5545
5546             Parameters:
5547                 theShapeWhere Shape to find sub-shape of.
5548                 theShapeWhat Shape, specifying what to find.
5549
5550             Returns:
5551                 List of all found sub-shapes indices.
5552             """
5553             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5554             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5555             return anObj
5556
5557
5558         # end of l4_obtain
5559         ## @}
5560
5561         ## @addtogroup l4_access
5562         ## @{
5563
5564         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5565         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5566         #  @param aShape Shape to get sub-shape of.
5567         #  @param ListOfID List of sub-shapes indices.
5568         #  @param theName Object name; when specified, this parameter is used
5569         #         for result publication in the study. Otherwise, if automatic
5570         #         publication is switched on, default value is used for result name.
5571         #
5572         #  @return Found sub-shape.
5573         #
5574         #  @ref swig_all_decompose "Example"
5575         def GetSubShape(self, aShape, ListOfID, theName=None):
5576             """
5577             Obtain a composite sub-shape of aShape, composed from sub-shapes
5578             of aShape, selected by their unique IDs inside aShape
5579
5580             Parameters:
5581                 aShape Shape to get sub-shape of.
5582                 ListOfID List of sub-shapes indices.
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                 Found sub-shape.
5589             """
5590             # Example: see GEOM_TestAll.py
5591             anObj = self.AddSubShape(aShape,ListOfID)
5592             self._autoPublish(anObj, theName, "subshape")
5593             return anObj
5594
5595         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5596         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5597         #  @param aShape Shape to get sub-shape of.
5598         #  @param aSubShape Sub-shapes of aShape.
5599         #  @return ID of found sub-shape.
5600         #
5601         #  @ref swig_all_decompose "Example"
5602         @ManageTransactions("LocalOp")
5603         def GetSubShapeID(self, aShape, aSubShape):
5604             """
5605             Obtain unique ID of sub-shape aSubShape inside aShape
5606             of aShape, selected by their unique IDs inside aShape
5607
5608             Parameters:
5609                aShape Shape to get sub-shape of.
5610                aSubShape Sub-shapes of aShape.
5611
5612             Returns:
5613                ID of found sub-shape.
5614             """
5615             # Example: see GEOM_TestAll.py
5616             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5617             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5618             return anID
5619
5620         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5621         #  This function is provided for performance purpose. The complexity is O(n) with n
5622         #  the number of subobjects of aShape
5623         #  @param aShape Shape to get sub-shape of.
5624         #  @param aSubShapes Sub-shapes of aShape.
5625         #  @return list of IDs of found sub-shapes.
5626         #
5627         #  @ref swig_all_decompose "Example"
5628         @ManageTransactions("ShapesOp")
5629         def GetSubShapesIDs(self, aShape, aSubShapes):
5630             """
5631             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5632             This function is provided for performance purpose. The complexity is O(n) with n
5633             the number of subobjects of aShape
5634
5635             Parameters:
5636                aShape Shape to get sub-shape of.
5637                aSubShapes Sub-shapes of aShape.
5638
5639             Returns:
5640                List of IDs of found sub-shape.
5641             """
5642             # Example: see GEOM_TestAll.py
5643             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5644             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5645             return anIDs
5646
5647         # end of l4_access
5648         ## @}
5649
5650         ## @addtogroup l4_decompose
5651         ## @{
5652
5653         ## Get all sub-shapes and groups of \a theShape,
5654         #  that were created already by any other methods.
5655         #  @param theShape Any shape.
5656         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5657         #                       returned, else all found sub-shapes and groups.
5658         #  @return List of existing sub-objects of \a theShape.
5659         #
5660         #  @ref swig_all_decompose "Example"
5661         @ManageTransactions("ShapesOp")
5662         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5663             """
5664             Get all sub-shapes and groups of theShape,
5665             that were created already by any other methods.
5666
5667             Parameters:
5668                 theShape Any shape.
5669                 theGroupsOnly If this parameter is TRUE, only groups will be
5670                                  returned, else all found sub-shapes and groups.
5671
5672             Returns:
5673                 List of existing sub-objects of theShape.
5674             """
5675             # Example: see GEOM_TestAll.py
5676             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5677             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5678             return ListObj
5679
5680         ## Get all groups of \a theShape,
5681         #  that were created already by any other methods.
5682         #  @param theShape Any shape.
5683         #  @return List of existing groups of \a theShape.
5684         #
5685         #  @ref swig_all_decompose "Example"
5686         @ManageTransactions("ShapesOp")
5687         def GetGroups(self, theShape):
5688             """
5689             Get all groups of theShape,
5690             that were created already by any other methods.
5691
5692             Parameters:
5693                 theShape Any shape.
5694
5695             Returns:
5696                 List of existing groups of theShape.
5697             """
5698             # Example: see GEOM_TestAll.py
5699             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5700             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5701             return ListObj
5702
5703         ## Explode a shape on sub-shapes of a given type.
5704         #  If the shape itself matches the type, it is also returned.
5705         #  @param aShape Shape to be exploded.
5706         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5707         #  @param theName Object name; when specified, this parameter is used
5708         #         for result publication in the study. Otherwise, if automatic
5709         #         publication is switched on, default value is used for result name.
5710         #
5711         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5712         #
5713         #  @ref swig_all_decompose "Example"
5714         @ManageTransactions("ShapesOp")
5715         def SubShapeAll(self, aShape, aType, theName=None):
5716             """
5717             Explode a shape on sub-shapes of a given type.
5718             If the shape itself matches the type, it is also returned.
5719
5720             Parameters:
5721                 aShape Shape to be exploded.
5722                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5723                 theName Object name; when specified, this parameter is used
5724                         for result publication in the study. Otherwise, if automatic
5725                         publication is switched on, default value is used for result name.
5726
5727             Returns:
5728                 List of sub-shapes of type theShapeType, contained in theShape.
5729             """
5730             # Example: see GEOM_TestAll.py
5731             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5732             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5733             self._autoPublish(ListObj, theName, "subshape")
5734             return ListObj
5735
5736         ## Explode a shape on sub-shapes of a given type.
5737         #  @param aShape Shape to be exploded.
5738         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5739         #  @return List of IDs of sub-shapes.
5740         #
5741         #  @ref swig_all_decompose "Example"
5742         @ManageTransactions("ShapesOp")
5743         def SubShapeAllIDs(self, aShape, aType):
5744             """
5745             Explode a shape on sub-shapes of a given type.
5746
5747             Parameters:
5748                 aShape Shape to be exploded (see geompy.ShapeType)
5749                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5750
5751             Returns:
5752                 List of IDs of sub-shapes.
5753             """
5754             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5755             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5756             return ListObj
5757
5758         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5759         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5760         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5761         #  @param aShape Shape to get sub-shape of.
5762         #  @param ListOfInd List of sub-shapes indices.
5763         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5764         #  @param theName Object name; when specified, this parameter is used
5765         #         for result publication in the study. Otherwise, if automatic
5766         #         publication is switched on, default value is used for result name.
5767         #
5768         #  @return A compound of sub-shapes of aShape.
5769         #
5770         #  @ref swig_all_decompose "Example"
5771         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5772             """
5773             Obtain a compound of sub-shapes of aShape,
5774             selected by their indices in list of all sub-shapes of type aType.
5775             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5776
5777             Parameters:
5778                 aShape Shape to get sub-shape of.
5779                 ListOfID List of sub-shapes indices.
5780                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5781                 theName Object name; when specified, this parameter is used
5782                         for result publication in the study. Otherwise, if automatic
5783                         publication is switched on, default value is used for result name.
5784
5785             Returns:
5786                 A compound of sub-shapes of aShape.
5787             """
5788             # Example: see GEOM_TestAll.py
5789             ListOfIDs = []
5790             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5791             for ind in ListOfInd:
5792                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5793             # note: auto-publishing is done in self.GetSubShape()
5794             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5795             return anObj
5796
5797         ## Explode a shape on sub-shapes of a given type.
5798         #  Sub-shapes will be sorted taking into account their gravity centers,
5799         #  to provide stable order of sub-shapes.
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_SubShapeAllSorted "Example"
5810         @ManageTransactions("ShapesOp")
5811         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5812             """
5813             Explode a shape on sub-shapes of a given type.
5814             Sub-shapes will be sorted taking into account their gravity centers,
5815             to provide stable order of sub-shapes.
5816             If the shape itself matches the type, it is also returned.
5817
5818             Parameters:
5819                 aShape Shape to be exploded.
5820                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5821                 theName Object name; when specified, this parameter is used
5822                         for result publication in the study. Otherwise, if automatic
5823                         publication is switched on, default value is used for result name.
5824
5825             Returns:
5826                 List of sub-shapes of type theShapeType, contained in theShape.
5827             """
5828             # Example: see GEOM_TestAll.py
5829             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5830             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5831             self._autoPublish(ListObj, theName, "subshape")
5832             return ListObj
5833
5834         ## Explode a shape on sub-shapes of a given type.
5835         #  Sub-shapes will be sorted taking into account their gravity centers,
5836         #  to provide stable order of sub-shapes.
5837         #  @param aShape Shape to be exploded.
5838         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5839         #  @return List of IDs of sub-shapes.
5840         #
5841         #  @ref swig_all_decompose "Example"
5842         @ManageTransactions("ShapesOp")
5843         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5844             """
5845             Explode a shape on sub-shapes of a given type.
5846             Sub-shapes will be sorted taking into account their gravity centers,
5847             to provide stable order of sub-shapes.
5848
5849             Parameters:
5850                 aShape Shape to be exploded.
5851                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5852
5853             Returns:
5854                 List of IDs of sub-shapes.
5855             """
5856             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5857             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5858             return ListIDs
5859
5860         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5861         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5862         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5863         #  @param aShape Shape to get sub-shape of.
5864         #  @param ListOfInd List of sub-shapes indices.
5865         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5866         #  @param theName Object name; when specified, this parameter is used
5867         #         for result publication in the study. Otherwise, if automatic
5868         #         publication is switched on, default value is used for result name.
5869         #
5870         #  @return A compound of sub-shapes of aShape.
5871         #
5872         #  @ref swig_all_decompose "Example"
5873         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5874             """
5875             Obtain a compound of sub-shapes of aShape,
5876             selected by they indices in sorted list of all sub-shapes of type aType.
5877             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5878
5879             Parameters:
5880                 aShape Shape to get sub-shape of.
5881                 ListOfID List of sub-shapes indices.
5882                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5883                 theName Object name; when specified, this parameter is used
5884                         for result publication in the study. Otherwise, if automatic
5885                         publication is switched on, default value is used for result name.
5886
5887             Returns:
5888                 A compound of sub-shapes of aShape.
5889             """
5890             # Example: see GEOM_TestAll.py
5891             ListOfIDs = []
5892             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5893             for ind in ListOfInd:
5894                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5895             # note: auto-publishing is done in self.GetSubShape()
5896             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5897             return anObj
5898
5899         ## Extract shapes (excluding the main shape) of given type.
5900         #  @param aShape The shape.
5901         #  @param aType  The shape type (see ShapeType())
5902         #  @param isSorted Boolean flag to switch sorting on/off.
5903         #  @param theName Object name; when specified, this parameter is used
5904         #         for result publication in the study. Otherwise, if automatic
5905         #         publication is switched on, default value is used for result name.
5906         #
5907         #  @return List of sub-shapes of type aType, contained in aShape.
5908         #
5909         #  @ref swig_FilletChamfer "Example"
5910         @ManageTransactions("ShapesOp")
5911         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5912             """
5913             Extract shapes (excluding the main shape) of given type.
5914
5915             Parameters:
5916                 aShape The shape.
5917                 aType  The shape type (see geompy.ShapeType)
5918                 isSorted Boolean flag to switch sorting on/off.
5919                 theName Object name; when specified, this parameter is used
5920                         for result publication in the study. Otherwise, if automatic
5921                         publication is switched on, default value is used for result name.
5922
5923             Returns:
5924                 List of sub-shapes of type aType, contained in aShape.
5925             """
5926             # Example: see GEOM_TestAll.py
5927             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5928             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5929             self._autoPublish(ListObj, theName, "subshape")
5930             return ListObj
5931
5932         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5933         #  @param aShape Main shape.
5934         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5935         #  @param theName Object name; when specified, this parameter is used
5936         #         for result publication in the study. Otherwise, if automatic
5937         #         publication is switched on, default value is used for result name.
5938         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5939         #
5940         #  @ref swig_all_decompose "Example"
5941         @ManageTransactions("ShapesOp")
5942         def SubShapes(self, aShape, anIDs, theName=None):
5943             """
5944             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5945
5946             Parameters:
5947                 aShape Main shape.
5948                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5949                 theName Object name; when specified, this parameter is used
5950                         for result publication in the study. Otherwise, if automatic
5951                         publication is switched on, default value is used for result name.
5952
5953             Returns:
5954                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5955             """
5956             # Example: see GEOM_TestAll.py
5957             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5958             RaiseIfFailed("SubShapes", self.ShapesOp)
5959             self._autoPublish(ListObj, theName, "subshape")
5960             return ListObj
5961
5962         # end of l4_decompose
5963         ## @}
5964
5965         ## @addtogroup l4_decompose_d
5966         ## @{
5967
5968         ## Deprecated method
5969         #  It works like SubShapeAllSortedCentres(), but wrongly
5970         #  defines centres of faces, shells and solids.
5971         @ManageTransactions("ShapesOp")
5972         def SubShapeAllSorted(self, aShape, aType, theName=None):
5973             """
5974             Deprecated method
5975             It works like geompy.SubShapeAllSortedCentres, but wrongly
5976             defines centres of faces, shells and solids.
5977             """
5978             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5979             RaiseIfFailed("MakeExplode", self.ShapesOp)
5980             self._autoPublish(ListObj, theName, "subshape")
5981             return ListObj
5982
5983         ## Deprecated method
5984         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5985         #  defines centres of faces, shells and solids.
5986         @ManageTransactions("ShapesOp")
5987         def SubShapeAllSortedIDs(self, aShape, aType):
5988             """
5989             Deprecated method
5990             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5991             defines centres of faces, shells and solids.
5992             """
5993             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5994             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5995             return ListIDs
5996
5997         ## Deprecated method
5998         #  It works like SubShapeSortedCentres(), but has a bug
5999         #  (wrongly defines centres of faces, shells and solids).
6000         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6001             """
6002             Deprecated method
6003             It works like geompy.SubShapeSortedCentres, but has a bug
6004             (wrongly defines centres of faces, shells and solids).
6005             """
6006             ListOfIDs = []
6007             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6008             for ind in ListOfInd:
6009                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6010             # note: auto-publishing is done in self.GetSubShape()
6011             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6012             return anObj
6013
6014         # end of l4_decompose_d
6015         ## @}
6016
6017         ## @addtogroup l3_healing
6018         ## @{
6019
6020         ## Apply a sequence of Shape Healing operators to the given object.
6021         #  @param theShape Shape to be processed.
6022         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6023         #  @param theParameters List of names of parameters
6024         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6025         #  @param theValues List of values of parameters, in the same order
6026         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6027         #  @param theName Object name; when specified, this parameter is used
6028         #         for result publication in the study. Otherwise, if automatic
6029         #         publication is switched on, default value is used for result name.
6030         #
6031         #  <b> Operators and Parameters: </b> \n
6032         #
6033         #  * \b FixShape - corrects invalid shapes. \n
6034         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6035         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6036         #
6037         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6038         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6039         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6040         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6041         #
6042         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6043         #    surfaces in segments using a certain angle. \n
6044         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6045         #    if Angle=180, four if Angle=90, etc). \n
6046         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6047         #
6048         #  * \b SplitClosedFaces - splits closed faces in segments.
6049         #    The number of segments depends on the number of splitting points.\n
6050         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6051         #
6052         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6053         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6054         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6055         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6056         #   This and the previous parameters can take the following values:\n
6057         #   \b Parametric \b Continuity \n
6058         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6059         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6060         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6061         #    ruling out sharp edges).\n
6062         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6063         #       are of the same magnitude).\n
6064         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6065         #    or surfaces (d/du C(u)) are the same at junction. \n
6066         #   \b Geometric \b Continuity \n
6067         #   \b G1: first derivatives are proportional at junction.\n
6068         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6069         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6070         #   \b G2: first and second derivatives are proportional at junction.
6071         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6072         #    continuity requires that the underlying parameterization was continuous as well.
6073         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6074         #
6075         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6076         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6077         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6078         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6079         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6080         #       with the specified parameters.\n
6081         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6082         #       with the specified parameters.\n
6083         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6084         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6085         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6086         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6087         #
6088         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6089         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6090         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6091         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6092         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6093         #
6094         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6095         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6096         #
6097         #
6098         #  @return New GEOM.GEOM_Object, containing processed shape.
6099         #
6100         #  \n @ref tui_shape_processing "Example"
6101         @ManageTransactions("HealOp")
6102         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6103             """
6104             Apply a sequence of Shape Healing operators to the given object.
6105
6106             Parameters:
6107                 theShape Shape to be processed.
6108                 theValues List of values of parameters, in the same order
6109                           as parameters are listed in theParameters list.
6110                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6111                 theParameters List of names of parameters
6112                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6113                 theName Object name; when specified, this parameter is used
6114                         for result publication in the study. Otherwise, if automatic
6115                         publication is switched on, default value is used for result name.
6116
6117                 Operators and Parameters:
6118
6119                  * FixShape - corrects invalid shapes.
6120                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6121                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6122                  * FixFaceSize - removes small faces, such as spots and strips.
6123                      * FixFaceSize.Tolerance - defines minimum possible face size.
6124                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
6125                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6126                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6127                                 in segments using a certain angle.
6128                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6129                                           if Angle=180, four if Angle=90, etc).
6130                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6131                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6132                                       splitting points.
6133                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6134                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6135                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6136                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6137                      * SplitContinuity.CurveContinuity - required continuity for curves.
6138                        This and the previous parameters can take the following values:
6139
6140                        Parametric Continuity:
6141                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6142                                                    coincidental. The curves or surfaces may still meet at an angle,
6143                                                    giving rise to a sharp corner or edge).
6144                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6145                                                    are parallel, ruling out sharp edges).
6146                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6147                                                   or surfaces are of the same magnitude).
6148                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6149                           curves or surfaces (d/du C(u)) are the same at junction.
6150
6151                        Geometric Continuity:
6152                        G1: first derivatives are proportional at junction.
6153                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6154                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6155                        G2: first and second derivatives are proportional at junction. As the names imply,
6156                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6157                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6158                            geometric continuity of order n, but not vice-versa.
6159                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6160                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6161                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6162                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6163                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6164                                                         the specified parameters.
6165                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6166                                                         the specified parameters.
6167                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6168                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6169                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6170                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6171                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6172                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6173                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6174                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6175                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6176                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6177                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6178
6179             Returns:
6180                 New GEOM.GEOM_Object, containing processed shape.
6181
6182             Note: For more information look through SALOME Geometry User's Guide->
6183                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6184             """
6185             # Example: see GEOM_TestHealing.py
6186             theValues,Parameters = ParseList(theValues)
6187             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6188             # To avoid script failure in case of good argument shape
6189             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6190                 return theShape
6191             RaiseIfFailed("ProcessShape", self.HealOp)
6192             for string in (theOperators + theParameters):
6193                 Parameters = ":" + Parameters
6194                 pass
6195             anObj.SetParameters(Parameters)
6196             self._autoPublish(anObj, theName, "healed")
6197             return anObj
6198
6199         ## Remove faces from the given object (shape).
6200         #  @param theObject Shape to be processed.
6201         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6202         #                  removes ALL faces of the given object.
6203         #  @param theName Object name; when specified, this parameter is used
6204         #         for result publication in the study. Otherwise, if automatic
6205         #         publication is switched on, default value is used for result name.
6206         #
6207         #  @return New GEOM.GEOM_Object, containing processed shape.
6208         #
6209         #  @ref tui_suppress_faces "Example"
6210         @ManageTransactions("HealOp")
6211         def SuppressFaces(self, theObject, theFaces, theName=None):
6212             """
6213             Remove faces from the given object (shape).
6214
6215             Parameters:
6216                 theObject Shape to be processed.
6217                 theFaces Indices of faces to be removed, if EMPTY then the method
6218                          removes ALL faces of the given object.
6219                 theName Object name; when specified, this parameter is used
6220                         for result publication in the study. Otherwise, if automatic
6221                         publication is switched on, default value is used for result name.
6222
6223             Returns:
6224                 New GEOM.GEOM_Object, containing processed shape.
6225             """
6226             # Example: see GEOM_TestHealing.py
6227             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6228             RaiseIfFailed("SuppressFaces", self.HealOp)
6229             self._autoPublish(anObj, theName, "suppressFaces")
6230             return anObj
6231
6232         ## Sewing of some shapes into single shape.
6233         #  @param ListShape Shapes to be processed.
6234         #  @param theTolerance Required tolerance value.
6235         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6236         #  @param theName Object name; when specified, this parameter is used
6237         #         for result publication in the study. Otherwise, if automatic
6238         #         publication is switched on, default value is used for result name.
6239         #
6240         #  @return New GEOM.GEOM_Object, containing processed shape.
6241         #
6242         #  @ref tui_sewing "Example"
6243         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6244             """
6245             Sewing of some shapes into single shape.
6246
6247             Parameters:
6248                 ListShape Shapes to be processed.
6249                 theTolerance Required tolerance value.
6250                 AllowNonManifold Flag that allows non-manifold sewing.
6251                 theName Object name; when specified, this parameter is used
6252                         for result publication in the study. Otherwise, if automatic
6253                         publication is switched on, default value is used for result name.
6254
6255             Returns:
6256                 New GEOM.GEOM_Object, containing processed shape.
6257             """
6258             # Example: see GEOM_TestHealing.py
6259             comp = self.MakeCompound(ListShape)
6260             # note: auto-publishing is done in self.Sew()
6261             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
6262             return anObj
6263
6264         ## Sewing of the given object.
6265         #  @param theObject Shape to be processed.
6266         #  @param theTolerance Required tolerance value.
6267         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6268         #  @param theName Object name; when specified, this parameter is used
6269         #         for result publication in the study. Otherwise, if automatic
6270         #         publication is switched on, default value is used for result name.
6271         #
6272         #  @return New GEOM.GEOM_Object, containing processed shape.
6273         @ManageTransactions("HealOp")
6274         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
6275             """
6276             Sewing of the given object.
6277
6278             Parameters:
6279                 theObject Shape to be processed.
6280                 theTolerance Required tolerance value.
6281                 AllowNonManifold Flag that allows non-manifold sewing.
6282                 theName Object name; when specified, this parameter is used
6283                         for result publication in the study. Otherwise, if automatic
6284                         publication is switched on, default value is used for result name.
6285
6286             Returns:
6287                 New GEOM.GEOM_Object, containing processed shape.
6288             """
6289             # Example: see MakeSewing() above
6290             theTolerance,Parameters = ParseParameters(theTolerance)
6291             if AllowNonManifold:
6292                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
6293             else:
6294                 anObj = self.HealOp.Sew(theObject, theTolerance)
6295             # To avoid script failure in case of good argument shape
6296             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6297                 return theObject
6298             RaiseIfFailed("Sew", self.HealOp)
6299             anObj.SetParameters(Parameters)
6300             self._autoPublish(anObj, theName, "sewed")
6301             return anObj
6302
6303         ## Rebuild the topology of theCompound of solids by removing
6304         #  of the faces that are shared by several solids.
6305         #  @param theCompound Shape to be processed.
6306         #  @param theName Object name; when specified, this parameter is used
6307         #         for result publication in the study. Otherwise, if automatic
6308         #         publication is switched on, default value is used for result name.
6309         #
6310         #  @return New GEOM.GEOM_Object, containing processed shape.
6311         #
6312         #  @ref tui_remove_webs "Example"
6313         @ManageTransactions("HealOp")
6314         def RemoveInternalFaces (self, theCompound, theName=None):
6315             """
6316             Rebuild the topology of theCompound of solids by removing
6317             of the faces that are shared by several solids.
6318
6319             Parameters:
6320                 theCompound Shape to be processed.
6321                 theName Object name; when specified, this parameter is used
6322                         for result publication in the study. Otherwise, if automatic
6323                         publication is switched on, default value is used for result name.
6324
6325             Returns:
6326                 New GEOM.GEOM_Object, containing processed shape.
6327             """
6328             # Example: see GEOM_TestHealing.py
6329             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6330             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6331             self._autoPublish(anObj, theName, "removeWebs")
6332             return anObj
6333
6334         ## Remove internal wires and edges from the given object (face).
6335         #  @param theObject Shape to be processed.
6336         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6337         #                  removes ALL internal wires of the given object.
6338         #  @param theName Object name; when specified, this parameter is used
6339         #         for result publication in the study. Otherwise, if automatic
6340         #         publication is switched on, default value is used for result name.
6341         #
6342         #  @return New GEOM.GEOM_Object, containing processed shape.
6343         #
6344         #  @ref tui_suppress_internal_wires "Example"
6345         @ManageTransactions("HealOp")
6346         def SuppressInternalWires(self, theObject, theWires, theName=None):
6347             """
6348             Remove internal wires and edges from the given object (face).
6349
6350             Parameters:
6351                 theObject Shape to be processed.
6352                 theWires Indices of wires to be removed, if EMPTY then the method
6353                          removes ALL internal wires of the given object.
6354                 theName Object name; when specified, this parameter is used
6355                         for result publication in the study. Otherwise, if automatic
6356                         publication is switched on, default value is used for result name.
6357
6358             Returns:
6359                 New GEOM.GEOM_Object, containing processed shape.
6360             """
6361             # Example: see GEOM_TestHealing.py
6362             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6363             RaiseIfFailed("RemoveIntWires", self.HealOp)
6364             self._autoPublish(anObj, theName, "suppressWires")
6365             return anObj
6366
6367         ## Remove internal closed contours (holes) from the given object.
6368         #  @param theObject Shape to be processed.
6369         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6370         #                  removes ALL internal holes of the given object
6371         #  @param theName Object name; when specified, this parameter is used
6372         #         for result publication in the study. Otherwise, if automatic
6373         #         publication is switched on, default value is used for result name.
6374         #
6375         #  @return New GEOM.GEOM_Object, containing processed shape.
6376         #
6377         #  @ref tui_suppress_holes "Example"
6378         @ManageTransactions("HealOp")
6379         def SuppressHoles(self, theObject, theWires, theName=None):
6380             """
6381             Remove internal closed contours (holes) from the given object.
6382
6383             Parameters:
6384                 theObject Shape to be processed.
6385                 theWires Indices of wires to be removed, if EMPTY then the method
6386                          removes ALL internal holes of the given object
6387                 theName Object name; when specified, this parameter is used
6388                         for result publication in the study. Otherwise, if automatic
6389                         publication is switched on, default value is used for result name.
6390
6391             Returns:
6392                 New GEOM.GEOM_Object, containing processed shape.
6393             """
6394             # Example: see GEOM_TestHealing.py
6395             anObj = self.HealOp.FillHoles(theObject, theWires)
6396             RaiseIfFailed("FillHoles", self.HealOp)
6397             self._autoPublish(anObj, theName, "suppressHoles")
6398             return anObj
6399
6400         ## Close an open wire.
6401         #  @param theObject Shape to be processed.
6402         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6403         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6404         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6405         #                        If False : closure by creation of an edge between ends.
6406         #  @param theName Object name; when specified, this parameter is used
6407         #         for result publication in the study. Otherwise, if automatic
6408         #         publication is switched on, default value is used for result name.
6409         #
6410         #  @return New GEOM.GEOM_Object, containing processed shape.
6411         #
6412         #  @ref tui_close_contour "Example"
6413         @ManageTransactions("HealOp")
6414         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6415             """
6416             Close an open wire.
6417
6418             Parameters:
6419                 theObject Shape to be processed.
6420                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6421                          if [ ], then theObject itself is a wire.
6422                 isCommonVertex If True  : closure by creation of a common vertex,
6423                                If False : closure by creation of an edge between ends.
6424                 theName Object name; when specified, this parameter is used
6425                         for result publication in the study. Otherwise, if automatic
6426                         publication is switched on, default value is used for result name.
6427
6428             Returns:
6429                 New GEOM.GEOM_Object, containing processed shape.
6430             """
6431             # Example: see GEOM_TestHealing.py
6432             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6433             RaiseIfFailed("CloseContour", self.HealOp)
6434             self._autoPublish(anObj, theName, "closeContour")
6435             return anObj
6436
6437         ## Addition of a point to a given edge object.
6438         #  @param theObject Shape to be processed.
6439         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6440         #                      if -1, then theObject itself is the edge.
6441         #  @param theValue Value of parameter on edge or length parameter,
6442         #                  depending on \a isByParameter.
6443         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6444         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6445         #  @param theName Object name; when specified, this parameter is used
6446         #         for result publication in the study. Otherwise, if automatic
6447         #         publication is switched on, default value is used for result name.
6448         #
6449         #  @return New GEOM.GEOM_Object, containing processed shape.
6450         #
6451         #  @ref tui_add_point_on_edge "Example"
6452         @ManageTransactions("HealOp")
6453         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6454             """
6455             Addition of a point to a given edge object.
6456
6457             Parameters:
6458                 theObject Shape to be processed.
6459                 theEdgeIndex Index of edge to be divided within theObject's shape,
6460                              if -1, then theObject itself is the edge.
6461                 theValue Value of parameter on edge or length parameter,
6462                          depending on isByParameter.
6463                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6464                               if FALSE : theValue is treated as a length parameter [0..1]
6465                 theName Object name; when specified, this parameter is used
6466                         for result publication in the study. Otherwise, if automatic
6467                         publication is switched on, default value is used for result name.
6468
6469             Returns:
6470                 New GEOM.GEOM_Object, containing processed shape.
6471             """
6472             # Example: see GEOM_TestHealing.py
6473             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6474             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6475             RaiseIfFailed("DivideEdge", self.HealOp)
6476             anObj.SetParameters(Parameters)
6477             self._autoPublish(anObj, theName, "divideEdge")
6478             return anObj
6479
6480         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6481         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6482         #  @param theVertices A list of vertices to suppress. If the list
6483         #                     is empty, all vertices in a wire will be assumed.
6484         #  @param theName Object name; when specified, this parameter is used
6485         #         for result publication in the study. Otherwise, if automatic
6486         #         publication is switched on, default value is used for result name.
6487         #
6488         #  @return New GEOM.GEOM_Object with modified wire.
6489         #
6490         #  @ref tui_fuse_collinear_edges "Example"
6491         @ManageTransactions("HealOp")
6492         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6493             """
6494             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6495
6496             Parameters:
6497                 theWire Wire to minimize the number of C1 continuous edges in.
6498                 theVertices A list of vertices to suppress. If the list
6499                             is empty, all vertices in a wire will be assumed.
6500                 theName Object name; when specified, this parameter is used
6501                         for result publication in the study. Otherwise, if automatic
6502                         publication is switched on, default value is used for result name.
6503
6504             Returns:
6505                 New GEOM.GEOM_Object with modified wire.
6506             """
6507             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6508             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6509             self._autoPublish(anObj, theName, "fuseEdges")
6510             return anObj
6511
6512         ## Change orientation of the given object. Updates given shape.
6513         #  @param theObject Shape to be processed.
6514         #  @return Updated <var>theObject</var>
6515         #
6516         #  @ref swig_todo "Example"
6517         @ManageTransactions("HealOp")
6518         def ChangeOrientationShell(self,theObject):
6519             """
6520             Change orientation of the given object. Updates given shape.
6521
6522             Parameters:
6523                 theObject Shape to be processed.
6524
6525             Returns:
6526                 Updated theObject
6527             """
6528             theObject = self.HealOp.ChangeOrientation(theObject)
6529             RaiseIfFailed("ChangeOrientation", self.HealOp)
6530             pass
6531
6532         ## Change orientation of the given object.
6533         #  @param theObject Shape to be processed.
6534         #  @param theName Object name; when specified, this parameter is used
6535         #         for result publication in the study. Otherwise, if automatic
6536         #         publication is switched on, default value is used for result name.
6537         #
6538         #  @return New GEOM.GEOM_Object, containing processed shape.
6539         #
6540         #  @ref swig_todo "Example"
6541         @ManageTransactions("HealOp")
6542         def ChangeOrientationShellCopy(self, theObject, theName=None):
6543             """
6544             Change orientation of the given object.
6545
6546             Parameters:
6547                 theObject Shape to be processed.
6548                 theName Object name; when specified, this parameter is used
6549                         for result publication in the study. Otherwise, if automatic
6550                         publication is switched on, default value is used for result name.
6551
6552             Returns:
6553                 New GEOM.GEOM_Object, containing processed shape.
6554             """
6555             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6556             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6557             self._autoPublish(anObj, theName, "reversed")
6558             return anObj
6559
6560         ## Try to limit tolerance of the given object by value \a theTolerance.
6561         #  @param theObject Shape to be processed.
6562         #  @param theTolerance Required tolerance value.
6563         #  @param theName Object name; when specified, this parameter is used
6564         #         for result publication in the study. Otherwise, if automatic
6565         #         publication is switched on, default value is used for result name.
6566         #
6567         #  @return New GEOM.GEOM_Object, containing processed shape.
6568         #
6569         #  @ref tui_limit_tolerance "Example"
6570         @ManageTransactions("HealOp")
6571         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6572             """
6573             Try to limit tolerance of the given object by value theTolerance.
6574
6575             Parameters:
6576                 theObject Shape to be processed.
6577                 theTolerance Required tolerance value.
6578                 theName Object name; when specified, this parameter is used
6579                         for result publication in the study. Otherwise, if automatic
6580                         publication is switched on, default value is used for result name.
6581
6582             Returns:
6583                 New GEOM.GEOM_Object, containing processed shape.
6584             """
6585             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6586             RaiseIfFailed("LimitTolerance", self.HealOp)
6587             self._autoPublish(anObj, theName, "limitTolerance")
6588             return anObj
6589
6590         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6591         #  that constitute a free boundary of the given shape.
6592         #  @param theObject Shape to get free boundary of.
6593         #  @param theName Object name; when specified, this parameter is used
6594         #         for result publication in the study. Otherwise, if automatic
6595         #         publication is switched on, default value is used for result name.
6596         #
6597         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6598         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6599         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6600         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6601         #
6602         #  @ref tui_measurement_tools_page "Example"
6603         @ManageTransactions("HealOp")
6604         def GetFreeBoundary(self, theObject, theName=None):
6605             """
6606             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6607             that constitute a free boundary of the given shape.
6608
6609             Parameters:
6610                 theObject Shape to get free boundary of.
6611                 theName Object name; when specified, this parameter is used
6612                         for result publication in the study. Otherwise, if automatic
6613                         publication is switched on, default value is used for result name.
6614
6615             Returns:
6616                 [status, theClosedWires, theOpenWires]
6617                  status: FALSE, if an error(s) occured during the method execution.
6618                  theClosedWires: Closed wires on the free boundary of the given shape.
6619                  theOpenWires: Open wires on the free boundary of the given shape.
6620             """
6621             # Example: see GEOM_TestHealing.py
6622             anObj = self.HealOp.GetFreeBoundary(theObject)
6623             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6624             self._autoPublish(anObj[1], theName, "closedWire")
6625             self._autoPublish(anObj[2], theName, "openWire")
6626             return anObj
6627
6628         ## Replace coincident faces in theShape by one face.
6629         #  @param theShape Initial shape.
6630         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6631         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6632         #                         otherwise all initial shapes.
6633         #  @param theName Object name; when specified, this parameter is used
6634         #         for result publication in the study. Otherwise, if automatic
6635         #         publication is switched on, default value is used for result name.
6636         #
6637         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6638         #
6639         #  @ref tui_glue_faces "Example"
6640         @ManageTransactions("ShapesOp")
6641         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6642             """
6643             Replace coincident faces in theShape by one face.
6644
6645             Parameters:
6646                 theShape Initial shape.
6647                 theTolerance Maximum distance between faces, which can be considered as coincident.
6648                 doKeepNonSolids If FALSE, only solids will present in the result,
6649                                 otherwise all initial shapes.
6650                 theName Object name; when specified, this parameter is used
6651                         for result publication in the study. Otherwise, if automatic
6652                         publication is switched on, default value is used for result name.
6653
6654             Returns:
6655                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6656             """
6657             # Example: see GEOM_Spanner.py
6658             theTolerance,Parameters = ParseParameters(theTolerance)
6659             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6660             if anObj is None:
6661                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6662             anObj.SetParameters(Parameters)
6663             self._autoPublish(anObj, theName, "glueFaces")
6664             return anObj
6665
6666         ## Find coincident faces in theShape for possible gluing.
6667         #  @param theShape Initial shape.
6668         #  @param theTolerance Maximum distance between faces,
6669         #                      which can be considered as coincident.
6670         #  @param theName Object name; when specified, this parameter is used
6671         #         for result publication in the study. Otherwise, if automatic
6672         #         publication is switched on, default value is used for result name.
6673         #
6674         #  @return GEOM.ListOfGO
6675         #
6676         #  @ref tui_glue_faces "Example"
6677         @ManageTransactions("ShapesOp")
6678         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6679             """
6680             Find coincident faces in theShape for possible gluing.
6681
6682             Parameters:
6683                 theShape Initial shape.
6684                 theTolerance Maximum distance between faces,
6685                              which can be considered as coincident.
6686                 theName Object name; when specified, this parameter is used
6687                         for result publication in the study. Otherwise, if automatic
6688                         publication is switched on, default value is used for result name.
6689
6690             Returns:
6691                 GEOM.ListOfGO
6692             """
6693             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6694             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6695             self._autoPublish(anObj, theName, "facesToGlue")
6696             return anObj
6697
6698         ## Replace coincident faces in theShape by one face
6699         #  in compliance with given list of faces
6700         #  @param theShape Initial shape.
6701         #  @param theTolerance Maximum distance between faces,
6702         #                      which can be considered as coincident.
6703         #  @param theFaces List of faces for gluing.
6704         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6705         #                         otherwise all initial shapes.
6706         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6707         #                        will be glued, otherwise only the edges,
6708         #                        belonging to <VAR>theFaces</VAR>.
6709         #  @param theName Object name; when specified, this parameter is used
6710         #         for result publication in the study. Otherwise, if automatic
6711         #         publication is switched on, default value is used for result name.
6712         #
6713         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6714         #          without some faces.
6715         #
6716         #  @ref tui_glue_faces "Example"
6717         @ManageTransactions("ShapesOp")
6718         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6719                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6720             """
6721             Replace coincident faces in theShape by one face
6722             in compliance with given list of faces
6723
6724             Parameters:
6725                 theShape Initial shape.
6726                 theTolerance Maximum distance between faces,
6727                              which can be considered as coincident.
6728                 theFaces List of faces for gluing.
6729                 doKeepNonSolids If FALSE, only solids will present in the result,
6730                                 otherwise all initial shapes.
6731                 doGlueAllEdges If TRUE, all coincident edges of theShape
6732                                will be glued, otherwise only the edges,
6733                                belonging to theFaces.
6734                 theName Object name; when specified, this parameter is used
6735                         for result publication in the study. Otherwise, if automatic
6736                         publication is switched on, default value is used for result name.
6737
6738             Returns:
6739                 New GEOM.GEOM_Object, containing a copy of theShape
6740                     without some faces.
6741             """
6742             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6743                                                       doKeepNonSolids, doGlueAllEdges)
6744             if anObj is None:
6745                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6746             self._autoPublish(anObj, theName, "glueFaces")
6747             return anObj
6748
6749         ## Replace coincident edges in theShape by one edge.
6750         #  @param theShape Initial shape.
6751         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6752         #  @param theName Object name; when specified, this parameter is used
6753         #         for result publication in the study. Otherwise, if automatic
6754         #         publication is switched on, default value is used for result name.
6755         #
6756         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6757         #
6758         #  @ref tui_glue_edges "Example"
6759         @ManageTransactions("ShapesOp")
6760         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6761             """
6762             Replace coincident edges in theShape by one edge.
6763
6764             Parameters:
6765                 theShape Initial shape.
6766                 theTolerance Maximum distance between edges, which can be considered as coincident.
6767                 theName Object name; when specified, this parameter is used
6768                         for result publication in the study. Otherwise, if automatic
6769                         publication is switched on, default value is used for result name.
6770
6771             Returns:
6772                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6773             """
6774             theTolerance,Parameters = ParseParameters(theTolerance)
6775             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6776             if anObj is None:
6777                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6778             anObj.SetParameters(Parameters)
6779             self._autoPublish(anObj, theName, "glueEdges")
6780             return anObj
6781
6782         ## Find coincident edges in theShape for possible gluing.
6783         #  @param theShape Initial shape.
6784         #  @param theTolerance Maximum distance between edges,
6785         #                      which can be considered as coincident.
6786         #  @param theName Object name; when specified, this parameter is used
6787         #         for result publication in the study. Otherwise, if automatic
6788         #         publication is switched on, default value is used for result name.
6789         #
6790         #  @return GEOM.ListOfGO
6791         #
6792         #  @ref tui_glue_edges "Example"
6793         @ManageTransactions("ShapesOp")
6794         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6795             """
6796             Find coincident edges in theShape for possible gluing.
6797
6798             Parameters:
6799                 theShape Initial shape.
6800                 theTolerance Maximum distance between edges,
6801                              which can be considered as coincident.
6802                 theName Object name; when specified, this parameter is used
6803                         for result publication in the study. Otherwise, if automatic
6804                         publication is switched on, default value is used for result name.
6805
6806             Returns:
6807                 GEOM.ListOfGO
6808             """
6809             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6810             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6811             self._autoPublish(anObj, theName, "edgesToGlue")
6812             return anObj
6813
6814         ## Replace coincident edges in theShape by one edge
6815         #  in compliance with given list of edges.
6816         #  @param theShape Initial shape.
6817         #  @param theTolerance Maximum distance between edges,
6818         #                      which can be considered as coincident.
6819         #  @param theEdges List of edges for gluing.
6820         #  @param theName Object name; when specified, this parameter is used
6821         #         for result publication in the study. Otherwise, if automatic
6822         #         publication is switched on, default value is used for result name.
6823         #
6824         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6825         #          without some edges.
6826         #
6827         #  @ref tui_glue_edges "Example"
6828         @ManageTransactions("ShapesOp")
6829         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6830             """
6831             Replace coincident edges in theShape by one edge
6832             in compliance with given list of edges.
6833
6834             Parameters:
6835                 theShape Initial shape.
6836                 theTolerance Maximum distance between edges,
6837                              which can be considered as coincident.
6838                 theEdges List of edges for gluing.
6839                 theName Object name; when specified, this parameter is used
6840                         for result publication in the study. Otherwise, if automatic
6841                         publication is switched on, default value is used for result name.
6842
6843             Returns:
6844                 New GEOM.GEOM_Object, containing a copy of theShape
6845                 without some edges.
6846             """
6847             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6848             if anObj is None:
6849                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6850             self._autoPublish(anObj, theName, "glueEdges")
6851             return anObj
6852
6853         # end of l3_healing
6854         ## @}
6855
6856         ## @addtogroup l3_boolean Boolean Operations
6857         ## @{
6858
6859         # -----------------------------------------------------------------------------
6860         # Boolean (Common, Cut, Fuse, Section)
6861         # -----------------------------------------------------------------------------
6862
6863         ## Perform one of boolean operations on two given shapes.
6864         #  @param theShape1 First argument for boolean operation.
6865         #  @param theShape2 Second argument for boolean operation.
6866         #  @param theOperation Indicates the operation to be done:\n
6867         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6868         #  @param checkSelfInte The flag that tells if the arguments should
6869         #         be checked for self-intersection prior to the operation.
6870         #  @param theName Object name; when specified, this parameter is used
6871         #         for result publication in the study. Otherwise, if automatic
6872         #         publication is switched on, default value is used for result name.
6873         #
6874         #  @note This algorithm doesn't find all types of self-intersections.
6875         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6876         #        vertex/face and edge/face intersections. Face/face
6877         #        intersections detection is switched off as it is a
6878         #        time-consuming operation that gives an impact on performance.
6879         #        To find all self-intersections please use
6880         #        CheckSelfIntersections() method.
6881         #
6882         #  @return New GEOM.GEOM_Object, containing the result shape.
6883         #
6884         #  @ref tui_fuse "Example"
6885         @ManageTransactions("BoolOp")
6886         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
6887             """
6888             Perform one of boolean operations on two given shapes.
6889
6890             Parameters:
6891                 theShape1 First argument for boolean operation.
6892                 theShape2 Second argument for boolean operation.
6893                 theOperation Indicates the operation to be done:
6894                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6895                 checkSelfInte The flag that tells if the arguments should
6896                               be checked for self-intersection prior to
6897                               the operation.
6898                 theName Object name; when specified, this parameter is used
6899                         for result publication in the study. Otherwise, if automatic
6900                         publication is switched on, default value is used for result name.
6901
6902             Note:
6903                     This algorithm doesn't find all types of self-intersections.
6904                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6905                     vertex/face and edge/face intersections. Face/face
6906                     intersections detection is switched off as it is a
6907                     time-consuming operation that gives an impact on performance.
6908                     To find all self-intersections please use
6909                     CheckSelfIntersections() method.
6910
6911             Returns:
6912                 New GEOM.GEOM_Object, containing the result shape.
6913             """
6914             # Example: see GEOM_TestAll.py
6915             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
6916             RaiseIfFailed("MakeBoolean", self.BoolOp)
6917             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6918             self._autoPublish(anObj, theName, def_names[theOperation])
6919             return anObj
6920
6921         ## Perform Common boolean operation on two given shapes.
6922         #  @param theShape1 First argument for boolean operation.
6923         #  @param theShape2 Second argument for boolean operation.
6924         #  @param checkSelfInte The flag that tells if the arguments should
6925         #         be checked for self-intersection prior to the operation.
6926         #  @param theName Object name; when specified, this parameter is used
6927         #         for result publication in the study. Otherwise, if automatic
6928         #         publication is switched on, default value is used for result name.
6929         #
6930         #  @note This algorithm doesn't find all types of self-intersections.
6931         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6932         #        vertex/face and edge/face intersections. Face/face
6933         #        intersections detection is switched off as it is a
6934         #        time-consuming operation that gives an impact on performance.
6935         #        To find all self-intersections please use
6936         #        CheckSelfIntersections() method.
6937         #
6938         #  @return New GEOM.GEOM_Object, containing the result shape.
6939         #
6940         #  @ref tui_common "Example 1"
6941         #  \n @ref swig_MakeCommon "Example 2"
6942         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6943             """
6944             Perform Common boolean operation on two given shapes.
6945
6946             Parameters:
6947                 theShape1 First argument for boolean operation.
6948                 theShape2 Second argument for boolean operation.
6949                 checkSelfInte The flag that tells if the arguments should
6950                               be checked for self-intersection prior to
6951                               the operation.
6952                 theName Object name; when specified, this parameter is used
6953                         for result publication in the study. Otherwise, if automatic
6954                         publication is switched on, default value is used for result name.
6955
6956             Note:
6957                     This algorithm doesn't find all types of self-intersections.
6958                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6959                     vertex/face and edge/face intersections. Face/face
6960                     intersections detection is switched off as it is a
6961                     time-consuming operation that gives an impact on performance.
6962                     To find all self-intersections please use
6963                     CheckSelfIntersections() method.
6964
6965             Returns:
6966                 New GEOM.GEOM_Object, containing the result shape.
6967             """
6968             # Example: see GEOM_TestOthers.py
6969             # note: auto-publishing is done in self.MakeBoolean()
6970             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
6971
6972         ## Perform Cut boolean operation on two given shapes.
6973         #  @param theShape1 First argument for boolean operation.
6974         #  @param theShape2 Second argument for boolean operation.
6975         #  @param checkSelfInte The flag that tells if the arguments should
6976         #         be checked for self-intersection prior to the operation.
6977         #  @param theName Object name; when specified, this parameter is used
6978         #         for result publication in the study. Otherwise, if automatic
6979         #         publication is switched on, default value is used for result name.
6980         #
6981         #  @note This algorithm doesn't find all types of self-intersections.
6982         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6983         #        vertex/face and edge/face intersections. Face/face
6984         #        intersections detection is switched off as it is a
6985         #        time-consuming operation that gives an impact on performance.
6986         #        To find all self-intersections please use
6987         #        CheckSelfIntersections() method.
6988         #
6989         #  @return New GEOM.GEOM_Object, containing the result shape.
6990         #
6991         #  @ref tui_cut "Example 1"
6992         #  \n @ref swig_MakeCommon "Example 2"
6993         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6994             """
6995             Perform Cut boolean operation on two given shapes.
6996
6997             Parameters:
6998                 theShape1 First argument for boolean operation.
6999                 theShape2 Second argument for boolean operation.
7000                 checkSelfInte The flag that tells if the arguments should
7001                               be checked for self-intersection prior to
7002                               the operation.
7003                 theName Object name; when specified, this parameter is used
7004                         for result publication in the study. Otherwise, if automatic
7005                         publication is switched on, default value is used for result name.
7006
7007             Note:
7008                     This algorithm doesn't find all types of self-intersections.
7009                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7010                     vertex/face and edge/face intersections. Face/face
7011                     intersections detection is switched off as it is a
7012                     time-consuming operation that gives an impact on performance.
7013                     To find all self-intersections please use
7014                     CheckSelfIntersections() method.
7015
7016             Returns:
7017                 New GEOM.GEOM_Object, containing the result shape.
7018
7019             """
7020             # Example: see GEOM_TestOthers.py
7021             # note: auto-publishing is done in self.MakeBoolean()
7022             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7023
7024         ## Perform Fuse boolean operation on two given shapes.
7025         #  @param theShape1 First argument for boolean operation.
7026         #  @param theShape2 Second argument for boolean operation.
7027         #  @param checkSelfInte The flag that tells if the arguments should
7028         #         be checked for self-intersection prior to the operation.
7029         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7030         #         operation should be performed during the operation.
7031         #  @param theName Object name; when specified, this parameter is used
7032         #         for result publication in the study. Otherwise, if automatic
7033         #         publication is switched on, default value is used for result name.
7034         #
7035         #  @note This algorithm doesn't find all types of self-intersections.
7036         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7037         #        vertex/face and edge/face intersections. Face/face
7038         #        intersections detection is switched off as it is a
7039         #        time-consuming operation that gives an impact on performance.
7040         #        To find all self-intersections please use
7041         #        CheckSelfIntersections() method.
7042         #
7043         #  @return New GEOM.GEOM_Object, containing the result shape.
7044         #
7045         #  @ref tui_fuse "Example 1"
7046         #  \n @ref swig_MakeCommon "Example 2"
7047         @ManageTransactions("BoolOp")
7048         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7049                      rmExtraEdges=False, theName=None):
7050             """
7051             Perform Fuse boolean operation on two given shapes.
7052
7053             Parameters:
7054                 theShape1 First argument for boolean operation.
7055                 theShape2 Second argument for boolean operation.
7056                 checkSelfInte The flag that tells if the arguments should
7057                               be checked for self-intersection prior to
7058                               the operation.
7059                 rmExtraEdges The flag that tells if Remove Extra Edges
7060                              operation should be performed during the operation.
7061                 theName Object name; when specified, this parameter is used
7062                         for result publication in the study. Otherwise, if automatic
7063                         publication is switched on, default value is used for result name.
7064
7065             Note:
7066                     This algorithm doesn't find all types of self-intersections.
7067                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7068                     vertex/face and edge/face intersections. Face/face
7069                     intersections detection is switched off as it is a
7070                     time-consuming operation that gives an impact on performance.
7071                     To find all self-intersections please use
7072                     CheckSelfIntersections() method.
7073
7074             Returns:
7075                 New GEOM.GEOM_Object, containing the result shape.
7076
7077             """
7078             # Example: see GEOM_TestOthers.py
7079             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7080                                          checkSelfInte, rmExtraEdges)
7081             RaiseIfFailed("MakeFuse", self.BoolOp)
7082             self._autoPublish(anObj, theName, "fuse")
7083             return anObj
7084
7085         ## Perform Section boolean operation on two given shapes.
7086         #  @param theShape1 First argument for boolean operation.
7087         #  @param theShape2 Second argument for boolean operation.
7088         #  @param checkSelfInte The flag that tells if the arguments should
7089         #         be checked for self-intersection prior to the operation.
7090         #  @param theName Object name; when specified, this parameter is used
7091         #         for result publication in the study. Otherwise, if automatic
7092         #         publication is switched on, default value is used for result name.
7093         #
7094         #  @note This algorithm doesn't find all types of self-intersections.
7095         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7096         #        vertex/face and edge/face intersections. Face/face
7097         #        intersections detection is switched off as it is a
7098         #        time-consuming operation that gives an impact on performance.
7099         #        To find all self-intersections please use
7100         #        CheckSelfIntersections() method.
7101         #
7102         #  @return New GEOM.GEOM_Object, containing the result shape.
7103         #
7104         #  @ref tui_section "Example 1"
7105         #  \n @ref swig_MakeCommon "Example 2"
7106         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7107             """
7108             Perform Section boolean operation on two given shapes.
7109
7110             Parameters:
7111                 theShape1 First argument for boolean operation.
7112                 theShape2 Second argument for boolean operation.
7113                 checkSelfInte The flag that tells if the arguments should
7114                               be checked for self-intersection prior to
7115                               the operation.
7116                 theName Object name; when specified, this parameter is used
7117                         for result publication in the study. Otherwise, if automatic
7118                         publication is switched on, default value is used for result name.
7119
7120             Note:
7121                     This algorithm doesn't find all types of self-intersections.
7122                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7123                     vertex/face and edge/face intersections. Face/face
7124                     intersections detection is switched off as it is a
7125                     time-consuming operation that gives an impact on performance.
7126                     To find all self-intersections please use
7127                     CheckSelfIntersections() method.
7128
7129             Returns:
7130                 New GEOM.GEOM_Object, containing the result shape.
7131
7132             """
7133             # Example: see GEOM_TestOthers.py
7134             # note: auto-publishing is done in self.MakeBoolean()
7135             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7136
7137         ## Perform Fuse boolean operation on the list of shapes.
7138         #  @param theShapesList Shapes to be fused.
7139         #  @param checkSelfInte The flag that tells if the arguments should
7140         #         be checked for self-intersection prior to the operation.
7141         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7142         #         operation should be performed during the operation.
7143         #  @param theName Object name; when specified, this parameter is used
7144         #         for result publication in the study. Otherwise, if automatic
7145         #         publication is switched on, default value is used for result name.
7146         #
7147         #  @note This algorithm doesn't find all types of self-intersections.
7148         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7149         #        vertex/face and edge/face intersections. Face/face
7150         #        intersections detection is switched off as it is a
7151         #        time-consuming operation that gives an impact on performance.
7152         #        To find all self-intersections please use
7153         #        CheckSelfIntersections() method.
7154         #
7155         #  @return New GEOM.GEOM_Object, containing the result shape.
7156         #
7157         #  @ref tui_fuse "Example 1"
7158         #  \n @ref swig_MakeCommon "Example 2"
7159         @ManageTransactions("BoolOp")
7160         def MakeFuseList(self, theShapesList, checkSelfInte=False,
7161                          rmExtraEdges=False, theName=None):
7162             """
7163             Perform Fuse boolean operation on the list of shapes.
7164
7165             Parameters:
7166                 theShapesList Shapes to be fused.
7167                 checkSelfInte The flag that tells if the arguments should
7168                               be checked for self-intersection prior to
7169                               the operation.
7170                 rmExtraEdges The flag that tells if Remove Extra Edges
7171                              operation should be performed during the operation.
7172                 theName Object name; when specified, this parameter is used
7173                         for result publication in the study. Otherwise, if automatic
7174                         publication is switched on, default value is used for result name.
7175
7176             Note:
7177                     This algorithm doesn't find all types of self-intersections.
7178                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7179                     vertex/face and edge/face intersections. Face/face
7180                     intersections detection is switched off as it is a
7181                     time-consuming operation that gives an impact on performance.
7182                     To find all self-intersections please use
7183                     CheckSelfIntersections() method.
7184
7185             Returns:
7186                 New GEOM.GEOM_Object, containing the result shape.
7187
7188             """
7189             # Example: see GEOM_TestOthers.py
7190             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
7191                                              rmExtraEdges)
7192             RaiseIfFailed("MakeFuseList", self.BoolOp)
7193             self._autoPublish(anObj, theName, "fuse")
7194             return anObj
7195
7196         ## Perform Common boolean operation on the list of shapes.
7197         #  @param theShapesList Shapes for Common operation.
7198         #  @param checkSelfInte The flag that tells if the arguments should
7199         #         be checked for self-intersection prior to the operation.
7200         #  @param theName Object name; when specified, this parameter is used
7201         #         for result publication in the study. Otherwise, if automatic
7202         #         publication is switched on, default value is used for result name.
7203         #
7204         #  @note This algorithm doesn't find all types of self-intersections.
7205         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7206         #        vertex/face and edge/face intersections. Face/face
7207         #        intersections detection is switched off as it is a
7208         #        time-consuming operation that gives an impact on performance.
7209         #        To find all self-intersections please use
7210         #        CheckSelfIntersections() method.
7211         #
7212         #  @return New GEOM.GEOM_Object, containing the result shape.
7213         #
7214         #  @ref tui_common "Example 1"
7215         #  \n @ref swig_MakeCommon "Example 2"
7216         @ManageTransactions("BoolOp")
7217         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7218             """
7219             Perform Common boolean operation on the list of shapes.
7220
7221             Parameters:
7222                 theShapesList Shapes for Common operation.
7223                 checkSelfInte The flag that tells if the arguments should
7224                               be checked for self-intersection prior to
7225                               the operation.
7226                 theName Object name; when specified, this parameter is used
7227                         for result publication in the study. Otherwise, if automatic
7228                         publication is switched on, default value is used for result name.
7229
7230             Note:
7231                     This algorithm doesn't find all types of self-intersections.
7232                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7233                     vertex/face and edge/face intersections. Face/face
7234                     intersections detection is switched off as it is a
7235                     time-consuming operation that gives an impact on performance.
7236                     To find all self-intersections please use
7237                     CheckSelfIntersections() method.
7238
7239             Returns:
7240                 New GEOM.GEOM_Object, containing the result shape.
7241
7242             """
7243             # Example: see GEOM_TestOthers.py
7244             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7245             RaiseIfFailed("MakeCommonList", self.BoolOp)
7246             self._autoPublish(anObj, theName, "common")
7247             return anObj
7248
7249         ## Perform Cut boolean operation on one object and the list of tools.
7250         #  @param theMainShape The object of the operation.
7251         #  @param theShapesList The list of tools of the operation.
7252         #  @param checkSelfInte The flag that tells if the arguments should
7253         #         be checked for self-intersection prior to the operation.
7254         #  @param theName Object name; when specified, this parameter is used
7255         #         for result publication in the study. Otherwise, if automatic
7256         #         publication is switched on, default value is used for result name.
7257         #
7258         #  @note This algorithm doesn't find all types of self-intersections.
7259         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7260         #        vertex/face and edge/face intersections. Face/face
7261         #        intersections detection is switched off as it is a
7262         #        time-consuming operation that gives an impact on performance.
7263         #        To find all self-intersections please use
7264         #        CheckSelfIntersections() method.
7265         #
7266         #  @return New GEOM.GEOM_Object, containing the result shape.
7267         #
7268         #  @ref tui_cut "Example 1"
7269         #  \n @ref swig_MakeCommon "Example 2"
7270         @ManageTransactions("BoolOp")
7271         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7272             """
7273             Perform Cut boolean operation on one object and the list of tools.
7274
7275             Parameters:
7276                 theMainShape The object of the operation.
7277                 theShapesList The list of tools of the operation.
7278                 checkSelfInte The flag that tells if the arguments should
7279                               be checked for self-intersection prior to
7280                               the operation.
7281                 theName Object name; when specified, this parameter is used
7282                         for result publication in the study. Otherwise, if automatic
7283                         publication is switched on, default value is used for result name.
7284
7285             Note:
7286                     This algorithm doesn't find all types of self-intersections.
7287                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7288                     vertex/face and edge/face intersections. Face/face
7289                     intersections detection is switched off as it is a
7290                     time-consuming operation that gives an impact on performance.
7291                     To find all self-intersections please use
7292                     CheckSelfIntersections() method.
7293
7294             Returns:
7295                 New GEOM.GEOM_Object, containing the result shape.
7296
7297             """
7298             # Example: see GEOM_TestOthers.py
7299             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7300             RaiseIfFailed("MakeCutList", self.BoolOp)
7301             self._autoPublish(anObj, theName, "cut")
7302             return anObj
7303
7304         # end of l3_boolean
7305         ## @}
7306
7307         ## @addtogroup l3_basic_op
7308         ## @{
7309
7310         ## Perform partition operation.
7311         #  @param ListShapes Shapes to be intersected.
7312         #  @param ListTools Shapes to intersect theShapes.
7313         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7314         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7315         #         type will be detected automatically.
7316         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7317         #                             target type (equal to Limit) are kept in the result,
7318         #                             else standalone shapes of lower dimension
7319         #                             are kept also (if they exist).
7320         #
7321         #  @param theName Object name; when specified, this parameter is used
7322         #         for result publication in the study. Otherwise, if automatic
7323         #         publication is switched on, default value is used for result name.
7324         #
7325         #  @note Each compound from ListShapes and ListTools will be exploded
7326         #        in order to avoid possible intersection between shapes from this compound.
7327         #
7328         #  After implementation new version of PartitionAlgo (October 2006)
7329         #  other parameters are ignored by current functionality. They are kept
7330         #  in this function only for support old versions.
7331         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7332         #         Each shape from theKeepInside must belong to theShapes also.
7333         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7334         #         Each shape from theRemoveInside must belong to theShapes also.
7335         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7336         #      @param ListMaterials Material indices for each shape. Make sence,
7337         #         only if theRemoveWebs is TRUE.
7338         #
7339         #  @return New GEOM.GEOM_Object, containing the result shapes.
7340         #
7341         #  @ref tui_partition "Example"
7342         @ManageTransactions("BoolOp")
7343         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7344                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7345                           KeepNonlimitShapes=0, theName=None):
7346             """
7347             Perform partition operation.
7348
7349             Parameters:
7350                 ListShapes Shapes to be intersected.
7351                 ListTools Shapes to intersect theShapes.
7352                 Limit Type of resulting shapes (see geompy.ShapeType)
7353                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7354                       type will be detected automatically.
7355                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7356                                     target type (equal to Limit) are kept in the result,
7357                                     else standalone shapes of lower dimension
7358                                     are kept also (if they exist).
7359
7360                 theName Object name; when specified, this parameter is used
7361                         for result publication in the study. Otherwise, if automatic
7362                         publication is switched on, default value is used for result name.
7363             Note:
7364                     Each compound from ListShapes and ListTools will be exploded
7365                     in order to avoid possible intersection between shapes from
7366                     this compound.
7367
7368             After implementation new version of PartitionAlgo (October 2006) other
7369             parameters are ignored by current functionality. They are kept in this
7370             function only for support old versions.
7371
7372             Ignored parameters:
7373                 ListKeepInside Shapes, outside which the results will be deleted.
7374                                Each shape from theKeepInside must belong to theShapes also.
7375                 ListRemoveInside Shapes, inside which the results will be deleted.
7376                                  Each shape from theRemoveInside must belong to theShapes also.
7377                 RemoveWebs If TRUE, perform Glue 3D algorithm.
7378                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
7379
7380             Returns:
7381                 New GEOM.GEOM_Object, containing the result shapes.
7382             """
7383             # Example: see GEOM_TestAll.py
7384             if Limit == self.ShapeType["AUTO"]:
7385                 # automatic detection of the most appropriate shape limit type
7386                 lim = GEOM.SHAPE
7387                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7388                 Limit = EnumToLong(lim)
7389                 pass
7390             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
7391                                               ListKeepInside, ListRemoveInside,
7392                                               Limit, RemoveWebs, ListMaterials,
7393                                               KeepNonlimitShapes);
7394             RaiseIfFailed("MakePartition", self.BoolOp)
7395             self._autoPublish(anObj, theName, "partition")
7396             return anObj
7397
7398         ## Perform partition operation.
7399         #  This method may be useful if it is needed to make a partition for
7400         #  compound contains nonintersected shapes. Performance will be better
7401         #  since intersection between shapes from compound is not performed.
7402         #
7403         #  Description of all parameters as in previous method MakePartition().
7404         #  One additional parameter is provided:
7405         #  @param checkSelfInte The flag that tells if the arguments should
7406         #         be checked for self-intersection prior to the operation.
7407         #
7408         #  @note This algorithm doesn't find all types of self-intersections.
7409         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7410         #        vertex/face and edge/face intersections. Face/face
7411         #        intersections detection is switched off as it is a
7412         #        time-consuming operation that gives an impact on performance.
7413         #        To find all self-intersections please use
7414         #        CheckSelfIntersections() method.
7415         #
7416         #  @note Passed compounds (via ListShapes or via ListTools)
7417         #           have to consist of nonintersecting shapes.
7418         #
7419         #  @return New GEOM.GEOM_Object, containing the result shapes.
7420         #
7421         #  @ref swig_todo "Example"
7422         @ManageTransactions("BoolOp")
7423         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
7424                                                  ListKeepInside=[], ListRemoveInside=[],
7425                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
7426                                                  ListMaterials=[], KeepNonlimitShapes=0,
7427                                                  checkSelfInte=False, theName=None):
7428             """
7429             Perform partition operation.
7430             This method may be useful if it is needed to make a partition for
7431             compound contains nonintersected shapes. Performance will be better
7432             since intersection between shapes from compound is not performed.
7433
7434             Parameters:
7435                 Description of all parameters as in method geompy.MakePartition.
7436                 One additional parameter is provided:
7437                 checkSelfInte The flag that tells if the arguments should
7438                               be checked for self-intersection prior to
7439                               the operation.
7440
7441             Note:
7442                     This algorithm doesn't find all types of self-intersections.
7443                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7444                     vertex/face and edge/face intersections. Face/face
7445                     intersections detection is switched off as it is a
7446                     time-consuming operation that gives an impact on performance.
7447                     To find all self-intersections please use
7448                     CheckSelfIntersections() method.
7449
7450             NOTE:
7451                 Passed compounds (via ListShapes or via ListTools)
7452                 have to consist of nonintersecting shapes.
7453
7454             Returns:
7455                 New GEOM.GEOM_Object, containing the result shapes.
7456             """
7457             if Limit == self.ShapeType["AUTO"]:
7458                 # automatic detection of the most appropriate shape limit type
7459                 lim = GEOM.SHAPE
7460                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7461                 Limit = EnumToLong(lim)
7462                 pass
7463             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7464                                                                      ListKeepInside, ListRemoveInside,
7465                                                                      Limit, RemoveWebs, ListMaterials,
7466                                                                      KeepNonlimitShapes, checkSelfInte);
7467             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7468             self._autoPublish(anObj, theName, "partition")
7469             return anObj
7470
7471         ## See method MakePartition() for more information.
7472         #
7473         #  @ref tui_partition "Example 1"
7474         #  \n @ref swig_Partition "Example 2"
7475         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7476                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7477                       KeepNonlimitShapes=0, theName=None):
7478             """
7479             See method geompy.MakePartition for more information.
7480             """
7481             # Example: see GEOM_TestOthers.py
7482             # note: auto-publishing is done in self.MakePartition()
7483             anObj = self.MakePartition(ListShapes, ListTools,
7484                                        ListKeepInside, ListRemoveInside,
7485                                        Limit, RemoveWebs, ListMaterials,
7486                                        KeepNonlimitShapes, theName);
7487             return anObj
7488
7489         ## Perform partition of the Shape with the Plane
7490         #  @param theShape Shape to be intersected.
7491         #  @param thePlane Tool shape, to intersect theShape.
7492         #  @param theName Object name; when specified, this parameter is used
7493         #         for result publication in the study. Otherwise, if automatic
7494         #         publication is switched on, default value is used for result name.
7495         #
7496         #  @return New GEOM.GEOM_Object, containing the result shape.
7497         #
7498         #  @ref tui_partition "Example"
7499         @ManageTransactions("BoolOp")
7500         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7501             """
7502             Perform partition of the Shape with the Plane
7503
7504             Parameters:
7505                 theShape Shape to be intersected.
7506                 thePlane Tool shape, to intersect theShape.
7507                 theName Object name; when specified, this parameter is used
7508                         for result publication in the study. Otherwise, if automatic
7509                         publication is switched on, default value is used for result name.
7510
7511             Returns:
7512                 New GEOM.GEOM_Object, containing the result shape.
7513             """
7514             # Example: see GEOM_TestAll.py
7515             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7516             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7517             self._autoPublish(anObj, theName, "partition")
7518             return anObj
7519
7520         # end of l3_basic_op
7521         ## @}
7522
7523         ## @addtogroup l3_transform
7524         ## @{
7525
7526         ## Translate the given object along the vector, specified
7527         #  by its end points.
7528         #  @param theObject The object to be translated.
7529         #  @param thePoint1 Start point of translation vector.
7530         #  @param thePoint2 End point of translation vector.
7531         #  @param theCopy Flag used to translate object itself or create a copy.
7532         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7533         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7534         @ManageTransactions("TrsfOp")
7535         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7536             """
7537             Translate the given object along the vector, specified by its end points.
7538
7539             Parameters:
7540                 theObject The object to be translated.
7541                 thePoint1 Start point of translation vector.
7542                 thePoint2 End point of translation vector.
7543                 theCopy Flag used to translate object itself or create a copy.
7544
7545             Returns:
7546                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7547                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7548             """
7549             if theCopy:
7550                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7551             else:
7552                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7553             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7554             return anObj
7555
7556         ## Translate the given object along the vector, specified
7557         #  by its end points, creating its copy before the translation.
7558         #  @param theObject The object to be translated.
7559         #  @param thePoint1 Start point of translation vector.
7560         #  @param thePoint2 End point of translation vector.
7561         #  @param theName Object name; when specified, this parameter is used
7562         #         for result publication in the study. Otherwise, if automatic
7563         #         publication is switched on, default value is used for result name.
7564         #
7565         #  @return New GEOM.GEOM_Object, containing the translated object.
7566         #
7567         #  @ref tui_translation "Example 1"
7568         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7569         @ManageTransactions("TrsfOp")
7570         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7571             """
7572             Translate the given object along the vector, specified
7573             by its end points, creating its copy before the translation.
7574
7575             Parameters:
7576                 theObject The object to be translated.
7577                 thePoint1 Start point of translation vector.
7578                 thePoint2 End point of translation vector.
7579                 theName Object name; when specified, this parameter is used
7580                         for result publication in the study. Otherwise, if automatic
7581                         publication is switched on, default value is used for result name.
7582
7583             Returns:
7584                 New GEOM.GEOM_Object, containing the translated object.
7585             """
7586             # Example: see GEOM_TestAll.py
7587             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7588             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7589             self._autoPublish(anObj, theName, "translated")
7590             return anObj
7591
7592         ## Translate the given object along the vector, specified by its components.
7593         #  @param theObject The object to be translated.
7594         #  @param theDX,theDY,theDZ Components of translation vector.
7595         #  @param theCopy Flag used to translate object itself or create a copy.
7596         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7597         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7598         #
7599         #  @ref tui_translation "Example"
7600         @ManageTransactions("TrsfOp")
7601         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7602             """
7603             Translate the given object along the vector, specified by its components.
7604
7605             Parameters:
7606                 theObject The object to be translated.
7607                 theDX,theDY,theDZ Components of translation vector.
7608                 theCopy Flag used to translate object itself or create a copy.
7609
7610             Returns:
7611                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7612                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7613             """
7614             # Example: see GEOM_TestAll.py
7615             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7616             if theCopy:
7617                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7618             else:
7619                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7620             anObj.SetParameters(Parameters)
7621             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7622             return anObj
7623
7624         ## Translate the given object along the vector, specified
7625         #  by its components, creating its copy before the translation.
7626         #  @param theObject The object to be translated.
7627         #  @param theDX,theDY,theDZ Components of translation vector.
7628         #  @param theName Object name; when specified, this parameter is used
7629         #         for result publication in the study. Otherwise, if automatic
7630         #         publication is switched on, default value is used for result name.
7631         #
7632         #  @return New GEOM.GEOM_Object, containing the translated object.
7633         #
7634         #  @ref tui_translation "Example"
7635         @ManageTransactions("TrsfOp")
7636         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7637             """
7638             Translate the given object along the vector, specified
7639             by its components, creating its copy before the translation.
7640
7641             Parameters:
7642                 theObject The object to be translated.
7643                 theDX,theDY,theDZ Components of translation vector.
7644                 theName Object name; when specified, this parameter is used
7645                         for result publication in the study. Otherwise, if automatic
7646                         publication is switched on, default value is used for result name.
7647
7648             Returns:
7649                 New GEOM.GEOM_Object, containing the translated object.
7650             """
7651             # Example: see GEOM_TestAll.py
7652             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7653             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7654             anObj.SetParameters(Parameters)
7655             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7656             self._autoPublish(anObj, theName, "translated")
7657             return anObj
7658
7659         ## Translate the given object along the given vector.
7660         #  @param theObject The object to be translated.
7661         #  @param theVector The translation vector.
7662         #  @param theCopy Flag used to translate object itself or create a copy.
7663         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7664         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7665         @ManageTransactions("TrsfOp")
7666         def TranslateVector(self, theObject, theVector, theCopy=False):
7667             """
7668             Translate the given object along the given vector.
7669
7670             Parameters:
7671                 theObject The object to be translated.
7672                 theVector The translation vector.
7673                 theCopy Flag used to translate object itself or create a copy.
7674
7675             Returns:
7676                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7677                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7678             """
7679             if theCopy:
7680                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7681             else:
7682                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7683             RaiseIfFailed("TranslateVector", self.TrsfOp)
7684             return anObj
7685
7686         ## Translate the given object along the given vector,
7687         #  creating its copy before the translation.
7688         #  @param theObject The object to be translated.
7689         #  @param theVector The translation vector.
7690         #  @param theName Object name; when specified, this parameter is used
7691         #         for result publication in the study. Otherwise, if automatic
7692         #         publication is switched on, default value is used for result name.
7693         #
7694         #  @return New GEOM.GEOM_Object, containing the translated object.
7695         #
7696         #  @ref tui_translation "Example"
7697         @ManageTransactions("TrsfOp")
7698         def MakeTranslationVector(self, theObject, theVector, theName=None):
7699             """
7700             Translate the given object along the given vector,
7701             creating its copy before the translation.
7702
7703             Parameters:
7704                 theObject The object to be translated.
7705                 theVector The translation vector.
7706                 theName Object name; when specified, this parameter is used
7707                         for result publication in the study. Otherwise, if automatic
7708                         publication is switched on, default value is used for result name.
7709
7710             Returns:
7711                 New GEOM.GEOM_Object, containing the translated object.
7712             """
7713             # Example: see GEOM_TestAll.py
7714             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7715             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7716             self._autoPublish(anObj, theName, "translated")
7717             return anObj
7718
7719         ## Translate the given object along the given vector on given distance.
7720         #  @param theObject The object to be translated.
7721         #  @param theVector The translation vector.
7722         #  @param theDistance The translation distance.
7723         #  @param theCopy Flag used to translate object itself or create a copy.
7724         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7725         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7726         #
7727         #  @ref tui_translation "Example"
7728         @ManageTransactions("TrsfOp")
7729         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7730             """
7731             Translate the given object along the given vector on given distance.
7732
7733             Parameters:
7734                 theObject The object to be translated.
7735                 theVector The translation vector.
7736                 theDistance The translation distance.
7737                 theCopy Flag used to translate object itself or create a copy.
7738
7739             Returns:
7740                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7741                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7742             """
7743             # Example: see GEOM_TestAll.py
7744             theDistance,Parameters = ParseParameters(theDistance)
7745             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7746             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7747             anObj.SetParameters(Parameters)
7748             return anObj
7749
7750         ## Translate the given object along the given vector on given distance,
7751         #  creating its copy before the translation.
7752         #  @param theObject The object to be translated.
7753         #  @param theVector The translation vector.
7754         #  @param theDistance The translation distance.
7755         #  @param theName Object name; when specified, this parameter is used
7756         #         for result publication in the study. Otherwise, if automatic
7757         #         publication is switched on, default value is used for result name.
7758         #
7759         #  @return New GEOM.GEOM_Object, containing the translated object.
7760         #
7761         #  @ref tui_translation "Example"
7762         @ManageTransactions("TrsfOp")
7763         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7764             """
7765             Translate the given object along the given vector on given distance,
7766             creating its copy before the translation.
7767
7768             Parameters:
7769                 theObject The object to be translated.
7770                 theVector The translation vector.
7771                 theDistance The translation distance.
7772                 theName Object name; when specified, this parameter is used
7773                         for result publication in the study. Otherwise, if automatic
7774                         publication is switched on, default value is used for result name.
7775
7776             Returns:
7777                 New GEOM.GEOM_Object, containing the translated object.
7778             """
7779             # Example: see GEOM_TestAll.py
7780             theDistance,Parameters = ParseParameters(theDistance)
7781             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7782             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7783             anObj.SetParameters(Parameters)
7784             self._autoPublish(anObj, theName, "translated")
7785             return anObj
7786
7787         ## Rotate the given object around the given axis on the given angle.
7788         #  @param theObject The object to be rotated.
7789         #  @param theAxis Rotation axis.
7790         #  @param theAngle Rotation angle in radians.
7791         #  @param theCopy Flag used to rotate object itself or create a copy.
7792         #
7793         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7794         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7795         #
7796         #  @ref tui_rotation "Example"
7797         @ManageTransactions("TrsfOp")
7798         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7799             """
7800             Rotate the given object around the given axis on the given angle.
7801
7802             Parameters:
7803                 theObject The object to be rotated.
7804                 theAxis Rotation axis.
7805                 theAngle Rotation angle in radians.
7806                 theCopy Flag used to rotate object itself or create a copy.
7807
7808             Returns:
7809                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7810                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7811             """
7812             # Example: see GEOM_TestAll.py
7813             flag = False
7814             if isinstance(theAngle,str):
7815                 flag = True
7816             theAngle, Parameters = ParseParameters(theAngle)
7817             if flag:
7818                 theAngle = theAngle*math.pi/180.0
7819             if theCopy:
7820                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7821             else:
7822                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7823             RaiseIfFailed("Rotate", self.TrsfOp)
7824             anObj.SetParameters(Parameters)
7825             return anObj
7826
7827         ## Rotate the given object around the given axis
7828         #  on the given angle, creating its copy before the rotatation.
7829         #  @param theObject The object to be rotated.
7830         #  @param theAxis Rotation axis.
7831         #  @param theAngle Rotation angle in radians.
7832         #  @param theName Object name; when specified, this parameter is used
7833         #         for result publication in the study. Otherwise, if automatic
7834         #         publication is switched on, default value is used for result name.
7835         #
7836         #  @return New GEOM.GEOM_Object, containing the rotated object.
7837         #
7838         #  @ref tui_rotation "Example"
7839         @ManageTransactions("TrsfOp")
7840         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7841             """
7842             Rotate the given object around the given axis
7843             on the given angle, creating its copy before the rotatation.
7844
7845             Parameters:
7846                 theObject The object to be rotated.
7847                 theAxis Rotation axis.
7848                 theAngle Rotation angle in radians.
7849                 theName Object name; when specified, this parameter is used
7850                         for result publication in the study. Otherwise, if automatic
7851                         publication is switched on, default value is used for result name.
7852
7853             Returns:
7854                 New GEOM.GEOM_Object, containing the rotated object.
7855             """
7856             # Example: see GEOM_TestAll.py
7857             flag = False
7858             if isinstance(theAngle,str):
7859                 flag = True
7860             theAngle, Parameters = ParseParameters(theAngle)
7861             if flag:
7862                 theAngle = theAngle*math.pi/180.0
7863             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7864             RaiseIfFailed("RotateCopy", self.TrsfOp)
7865             anObj.SetParameters(Parameters)
7866             self._autoPublish(anObj, theName, "rotated")
7867             return anObj
7868
7869         ## Rotate given object around vector perpendicular to plane
7870         #  containing three points.
7871         #  @param theObject The object to be rotated.
7872         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7873         #  containing the three points.
7874         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7875         #  @param theCopy Flag used to rotate object itself or create a copy.
7876         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7877         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7878         @ManageTransactions("TrsfOp")
7879         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7880             """
7881             Rotate given object around vector perpendicular to plane
7882             containing three points.
7883
7884             Parameters:
7885                 theObject The object to be rotated.
7886                 theCentPoint central point  the axis is the vector perpendicular to the plane
7887                              containing the three points.
7888                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7889                 theCopy Flag used to rotate object itself or create a copy.
7890
7891             Returns:
7892                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7893                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7894             """
7895             if theCopy:
7896                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7897             else:
7898                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7899             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7900             return anObj
7901
7902         ## Rotate given object around vector perpendicular to plane
7903         #  containing three points, creating its copy before the rotatation.
7904         #  @param theObject The object to be rotated.
7905         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7906         #  containing the three points.
7907         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7908         #  @param theName Object name; when specified, this parameter is used
7909         #         for result publication in the study. Otherwise, if automatic
7910         #         publication is switched on, default value is used for result name.
7911         #
7912         #  @return New GEOM.GEOM_Object, containing the rotated object.
7913         #
7914         #  @ref tui_rotation "Example"
7915         @ManageTransactions("TrsfOp")
7916         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7917             """
7918             Rotate given object around vector perpendicular to plane
7919             containing three points, creating its copy before the rotatation.
7920
7921             Parameters:
7922                 theObject The object to be rotated.
7923                 theCentPoint central point  the axis is the vector perpendicular to the plane
7924                              containing the three points.
7925                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7926                 theName Object name; when specified, this parameter is used
7927                         for result publication in the study. Otherwise, if automatic
7928                         publication is switched on, default value is used for result name.
7929
7930             Returns:
7931                 New GEOM.GEOM_Object, containing the rotated object.
7932             """
7933             # Example: see GEOM_TestAll.py
7934             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7935             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7936             self._autoPublish(anObj, theName, "rotated")
7937             return anObj
7938
7939         ## Scale the given object by the specified factor.
7940         #  @param theObject The object to be scaled.
7941         #  @param thePoint Center point for scaling.
7942         #                  Passing None for it means scaling relatively the origin of global CS.
7943         #  @param theFactor Scaling factor value.
7944         #  @param theCopy Flag used to scale object itself or create a copy.
7945         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7946         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7947         @ManageTransactions("TrsfOp")
7948         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7949             """
7950             Scale the given object by the specified factor.
7951
7952             Parameters:
7953                 theObject The object to be scaled.
7954                 thePoint Center point for scaling.
7955                          Passing None for it means scaling relatively the origin of global CS.
7956                 theFactor Scaling factor value.
7957                 theCopy Flag used to scale object itself or create a copy.
7958
7959             Returns:
7960                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7961                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7962             """
7963             # Example: see GEOM_TestAll.py
7964             theFactor, Parameters = ParseParameters(theFactor)
7965             if theCopy:
7966                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7967             else:
7968                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7969             RaiseIfFailed("Scale", self.TrsfOp)
7970             anObj.SetParameters(Parameters)
7971             return anObj
7972
7973         ## Scale the given object by the factor, creating its copy before the scaling.
7974         #  @param theObject The object to be scaled.
7975         #  @param thePoint Center point for scaling.
7976         #                  Passing None for it means scaling relatively the origin of global CS.
7977         #  @param theFactor Scaling factor value.
7978         #  @param theName Object name; when specified, this parameter is used
7979         #         for result publication in the study. Otherwise, if automatic
7980         #         publication is switched on, default value is used for result name.
7981         #
7982         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7983         #
7984         #  @ref tui_scale "Example"
7985         @ManageTransactions("TrsfOp")
7986         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7987             """
7988             Scale the given object by the factor, creating its copy before the scaling.
7989
7990             Parameters:
7991                 theObject The object to be scaled.
7992                 thePoint Center point for scaling.
7993                          Passing None for it means scaling relatively the origin of global CS.
7994                 theFactor Scaling factor value.
7995                 theName Object name; when specified, this parameter is used
7996                         for result publication in the study. Otherwise, if automatic
7997                         publication is switched on, default value is used for result name.
7998
7999             Returns:
8000                 New GEOM.GEOM_Object, containing the scaled shape.
8001             """
8002             # Example: see GEOM_TestAll.py
8003             theFactor, Parameters = ParseParameters(theFactor)
8004             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8005             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8006             anObj.SetParameters(Parameters)
8007             self._autoPublish(anObj, theName, "scaled")
8008             return anObj
8009
8010         ## Scale the given object by different factors along coordinate axes.
8011         #  @param theObject The object to be scaled.
8012         #  @param thePoint Center point for scaling.
8013         #                  Passing None for it means scaling relatively the origin of global CS.
8014         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8015         #  @param theCopy Flag used to scale object itself or create a copy.
8016         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8017         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8018         @ManageTransactions("TrsfOp")
8019         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8020             """
8021             Scale the given object by different factors along coordinate axes.
8022
8023             Parameters:
8024                 theObject The object to be scaled.
8025                 thePoint Center point for scaling.
8026                             Passing None for it means scaling relatively the origin of global CS.
8027                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8028                 theCopy Flag used to scale object itself or create a copy.
8029
8030             Returns:
8031                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8032                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8033             """
8034             # Example: see GEOM_TestAll.py
8035             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8036             if theCopy:
8037                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8038                                                             theFactorX, theFactorY, theFactorZ)
8039             else:
8040                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8041                                                         theFactorX, theFactorY, theFactorZ)
8042             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8043             anObj.SetParameters(Parameters)
8044             return anObj
8045
8046         ## Scale the given object by different factors along coordinate axes,
8047         #  creating its copy before the scaling.
8048         #  @param theObject The object to be scaled.
8049         #  @param thePoint Center point for scaling.
8050         #                  Passing None for it means scaling relatively the origin of global CS.
8051         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8052         #  @param theName Object name; when specified, this parameter is used
8053         #         for result publication in the study. Otherwise, if automatic
8054         #         publication is switched on, default value is used for result name.
8055         #
8056         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8057         #
8058         #  @ref swig_scale "Example"
8059         @ManageTransactions("TrsfOp")
8060         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8061             """
8062             Scale the given object by different factors along coordinate axes,
8063             creating its copy before the scaling.
8064
8065             Parameters:
8066                 theObject The object to be scaled.
8067                 thePoint Center point for scaling.
8068                             Passing None for it means scaling relatively the origin of global CS.
8069                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8070                 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             Returns:
8075                 New GEOM.GEOM_Object, containing the scaled shape.
8076             """
8077             # Example: see GEOM_TestAll.py
8078             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8079             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8080                                                         theFactorX, theFactorY, theFactorZ)
8081             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8082             anObj.SetParameters(Parameters)
8083             self._autoPublish(anObj, theName, "scaled")
8084             return anObj
8085
8086         ## Mirror an object relatively the given plane.
8087         #  @param theObject The object to be mirrored.
8088         #  @param thePlane Plane of symmetry.
8089         #  @param theCopy Flag used to mirror object itself or create a copy.
8090         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8091         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8092         @ManageTransactions("TrsfOp")
8093         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8094             """
8095             Mirror an object relatively the given plane.
8096
8097             Parameters:
8098                 theObject The object to be mirrored.
8099                 thePlane Plane of symmetry.
8100                 theCopy Flag used to mirror object itself or create a copy.
8101
8102             Returns:
8103                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8104                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8105             """
8106             if theCopy:
8107                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8108             else:
8109                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8110             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8111             return anObj
8112
8113         ## Create an object, symmetrical
8114         #  to the given one relatively the given plane.
8115         #  @param theObject The object to be mirrored.
8116         #  @param thePlane Plane of symmetry.
8117         #  @param theName Object name; when specified, this parameter is used
8118         #         for result publication in the study. Otherwise, if automatic
8119         #         publication is switched on, default value is used for result name.
8120         #
8121         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8122         #
8123         #  @ref tui_mirror "Example"
8124         @ManageTransactions("TrsfOp")
8125         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8126             """
8127             Create an object, symmetrical to the given one relatively the given plane.
8128
8129             Parameters:
8130                 theObject The object to be mirrored.
8131                 thePlane Plane of symmetry.
8132                 theName Object name; when specified, this parameter is used
8133                         for result publication in the study. Otherwise, if automatic
8134                         publication is switched on, default value is used for result name.
8135
8136             Returns:
8137                 New GEOM.GEOM_Object, containing the mirrored shape.
8138             """
8139             # Example: see GEOM_TestAll.py
8140             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8141             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
8142             self._autoPublish(anObj, theName, "mirrored")
8143             return anObj
8144
8145         ## Mirror an object relatively the given axis.
8146         #  @param theObject The object to be mirrored.
8147         #  @param theAxis Axis of symmetry.
8148         #  @param theCopy Flag used to mirror object itself or create a copy.
8149         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8150         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8151         @ManageTransactions("TrsfOp")
8152         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
8153             """
8154             Mirror an object relatively the given axis.
8155
8156             Parameters:
8157                 theObject The object to be mirrored.
8158                 theAxis Axis of symmetry.
8159                 theCopy Flag used to mirror object itself or create a copy.
8160
8161             Returns:
8162                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8163                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8164             """
8165             if theCopy:
8166                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8167             else:
8168                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
8169             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
8170             return anObj
8171
8172         ## Create an object, symmetrical
8173         #  to the given one relatively the given axis.
8174         #  @param theObject The object to be mirrored.
8175         #  @param theAxis Axis of symmetry.
8176         #  @param theName Object name; when specified, this parameter is used
8177         #         for result publication in the study. Otherwise, if automatic
8178         #         publication is switched on, default value is used for result name.
8179         #
8180         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8181         #
8182         #  @ref tui_mirror "Example"
8183         @ManageTransactions("TrsfOp")
8184         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
8185             """
8186             Create an object, symmetrical to the given one relatively the given axis.
8187
8188             Parameters:
8189                 theObject The object to be mirrored.
8190                 theAxis Axis of symmetry.
8191                 theName Object name; when specified, this parameter is used
8192                         for result publication in the study. Otherwise, if automatic
8193                         publication is switched on, default value is used for result name.
8194
8195             Returns:
8196                 New GEOM.GEOM_Object, containing the mirrored shape.
8197             """
8198             # Example: see GEOM_TestAll.py
8199             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8200             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
8201             self._autoPublish(anObj, theName, "mirrored")
8202             return anObj
8203
8204         ## Mirror an object relatively the given point.
8205         #  @param theObject The object to be mirrored.
8206         #  @param thePoint Point of symmetry.
8207         #  @param theCopy Flag used to mirror object itself or create a copy.
8208         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8209         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8210         @ManageTransactions("TrsfOp")
8211         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8212             """
8213             Mirror an object relatively the given point.
8214
8215             Parameters:
8216                 theObject The object to be mirrored.
8217                 thePoint Point of symmetry.
8218                 theCopy Flag used to mirror object itself or create a copy.
8219
8220             Returns:
8221                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8222                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8223             """
8224             # Example: see GEOM_TestAll.py
8225             if theCopy:
8226                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8227             else:
8228                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8229             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8230             return anObj
8231
8232         ## Create an object, symmetrical
8233         #  to the given one relatively the given point.
8234         #  @param theObject The object to be mirrored.
8235         #  @param thePoint Point of symmetry.
8236         #  @param theName Object name; when specified, this parameter is used
8237         #         for result publication in the study. Otherwise, if automatic
8238         #         publication is switched on, default value is used for result name.
8239         #
8240         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8241         #
8242         #  @ref tui_mirror "Example"
8243         @ManageTransactions("TrsfOp")
8244         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8245             """
8246             Create an object, symmetrical
8247             to the given one relatively the given point.
8248
8249             Parameters:
8250                 theObject The object to be mirrored.
8251                 thePoint Point of symmetry.
8252                 theName Object name; when specified, this parameter is used
8253                         for result publication in the study. Otherwise, if automatic
8254                         publication is switched on, default value is used for result name.
8255
8256             Returns:
8257                 New GEOM.GEOM_Object, containing the mirrored shape.
8258             """
8259             # Example: see GEOM_TestAll.py
8260             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8261             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8262             self._autoPublish(anObj, theName, "mirrored")
8263             return anObj
8264
8265         ## Modify the location of the given object.
8266         #  @param theObject The object to be displaced.
8267         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8268         #                     If \a theStartLCS is NULL, displacement
8269         #                     will be performed from global CS.\n
8270         #                     If \a theObject itself is used as \a theStartLCS,
8271         #                     its location will be changed to \a theEndLCS.
8272         #  @param theEndLCS Coordinate system to perform displacement to it.
8273         #  @param theCopy Flag used to displace object itself or create a copy.
8274         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8275         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8276         @ManageTransactions("TrsfOp")
8277         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8278             """
8279             Modify the Location of the given object by LCS, creating its copy before the setting.
8280
8281             Parameters:
8282                 theObject The object to be displaced.
8283                 theStartLCS Coordinate system to perform displacement from it.
8284                             If theStartLCS is NULL, displacement
8285                             will be performed from global CS.
8286                             If theObject itself is used as theStartLCS,
8287                             its location will be changed to theEndLCS.
8288                 theEndLCS Coordinate system to perform displacement to it.
8289                 theCopy Flag used to displace object itself or create a copy.
8290
8291             Returns:
8292                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8293                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8294             """
8295             # Example: see GEOM_TestAll.py
8296             if theCopy:
8297                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8298             else:
8299                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8300             RaiseIfFailed("Displace", self.TrsfOp)
8301             return anObj
8302
8303         ## Modify the Location of the given object by LCS,
8304         #  creating its copy before the setting.
8305         #  @param theObject The object to be displaced.
8306         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8307         #                     If \a theStartLCS is NULL, displacement
8308         #                     will be performed from global CS.\n
8309         #                     If \a theObject itself is used as \a theStartLCS,
8310         #                     its location will be changed to \a theEndLCS.
8311         #  @param theEndLCS Coordinate system to perform displacement to it.
8312         #  @param theName Object name; when specified, this parameter is used
8313         #         for result publication in the study. Otherwise, if automatic
8314         #         publication is switched on, default value is used for result name.
8315         #
8316         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8317         #
8318         #  @ref tui_modify_location "Example"
8319         @ManageTransactions("TrsfOp")
8320         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8321             """
8322             Modify the Location of the given object by LCS, creating its copy before the setting.
8323
8324             Parameters:
8325                 theObject The object to be displaced.
8326                 theStartLCS Coordinate system to perform displacement from it.
8327                             If theStartLCS is NULL, displacement
8328                             will be performed from global CS.
8329                             If theObject itself is used as theStartLCS,
8330                             its location will be changed to theEndLCS.
8331                 theEndLCS Coordinate system to perform displacement to it.
8332                 theName Object name; when specified, this parameter is used
8333                         for result publication in the study. Otherwise, if automatic
8334                         publication is switched on, default value is used for result name.
8335
8336             Returns:
8337                 New GEOM.GEOM_Object, containing the displaced shape.
8338
8339             Example of usage:
8340                 # create local coordinate systems
8341                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8342                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8343                 # modify the location of the given object
8344                 position = geompy.MakePosition(cylinder, cs1, cs2)
8345             """
8346             # Example: see GEOM_TestAll.py
8347             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8348             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8349             self._autoPublish(anObj, theName, "displaced")
8350             return anObj
8351
8352         ## Modify the Location of the given object by Path.
8353         #  @param  theObject The object to be displaced.
8354         #  @param  thePath Wire or Edge along that the object will be translated.
8355         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
8356         #  @param  theCopy is to create a copy objects if true.
8357         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
8358         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
8359         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
8360         #
8361         #  @ref tui_modify_location "Example"
8362         @ManageTransactions("TrsfOp")
8363         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
8364             """
8365             Modify the Location of the given object by Path.
8366
8367             Parameters:
8368                  theObject The object to be displaced.
8369                  thePath Wire or Edge along that the object will be translated.
8370                  theDistance progress of Path (0 = start location, 1 = end of path location).
8371                  theCopy is to create a copy objects if true.
8372                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8373
8374             Returns:
8375                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
8376                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
8377
8378             Example of usage:
8379                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
8380             """
8381             # Example: see GEOM_TestAll.py
8382             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
8383             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8384             return anObj
8385
8386         ## Modify the Location of the given object by Path, creating its copy before the operation.
8387         #  @param theObject The object to be displaced.
8388         #  @param thePath Wire or Edge along that the object will be translated.
8389         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
8390         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
8391         #  @param theName Object name; when specified, this parameter is used
8392         #         for result publication in the study. Otherwise, if automatic
8393         #         publication is switched on, default value is used for result name.
8394         #
8395         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8396         @ManageTransactions("TrsfOp")
8397         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
8398             """
8399             Modify the Location of the given object by Path, creating its copy before the operation.
8400
8401             Parameters:
8402                  theObject The object to be displaced.
8403                  thePath Wire or Edge along that the object will be translated.
8404                  theDistance progress of Path (0 = start location, 1 = end of path location).
8405                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8406                  theName Object name; when specified, this parameter is used
8407                          for result publication in the study. Otherwise, if automatic
8408                          publication is switched on, default value is used for result name.
8409
8410             Returns:
8411                 New GEOM.GEOM_Object, containing the displaced shape.
8412             """
8413             # Example: see GEOM_TestAll.py
8414             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
8415             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8416             self._autoPublish(anObj, theName, "displaced")
8417             return anObj
8418
8419         ## Offset given shape.
8420         #  @param theObject The base object for the offset.
8421         #  @param theOffset Offset value.
8422         #  @param theCopy Flag used to offset object itself or create a copy.
8423         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8424         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
8425         @ManageTransactions("TrsfOp")
8426         def Offset(self, theObject, theOffset, theCopy=False):
8427             """
8428             Offset given shape.
8429
8430             Parameters:
8431                 theObject The base object for the offset.
8432                 theOffset Offset value.
8433                 theCopy Flag used to offset object itself or create a copy.
8434
8435             Returns:
8436                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8437                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8438             """
8439             theOffset, Parameters = ParseParameters(theOffset)
8440             if theCopy:
8441                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8442             else:
8443                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8444             RaiseIfFailed("Offset", self.TrsfOp)
8445             anObj.SetParameters(Parameters)
8446             return anObj
8447
8448         ## Create new object as offset of the given one.
8449         #  @param theObject The base object for the offset.
8450         #  @param theOffset Offset value.
8451         #  @param theName Object name; when specified, this parameter is used
8452         #         for result publication in the study. Otherwise, if automatic
8453         #         publication is switched on, default value is used for result name.
8454         #
8455         #  @return New GEOM.GEOM_Object, containing the offset object.
8456         #
8457         #  @ref tui_offset "Example"
8458         @ManageTransactions("TrsfOp")
8459         def MakeOffset(self, theObject, theOffset, theName=None):
8460             """
8461             Create new object as offset of the given one.
8462
8463             Parameters:
8464                 theObject The base object for the offset.
8465                 theOffset Offset value.
8466                 theName Object name; when specified, this parameter is used
8467                         for result publication in the study. Otherwise, if automatic
8468                         publication is switched on, default value is used for result name.
8469
8470             Returns:
8471                 New GEOM.GEOM_Object, containing the offset object.
8472
8473             Example of usage:
8474                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8475                  # create a new object as offset of the given object
8476                  offset = geompy.MakeOffset(box, 70.)
8477             """
8478             # Example: see GEOM_TestAll.py
8479             theOffset, Parameters = ParseParameters(theOffset)
8480             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8481             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8482             anObj.SetParameters(Parameters)
8483             self._autoPublish(anObj, theName, "offset")
8484             return anObj
8485
8486         ## Create new object as projection of the given one on a 2D surface.
8487         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8488         #  @param theTarget The target object. It can be planar or cylindrical face.
8489         #  @param theName Object name; when specified, this parameter is used
8490         #         for result publication in the study. Otherwise, if automatic
8491         #         publication is switched on, default value is used for result name.
8492         #
8493         #  @return New GEOM.GEOM_Object, containing the projection.
8494         #
8495         #  @ref tui_projection "Example"
8496         @ManageTransactions("TrsfOp")
8497         def MakeProjection(self, theSource, theTarget, theName=None):
8498             """
8499             Create new object as projection of the given one on a 2D surface.
8500
8501             Parameters:
8502                 theSource The source object for the projection. It can be a point, edge or wire.
8503                 theTarget The target object. It can be planar or cylindrical face.
8504                 theName Object name; when specified, this parameter is used
8505                         for result publication in the study. Otherwise, if automatic
8506                         publication is switched on, default value is used for result name.
8507
8508             Returns:
8509                 New GEOM.GEOM_Object, containing the projection.
8510             """
8511             # Example: see GEOM_TestAll.py
8512             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8513             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8514             self._autoPublish(anObj, theName, "projection")
8515             return anObj
8516
8517         ## Create a projection projection of the given point on a wire or an edge.
8518         #  If there are no solutions or there are 2 or more solutions It throws an
8519         #  exception.
8520         #  @param thePoint the point to be projected.
8521         #  @param theWire the wire. The edge is accepted as well.
8522         #  @param theName Object name; when specified, this parameter is used
8523         #         for result publication in the study. Otherwise, if automatic
8524         #         publication is switched on, default value is used for result name.
8525         #
8526         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8527         #  \n \a u: The parameter of projection point on edge.
8528         #  \n \a PointOnEdge: The projection point.
8529         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8530         #
8531         #  @ref tui_projection "Example"
8532         @ManageTransactions("TrsfOp")
8533         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8534             """
8535             Create a projection projection of the given point on a wire or an edge.
8536             If there are no solutions or there are 2 or more solutions It throws an
8537             exception.
8538
8539             Parameters:
8540                 thePoint the point to be projected.
8541                 theWire the wire. The edge is accepted as well.
8542                 theName Object name; when specified, this parameter is used
8543                         for result publication in the study. Otherwise, if automatic
8544                         publication is switched on, default value is used for result name.
8545
8546             Returns:
8547                 [u, PointOnEdge, EdgeInWireIndex]
8548                  u: The parameter of projection point on edge.
8549                  PointOnEdge: The projection point.
8550                  EdgeInWireIndex: The index of an edge in a wire.
8551             """
8552             # Example: see GEOM_TestAll.py
8553             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
8554             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
8555             self._autoPublish(anObj[1], theName, "projection")
8556             return anObj
8557
8558         # -----------------------------------------------------------------------------
8559         # Patterns
8560         # -----------------------------------------------------------------------------
8561
8562         ## Translate the given object along the given vector a given number times
8563         #  @param theObject The object to be translated.
8564         #  @param theVector Direction of the translation. DX if None.
8565         #  @param theStep Distance to translate on.
8566         #  @param theNbTimes Quantity of translations to be done.
8567         #  @param theName Object name; when specified, this parameter is used
8568         #         for result publication in the study. Otherwise, if automatic
8569         #         publication is switched on, default value is used for result name.
8570         #
8571         #  @return New GEOM.GEOM_Object, containing compound of all
8572         #          the shapes, obtained after each translation.
8573         #
8574         #  @ref tui_multi_translation "Example"
8575         @ManageTransactions("TrsfOp")
8576         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8577             """
8578             Translate the given object along the given vector a given number times
8579
8580             Parameters:
8581                 theObject The object to be translated.
8582                 theVector Direction of the translation. DX if None.
8583                 theStep Distance to translate on.
8584                 theNbTimes Quantity of translations to be done.
8585                 theName Object name; when specified, this parameter is used
8586                         for result publication in the study. Otherwise, if automatic
8587                         publication is switched on, default value is used for result name.
8588
8589             Returns:
8590                 New GEOM.GEOM_Object, containing compound of all
8591                 the shapes, obtained after each translation.
8592
8593             Example of usage:
8594                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8595             """
8596             # Example: see GEOM_TestAll.py
8597             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8598             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8599             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8600             anObj.SetParameters(Parameters)
8601             self._autoPublish(anObj, theName, "multitranslation")
8602             return anObj
8603
8604         ## Conseqently apply two specified translations to theObject specified number of times.
8605         #  @param theObject The object to be translated.
8606         #  @param theVector1 Direction of the first translation. DX if None.
8607         #  @param theStep1 Step of the first translation.
8608         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8609         #  @param theVector2 Direction of the second translation. DY if None.
8610         #  @param theStep2 Step of the second translation.
8611         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8612         #  @param theName Object name; when specified, this parameter is used
8613         #         for result publication in the study. Otherwise, if automatic
8614         #         publication is switched on, default value is used for result name.
8615         #
8616         #  @return New GEOM.GEOM_Object, containing compound of all
8617         #          the shapes, obtained after each translation.
8618         #
8619         #  @ref tui_multi_translation "Example"
8620         @ManageTransactions("TrsfOp")
8621         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8622                                    theVector2, theStep2, theNbTimes2, theName=None):
8623             """
8624             Conseqently apply two specified translations to theObject specified number of times.
8625
8626             Parameters:
8627                 theObject The object to be translated.
8628                 theVector1 Direction of the first translation. DX if None.
8629                 theStep1 Step of the first translation.
8630                 theNbTimes1 Quantity of translations to be done along theVector1.
8631                 theVector2 Direction of the second translation. DY if None.
8632                 theStep2 Step of the second translation.
8633                 theNbTimes2 Quantity of translations to be done along theVector2.
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                 New GEOM.GEOM_Object, containing compound of all
8640                 the shapes, obtained after each translation.
8641
8642             Example of usage:
8643                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8644             """
8645             # Example: see GEOM_TestAll.py
8646             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8647             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8648                                                  theVector2, theStep2, theNbTimes2)
8649             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8650             anObj.SetParameters(Parameters)
8651             self._autoPublish(anObj, theName, "multitranslation")
8652             return anObj
8653
8654         ## Rotate the given object around the given axis a given number times.
8655         #  Rotation angle will be 2*PI/theNbTimes.
8656         #  @param theObject The object to be rotated.
8657         #  @param theAxis The rotation axis. DZ if None.
8658         #  @param theNbTimes Quantity of rotations 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 the
8664         #          shapes, obtained after each rotation.
8665         #
8666         #  @ref tui_multi_rotation "Example"
8667         @ManageTransactions("TrsfOp")
8668         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8669             """
8670             Rotate the given object around the given axis a given number times.
8671             Rotation angle will be 2*PI/theNbTimes.
8672
8673             Parameters:
8674                 theObject The object to be rotated.
8675                 theAxis The rotation axis. DZ if None.
8676                 theNbTimes Quantity of rotations 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 the
8683                 shapes, obtained after each rotation.
8684
8685             Example of usage:
8686                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8687             """
8688             # Example: see GEOM_TestAll.py
8689             theNbTimes, Parameters = ParseParameters(theNbTimes)
8690             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8691             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8692             anObj.SetParameters(Parameters)
8693             self._autoPublish(anObj, theName, "multirotation")
8694             return anObj
8695
8696         ## Rotate the given object around the given axis
8697         #  a given number times on the given angle.
8698         #  @param theObject The object to be rotated.
8699         #  @param theAxis The rotation axis. DZ if None.
8700         #  @param theAngleStep Rotation angle in radians.
8701         #  @param theNbTimes Quantity of rotations to be done.
8702         #  @param theName Object name; when specified, this parameter is used
8703         #         for result publication in the study. Otherwise, if automatic
8704         #         publication is switched on, default value is used for result name.
8705         #
8706         #  @return New GEOM.GEOM_Object, containing compound of all the
8707         #          shapes, obtained after each rotation.
8708         #
8709         #  @ref tui_multi_rotation "Example"
8710         @ManageTransactions("TrsfOp")
8711         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8712             """
8713             Rotate the given object around the given axis
8714             a given number times on the given angle.
8715
8716             Parameters:
8717                 theObject The object to be rotated.
8718                 theAxis The rotation axis. DZ if None.
8719                 theAngleStep Rotation angle in radians.
8720                 theNbTimes Quantity of rotations to be done.
8721                 theName Object name; when specified, this parameter is used
8722                         for result publication in the study. Otherwise, if automatic
8723                         publication is switched on, default value is used for result name.
8724
8725             Returns:
8726                 New GEOM.GEOM_Object, containing compound of all the
8727                 shapes, obtained after each rotation.
8728
8729             Example of usage:
8730                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8731             """
8732             # Example: see GEOM_TestAll.py
8733             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8734             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8735             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8736             anObj.SetParameters(Parameters)
8737             self._autoPublish(anObj, theName, "multirotation")
8738             return anObj
8739
8740         ## Rotate the given object around the given axis a given
8741         #  number times and multi-translate each rotation result.
8742         #  Rotation angle will be 2*PI/theNbTimes1.
8743         #  Translation direction passes through center of gravity
8744         #  of rotated shape and its projection on the rotation axis.
8745         #  @param theObject The object to be rotated.
8746         #  @param theAxis Rotation axis. DZ if None.
8747         #  @param theNbTimes1 Quantity of rotations to be done.
8748         #  @param theRadialStep Translation distance.
8749         #  @param theNbTimes2 Quantity of translations to be done.
8750         #  @param theName Object name; when specified, this parameter is used
8751         #         for result publication in the study. Otherwise, if automatic
8752         #         publication is switched on, default value is used for result name.
8753         #
8754         #  @return New GEOM.GEOM_Object, containing compound of all the
8755         #          shapes, obtained after each transformation.
8756         #
8757         #  @ref tui_multi_rotation "Example"
8758         @ManageTransactions("TrsfOp")
8759         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8760             """
8761             Rotate the given object around the
8762             given axis on the given angle a given number
8763             times and multi-translate each rotation result.
8764             Translation direction passes through center of gravity
8765             of rotated shape and its projection on the rotation axis.
8766
8767             Parameters:
8768                 theObject The object to be rotated.
8769                 theAxis Rotation axis. DZ if None.
8770                 theNbTimes1 Quantity of rotations to be done.
8771                 theRadialStep Translation distance.
8772                 theNbTimes2 Quantity of translations to be done.
8773                 theName Object name; when specified, this parameter is used
8774                         for result publication in the study. Otherwise, if automatic
8775                         publication is switched on, default value is used for result name.
8776
8777             Returns:
8778                 New GEOM.GEOM_Object, containing compound of all the
8779                 shapes, obtained after each transformation.
8780
8781             Example of usage:
8782                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8783             """
8784             # Example: see GEOM_TestAll.py
8785             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8786             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8787             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8788             anObj.SetParameters(Parameters)
8789             self._autoPublish(anObj, theName, "multirotation")
8790             return anObj
8791
8792         ## Rotate the given object around the
8793         #  given axis on the given angle a given number
8794         #  times and multi-translate each rotation result.
8795         #  Translation direction passes through center of gravity
8796         #  of rotated shape and its projection on the rotation axis.
8797         #  @param theObject The object to be rotated.
8798         #  @param theAxis Rotation axis. DZ if None.
8799         #  @param theAngleStep Rotation angle in radians.
8800         #  @param theNbTimes1 Quantity of rotations to be done.
8801         #  @param theRadialStep Translation distance.
8802         #  @param theNbTimes2 Quantity of translations to be done.
8803         #  @param theName Object name; when specified, this parameter is used
8804         #         for result publication in the study. Otherwise, if automatic
8805         #         publication is switched on, default value is used for result name.
8806         #
8807         #  @return New GEOM.GEOM_Object, containing compound of all the
8808         #          shapes, obtained after each transformation.
8809         #
8810         #  @ref tui_multi_rotation "Example"
8811         @ManageTransactions("TrsfOp")
8812         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8813             """
8814             Rotate the given object around the
8815             given axis on the given angle a given number
8816             times and multi-translate each rotation result.
8817             Translation direction passes through center of gravity
8818             of rotated shape and its projection on the rotation axis.
8819
8820             Parameters:
8821                 theObject The object to be rotated.
8822                 theAxis Rotation axis. DZ if None.
8823                 theAngleStep Rotation angle in radians.
8824                 theNbTimes1 Quantity of rotations to be done.
8825                 theRadialStep Translation distance.
8826                 theNbTimes2 Quantity of translations to be done.
8827                 theName Object name; when specified, this parameter is used
8828                         for result publication in the study. Otherwise, if automatic
8829                         publication is switched on, default value is used for result name.
8830
8831             Returns:
8832                 New GEOM.GEOM_Object, containing compound of all the
8833                 shapes, obtained after each transformation.
8834
8835             Example of usage:
8836                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8837             """
8838             # Example: see GEOM_TestAll.py
8839             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8840             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8841             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8842             anObj.SetParameters(Parameters)
8843             self._autoPublish(anObj, theName, "multirotation")
8844             return anObj
8845
8846         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8847         #
8848         #  @ref swig_MakeMultiRotation "Example"
8849         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8850             """
8851             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8852
8853             Example of usage:
8854                 pz = geompy.MakeVertex(0, 0, 100)
8855                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8856                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8857             """
8858             # Example: see GEOM_TestOthers.py
8859             aVec = self.MakeLine(aPoint,aDir)
8860             # note: auto-publishing is done in self.MultiRotate1D()
8861             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8862             return anObj
8863
8864         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8865         #
8866         #  @ref swig_MakeMultiRotation "Example"
8867         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8868             """
8869             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8870
8871             Example of usage:
8872                 pz = geompy.MakeVertex(0, 0, 100)
8873                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8874                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8875             """
8876             # Example: see GEOM_TestOthers.py
8877             aVec = self.MakeLine(aPoint,aDir)
8878             # note: auto-publishing is done in self.MultiRotate1D()
8879             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8880             return anObj
8881
8882         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8883         #
8884         #  @ref swig_MakeMultiRotation "Example"
8885         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8886             """
8887             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8888
8889             Example of usage:
8890                 pz = geompy.MakeVertex(0, 0, 100)
8891                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8892                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8893             """
8894             # Example: see GEOM_TestOthers.py
8895             aVec = self.MakeLine(aPoint,aDir)
8896             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8897             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8898             return anObj
8899
8900         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8901         #
8902         #  @ref swig_MakeMultiRotation "Example"
8903         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8904             """
8905             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8906
8907             Example of usage:
8908                 pz = geompy.MakeVertex(0, 0, 100)
8909                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8910                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8911             """
8912             # Example: see GEOM_TestOthers.py
8913             aVec = self.MakeLine(aPoint,aDir)
8914             # note: auto-publishing is done in self.MultiRotate2D()
8915             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8916             return anObj
8917
8918         # end of l3_transform
8919         ## @}
8920
8921         ## @addtogroup l3_transform_d
8922         ## @{
8923
8924         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8925         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8926             """
8927             Deprecated method. Use MultiRotate1DNbTimes instead.
8928             """
8929             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8930             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8931
8932         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8933         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8934         @ManageTransactions("TrsfOp")
8935         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8936             """
8937             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8938             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8939
8940             Example of usage:
8941                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8942             """
8943             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8944             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8945             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8946             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8947             anObj.SetParameters(Parameters)
8948             self._autoPublish(anObj, theName, "multirotation")
8949             return anObj
8950
8951         ## The same, as MultiRotate1D(), but axis is given by direction and point
8952         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8953         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8954             """
8955             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8956             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8957
8958             Example of usage:
8959                 pz = geompy.MakeVertex(0, 0, 100)
8960                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8961                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8962             """
8963             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8964             aVec = self.MakeLine(aPoint,aDir)
8965             # note: auto-publishing is done in self.MultiRotate1D()
8966             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8967             return anObj
8968
8969         ## The same, as MultiRotate2D(), but axis is given by direction and point
8970         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8971         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8972             """
8973             The same, as MultiRotate2D(), but axis is given by direction and point
8974             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8975
8976             Example of usage:
8977                 pz = geompy.MakeVertex(0, 0, 100)
8978                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8979                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8980             """
8981             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8982             aVec = self.MakeLine(aPoint,aDir)
8983             # note: auto-publishing is done in self.MultiRotate2D()
8984             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8985             return anObj
8986
8987         # end of l3_transform_d
8988         ## @}
8989
8990         ## @addtogroup l3_local
8991         ## @{
8992
8993         ## Perform a fillet on all edges of the given shape.
8994         #  @param theShape Shape, to perform fillet on.
8995         #  @param theR Fillet radius.
8996         #  @param theName Object name; when specified, this parameter is used
8997         #         for result publication in the study. Otherwise, if automatic
8998         #         publication is switched on, default value is used for result name.
8999         #
9000         #  @return New GEOM.GEOM_Object, containing the result shape.
9001         #
9002         #  @ref tui_fillet "Example 1"
9003         #  \n @ref swig_MakeFilletAll "Example 2"
9004         @ManageTransactions("LocalOp")
9005         def MakeFilletAll(self, theShape, theR, theName=None):
9006             """
9007             Perform a fillet on all edges of the given shape.
9008
9009             Parameters:
9010                 theShape Shape, to perform fillet on.
9011                 theR Fillet radius.
9012                 theName Object name; when specified, this parameter is used
9013                         for result publication in the study. Otherwise, if automatic
9014                         publication is switched on, default value is used for result name.
9015
9016             Returns:
9017                 New GEOM.GEOM_Object, containing the result shape.
9018
9019             Example of usage:
9020                filletall = geompy.MakeFilletAll(prism, 10.)
9021             """
9022             # Example: see GEOM_TestOthers.py
9023             theR,Parameters = ParseParameters(theR)
9024             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
9025             RaiseIfFailed("MakeFilletAll", self.LocalOp)
9026             anObj.SetParameters(Parameters)
9027             self._autoPublish(anObj, theName, "fillet")
9028             return anObj
9029
9030         ## Perform a fillet on the specified edges/faces of the given shape
9031         #  @param theShape Shape, to perform fillet on.
9032         #  @param theR Fillet radius.
9033         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
9034         #  @param theListShapes Global indices of edges/faces to perform fillet on.
9035         #  @param theName Object name; when specified, this parameter is used
9036         #         for result publication in the study. Otherwise, if automatic
9037         #         publication is switched on, default value is used for result name.
9038         #
9039         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9040         #
9041         #  @return New GEOM.GEOM_Object, containing the result shape.
9042         #
9043         #  @ref tui_fillet "Example"
9044         @ManageTransactions("LocalOp")
9045         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
9046             """
9047             Perform a fillet on the specified edges/faces of the given shape
9048
9049             Parameters:
9050                 theShape Shape, to perform fillet on.
9051                 theR Fillet radius.
9052                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
9053                 theListShapes Global indices of edges/faces to perform fillet on.
9054                 theName Object name; when specified, this parameter is used
9055                         for result publication in the study. Otherwise, if automatic
9056                         publication is switched on, default value is used for result name.
9057
9058             Note:
9059                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9060
9061             Returns:
9062                 New GEOM.GEOM_Object, containing the result shape.
9063
9064             Example of usage:
9065                 # get the list of IDs (IDList) for the fillet
9066                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9067                 IDlist_e = []
9068                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9069                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9070                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9071                 # make a fillet on the specified edges of the given shape
9072                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
9073             """
9074             # Example: see GEOM_TestAll.py
9075             theR,Parameters = ParseParameters(theR)
9076             anObj = None
9077             if theShapeType == self.ShapeType["EDGE"]:
9078                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
9079                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
9080             else:
9081                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
9082                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
9083             anObj.SetParameters(Parameters)
9084             self._autoPublish(anObj, theName, "fillet")
9085             return anObj
9086
9087         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
9088         @ManageTransactions("LocalOp")
9089         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
9090             """
9091             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
9092
9093             Example of usage:
9094                 # get the list of IDs (IDList) for the fillet
9095                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9096                 IDlist_e = []
9097                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9098                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9099                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9100                 # make a fillet on the specified edges of the given shape
9101                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
9102             """
9103             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
9104             anObj = None
9105             if theShapeType == self.ShapeType["EDGE"]:
9106                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
9107                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
9108             else:
9109                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
9110                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
9111             anObj.SetParameters(Parameters)
9112             self._autoPublish(anObj, theName, "fillet")
9113             return anObj
9114
9115         ## Perform a fillet on the specified edges of the given shape
9116         #  @param theShape  Wire Shape to perform fillet on.
9117         #  @param theR  Fillet radius.
9118         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9119         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
9120         #    \note The list of vertices could be empty,
9121         #          in this case fillet will done done at all vertices in wire
9122         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
9123         #         by the length of the edges, nearest to the fillet vertex.
9124         #         But sometimes the next edge is C1 continuous with the one, nearest to
9125         #         the fillet point, and such two (or more) edges can be united to allow
9126         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
9127         #         thus ignoring the secant vertex (vertices).
9128         #  @param theName Object name; when specified, this parameter is used
9129         #         for result publication in the study. Otherwise, if automatic
9130         #         publication is switched on, default value is used for result name.
9131         #
9132         #  @return New GEOM.GEOM_Object, containing the result shape.
9133         #
9134         #  @ref tui_fillet2d "Example"
9135         @ManageTransactions("LocalOp")
9136         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
9137             """
9138             Perform a fillet on the specified edges of the given shape
9139
9140             Parameters:
9141                 theShape  Wire Shape to perform fillet on.
9142                 theR  Fillet radius.
9143                 theListOfVertexes Global indices of vertexes to perform fillet on.
9144                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
9145                     by the length of the edges, nearest to the fillet vertex.
9146                     But sometimes the next edge is C1 continuous with the one, nearest to
9147                     the fillet point, and such two (or more) edges can be united to allow
9148                     bigger radius. Set this flag to TRUE to allow collinear edges union,
9149                     thus ignoring the secant vertex (vertices).
9150                 theName Object name; when specified, this parameter is used
9151                         for result publication in the study. Otherwise, if automatic
9152                         publication is switched on, default value is used for result name.
9153             Note:
9154                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9155
9156                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
9157
9158             Returns:
9159                 New GEOM.GEOM_Object, containing the result shape.
9160
9161             Example of usage:
9162                 # create wire
9163                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
9164                 # make fillet at given wire vertices with giver radius
9165                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
9166             """
9167             # Example: see GEOM_TestAll.py
9168             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
9169             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
9170             RaiseIfFailed("MakeFillet1D", self.LocalOp)
9171             anObj.SetParameters(Parameters)
9172             self._autoPublish(anObj, theName, "fillet")
9173             return anObj
9174
9175         ## Perform a fillet at the specified vertices of the given face/shell.
9176         #  @param theShape Face or Shell shape to perform fillet on.
9177         #  @param theR Fillet radius.
9178         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9179         #  @param theName Object name; when specified, this parameter is used
9180         #         for result publication in the study. Otherwise, if automatic
9181         #         publication is switched on, default value is used for result name.
9182         #
9183         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9184         #
9185         #  @return New GEOM.GEOM_Object, containing the result shape.
9186         #
9187         #  @ref tui_fillet2d "Example"
9188         @ManageTransactions("LocalOp")
9189         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
9190             """
9191             Perform a fillet at the specified vertices of the given face/shell.
9192
9193             Parameters:
9194                 theShape  Face or Shell shape to perform fillet on.
9195                 theR  Fillet radius.
9196                 theListOfVertexes Global indices of vertexes to perform fillet on.
9197                 theName Object name; when specified, this parameter is used
9198                         for result publication in the study. Otherwise, if automatic
9199                         publication is switched on, default value is used for result name.
9200             Note:
9201                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9202
9203             Returns:
9204                 New GEOM.GEOM_Object, containing the result shape.
9205
9206             Example of usage:
9207                 face = geompy.MakeFaceHW(100, 100, 1)
9208                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
9209             """
9210             # Example: see GEOM_TestAll.py
9211             theR,Parameters = ParseParameters(theR)
9212             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
9213             RaiseIfFailed("MakeFillet2D", self.LocalOp)
9214             anObj.SetParameters(Parameters)
9215             self._autoPublish(anObj, theName, "fillet")
9216             return anObj
9217
9218         ## Perform a symmetric chamfer on all edges of the given shape.
9219         #  @param theShape Shape, to perform chamfer on.
9220         #  @param theD Chamfer size along each face.
9221         #  @param theName Object name; when specified, this parameter is used
9222         #         for result publication in the study. Otherwise, if automatic
9223         #         publication is switched on, default value is used for result name.
9224         #
9225         #  @return New GEOM.GEOM_Object, containing the result shape.
9226         #
9227         #  @ref tui_chamfer "Example 1"
9228         #  \n @ref swig_MakeChamferAll "Example 2"
9229         @ManageTransactions("LocalOp")
9230         def MakeChamferAll(self, theShape, theD, theName=None):
9231             """
9232             Perform a symmetric chamfer on all edges of the given shape.
9233
9234             Parameters:
9235                 theShape Shape, to perform chamfer on.
9236                 theD Chamfer size along each face.
9237                 theName Object name; when specified, this parameter is used
9238                         for result publication in the study. Otherwise, if automatic
9239                         publication is switched on, default value is used for result name.
9240
9241             Returns:
9242                 New GEOM.GEOM_Object, containing the result shape.
9243
9244             Example of usage:
9245                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9246             """
9247             # Example: see GEOM_TestOthers.py
9248             theD,Parameters = ParseParameters(theD)
9249             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9250             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9251             anObj.SetParameters(Parameters)
9252             self._autoPublish(anObj, theName, "chamfer")
9253             return anObj
9254
9255         ## Perform a chamfer on edges, common to the specified faces,
9256         #  with distance D1 on the Face1
9257         #  @param theShape Shape, to perform chamfer on.
9258         #  @param theD1 Chamfer size along \a theFace1.
9259         #  @param theD2 Chamfer size along \a theFace2.
9260         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9261         #  @param theName Object name; when specified, this parameter is used
9262         #         for result publication in the study. Otherwise, if automatic
9263         #         publication is switched on, default value is used for result name.
9264         #
9265         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9266         #
9267         #  @return New GEOM.GEOM_Object, containing the result shape.
9268         #
9269         #  @ref tui_chamfer "Example"
9270         @ManageTransactions("LocalOp")
9271         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9272             """
9273             Perform a chamfer on edges, common to the specified faces,
9274             with distance D1 on the Face1
9275
9276             Parameters:
9277                 theShape Shape, to perform chamfer on.
9278                 theD1 Chamfer size along theFace1.
9279                 theD2 Chamfer size along theFace2.
9280                 theFace1,theFace2 Global indices of two faces of theShape.
9281                 theName Object name; when specified, this parameter is used
9282                         for result publication in the study. Otherwise, if automatic
9283                         publication is switched on, default value is used for result name.
9284
9285             Note:
9286                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9287
9288             Returns:
9289                 New GEOM.GEOM_Object, containing the result shape.
9290
9291             Example of usage:
9292                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9293                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9294                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9295                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
9296             """
9297             # Example: see GEOM_TestAll.py
9298             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9299             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
9300             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
9301             anObj.SetParameters(Parameters)
9302             self._autoPublish(anObj, theName, "chamfer")
9303             return anObj
9304
9305         ## Perform a chamfer on edges
9306         #  @param theShape Shape, to perform chamfer on.
9307         #  @param theD Chamfer length
9308         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9309         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9310         #  @param theName Object name; when specified, this parameter is used
9311         #         for result publication in the study. Otherwise, if automatic
9312         #         publication is switched on, default value is used for result name.
9313         #
9314         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9315         #
9316         #  @return New GEOM.GEOM_Object, containing the result shape.
9317         @ManageTransactions("LocalOp")
9318         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
9319             """
9320             Perform a chamfer on edges
9321
9322             Parameters:
9323                 theShape Shape, to perform chamfer on.
9324                 theD1 Chamfer size along theFace1.
9325                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
9326                 theFace1,theFace2 Global indices of two faces of theShape.
9327                 theName Object name; when specified, this parameter is used
9328                         for result publication in the study. Otherwise, if automatic
9329                         publication is switched on, default value is used for result name.
9330
9331             Note:
9332                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9333
9334             Returns:
9335                 New GEOM.GEOM_Object, containing the result shape.
9336
9337             Example of usage:
9338                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9339                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9340                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9341                 ang = 30
9342                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
9343             """
9344             flag = False
9345             if isinstance(theAngle,str):
9346                 flag = True
9347             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9348             if flag:
9349                 theAngle = theAngle*math.pi/180.0
9350             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
9351             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
9352             anObj.SetParameters(Parameters)
9353             self._autoPublish(anObj, theName, "chamfer")
9354             return anObj
9355
9356         ## Perform a chamfer on all edges of the specified faces,
9357         #  with distance D1 on the first specified face (if several for one edge)
9358         #  @param theShape Shape, to perform chamfer on.
9359         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
9360         #               connected to the edge, are in \a theFaces, \a theD1
9361         #               will be get along face, which is nearer to \a theFaces beginning.
9362         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
9363         #  @param theFaces Sequence of global indices of faces of \a theShape.
9364         #  @param theName Object name; when specified, this parameter is used
9365         #         for result publication in the study. Otherwise, if automatic
9366         #         publication is switched on, default value is used for result name.
9367         #
9368         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9369         #
9370         #  @return New GEOM.GEOM_Object, containing the result shape.
9371         #
9372         #  @ref tui_chamfer "Example"
9373         @ManageTransactions("LocalOp")
9374         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
9375             """
9376             Perform a chamfer on all edges of the specified faces,
9377             with distance D1 on the first specified face (if several for one edge)
9378
9379             Parameters:
9380                 theShape Shape, to perform chamfer on.
9381                 theD1 Chamfer size along face from  theFaces. If both faces,
9382                       connected to the edge, are in theFaces, theD1
9383                       will be get along face, which is nearer to theFaces beginning.
9384                 theD2 Chamfer size along another of two faces, connected to the edge.
9385                 theFaces Sequence of global indices of faces of theShape.
9386                 theName Object name; when specified, this parameter is used
9387                         for result publication in the study. Otherwise, if automatic
9388                         publication is switched on, default value is used for result name.
9389
9390             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
9391
9392             Returns:
9393                 New GEOM.GEOM_Object, containing the result shape.
9394             """
9395             # Example: see GEOM_TestAll.py
9396             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9397             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
9398             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
9399             anObj.SetParameters(Parameters)
9400             self._autoPublish(anObj, theName, "chamfer")
9401             return anObj
9402
9403         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
9404         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9405         #
9406         #  @ref swig_FilletChamfer "Example"
9407         @ManageTransactions("LocalOp")
9408         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
9409             """
9410             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
9411             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9412             """
9413             flag = False
9414             if isinstance(theAngle,str):
9415                 flag = True
9416             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9417             if flag:
9418                 theAngle = theAngle*math.pi/180.0
9419             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
9420             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
9421             anObj.SetParameters(Parameters)
9422             self._autoPublish(anObj, theName, "chamfer")
9423             return anObj
9424
9425         ## Perform a chamfer on edges,
9426         #  with distance D1 on the first specified face (if several for one edge)
9427         #  @param theShape Shape, to perform chamfer on.
9428         #  @param theD1,theD2 Chamfer size
9429         #  @param theEdges Sequence of edges of \a theShape.
9430         #  @param theName Object name; when specified, this parameter is used
9431         #         for result publication in the study. Otherwise, if automatic
9432         #         publication is switched on, default value is used for result name.
9433         #
9434         #  @return New GEOM.GEOM_Object, containing the result shape.
9435         #
9436         #  @ref swig_FilletChamfer "Example"
9437         @ManageTransactions("LocalOp")
9438         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
9439             """
9440             Perform a chamfer on edges,
9441             with distance D1 on the first specified face (if several for one edge)
9442
9443             Parameters:
9444                 theShape Shape, to perform chamfer on.
9445                 theD1,theD2 Chamfer size
9446                 theEdges Sequence of edges of theShape.
9447                 theName Object name; when specified, this parameter is used
9448                         for result publication in the study. Otherwise, if automatic
9449                         publication is switched on, default value is used for result name.
9450
9451             Returns:
9452                 New GEOM.GEOM_Object, containing the result shape.
9453             """
9454             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9455             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
9456             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
9457             anObj.SetParameters(Parameters)
9458             self._autoPublish(anObj, theName, "chamfer")
9459             return anObj
9460
9461         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
9462         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9463         @ManageTransactions("LocalOp")
9464         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
9465             """
9466             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
9467             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9468             """
9469             flag = False
9470             if isinstance(theAngle,str):
9471                 flag = True
9472             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9473             if flag:
9474                 theAngle = theAngle*math.pi/180.0
9475             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
9476             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
9477             anObj.SetParameters(Parameters)
9478             self._autoPublish(anObj, theName, "chamfer")
9479             return anObj
9480
9481         ## @sa MakeChamferEdge(), MakeChamferFaces()
9482         #
9483         #  @ref swig_MakeChamfer "Example"
9484         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
9485             """
9486             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
9487             """
9488             # Example: see GEOM_TestOthers.py
9489             anObj = None
9490             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
9491             if aShapeType == self.ShapeType["EDGE"]:
9492                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
9493             else:
9494                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
9495             return anObj
9496
9497         ## Remove material from a solid by extrusion of the base shape on the given distance.
9498         #  @param theInit Shape to remove material from. It must be a solid or
9499         #  a compound made of a single solid.
9500         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9501         #  @param theH Prism dimension along the normal to theBase
9502         #  @param theAngle Draft angle in degrees.
9503         #  @param theName Object name; when specified, this parameter is used
9504         #         for result publication in the study. Otherwise, if automatic
9505         #         publication is switched on, default value is used for result name.
9506         #
9507         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
9508         #
9509         #  @ref tui_creation_prism "Example"
9510         @ManageTransactions("PrimOp")
9511         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9512             """
9513             Add material to a solid by extrusion of the base shape on the given distance.
9514
9515             Parameters:
9516                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9517                 theBase Closed edge or wire defining the base shape to be extruded.
9518                 theH Prism dimension along the normal  to theBase
9519                 theAngle Draft angle in degrees.
9520                 theName Object name; when specified, this parameter is used
9521                         for result publication in the study. Otherwise, if automatic
9522                         publication is switched on, default value is used for result name.
9523
9524             Returns:
9525                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9526             """
9527             # Example: see GEOM_TestAll.py
9528             #theH,Parameters = ParseParameters(theH)
9529             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9530             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9531             #anObj.SetParameters(Parameters)
9532             self._autoPublish(anObj, theName, "extrudedCut")
9533             return anObj
9534
9535         ## Add material to a solid by extrusion of the base shape on the given distance.
9536         #  @param theInit Shape to add material to. It must be a solid or
9537         #  a compound made of a single solid.
9538         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9539         #  @param theH Prism dimension along the normal to theBase
9540         #  @param theAngle Draft angle in degrees.
9541         #  @param theName Object name; when specified, this parameter is used
9542         #         for result publication in the study. Otherwise, if automatic
9543         #         publication is switched on, default value is used for result name.
9544         #
9545         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
9546         #
9547         #  @ref tui_creation_prism "Example"
9548         @ManageTransactions("PrimOp")
9549         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
9550             """
9551             Add material to a solid by extrusion of the base shape on the given distance.
9552
9553             Parameters:
9554                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
9555                 theBase Closed edge or wire defining the base shape to be extruded.
9556                 theH Prism dimension along the normal  to theBase
9557                 theAngle Draft angle in degrees.
9558                 theName Object name; when specified, this parameter is used
9559                         for result publication in the study. Otherwise, if automatic
9560                         publication is switched on, default value is used for result name.
9561
9562             Returns:
9563                 New GEOM.GEOM_Object,  containing the initial shape with added material.
9564             """
9565             # Example: see GEOM_TestAll.py
9566             #theH,Parameters = ParseParameters(theH)
9567             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
9568             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9569             #anObj.SetParameters(Parameters)
9570             self._autoPublish(anObj, theName, "extrudedBoss")
9571             return anObj
9572
9573         # end of l3_local
9574         ## @}
9575
9576         ## @addtogroup l3_basic_op
9577         ## @{
9578
9579         ## Perform an Archimde operation on the given shape with given parameters.
9580         #  The object presenting the resulting face is returned.
9581         #  @param theShape Shape to be put in water.
9582         #  @param theWeight Weight og the shape.
9583         #  @param theWaterDensity Density of the water.
9584         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
9585         #  @param theName Object name; when specified, this parameter is used
9586         #         for result publication in the study. Otherwise, if automatic
9587         #         publication is switched on, default value is used for result name.
9588         #
9589         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
9590         #          by a plane, corresponding to water level.
9591         #
9592         #  @ref tui_archimede "Example"
9593         @ManageTransactions("LocalOp")
9594         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9595             """
9596             Perform an Archimde operation on the given shape with given parameters.
9597             The object presenting the resulting face is returned.
9598
9599             Parameters:
9600                 theShape Shape to be put in water.
9601                 theWeight Weight og the shape.
9602                 theWaterDensity Density of the water.
9603                 theMeshDeflection Deflection of the mesh, using to compute the section.
9604                 theName Object name; when specified, this parameter is used
9605                         for result publication in the study. Otherwise, if automatic
9606                         publication is switched on, default value is used for result name.
9607
9608             Returns:
9609                 New GEOM.GEOM_Object, containing a section of theShape
9610                 by a plane, corresponding to water level.
9611             """
9612             # Example: see GEOM_TestAll.py
9613             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9614               theWeight,theWaterDensity,theMeshDeflection)
9615             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9616             RaiseIfFailed("MakeArchimede", self.LocalOp)
9617             anObj.SetParameters(Parameters)
9618             self._autoPublish(anObj, theName, "archimede")
9619             return anObj
9620
9621         # end of l3_basic_op
9622         ## @}
9623
9624         ## @addtogroup l2_measure
9625         ## @{
9626
9627         ## Get point coordinates
9628         #  @return [x, y, z]
9629         #
9630         #  @ref tui_measurement_tools_page "Example"
9631         @ManageTransactions("MeasuOp")
9632         def PointCoordinates(self,Point):
9633             """
9634             Get point coordinates
9635
9636             Returns:
9637                 [x, y, z]
9638             """
9639             # Example: see GEOM_TestMeasures.py
9640             aTuple = self.MeasuOp.PointCoordinates(Point)
9641             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9642             return aTuple
9643
9644         ## Get vector coordinates
9645         #  @return [x, y, z]
9646         #
9647         #  @ref tui_measurement_tools_page "Example"
9648         def VectorCoordinates(self,Vector):
9649             """
9650             Get vector coordinates
9651
9652             Returns:
9653                 [x, y, z]
9654             """
9655
9656             p1=self.GetFirstVertex(Vector)
9657             p2=self.GetLastVertex(Vector)
9658
9659             X1=self.PointCoordinates(p1)
9660             X2=self.PointCoordinates(p2)
9661
9662             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9663
9664
9665         ## Compute cross product
9666         #  @return vector w=u^v
9667         #
9668         #  @ref tui_measurement_tools_page "Example"
9669         def CrossProduct(self, Vector1, Vector2):
9670             """
9671             Compute cross product
9672
9673             Returns: vector w=u^v
9674             """
9675             u=self.VectorCoordinates(Vector1)
9676             v=self.VectorCoordinates(Vector2)
9677             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])
9678
9679             return w
9680
9681         ## Compute cross product
9682         #  @return dot product  p=u.v
9683         #
9684         #  @ref tui_measurement_tools_page "Example"
9685         def DotProduct(self, Vector1, Vector2):
9686             """
9687             Compute cross product
9688
9689             Returns: dot product  p=u.v
9690             """
9691             u=self.VectorCoordinates(Vector1)
9692             v=self.VectorCoordinates(Vector2)
9693             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9694
9695             return p
9696
9697
9698         ## Get summarized length of all wires,
9699         #  area of surface and volume of the given shape.
9700         #  @param theShape Shape to define properties of.
9701         #  @return [theLength, theSurfArea, theVolume]\n
9702         #  theLength:   Summarized length of all wires of the given shape.\n
9703         #  theSurfArea: Area of surface of the given shape.\n
9704         #  theVolume:   Volume of the given shape.
9705         #
9706         #  @ref tui_measurement_tools_page "Example"
9707         @ManageTransactions("MeasuOp")
9708         def BasicProperties(self,theShape):
9709             """
9710             Get summarized length of all wires,
9711             area of surface and volume of the given shape.
9712
9713             Parameters:
9714                 theShape Shape to define properties of.
9715
9716             Returns:
9717                 [theLength, theSurfArea, theVolume]
9718                  theLength:   Summarized length of all wires of the given shape.
9719                  theSurfArea: Area of surface of the given shape.
9720                  theVolume:   Volume of the given shape.
9721             """
9722             # Example: see GEOM_TestMeasures.py
9723             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9724             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9725             return aTuple
9726
9727         ## Get parameters of bounding box of the given shape
9728         #  @param theShape Shape to obtain bounding box of.
9729         #  @param precise TRUE for precise computation; FALSE for fast one.
9730         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9731         #  Xmin,Xmax: Limits of shape along OX axis.
9732         #  Ymin,Ymax: Limits of shape along OY axis.
9733         #  Zmin,Zmax: Limits of shape along OZ axis.
9734         #
9735         #  @ref tui_measurement_tools_page "Example"
9736         @ManageTransactions("MeasuOp")
9737         def BoundingBox (self, theShape, precise=False):
9738             """
9739             Get parameters of bounding box of the given shape
9740
9741             Parameters:
9742                 theShape Shape to obtain bounding box of.
9743                 precise TRUE for precise computation; FALSE for fast one.
9744
9745             Returns:
9746                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9747                  Xmin,Xmax: Limits of shape along OX axis.
9748                  Ymin,Ymax: Limits of shape along OY axis.
9749                  Zmin,Zmax: Limits of shape along OZ axis.
9750             """
9751             # Example: see GEOM_TestMeasures.py
9752             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9753             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9754             return aTuple
9755
9756         ## Get bounding box of the given shape
9757         #  @param theShape Shape to obtain bounding box of.
9758         #  @param precise TRUE for precise computation; FALSE for fast one.
9759         #  @param theName Object name; when specified, this parameter is used
9760         #         for result publication in the study. Otherwise, if automatic
9761         #         publication is switched on, default value is used for result name.
9762         #
9763         #  @return New GEOM.GEOM_Object, containing the created box.
9764         #
9765         #  @ref tui_measurement_tools_page "Example"
9766         @ManageTransactions("MeasuOp")
9767         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9768             """
9769             Get bounding box of the given shape
9770
9771             Parameters:
9772                 theShape Shape to obtain bounding box of.
9773                 precise TRUE for precise computation; FALSE for fast one.
9774                 theName Object name; when specified, this parameter is used
9775                         for result publication in the study. Otherwise, if automatic
9776                         publication is switched on, default value is used for result name.
9777
9778             Returns:
9779                 New GEOM.GEOM_Object, containing the created box.
9780             """
9781             # Example: see GEOM_TestMeasures.py
9782             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9783             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9784             self._autoPublish(anObj, theName, "bndbox")
9785             return anObj
9786
9787         ## Get inertia matrix and moments of inertia of theShape.
9788         #  @param theShape Shape to calculate inertia of.
9789         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9790         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9791         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9792         #
9793         #  @ref tui_measurement_tools_page "Example"
9794         @ManageTransactions("MeasuOp")
9795         def Inertia(self,theShape):
9796             """
9797             Get inertia matrix and moments of inertia of theShape.
9798
9799             Parameters:
9800                 theShape Shape to calculate inertia of.
9801
9802             Returns:
9803                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9804                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9805                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9806             """
9807             # Example: see GEOM_TestMeasures.py
9808             aTuple = self.MeasuOp.GetInertia(theShape)
9809             RaiseIfFailed("GetInertia", self.MeasuOp)
9810             return aTuple
9811
9812         ## Get if coords are included in the shape (ST_IN or ST_ON)
9813         #  @param theShape Shape
9814         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9815         #  @param tolerance to be used (default is 1.0e-7)
9816         #  @return list_of_boolean = [res1, res2, ...]
9817         @ManageTransactions("MeasuOp")
9818         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9819             """
9820             Get if coords are included in the shape (ST_IN or ST_ON)
9821
9822             Parameters:
9823                 theShape Shape
9824                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9825                 tolerance to be used (default is 1.0e-7)
9826
9827             Returns:
9828                 list_of_boolean = [res1, res2, ...]
9829             """
9830             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9831
9832         ## Get minimal distance between the given shapes.
9833         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9834         #  @return Value of the minimal distance between the given shapes.
9835         #
9836         #  @ref tui_measurement_tools_page "Example"
9837         @ManageTransactions("MeasuOp")
9838         def MinDistance(self, theShape1, theShape2):
9839             """
9840             Get minimal distance between the given shapes.
9841
9842             Parameters:
9843                 theShape1,theShape2 Shapes to find minimal distance between.
9844
9845             Returns:
9846                 Value of the minimal distance between the given shapes.
9847             """
9848             # Example: see GEOM_TestMeasures.py
9849             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9850             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9851             return aTuple[0]
9852
9853         ## Get minimal distance between the given shapes.
9854         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9855         #  @return Value of the minimal distance between the given shapes, in form of list
9856         #          [Distance, DX, DY, DZ].
9857         #
9858         #  @ref swig_all_measure "Example"
9859         @ManageTransactions("MeasuOp")
9860         def MinDistanceComponents(self, theShape1, theShape2):
9861             """
9862             Get minimal distance between the given shapes.
9863
9864             Parameters:
9865                 theShape1,theShape2 Shapes to find minimal distance between.
9866
9867             Returns:
9868                 Value of the minimal distance between the given shapes, in form of list
9869                 [Distance, DX, DY, DZ]
9870             """
9871             # Example: see GEOM_TestMeasures.py
9872             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9873             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9874             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9875             return aRes
9876
9877         ## Get closest points of the given shapes.
9878         #  @param theShape1,theShape2 Shapes to find closest points of.
9879         #  @return The number of found solutions (-1 in case of infinite number of
9880         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9881         #
9882         #  @ref tui_measurement_tools_page "Example"
9883         @ManageTransactions("MeasuOp")
9884         def ClosestPoints (self, theShape1, theShape2):
9885             """
9886             Get closest points of the given shapes.
9887
9888             Parameters:
9889                 theShape1,theShape2 Shapes to find closest points of.
9890
9891             Returns:
9892                 The number of found solutions (-1 in case of infinite number of
9893                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9894             """
9895             # Example: see GEOM_TestMeasures.py
9896             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9897             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9898             return aTuple
9899
9900         ## Get angle between the given shapes in degrees.
9901         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9902         #  @note If both arguments are vectors, the angle is computed in accordance
9903         #        with their orientations, otherwise the minimum angle is computed.
9904         #  @return Value of the angle between the given shapes in degrees.
9905         #
9906         #  @ref tui_measurement_tools_page "Example"
9907         @ManageTransactions("MeasuOp")
9908         def GetAngle(self, theShape1, theShape2):
9909             """
9910             Get angle between the given shapes in degrees.
9911
9912             Parameters:
9913                 theShape1,theShape2 Lines or linear edges to find angle between.
9914
9915             Note:
9916                 If both arguments are vectors, the angle is computed in accordance
9917                 with their orientations, otherwise the minimum angle is computed.
9918
9919             Returns:
9920                 Value of the angle between the given shapes in degrees.
9921             """
9922             # Example: see GEOM_TestMeasures.py
9923             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9924             RaiseIfFailed("GetAngle", self.MeasuOp)
9925             return anAngle
9926
9927         ## Get angle between the given shapes in radians.
9928         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9929         #  @note If both arguments are vectors, the angle is computed in accordance
9930         #        with their orientations, otherwise the minimum angle is computed.
9931         #  @return Value of the angle between the given shapes in radians.
9932         #
9933         #  @ref tui_measurement_tools_page "Example"
9934         @ManageTransactions("MeasuOp")
9935         def GetAngleRadians(self, theShape1, theShape2):
9936             """
9937             Get angle between the given shapes in radians.
9938
9939             Parameters:
9940                 theShape1,theShape2 Lines or linear edges to find angle between.
9941
9942
9943             Note:
9944                 If both arguments are vectors, the angle is computed in accordance
9945                 with their orientations, otherwise the minimum angle is computed.
9946
9947             Returns:
9948                 Value of the angle between the given shapes in radians.
9949             """
9950             # Example: see GEOM_TestMeasures.py
9951             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9952             RaiseIfFailed("GetAngle", self.MeasuOp)
9953             return anAngle
9954
9955         ## Get angle between the given vectors in degrees.
9956         #  @param theShape1,theShape2 Vectors to find angle between.
9957         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9958         #                 if False, the opposite vector to the normal vector is used.
9959         #  @return Value of the angle between the given vectors in degrees.
9960         #
9961         #  @ref tui_measurement_tools_page "Example"
9962         @ManageTransactions("MeasuOp")
9963         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9964             """
9965             Get angle between the given vectors in degrees.
9966
9967             Parameters:
9968                 theShape1,theShape2 Vectors to find angle between.
9969                 theFlag If True, the normal vector is defined by the two vectors cross,
9970                         if False, the opposite vector to the normal vector is used.
9971
9972             Returns:
9973                 Value of the angle between the given vectors in degrees.
9974             """
9975             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9976             if not theFlag:
9977                 anAngle = 360. - anAngle
9978             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9979             return anAngle
9980
9981         ## The same as GetAngleVectors, but the result is in radians.
9982         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9983             """
9984             Get angle between the given vectors in radians.
9985
9986             Parameters:
9987                 theShape1,theShape2 Vectors to find angle between.
9988                 theFlag If True, the normal vector is defined by the two vectors cross,
9989                         if False, the opposite vector to the normal vector is used.
9990
9991             Returns:
9992                 Value of the angle between the given vectors in radians.
9993             """
9994             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9995             return anAngle
9996
9997         ## @name Curve Curvature Measurement
9998         #  Methods for receiving radius of curvature of curves
9999         #  in the given point
10000         ## @{
10001
10002         ## Measure curvature of a curve at a point, set by parameter.
10003         #  @param theCurve a curve.
10004         #  @param theParam parameter.
10005         #  @return radius of curvature of \a theCurve.
10006         #
10007         #  @ref swig_todo "Example"
10008         @ManageTransactions("MeasuOp")
10009         def CurveCurvatureByParam(self, theCurve, theParam):
10010             """
10011             Measure curvature of a curve at a point, set by parameter.
10012
10013             Parameters:
10014                 theCurve a curve.
10015                 theParam parameter.
10016
10017             Returns:
10018                 radius of curvature of theCurve.
10019             """
10020             # Example: see GEOM_TestMeasures.py
10021             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
10022             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
10023             return aCurv
10024
10025         ## Measure curvature of a curve at a point.
10026         #  @param theCurve a curve.
10027         #  @param thePoint given point.
10028         #  @return radius of curvature of \a theCurve.
10029         #
10030         #  @ref swig_todo "Example"
10031         @ManageTransactions("MeasuOp")
10032         def CurveCurvatureByPoint(self, theCurve, thePoint):
10033             """
10034             Measure curvature of a curve at a point.
10035
10036             Parameters:
10037                 theCurve a curve.
10038                 thePoint given point.
10039
10040             Returns:
10041                 radius of curvature of theCurve.
10042             """
10043             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
10044             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
10045             return aCurv
10046         ## @}
10047
10048         ## @name Surface Curvature Measurement
10049         #  Methods for receiving max and min radius of curvature of surfaces
10050         #  in the given point
10051         ## @{
10052
10053         ## Measure max radius of curvature of surface.
10054         #  @param theSurf the given surface.
10055         #  @param theUParam Value of U-parameter on the referenced surface.
10056         #  @param theVParam Value of V-parameter on the referenced surface.
10057         #  @return max radius of curvature of theSurf.
10058         #
10059         ## @ref swig_todo "Example"
10060         @ManageTransactions("MeasuOp")
10061         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10062             """
10063             Measure max radius of curvature of surface.
10064
10065             Parameters:
10066                 theSurf the given surface.
10067                 theUParam Value of U-parameter on the referenced surface.
10068                 theVParam Value of V-parameter on the referenced surface.
10069
10070             Returns:
10071                 max radius of curvature of theSurf.
10072             """
10073             # Example: see GEOM_TestMeasures.py
10074             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10075             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
10076             return aSurf
10077
10078         ## Measure max radius of curvature of surface in the given point
10079         #  @param theSurf the given surface.
10080         #  @param thePoint given point.
10081         #  @return max radius of curvature of theSurf.
10082         #
10083         ## @ref swig_todo "Example"
10084         @ManageTransactions("MeasuOp")
10085         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
10086             """
10087             Measure max radius of curvature of surface in the given point.
10088
10089             Parameters:
10090                 theSurf the given surface.
10091                 thePoint given point.
10092
10093             Returns:
10094                 max radius of curvature of theSurf.
10095             """
10096             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
10097             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
10098             return aSurf
10099
10100         ## Measure min radius of curvature of surface.
10101         #  @param theSurf the given surface.
10102         #  @param theUParam Value of U-parameter on the referenced surface.
10103         #  @param theVParam Value of V-parameter on the referenced surface.
10104         #  @return min radius of curvature of theSurf.
10105         #
10106         ## @ref swig_todo "Example"
10107         @ManageTransactions("MeasuOp")
10108         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10109             """
10110             Measure min radius of curvature of surface.
10111
10112             Parameters:
10113                 theSurf the given surface.
10114                 theUParam Value of U-parameter on the referenced surface.
10115                 theVParam Value of V-parameter on the referenced surface.
10116
10117             Returns:
10118                 Min radius of curvature of theSurf.
10119             """
10120             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10121             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
10122             return aSurf
10123
10124         ## Measure min radius of curvature of surface in the given point
10125         #  @param theSurf the given surface.
10126         #  @param thePoint given point.
10127         #  @return min radius of curvature of theSurf.
10128         #
10129         ## @ref swig_todo "Example"
10130         @ManageTransactions("MeasuOp")
10131         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
10132             """
10133             Measure min radius of curvature of surface in the given point.
10134
10135             Parameters:
10136                 theSurf the given surface.
10137                 thePoint given point.
10138
10139             Returns:
10140                 Min radius of curvature of theSurf.
10141             """
10142             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
10143             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
10144             return aSurf
10145         ## @}
10146
10147         ## Get min and max tolerances of sub-shapes of theShape
10148         #  @param theShape Shape, to get tolerances of.
10149         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
10150         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
10151         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
10152         #  VertMin,VertMax: Min and max tolerances of the vertices.
10153         #
10154         #  @ref tui_measurement_tools_page "Example"
10155         @ManageTransactions("MeasuOp")
10156         def Tolerance(self,theShape):
10157             """
10158             Get min and max tolerances of sub-shapes of theShape
10159
10160             Parameters:
10161                 theShape Shape, to get tolerances of.
10162
10163             Returns:
10164                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
10165                  FaceMin,FaceMax: Min and max tolerances of the faces.
10166                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
10167                  VertMin,VertMax: Min and max tolerances of the vertices.
10168             """
10169             # Example: see GEOM_TestMeasures.py
10170             aTuple = self.MeasuOp.GetTolerance(theShape)
10171             RaiseIfFailed("GetTolerance", self.MeasuOp)
10172             return aTuple
10173
10174         ## Obtain description of the given shape (number of sub-shapes of each type)
10175         #  @param theShape Shape to be described.
10176         #  @return Description of the given shape.
10177         #
10178         #  @ref tui_measurement_tools_page "Example"
10179         @ManageTransactions("MeasuOp")
10180         def WhatIs(self,theShape):
10181             """
10182             Obtain description of the given shape (number of sub-shapes of each type)
10183
10184             Parameters:
10185                 theShape Shape to be described.
10186
10187             Returns:
10188                 Description of the given shape.
10189             """
10190             # Example: see GEOM_TestMeasures.py
10191             aDescr = self.MeasuOp.WhatIs(theShape)
10192             RaiseIfFailed("WhatIs", self.MeasuOp)
10193             return aDescr
10194
10195         ## Obtain quantity of shapes of the given type in \a theShape.
10196         #  If \a theShape is of type \a theType, it is also counted.
10197         #  @param theShape Shape to be described.
10198         #  @param theType the given ShapeType().
10199         #  @return Quantity of shapes of type \a theType in \a theShape.
10200         #
10201         #  @ref tui_measurement_tools_page "Example"
10202         def NbShapes (self, theShape, theType):
10203             """
10204             Obtain quantity of shapes of the given type in theShape.
10205             If theShape is of type theType, it is also counted.
10206
10207             Parameters:
10208                 theShape Shape to be described.
10209                 theType the given geompy.ShapeType
10210
10211             Returns:
10212                 Quantity of shapes of type theType in theShape.
10213             """
10214             # Example: see GEOM_TestMeasures.py
10215             listSh = self.SubShapeAllIDs(theShape, theType)
10216             Nb = len(listSh)
10217             return Nb
10218
10219         ## Obtain quantity of shapes of each type in \a theShape.
10220         #  The \a theShape is also counted.
10221         #  @param theShape Shape to be described.
10222         #  @return Dictionary of ShapeType() with bound quantities of shapes.
10223         #
10224         #  @ref tui_measurement_tools_page "Example"
10225         def ShapeInfo (self, theShape):
10226             """
10227             Obtain quantity of shapes of each type in theShape.
10228             The theShape is also counted.
10229
10230             Parameters:
10231                 theShape Shape to be described.
10232
10233             Returns:
10234                 Dictionary of geompy.ShapeType with bound quantities of shapes.
10235             """
10236             # Example: see GEOM_TestMeasures.py
10237             aDict = {}
10238             for typeSh in self.ShapeType:
10239                 if typeSh in ( "AUTO", "SHAPE" ): continue
10240                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
10241                 Nb = len(listSh)
10242                 aDict[typeSh] = Nb
10243                 pass
10244             return aDict
10245
10246         def GetCreationInformation(self, theShape):
10247             info = theShape.GetCreationInformation()
10248             # operationName
10249             opName = info.operationName
10250             if not opName: opName = "no info available"
10251             res = "Operation: " + opName
10252             # parameters
10253             for parVal in info.params:
10254                 res += " \n %s = %s" % ( parVal.name, parVal.value )
10255             return res
10256
10257         ## Get a point, situated at the centre of mass of theShape.
10258         #  @param theShape Shape to define centre of mass of.
10259         #  @param theName Object name; when specified, this parameter is used
10260         #         for result publication in the study. Otherwise, if automatic
10261         #         publication is switched on, default value is used for result name.
10262         #
10263         #  @return New GEOM.GEOM_Object, containing the created point.
10264         #
10265         #  @ref tui_measurement_tools_page "Example"
10266         @ManageTransactions("MeasuOp")
10267         def MakeCDG(self, theShape, theName=None):
10268             """
10269             Get a point, situated at the centre of mass of theShape.
10270
10271             Parameters:
10272                 theShape Shape to define centre of mass of.
10273                 theName Object name; when specified, this parameter is used
10274                         for result publication in the study. Otherwise, if automatic
10275                         publication is switched on, default value is used for result name.
10276
10277             Returns:
10278                 New GEOM.GEOM_Object, containing the created point.
10279             """
10280             # Example: see GEOM_TestMeasures.py
10281             anObj = self.MeasuOp.GetCentreOfMass(theShape)
10282             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
10283             self._autoPublish(anObj, theName, "centerOfMass")
10284             return anObj
10285
10286         ## Get a vertex sub-shape by index depended with orientation.
10287         #  @param theShape Shape to find sub-shape.
10288         #  @param theIndex Index to find vertex by this index (starting from zero)
10289         #  @param theName Object name; when specified, this parameter is used
10290         #         for result publication in the study. Otherwise, if automatic
10291         #         publication is switched on, default value is used for result name.
10292         #
10293         #  @return New GEOM.GEOM_Object, containing the created vertex.
10294         #
10295         #  @ref tui_measurement_tools_page "Example"
10296         @ManageTransactions("MeasuOp")
10297         def GetVertexByIndex(self, theShape, theIndex, theName=None):
10298             """
10299             Get a vertex sub-shape by index depended with orientation.
10300
10301             Parameters:
10302                 theShape Shape to find sub-shape.
10303                 theIndex Index to find vertex by this index (starting from zero)
10304                 theName Object name; when specified, this parameter is used
10305                         for result publication in the study. Otherwise, if automatic
10306                         publication is switched on, default value is used for result name.
10307
10308             Returns:
10309                 New GEOM.GEOM_Object, containing the created vertex.
10310             """
10311             # Example: see GEOM_TestMeasures.py
10312             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
10313             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
10314             self._autoPublish(anObj, theName, "vertex")
10315             return anObj
10316
10317         ## Get the first vertex of wire/edge depended orientation.
10318         #  @param theShape Shape to find first vertex.
10319         #  @param theName Object name; when specified, this parameter is used
10320         #         for result publication in the study. Otherwise, if automatic
10321         #         publication is switched on, default value is used for result name.
10322         #
10323         #  @return New GEOM.GEOM_Object, containing the created vertex.
10324         #
10325         #  @ref tui_measurement_tools_page "Example"
10326         def GetFirstVertex(self, theShape, theName=None):
10327             """
10328             Get the first vertex of wire/edge depended orientation.
10329
10330             Parameters:
10331                 theShape Shape to find first vertex.
10332                 theName Object name; when specified, this parameter is used
10333                         for result publication in the study. Otherwise, if automatic
10334                         publication is switched on, default value is used for result name.
10335
10336             Returns:
10337                 New GEOM.GEOM_Object, containing the created vertex.
10338             """
10339             # Example: see GEOM_TestMeasures.py
10340             # note: auto-publishing is done in self.GetVertexByIndex()
10341             return self.GetVertexByIndex(theShape, 0, theName)
10342
10343         ## Get the last vertex of wire/edge depended orientation.
10344         #  @param theShape Shape to find last vertex.
10345         #  @param theName Object name; when specified, this parameter is used
10346         #         for result publication in the study. Otherwise, if automatic
10347         #         publication is switched on, default value is used for result name.
10348         #
10349         #  @return New GEOM.GEOM_Object, containing the created vertex.
10350         #
10351         #  @ref tui_measurement_tools_page "Example"
10352         def GetLastVertex(self, theShape, theName=None):
10353             """
10354             Get the last vertex of wire/edge depended orientation.
10355
10356             Parameters:
10357                 theShape Shape to find last vertex.
10358                 theName Object name; when specified, this parameter is used
10359                         for result publication in the study. Otherwise, if automatic
10360                         publication is switched on, default value is used for result name.
10361
10362             Returns:
10363                 New GEOM.GEOM_Object, containing the created vertex.
10364             """
10365             # Example: see GEOM_TestMeasures.py
10366             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
10367             # note: auto-publishing is done in self.GetVertexByIndex()
10368             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
10369
10370         ## Get a normale to the given face. If the point is not given,
10371         #  the normale is calculated at the center of mass.
10372         #  @param theFace Face to define normale of.
10373         #  @param theOptionalPoint Point to compute the normale at.
10374         #  @param theName Object name; when specified, this parameter is used
10375         #         for result publication in the study. Otherwise, if automatic
10376         #         publication is switched on, default value is used for result name.
10377         #
10378         #  @return New GEOM.GEOM_Object, containing the created vector.
10379         #
10380         #  @ref swig_todo "Example"
10381         @ManageTransactions("MeasuOp")
10382         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
10383             """
10384             Get a normale to the given face. If the point is not given,
10385             the normale is calculated at the center of mass.
10386
10387             Parameters:
10388                 theFace Face to define normale of.
10389                 theOptionalPoint Point to compute the normale at.
10390                 theName Object name; when specified, this parameter is used
10391                         for result publication in the study. Otherwise, if automatic
10392                         publication is switched on, default value is used for result name.
10393
10394             Returns:
10395                 New GEOM.GEOM_Object, containing the created vector.
10396             """
10397             # Example: see GEOM_TestMeasures.py
10398             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
10399             RaiseIfFailed("GetNormal", self.MeasuOp)
10400             self._autoPublish(anObj, theName, "normal")
10401             return anObj
10402
10403         ## Print shape errors obtained from CheckShape.
10404         #  @param theShape Shape that was checked.
10405         #  @param theShapeErrors the shape errors obtained by CheckShape.
10406         #  @param theReturnStatus If 0 the description of problem is printed.
10407         #                         If 1 the description of problem is returned.
10408         #  @return If theReturnStatus is equal to 1 the description is returned.
10409         #          Otherwise doesn't return anything.
10410         #
10411         #  @ref tui_measurement_tools_page "Example"
10412         @ManageTransactions("MeasuOp")
10413         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
10414             """
10415             Print shape errors obtained from CheckShape.
10416
10417             Parameters:
10418                 theShape Shape that was checked.
10419                 theShapeErrors the shape errors obtained by CheckShape.
10420                 theReturnStatus If 0 the description of problem is printed.
10421                                 If 1 the description of problem is returned.
10422
10423             Returns:
10424                 If theReturnStatus is equal to 1 the description is returned.
10425                   Otherwise doesn't return anything.
10426             """
10427             # Example: see GEOM_TestMeasures.py
10428             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
10429             if theReturnStatus == 1:
10430                 return Descr
10431             print Descr
10432             pass
10433
10434         ## Check a topology of the given shape.
10435         #  @param theShape Shape to check validity of.
10436         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
10437         #                        if TRUE, the shape's geometry will be checked also.
10438         #  @param theReturnStatus If 0 and if theShape is invalid, a description
10439         #                         of problem is printed.
10440         #                         If 1 isValid flag and the description of
10441         #                         problem is returned.
10442         #                         If 2 isValid flag and the list of error data
10443         #                         is returned.
10444         #  @return TRUE, if the shape "seems to be valid".
10445         #          If theShape is invalid, prints a description of problem.
10446         #          If theReturnStatus is equal to 1 the description is returned
10447         #          along with IsValid flag.
10448         #          If theReturnStatus is equal to 2 the list of error data is
10449         #          returned along with IsValid flag.
10450         #
10451         #  @ref tui_measurement_tools_page "Example"
10452         @ManageTransactions("MeasuOp")
10453         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
10454             """
10455             Check a topology of the given shape.
10456
10457             Parameters:
10458                 theShape Shape to check validity of.
10459                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
10460                                if TRUE, the shape's geometry will be checked also.
10461                 theReturnStatus If 0 and if theShape is invalid, a description
10462                                 of problem is printed.
10463                                 If 1 IsValid flag and the description of
10464                                 problem is returned.
10465                                 If 2 IsValid flag and the list of error data
10466                                 is returned.
10467
10468             Returns:
10469                 TRUE, if the shape "seems to be valid".
10470                 If theShape is invalid, prints a description of problem.
10471                 If theReturnStatus is equal to 1 the description is returned
10472                 along with IsValid flag.
10473                 If theReturnStatus is equal to 2 the list of error data is
10474                 returned along with IsValid flag.
10475             """
10476             # Example: see GEOM_TestMeasures.py
10477             if theIsCheckGeom:
10478                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
10479                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
10480             else:
10481                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
10482                 RaiseIfFailed("CheckShape", self.MeasuOp)
10483             if IsValid == 0:
10484                 if theReturnStatus == 0:
10485                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10486                     print Descr
10487             if theReturnStatus == 1:
10488               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10489               return (IsValid, Descr)
10490             elif theReturnStatus == 2:
10491               return (IsValid, ShapeErrors)
10492             return IsValid
10493
10494         ## Detect self-intersections in the given shape.
10495         #  @param theShape Shape to check.
10496         #  @return TRUE, if the shape contains no self-intersections.
10497         #
10498         #  @ref tui_measurement_tools_page "Example"
10499         @ManageTransactions("MeasuOp")
10500         def CheckSelfIntersections(self, theShape):
10501             """
10502             Detect self-intersections in the given shape.
10503
10504             Parameters:
10505                 theShape Shape to check.
10506
10507             Returns:
10508                 TRUE, if the shape contains no self-intersections.
10509             """
10510             # Example: see GEOM_TestMeasures.py
10511             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
10512             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
10513             return IsValid
10514
10515         ## Get position (LCS) of theShape.
10516         #
10517         #  Origin of the LCS is situated at the shape's center of mass.
10518         #  Axes of the LCS are obtained from shape's location or,
10519         #  if the shape is a planar face, from position of its plane.
10520         #
10521         #  @param theShape Shape to calculate position of.
10522         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10523         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
10524         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10525         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10526         #
10527         #  @ref swig_todo "Example"
10528         @ManageTransactions("MeasuOp")
10529         def GetPosition(self,theShape):
10530             """
10531             Get position (LCS) of theShape.
10532             Origin of the LCS is situated at the shape's center of mass.
10533             Axes of the LCS are obtained from shape's location or,
10534             if the shape is a planar face, from position of its plane.
10535
10536             Parameters:
10537                 theShape Shape to calculate position of.
10538
10539             Returns:
10540                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10541                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
10542                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10543                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10544             """
10545             # Example: see GEOM_TestMeasures.py
10546             aTuple = self.MeasuOp.GetPosition(theShape)
10547             RaiseIfFailed("GetPosition", self.MeasuOp)
10548             return aTuple
10549
10550         ## Get kind of theShape.
10551         #
10552         #  @param theShape Shape to get a kind of.
10553         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
10554         #          and a list of parameters, describing the shape.
10555         #  @note  Concrete meaning of each value, returned via \a theIntegers
10556         #         or \a theDoubles list depends on the kind() of the shape.
10557         #
10558         #  @ref swig_todo "Example"
10559         @ManageTransactions("MeasuOp")
10560         def KindOfShape(self,theShape):
10561             """
10562             Get kind of theShape.
10563
10564             Parameters:
10565                 theShape Shape to get a kind of.
10566
10567             Returns:
10568                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
10569                     and a list of parameters, describing the shape.
10570             Note:
10571                 Concrete meaning of each value, returned via theIntegers
10572                 or theDoubles list depends on the geompy.kind of the shape
10573             """
10574             # Example: see GEOM_TestMeasures.py
10575             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
10576             RaiseIfFailed("KindOfShape", self.MeasuOp)
10577
10578             aKind  = aRoughTuple[0]
10579             anInts = aRoughTuple[1]
10580             aDbls  = aRoughTuple[2]
10581
10582             # Now there is no exception from this rule:
10583             aKindTuple = [aKind] + aDbls + anInts
10584
10585             # If they are we will regroup parameters for such kind of shape.
10586             # For example:
10587             #if aKind == kind.SOME_KIND:
10588             #    #  SOME_KIND     int int double int double double
10589             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
10590
10591             return aKindTuple
10592
10593         ## Returns the string that describes if the shell is good for solid.
10594         #  This is a support method for MakeSolid.
10595         #
10596         #  @param theShell the shell to be checked.
10597         #  @return Returns a string that describes the shell validity for
10598         #          solid construction.
10599         @ManageTransactions("MeasuOp")
10600         def _IsGoodForSolid(self, theShell):
10601             """
10602             Returns the string that describes if the shell is good for solid.
10603             This is a support method for MakeSolid.
10604
10605             Parameter:
10606                 theShell the shell to be checked.
10607
10608             Returns:
10609                 Returns a string that describes the shell validity for
10610                 solid construction.
10611             """
10612             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
10613             return aDescr
10614
10615         # end of l2_measure
10616         ## @}
10617
10618         ## @addtogroup l2_import_export
10619         ## @{
10620
10621         ## Import a shape from the BREP or IGES or STEP file
10622         #  (depends on given format) with given name.
10623         #  @param theFileName The file, containing the shape.
10624         #  @param theFormatName Specify format for the file reading.
10625         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
10626         #         If format 'IGES_SCALE' is used instead of 'IGES' or
10627         #            format 'STEP_SCALE' is used instead of 'STEP',
10628         #            length unit will be set to 'meter' and result model will be scaled.
10629         #  @param theName Object name; when specified, this parameter is used
10630         #         for result publication in the study. Otherwise, if automatic
10631         #         publication is switched on, default value is used for result name.
10632         #
10633         #  @return New GEOM.GEOM_Object, containing the imported shape.
10634         #          If material names are imported it returns the list of
10635         #          objects. The first one is the imported object followed by
10636         #          material groups.
10637         #  @note Auto publishing is allowed for the shape itself. Imported
10638         #        material groups are not automatically published.
10639         #
10640         #  @ref swig_Import_Export "Example"
10641         @ManageTransactions("InsertOp")
10642         def ImportFile(self, theFileName, theFormatName, theName=None):
10643             """
10644             Import a shape from the BREP or IGES or STEP file
10645             (depends on given format) with given name.
10646
10647             Parameters:
10648                 theFileName The file, containing the shape.
10649                 theFormatName Specify format for the file reading.
10650                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
10651                     If format 'IGES_SCALE' is used instead of 'IGES' or
10652                        format 'STEP_SCALE' is used instead of 'STEP',
10653                        length unit will be set to 'meter' and result model will be scaled.
10654                 theName Object name; when specified, this parameter is used
10655                         for result publication in the study. Otherwise, if automatic
10656                         publication is switched on, default value is used for result name.
10657
10658             Returns:
10659                 New GEOM.GEOM_Object, containing the imported shape.
10660                 If material names are imported it returns the list of
10661                 objects. The first one is the imported object followed by
10662                 material groups.
10663             Note:
10664                 Auto publishing is allowed for the shape itself. Imported
10665                 material groups are not automatically published.
10666             """
10667             # Example: see GEOM_TestOthers.py
10668             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
10669             RaiseIfFailed("ImportFile", self.InsertOp)
10670             aNbObj = len(aListObj)
10671             if aNbObj > 0:
10672                 self._autoPublish(aListObj[0], theName, "imported")
10673             if aNbObj == 1:
10674                 return aListObj[0]
10675             return aListObj
10676
10677         ## Deprecated analog of ImportFile()
10678         def Import(self, theFileName, theFormatName, theName=None):
10679             """
10680             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
10681             """
10682             print "WARNING: Function Import is deprecated, use ImportFile instead"
10683             # note: auto-publishing is done in self.ImportFile()
10684             return self.ImportFile(theFileName, theFormatName, theName)
10685
10686         ## Shortcut to ImportFile() for BREP format.
10687         #  Import a shape from the BREP file with given name.
10688         #  @param theFileName The file, containing the shape.
10689         #  @param theName Object name; when specified, this parameter is used
10690         #         for result publication in the study. Otherwise, if automatic
10691         #         publication is switched on, default value is used for result name.
10692         #
10693         #  @return New GEOM.GEOM_Object, containing the imported shape.
10694         #
10695         #  @ref swig_Import_Export "Example"
10696         def ImportBREP(self, theFileName, theName=None):
10697             """
10698             geompy.ImportFile(...) function for BREP format
10699             Import a shape from the BREP file with given name.
10700
10701             Parameters:
10702                 theFileName The file, containing the shape.
10703                 theName Object name; when specified, this parameter is used
10704                         for result publication in the study. Otherwise, if automatic
10705                         publication is switched on, default value is used for result name.
10706
10707             Returns:
10708                 New GEOM.GEOM_Object, containing the imported shape.
10709             """
10710             # Example: see GEOM_TestOthers.py
10711             # note: auto-publishing is done in self.ImportFile()
10712             return self.ImportFile(theFileName, "BREP", theName)
10713
10714         ## Shortcut to ImportFile() for IGES format
10715         #  Import a shape from the IGES file with given name.
10716         #  @param theFileName The file, containing the shape.
10717         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10718         #                     and result model will be scaled, if its units are not meters.
10719         #                     If False (default), file length units will be taken into account.
10720         #  @param theName Object name; when specified, this parameter is used
10721         #         for result publication in the study. Otherwise, if automatic
10722         #         publication is switched on, default value is used for result name.
10723         #
10724         #  @return New GEOM.GEOM_Object, containing the imported shape.
10725         #
10726         #  @ref swig_Import_Export "Example"
10727         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
10728             """
10729             geompy.ImportFile(...) function for IGES format
10730
10731             Parameters:
10732                 theFileName The file, containing the shape.
10733                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10734                             and result model will be scaled, if its units are not meters.
10735                             If False (default), file length units will be taken into account.
10736                 theName Object name; when specified, this parameter is used
10737                         for result publication in the study. Otherwise, if automatic
10738                         publication is switched on, default value is used for result name.
10739
10740             Returns:
10741                 New GEOM.GEOM_Object, containing the imported shape.
10742             """
10743             # Example: see GEOM_TestOthers.py
10744             # note: auto-publishing is done in self.ImportFile()
10745             if ignoreUnits:
10746                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
10747             return self.ImportFile(theFileName, "IGES", theName)
10748
10749         ## Return length unit from given IGES file
10750         #  @param theFileName The file, containing the shape.
10751         #  @return String, containing the units name.
10752         #
10753         #  @ref swig_Import_Export "Example"
10754         @ManageTransactions("InsertOp")
10755         def GetIGESUnit(self, theFileName):
10756             """
10757             Return length units from given IGES file
10758
10759             Parameters:
10760                 theFileName The file, containing the shape.
10761
10762             Returns:
10763                 String, containing the units name.
10764             """
10765             # Example: see GEOM_TestOthers.py
10766             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
10767             return aUnitName
10768
10769         ## Shortcut to ImportFile() for STEP format
10770         #  Import a shape from the STEP file with given name.
10771         #  @param theFileName The file, containing the shape.
10772         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10773         #                     and result model will be scaled, if its units are not meters.
10774         #                     If False (default), file length units will be taken into account.
10775         #  @param theName Object name; when specified, this parameter is used
10776         #         for result publication in the study. Otherwise, if automatic
10777         #         publication is switched on, default value is used for result name.
10778         #
10779         #  @return New GEOM.GEOM_Object, containing the imported shape.
10780         #          If material names are imported it returns the list of
10781         #          objects. The first one is the imported object followed by
10782         #          material groups.
10783         #  @note Auto publishing is allowed for the shape itself. Imported
10784         #        material groups are not automatically published.
10785         #
10786         #  @ref swig_Import_Export "Example"
10787         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10788             """
10789             geompy.ImportFile(...) function for STEP format
10790
10791             Parameters:
10792                 theFileName The file, containing the shape.
10793                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10794                             and result model will be scaled, if its units are not meters.
10795                             If False (default), file length units will be taken into account.
10796                 theName Object name; when specified, this parameter is used
10797                         for result publication in the study. Otherwise, if automatic
10798                         publication is switched on, default value is used for result name.
10799
10800             Returns:
10801                 New GEOM.GEOM_Object, containing the imported shape.
10802                 If material names are imported it returns the list of
10803                 objects. The first one is the imported object followed by
10804                 material groups.
10805             Note:
10806                 Auto publishing is allowed for the shape itself. Imported
10807                 material groups are not automatically published.
10808             """
10809             # Example: see GEOM_TestOthers.py
10810             # note: auto-publishing is done in self.ImportFile()
10811             if ignoreUnits:
10812                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10813             return self.ImportFile(theFileName, "STEP", theName)
10814
10815         ## Return length unit from given IGES or STEP file
10816         #  @param theFileName The file, containing the shape.
10817         #  @return String, containing the units name.
10818         #
10819         #  @ref swig_Import_Export "Example"
10820         @ManageTransactions("InsertOp")
10821         def GetSTEPUnit(self, theFileName):
10822             """
10823             Return length units from given STEP file
10824
10825             Parameters:
10826                 theFileName The file, containing the shape.
10827
10828             Returns:
10829                 String, containing the units name.
10830             """
10831             # Example: see GEOM_TestOthers.py
10832             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10833             return aUnitName
10834
10835         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10836         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10837         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10838         #  @param theStream The BRep binary stream.
10839         #  @param theName Object name; when specified, this parameter is used
10840         #         for result publication in the study. Otherwise, if automatic
10841         #         publication is switched on, default value is used for result name.
10842         #
10843         #  @return New GEOM_Object, containing the shape, read from theStream.
10844         #
10845         #  @ref swig_Import_Export "Example"
10846         @ManageTransactions("InsertOp")
10847         def RestoreShape (self, theStream, theName=None):
10848             """
10849             Read a shape from the binary stream, containing its bounding representation (BRep).
10850
10851             Note:
10852                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10853
10854             Parameters:
10855                 theStream The BRep binary stream.
10856                 theName Object name; when specified, this parameter is used
10857                         for result publication in the study. Otherwise, if automatic
10858                         publication is switched on, default value is used for result name.
10859
10860             Returns:
10861                 New GEOM_Object, containing the shape, read from theStream.
10862             """
10863             # Example: see GEOM_TestOthers.py
10864             anObj = self.InsertOp.RestoreShape(theStream)
10865             RaiseIfFailed("RestoreShape", self.InsertOp)
10866             self._autoPublish(anObj, theName, "restored")
10867             return anObj
10868
10869         ## Export the given shape into a file with given name.
10870         #  @param theObject Shape to be stored in the file.
10871         #  @param theFileName Name of the file to store the given shape in.
10872         #  @param theFormatName Specify format for the shape storage.
10873         #         Available formats can be obtained with
10874         #         geompy.InsertOp.ExportTranslators()[0] method.
10875         #
10876         #  @ref swig_Import_Export "Example"
10877         @ManageTransactions("InsertOp")
10878         def Export(self, theObject, theFileName, theFormatName):
10879             """
10880             Export the given shape into a file with given name.
10881
10882             Parameters:
10883                 theObject Shape to be stored in the file.
10884                 theFileName Name of the file to store the given shape in.
10885                 theFormatName Specify format for the shape storage.
10886                               Available formats can be obtained with
10887                               geompy.InsertOp.ExportTranslators()[0] method.
10888             """
10889             # Example: see GEOM_TestOthers.py
10890             self.InsertOp.Export(theObject, theFileName, theFormatName)
10891             if self.InsertOp.IsDone() == 0:
10892                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10893                 pass
10894             pass
10895
10896         ## Shortcut to Export() for BREP format
10897         #
10898         #  @ref swig_Import_Export "Example"
10899         def ExportBREP(self,theObject, theFileName):
10900             """
10901             geompy.Export(...) function for BREP format
10902             """
10903             # Example: see GEOM_TestOthers.py
10904             return self.Export(theObject, theFileName, "BREP")
10905
10906         ## Shortcut to Export() for IGES format
10907         #
10908         #  @ref swig_Import_Export "Example"
10909         def ExportIGES(self,theObject, theFileName):
10910             """
10911             geompy.Export(...) function for IGES format
10912             """
10913             # Example: see GEOM_TestOthers.py
10914             return self.Export(theObject, theFileName, "IGES")
10915
10916         ## Shortcut to Export() for STEP format
10917         #
10918         #  @ref swig_Import_Export "Example"
10919         def ExportSTEP(self,theObject, theFileName):
10920             """
10921             geompy.Export(...) function for STEP format
10922             """
10923             # Example: see GEOM_TestOthers.py
10924             return self.Export(theObject, theFileName, "STEP")
10925
10926         # end of l2_import_export
10927         ## @}
10928
10929         ## @addtogroup l3_blocks
10930         ## @{
10931
10932         ## Create a quadrangle face from four edges. Order of Edges is not
10933         #  important. It is  not necessary that edges share the same vertex.
10934         #  @param E1,E2,E3,E4 Edges for the face bound.
10935         #  @param theName Object name; when specified, this parameter is used
10936         #         for result publication in the study. Otherwise, if automatic
10937         #         publication is switched on, default value is used for result name.
10938         #
10939         #  @return New GEOM.GEOM_Object, containing the created face.
10940         #
10941         #  @ref tui_building_by_blocks_page "Example"
10942         @ManageTransactions("BlocksOp")
10943         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10944             """
10945             Create a quadrangle face from four edges. Order of Edges is not
10946             important. It is  not necessary that edges share the same vertex.
10947
10948             Parameters:
10949                 E1,E2,E3,E4 Edges for the face bound.
10950                 theName Object name; when specified, this parameter is used
10951                         for result publication in the study. Otherwise, if automatic
10952                         publication is switched on, default value is used for result name.
10953
10954             Returns:
10955                 New GEOM.GEOM_Object, containing the created face.
10956
10957             Example of usage:
10958                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10959             """
10960             # Example: see GEOM_Spanner.py
10961             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10962             RaiseIfFailed("MakeQuad", self.BlocksOp)
10963             self._autoPublish(anObj, theName, "quad")
10964             return anObj
10965
10966         ## Create a quadrangle face on two edges.
10967         #  The missing edges will be built by creating the shortest ones.
10968         #  @param E1,E2 Two opposite edges for the face.
10969         #  @param theName Object name; when specified, this parameter is used
10970         #         for result publication in the study. Otherwise, if automatic
10971         #         publication is switched on, default value is used for result name.
10972         #
10973         #  @return New GEOM.GEOM_Object, containing the created face.
10974         #
10975         #  @ref tui_building_by_blocks_page "Example"
10976         @ManageTransactions("BlocksOp")
10977         def MakeQuad2Edges(self, E1, E2, theName=None):
10978             """
10979             Create a quadrangle face on two edges.
10980             The missing edges will be built by creating the shortest ones.
10981
10982             Parameters:
10983                 E1,E2 Two opposite edges for the face.
10984                 theName Object name; when specified, this parameter is used
10985                         for result publication in the study. Otherwise, if automatic
10986                         publication is switched on, default value is used for result name.
10987
10988             Returns:
10989                 New GEOM.GEOM_Object, containing the created face.
10990
10991             Example of usage:
10992                 # create vertices
10993                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10994                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10995                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10996                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10997                 # create edges
10998                 edge1 = geompy.MakeEdge(p1, p2)
10999                 edge2 = geompy.MakeEdge(p3, p4)
11000                 # create a quadrangle face from two edges
11001                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
11002             """
11003             # Example: see GEOM_Spanner.py
11004             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
11005             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
11006             self._autoPublish(anObj, theName, "quad")
11007             return anObj
11008
11009         ## Create a quadrangle face with specified corners.
11010         #  The missing edges will be built by creating the shortest ones.
11011         #  @param V1,V2,V3,V4 Corner vertices for the face.
11012         #  @param theName Object name; when specified, this parameter is used
11013         #         for result publication in the study. Otherwise, if automatic
11014         #         publication is switched on, default value is used for result name.
11015         #
11016         #  @return New GEOM.GEOM_Object, containing the created face.
11017         #
11018         #  @ref tui_building_by_blocks_page "Example 1"
11019         #  \n @ref swig_MakeQuad4Vertices "Example 2"
11020         @ManageTransactions("BlocksOp")
11021         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
11022             """
11023             Create a quadrangle face with specified corners.
11024             The missing edges will be built by creating the shortest ones.
11025
11026             Parameters:
11027                 V1,V2,V3,V4 Corner vertices for the face.
11028                 theName Object name; when specified, this parameter is used
11029                         for result publication in the study. Otherwise, if automatic
11030                         publication is switched on, default value is used for result name.
11031
11032             Returns:
11033                 New GEOM.GEOM_Object, containing the created face.
11034
11035             Example of usage:
11036                 # create vertices
11037                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11038                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11039                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11040                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11041                 # create a quadrangle from four points in its corners
11042                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
11043             """
11044             # Example: see GEOM_Spanner.py
11045             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
11046             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
11047             self._autoPublish(anObj, theName, "quad")
11048             return anObj
11049
11050         ## Create a hexahedral solid, bounded by the six given faces. Order of
11051         #  faces is not important. It is  not necessary that Faces share the same edge.
11052         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11053         #  @param theName Object name; when specified, this parameter is used
11054         #         for result publication in the study. Otherwise, if automatic
11055         #         publication is switched on, default value is used for result name.
11056         #
11057         #  @return New GEOM.GEOM_Object, containing the created solid.
11058         #
11059         #  @ref tui_building_by_blocks_page "Example 1"
11060         #  \n @ref swig_MakeHexa "Example 2"
11061         @ManageTransactions("BlocksOp")
11062         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
11063             """
11064             Create a hexahedral solid, bounded by the six given faces. Order of
11065             faces is not important. It is  not necessary that Faces share the same edge.
11066
11067             Parameters:
11068                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11069                 theName Object name; when specified, this parameter is used
11070                         for result publication in the study. Otherwise, if automatic
11071                         publication is switched on, default value is used for result name.
11072
11073             Returns:
11074                 New GEOM.GEOM_Object, containing the created solid.
11075
11076             Example of usage:
11077                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
11078             """
11079             # Example: see GEOM_Spanner.py
11080             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
11081             RaiseIfFailed("MakeHexa", self.BlocksOp)
11082             self._autoPublish(anObj, theName, "hexa")
11083             return anObj
11084
11085         ## Create a hexahedral solid between two given faces.
11086         #  The missing faces will be built by creating the smallest ones.
11087         #  @param F1,F2 Two opposite faces for the hexahedral solid.
11088         #  @param theName Object name; when specified, this parameter is used
11089         #         for result publication in the study. Otherwise, if automatic
11090         #         publication is switched on, default value is used for result name.
11091         #
11092         #  @return New GEOM.GEOM_Object, containing the created solid.
11093         #
11094         #  @ref tui_building_by_blocks_page "Example 1"
11095         #  \n @ref swig_MakeHexa2Faces "Example 2"
11096         @ManageTransactions("BlocksOp")
11097         def MakeHexa2Faces(self, F1, F2, theName=None):
11098             """
11099             Create a hexahedral solid between two given faces.
11100             The missing faces will be built by creating the smallest ones.
11101
11102             Parameters:
11103                 F1,F2 Two opposite faces for the hexahedral solid.
11104                 theName Object name; when specified, this parameter is used
11105                         for result publication in the study. Otherwise, if automatic
11106                         publication is switched on, default value is used for result name.
11107
11108             Returns:
11109                 New GEOM.GEOM_Object, containing the created solid.
11110
11111             Example of usage:
11112                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
11113             """
11114             # Example: see GEOM_Spanner.py
11115             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
11116             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
11117             self._autoPublish(anObj, theName, "hexa")
11118             return anObj
11119
11120         # end of l3_blocks
11121         ## @}
11122
11123         ## @addtogroup l3_blocks_op
11124         ## @{
11125
11126         ## Get a vertex, found in the given shape by its coordinates.
11127         #  @param theShape Block or a compound of blocks.
11128         #  @param theX,theY,theZ Coordinates of the sought vertex.
11129         #  @param theEpsilon Maximum allowed distance between the resulting
11130         #                    vertex and point with the given coordinates.
11131         #  @param theName Object name; when specified, this parameter is used
11132         #         for result publication in the study. Otherwise, if automatic
11133         #         publication is switched on, default value is used for result name.
11134         #
11135         #  @return New GEOM.GEOM_Object, containing the found vertex.
11136         #
11137         #  @ref swig_GetPoint "Example"
11138         @ManageTransactions("BlocksOp")
11139         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
11140             """
11141             Get a vertex, found in the given shape by its coordinates.
11142
11143             Parameters:
11144                 theShape Block or a compound of blocks.
11145                 theX,theY,theZ Coordinates of the sought vertex.
11146                 theEpsilon Maximum allowed distance between the resulting
11147                            vertex and point with the given coordinates.
11148                 theName Object name; when specified, this parameter is used
11149                         for result publication in the study. Otherwise, if automatic
11150                         publication is switched on, default value is used for result name.
11151
11152             Returns:
11153                 New GEOM.GEOM_Object, containing the found vertex.
11154
11155             Example of usage:
11156                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
11157             """
11158             # Example: see GEOM_TestOthers.py
11159             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
11160             RaiseIfFailed("GetPoint", self.BlocksOp)
11161             self._autoPublish(anObj, theName, "vertex")
11162             return anObj
11163
11164         ## Find a vertex of the given shape, which has minimal distance to the given point.
11165         #  @param theShape Any shape.
11166         #  @param thePoint Point, close to the desired vertex.
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 vertex.
11172         #
11173         #  @ref swig_GetVertexNearPoint "Example"
11174         @ManageTransactions("BlocksOp")
11175         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
11176             """
11177             Find a vertex of the given shape, which has minimal distance to the given point.
11178
11179             Parameters:
11180                 theShape Any shape.
11181                 thePoint Point, close to the desired vertex.
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 vertex.
11188
11189             Example of usage:
11190                 pmidle = geompy.MakeVertex(50, 0, 50)
11191                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
11192             """
11193             # Example: see GEOM_TestOthers.py
11194             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
11195             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
11196             self._autoPublish(anObj, theName, "vertex")
11197             return anObj
11198
11199         ## Get an edge, found in the given shape by two given vertices.
11200         #  @param theShape Block or a compound of blocks.
11201         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
11202         #  @param theName Object name; when specified, this parameter is used
11203         #         for result publication in the study. Otherwise, if automatic
11204         #         publication is switched on, default value is used for result name.
11205         #
11206         #  @return New GEOM.GEOM_Object, containing the found edge.
11207         #
11208         #  @ref swig_GetEdge "Example"
11209         @ManageTransactions("BlocksOp")
11210         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
11211             """
11212             Get an edge, found in the given shape by two given vertices.
11213
11214             Parameters:
11215                 theShape Block or a compound of blocks.
11216                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
11217                 theName Object name; when specified, this parameter is used
11218                         for result publication in the study. Otherwise, if automatic
11219                         publication is switched on, default value is used for result name.
11220
11221             Returns:
11222                 New GEOM.GEOM_Object, containing the found edge.
11223             """
11224             # Example: see GEOM_Spanner.py
11225             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
11226             RaiseIfFailed("GetEdge", self.BlocksOp)
11227             self._autoPublish(anObj, theName, "edge")
11228             return anObj
11229
11230         ## Find an edge of the given shape, which has minimal distance to the given point.
11231         #  @param theShape Block or a compound of blocks.
11232         #  @param thePoint Point, close to the desired edge.
11233         #  @param theName Object name; when specified, this parameter is used
11234         #         for result publication in the study. Otherwise, if automatic
11235         #         publication is switched on, default value is used for result name.
11236         #
11237         #  @return New GEOM.GEOM_Object, containing the found edge.
11238         #
11239         #  @ref swig_GetEdgeNearPoint "Example"
11240         @ManageTransactions("BlocksOp")
11241         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
11242             """
11243             Find an edge of the given shape, which has minimal distance to the given point.
11244
11245             Parameters:
11246                 theShape Block or a compound of blocks.
11247                 thePoint Point, close to the desired edge.
11248                 theName Object name; when specified, this parameter is used
11249                         for result publication in the study. Otherwise, if automatic
11250                         publication is switched on, default value is used for result name.
11251
11252             Returns:
11253                 New GEOM.GEOM_Object, containing the found edge.
11254             """
11255             # Example: see GEOM_TestOthers.py
11256             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
11257             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
11258             self._autoPublish(anObj, theName, "edge")
11259             return anObj
11260
11261         ## Returns a face, found in the given shape by four given corner vertices.
11262         #  @param theShape Block or a compound of blocks.
11263         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11264         #  @param theName Object name; when specified, this parameter is used
11265         #         for result publication in the study. Otherwise, if automatic
11266         #         publication is switched on, default value is used for result name.
11267         #
11268         #  @return New GEOM.GEOM_Object, containing the found face.
11269         #
11270         #  @ref swig_todo "Example"
11271         @ManageTransactions("BlocksOp")
11272         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
11273             """
11274             Returns a face, found in the given shape by four given corner vertices.
11275
11276             Parameters:
11277                 theShape Block or a compound of blocks.
11278                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11279                 theName Object name; when specified, this parameter is used
11280                         for result publication in the study. Otherwise, if automatic
11281                         publication is switched on, default value is used for result name.
11282
11283             Returns:
11284                 New GEOM.GEOM_Object, containing the found face.
11285             """
11286             # Example: see GEOM_Spanner.py
11287             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
11288             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
11289             self._autoPublish(anObj, theName, "face")
11290             return anObj
11291
11292         ## Get a face of block, found in the given shape by two given edges.
11293         #  @param theShape Block or a compound of blocks.
11294         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
11295         #  @param theName Object name; when specified, this parameter is used
11296         #         for result publication in the study. Otherwise, if automatic
11297         #         publication is switched on, default value is used for result name.
11298         #
11299         #  @return New GEOM.GEOM_Object, containing the found face.
11300         #
11301         #  @ref swig_todo "Example"
11302         @ManageTransactions("BlocksOp")
11303         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
11304             """
11305             Get a face of block, found in the given shape by two given edges.
11306
11307             Parameters:
11308                 theShape Block or a compound of blocks.
11309                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
11310                 theName Object name; when specified, this parameter is used
11311                         for result publication in the study. Otherwise, if automatic
11312                         publication is switched on, default value is used for result name.
11313
11314             Returns:
11315                 New GEOM.GEOM_Object, containing the found face.
11316             """
11317             # Example: see GEOM_Spanner.py
11318             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
11319             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
11320             self._autoPublish(anObj, theName, "face")
11321             return anObj
11322
11323         ## Find a face, opposite to the given one in the given block.
11324         #  @param theBlock Must be a hexahedral solid.
11325         #  @param theFace Face of \a theBlock, opposite to the desired face.
11326         #  @param theName Object name; when specified, this parameter is used
11327         #         for result publication in the study. Otherwise, if automatic
11328         #         publication is switched on, default value is used for result name.
11329         #
11330         #  @return New GEOM.GEOM_Object, containing the found face.
11331         #
11332         #  @ref swig_GetOppositeFace "Example"
11333         @ManageTransactions("BlocksOp")
11334         def GetOppositeFace(self, theBlock, theFace, theName=None):
11335             """
11336             Find a face, opposite to the given one in the given block.
11337
11338             Parameters:
11339                 theBlock Must be a hexahedral solid.
11340                 theFace Face of theBlock, opposite to the desired face.
11341                 theName Object name; when specified, this parameter is used
11342                         for result publication in the study. Otherwise, if automatic
11343                         publication is switched on, default value is used for result name.
11344
11345             Returns:
11346                 New GEOM.GEOM_Object, containing the found face.
11347             """
11348             # Example: see GEOM_Spanner.py
11349             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
11350             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
11351             self._autoPublish(anObj, theName, "face")
11352             return anObj
11353
11354         ## Find a face of the given shape, which has minimal distance to the given point.
11355         #  @param theShape Block or a compound of blocks.
11356         #  @param thePoint Point, close to the desired face.
11357         #  @param theName Object name; when specified, this parameter is used
11358         #         for result publication in the study. Otherwise, if automatic
11359         #         publication is switched on, default value is used for result name.
11360         #
11361         #  @return New GEOM.GEOM_Object, containing the found face.
11362         #
11363         #  @ref swig_GetFaceNearPoint "Example"
11364         @ManageTransactions("BlocksOp")
11365         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
11366             """
11367             Find a face of the given shape, which has minimal distance to the given point.
11368
11369             Parameters:
11370                 theShape Block or a compound of blocks.
11371                 thePoint Point, close to the desired face.
11372                 theName Object name; when specified, this parameter is used
11373                         for result publication in the study. Otherwise, if automatic
11374                         publication is switched on, default value is used for result name.
11375
11376             Returns:
11377                 New GEOM.GEOM_Object, containing the found face.
11378             """
11379             # Example: see GEOM_Spanner.py
11380             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
11381             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
11382             self._autoPublish(anObj, theName, "face")
11383             return anObj
11384
11385         ## Find a face of block, whose outside normale has minimal angle with the given vector.
11386         #  @param theBlock Block or a compound of blocks.
11387         #  @param theVector Vector, close to the normale of the desired face.
11388         #  @param theName Object name; when specified, this parameter is used
11389         #         for result publication in the study. Otherwise, if automatic
11390         #         publication is switched on, default value is used for result name.
11391         #
11392         #  @return New GEOM.GEOM_Object, containing the found face.
11393         #
11394         #  @ref swig_todo "Example"
11395         @ManageTransactions("BlocksOp")
11396         def GetFaceByNormale(self, theBlock, theVector, theName=None):
11397             """
11398             Find a face of block, whose outside normale has minimal angle with the given vector.
11399
11400             Parameters:
11401                 theBlock Block or a compound of blocks.
11402                 theVector Vector, close to the normale of the desired face.
11403                 theName Object name; when specified, this parameter is used
11404                         for result publication in the study. Otherwise, if automatic
11405                         publication is switched on, default value is used for result name.
11406
11407             Returns:
11408                 New GEOM.GEOM_Object, containing the found face.
11409             """
11410             # Example: see GEOM_Spanner.py
11411             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
11412             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
11413             self._autoPublish(anObj, theName, "face")
11414             return anObj
11415
11416         ## Find all sub-shapes of type \a theShapeType of the given shape,
11417         #  which have minimal distance to the given point.
11418         #  @param theShape Any shape.
11419         #  @param thePoint Point, close to the desired shape.
11420         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
11421         #  @param theTolerance The tolerance for distances comparison. All shapes
11422         #                      with distances to the given point in interval
11423         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
11424         #  @param theName Object name; when specified, this parameter is used
11425         #         for result publication in the study. Otherwise, if automatic
11426         #         publication is switched on, default value is used for result name.
11427         #
11428         #  @return New GEOM_Object, containing a group of all found shapes.
11429         #
11430         #  @ref swig_GetShapesNearPoint "Example"
11431         @ManageTransactions("BlocksOp")
11432         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
11433             """
11434             Find all sub-shapes of type theShapeType of the given shape,
11435             which have minimal distance to the given point.
11436
11437             Parameters:
11438                 theShape Any shape.
11439                 thePoint Point, close to the desired shape.
11440                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
11441                 theTolerance The tolerance for distances comparison. All shapes
11442                                 with distances to the given point in interval
11443                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
11444                 theName Object name; when specified, this parameter is used
11445                         for result publication in the study. Otherwise, if automatic
11446                         publication is switched on, default value is used for result name.
11447
11448             Returns:
11449                 New GEOM_Object, containing a group of all found shapes.
11450             """
11451             # Example: see GEOM_TestOthers.py
11452             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
11453             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
11454             self._autoPublish(anObj, theName, "group")
11455             return anObj
11456
11457         # end of l3_blocks_op
11458         ## @}
11459
11460         ## @addtogroup l4_blocks_measure
11461         ## @{
11462
11463         ## Check, if the compound of blocks is given.
11464         #  To be considered as a compound of blocks, the
11465         #  given shape must satisfy the following conditions:
11466         #  - Each element of the compound should be a Block (6 faces and 12 edges).
11467         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11468         #  - The compound should be connexe.
11469         #  - The glue between two quadrangle faces should be applied.
11470         #  @param theCompound The compound to check.
11471         #  @return TRUE, if the given shape is a compound of blocks.
11472         #  If theCompound is not valid, prints all discovered errors.
11473         #
11474         #  @ref tui_measurement_tools_page "Example 1"
11475         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
11476         @ManageTransactions("BlocksOp")
11477         def CheckCompoundOfBlocks(self,theCompound):
11478             """
11479             Check, if the compound of blocks is given.
11480             To be considered as a compound of blocks, the
11481             given shape must satisfy the following conditions:
11482             - Each element of the compound should be a Block (6 faces and 12 edges).
11483             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11484             - The compound should be connexe.
11485             - The glue between two quadrangle faces should be applied.
11486
11487             Parameters:
11488                 theCompound The compound to check.
11489
11490             Returns:
11491                 TRUE, if the given shape is a compound of blocks.
11492                 If theCompound is not valid, prints all discovered errors.
11493             """
11494             # Example: see GEOM_Spanner.py
11495             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
11496             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
11497             if IsValid == 0:
11498                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
11499                 print Descr
11500             return IsValid
11501
11502         ## Retrieve all non blocks solids and faces from \a theShape.
11503         #  @param theShape The shape to explore.
11504         #  @param theName Object name; when specified, this parameter is used
11505         #         for result publication in the study. Otherwise, if automatic
11506         #         publication is switched on, default value is used for result name.
11507         #
11508         #  @return A tuple of two GEOM_Objects. The first object is a group of all
11509         #          non block solids (= not 6 faces, or with 6 faces, but with the
11510         #          presence of non-quadrangular faces). The second object is a
11511         #          group of all non quadrangular faces.
11512         #
11513         #  @ref tui_measurement_tools_page "Example 1"
11514         #  \n @ref swig_GetNonBlocks "Example 2"
11515         @ManageTransactions("BlocksOp")
11516         def GetNonBlocks (self, theShape, theName=None):
11517             """
11518             Retrieve all non blocks solids and faces from theShape.
11519
11520             Parameters:
11521                 theShape The shape to explore.
11522                 theName Object name; when specified, this parameter is used
11523                         for result publication in the study. Otherwise, if automatic
11524                         publication is switched on, default value is used for result name.
11525
11526             Returns:
11527                 A tuple of two GEOM_Objects. The first object is a group of all
11528                 non block solids (= not 6 faces, or with 6 faces, but with the
11529                 presence of non-quadrangular faces). The second object is a
11530                 group of all non quadrangular faces.
11531
11532             Usage:
11533                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
11534             """
11535             # Example: see GEOM_Spanner.py
11536             aTuple = self.BlocksOp.GetNonBlocks(theShape)
11537             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
11538             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
11539             return aTuple
11540
11541         ## Remove all seam and degenerated edges from \a theShape.
11542         #  Unite faces and edges, sharing one surface. It means that
11543         #  this faces must have references to one C++ surface object (handle).
11544         #  @param theShape The compound or single solid to remove irregular edges from.
11545         #  @param doUnionFaces If True, then unite faces. If False (the default value),
11546         #         do not unite faces.
11547         #  @param theName Object name; when specified, this parameter is used
11548         #         for result publication in the study. Otherwise, if automatic
11549         #         publication is switched on, default value is used for result name.
11550         #
11551         #  @return Improved shape.
11552         #
11553         #  @ref swig_RemoveExtraEdges "Example"
11554         @ManageTransactions("BlocksOp")
11555         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
11556             """
11557             Remove all seam and degenerated edges from theShape.
11558             Unite faces and edges, sharing one surface. It means that
11559             this faces must have references to one C++ surface object (handle).
11560
11561             Parameters:
11562                 theShape The compound or single solid to remove irregular edges from.
11563                 doUnionFaces If True, then unite faces. If False (the default value),
11564                              do not unite faces.
11565                 theName Object name; when specified, this parameter is used
11566                         for result publication in the study. Otherwise, if automatic
11567                         publication is switched on, default value is used for result name.
11568
11569             Returns:
11570                 Improved shape.
11571             """
11572             # Example: see GEOM_TestOthers.py
11573             nbFacesOptimum = -1 # -1 means do not unite faces
11574             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
11575             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
11576             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
11577             self._autoPublish(anObj, theName, "removeExtraEdges")
11578             return anObj
11579
11580         ## Performs union faces of \a theShape
11581         #  Unite faces sharing one surface. It means that
11582         #  these faces must have references to one C++ surface object (handle).
11583         #  @param theShape The compound or single solid that contains faces
11584         #         to perform union.
11585         #  @param theName Object name; when specified, this parameter is used
11586         #         for result publication in the study. Otherwise, if automatic
11587         #         publication is switched on, default value is used for result name.
11588         #
11589         #  @return Improved shape.
11590         #
11591         #  @ref swig_UnionFaces "Example"
11592         @ManageTransactions("BlocksOp")
11593         def UnionFaces(self, theShape, theName=None):
11594             """
11595             Performs union faces of theShape.
11596             Unite faces sharing one surface. It means that
11597             these faces must have references to one C++ surface object (handle).
11598
11599             Parameters:
11600                 theShape The compound or single solid that contains faces
11601                          to perform union.
11602                 theName Object name; when specified, this parameter is used
11603                         for result publication in the study. Otherwise, if automatic
11604                         publication is switched on, default value is used for result name.
11605
11606             Returns:
11607                 Improved shape.
11608             """
11609             # Example: see GEOM_TestOthers.py
11610             anObj = self.BlocksOp.UnionFaces(theShape)
11611             RaiseIfFailed("UnionFaces", self.BlocksOp)
11612             self._autoPublish(anObj, theName, "unionFaces")
11613             return anObj
11614
11615         ## Check, if the given shape is a blocks compound.
11616         #  Fix all detected errors.
11617         #    \note Single block can be also fixed by this method.
11618         #  @param theShape The compound to check and improve.
11619         #  @param theName Object name; when specified, this parameter is used
11620         #         for result publication in the study. Otherwise, if automatic
11621         #         publication is switched on, default value is used for result name.
11622         #
11623         #  @return Improved compound.
11624         #
11625         #  @ref swig_CheckAndImprove "Example"
11626         @ManageTransactions("BlocksOp")
11627         def CheckAndImprove(self, theShape, theName=None):
11628             """
11629             Check, if the given shape is a blocks compound.
11630             Fix all detected errors.
11631
11632             Note:
11633                 Single block can be also fixed by this method.
11634
11635             Parameters:
11636                 theShape The compound to check and improve.
11637                 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             Returns:
11642                 Improved compound.
11643             """
11644             # Example: see GEOM_TestOthers.py
11645             anObj = self.BlocksOp.CheckAndImprove(theShape)
11646             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
11647             self._autoPublish(anObj, theName, "improved")
11648             return anObj
11649
11650         # end of l4_blocks_measure
11651         ## @}
11652
11653         ## @addtogroup l3_blocks_op
11654         ## @{
11655
11656         ## Get all the blocks, contained in the given compound.
11657         #  @param theCompound The compound to explode.
11658         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
11659         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
11660         #  @param theName Object name; when specified, this parameter is used
11661         #         for result publication in the study. Otherwise, if automatic
11662         #         publication is switched on, default value is used for result name.
11663         #
11664         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11665         #
11666         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
11667         #
11668         #  @ref tui_explode_on_blocks "Example 1"
11669         #  \n @ref swig_MakeBlockExplode "Example 2"
11670         @ManageTransactions("BlocksOp")
11671         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
11672             """
11673             Get all the blocks, contained in the given compound.
11674
11675             Parameters:
11676                 theCompound The compound to explode.
11677                 theMinNbFaces If solid has lower number of faces, it is not a block.
11678                 theMaxNbFaces If solid has higher number of faces, it is not a block.
11679                 theName Object name; when specified, this parameter is used
11680                         for result publication in the study. Otherwise, if automatic
11681                         publication is switched on, default value is used for result name.
11682
11683             Note:
11684                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11685
11686             Returns:
11687                 List of GEOM.GEOM_Object, containing the retrieved blocks.
11688             """
11689             # Example: see GEOM_TestOthers.py
11690             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
11691             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
11692             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
11693             for anObj in aList:
11694                 anObj.SetParameters(Parameters)
11695                 pass
11696             self._autoPublish(aList, theName, "block")
11697             return aList
11698
11699         ## Find block, containing the given point inside its volume or on boundary.
11700         #  @param theCompound Compound, to find block in.
11701         #  @param thePoint Point, close to the desired block. If the point lays on
11702         #         boundary between some blocks, we return block with nearest center.
11703         #  @param theName Object name; when specified, this parameter is used
11704         #         for result publication in the study. Otherwise, if automatic
11705         #         publication is switched on, default value is used for result name.
11706         #
11707         #  @return New GEOM.GEOM_Object, containing the found block.
11708         #
11709         #  @ref swig_todo "Example"
11710         @ManageTransactions("BlocksOp")
11711         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
11712             """
11713             Find block, containing the given point inside its volume or on boundary.
11714
11715             Parameters:
11716                 theCompound Compound, to find block in.
11717                 thePoint Point, close to the desired block. If the point lays on
11718                          boundary between some blocks, we return block with nearest center.
11719                 theName Object name; when specified, this parameter is used
11720                         for result publication in the study. Otherwise, if automatic
11721                         publication is switched on, default value is used for result name.
11722
11723             Returns:
11724                 New GEOM.GEOM_Object, containing the found block.
11725             """
11726             # Example: see GEOM_Spanner.py
11727             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
11728             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
11729             self._autoPublish(anObj, theName, "block")
11730             return anObj
11731
11732         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11733         #  @param theCompound Compound, to find block in.
11734         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
11735         #  @param theName Object name; when specified, this parameter is used
11736         #         for result publication in the study. Otherwise, if automatic
11737         #         publication is switched on, default value is used for result name.
11738         #
11739         #  @return New GEOM.GEOM_Object, containing the found block.
11740         #
11741         #  @ref swig_GetBlockByParts "Example"
11742         @ManageTransactions("BlocksOp")
11743         def GetBlockByParts(self, theCompound, theParts, theName=None):
11744             """
11745              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11746
11747              Parameters:
11748                 theCompound Compound, to find block in.
11749                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11750                 theName Object name; when specified, this parameter is used
11751                         for result publication in the study. Otherwise, if automatic
11752                         publication is switched on, default value is used for result name.
11753
11754             Returns:
11755                 New GEOM_Object, containing the found block.
11756             """
11757             # Example: see GEOM_TestOthers.py
11758             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11759             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11760             self._autoPublish(anObj, theName, "block")
11761             return anObj
11762
11763         ## Return all blocks, containing all the elements, passed as the parts.
11764         #  @param theCompound Compound, to find blocks in.
11765         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11766         #  @param theName Object name; when specified, this parameter is used
11767         #         for result publication in the study. Otherwise, if automatic
11768         #         publication is switched on, default value is used for result name.
11769         #
11770         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11771         #
11772         #  @ref swig_todo "Example"
11773         @ManageTransactions("BlocksOp")
11774         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11775             """
11776             Return all blocks, containing all the elements, passed as the parts.
11777
11778             Parameters:
11779                 theCompound Compound, to find blocks in.
11780                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11781                 theName Object name; when specified, this parameter is used
11782                         for result publication in the study. Otherwise, if automatic
11783                         publication is switched on, default value is used for result name.
11784
11785             Returns:
11786                 List of GEOM.GEOM_Object, containing the found blocks.
11787             """
11788             # Example: see GEOM_Spanner.py
11789             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11790             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11791             self._autoPublish(aList, theName, "block")
11792             return aList
11793
11794         ## Multi-transformate block and glue the result.
11795         #  Transformation is defined so, as to superpose direction faces.
11796         #  @param Block Hexahedral solid to be multi-transformed.
11797         #  @param DirFace1 ID of First direction face.
11798         #  @param DirFace2 ID of Second direction face.
11799         #  @param NbTimes Quantity of transformations to be done.
11800         #  @param theName Object name; when specified, this parameter is used
11801         #         for result publication in the study. Otherwise, if automatic
11802         #         publication is switched on, default value is used for result name.
11803         #
11804         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11805         #
11806         #  @return New GEOM.GEOM_Object, containing the result shape.
11807         #
11808         #  @ref tui_multi_transformation "Example"
11809         @ManageTransactions("BlocksOp")
11810         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11811             """
11812             Multi-transformate block and glue the result.
11813             Transformation is defined so, as to superpose direction faces.
11814
11815             Parameters:
11816                 Block Hexahedral solid to be multi-transformed.
11817                 DirFace1 ID of First direction face.
11818                 DirFace2 ID of Second direction face.
11819                 NbTimes Quantity of transformations to be done.
11820                 theName Object name; when specified, this parameter is used
11821                         for result publication in the study. Otherwise, if automatic
11822                         publication is switched on, default value is used for result name.
11823
11824             Note:
11825                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11826
11827             Returns:
11828                 New GEOM.GEOM_Object, containing the result shape.
11829             """
11830             # Example: see GEOM_Spanner.py
11831             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11832             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11833             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11834             anObj.SetParameters(Parameters)
11835             self._autoPublish(anObj, theName, "transformed")
11836             return anObj
11837
11838         ## Multi-transformate block and glue the result.
11839         #  @param Block Hexahedral solid to be multi-transformed.
11840         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11841         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11842         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11843         #  @param theName Object name; when specified, this parameter is used
11844         #         for result publication in the study. Otherwise, if automatic
11845         #         publication is switched on, default value is used for result name.
11846         #
11847         #  @return New GEOM.GEOM_Object, containing the result shape.
11848         #
11849         #  @ref tui_multi_transformation "Example"
11850         @ManageTransactions("BlocksOp")
11851         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11852                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11853             """
11854             Multi-transformate block and glue the result.
11855
11856             Parameters:
11857                 Block Hexahedral solid to be multi-transformed.
11858                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11859                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11860                 NbTimesU,NbTimesV Quantity of transformations to be done.
11861                 theName Object name; when specified, this parameter is used
11862                         for result publication in the study. Otherwise, if automatic
11863                         publication is switched on, default value is used for result name.
11864
11865             Returns:
11866                 New GEOM.GEOM_Object, containing the result shape.
11867             """
11868             # Example: see GEOM_Spanner.py
11869             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11870               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11871             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11872                                                             DirFace1V, DirFace2V, NbTimesV)
11873             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11874             anObj.SetParameters(Parameters)
11875             self._autoPublish(anObj, theName, "transformed")
11876             return anObj
11877
11878         ## Build all possible propagation groups.
11879         #  Propagation group is a set of all edges, opposite to one (main)
11880         #  edge of this group directly or through other opposite edges.
11881         #  Notion of Opposite Edge make sence only on quadrangle face.
11882         #  @param theShape Shape to build propagation groups on.
11883         #  @param theName Object name; when specified, this parameter is used
11884         #         for result publication in the study. Otherwise, if automatic
11885         #         publication is switched on, default value is used for result name.
11886         #
11887         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11888         #
11889         #  @ref swig_Propagate "Example"
11890         @ManageTransactions("BlocksOp")
11891         def Propagate(self, theShape, theName=None):
11892             """
11893             Build all possible propagation groups.
11894             Propagation group is a set of all edges, opposite to one (main)
11895             edge of this group directly or through other opposite edges.
11896             Notion of Opposite Edge make sence only on quadrangle face.
11897
11898             Parameters:
11899                 theShape Shape to build propagation groups on.
11900                 theName Object name; when specified, this parameter is used
11901                         for result publication in the study. Otherwise, if automatic
11902                         publication is switched on, default value is used for result name.
11903
11904             Returns:
11905                 List of GEOM.GEOM_Object, each of them is a propagation group.
11906             """
11907             # Example: see GEOM_TestOthers.py
11908             listChains = self.BlocksOp.Propagate(theShape)
11909             RaiseIfFailed("Propagate", self.BlocksOp)
11910             self._autoPublish(listChains, theName, "propagate")
11911             return listChains
11912
11913         # end of l3_blocks_op
11914         ## @}
11915
11916         ## @addtogroup l3_groups
11917         ## @{
11918
11919         ## Creates a new group which will store sub-shapes of theMainShape
11920         #  @param theMainShape is a GEOM object on which the group is selected
11921         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11922         #  @param theName Object name; when specified, this parameter is used
11923         #         for result publication in the study. Otherwise, if automatic
11924         #         publication is switched on, default value is used for result name.
11925         #
11926         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11927         #
11928         #  @ref tui_working_with_groups_page "Example 1"
11929         #  \n @ref swig_CreateGroup "Example 2"
11930         @ManageTransactions("GroupOp")
11931         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11932             """
11933             Creates a new group which will store sub-shapes of theMainShape
11934
11935             Parameters:
11936                theMainShape is a GEOM object on which the group is selected
11937                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11938                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11939                 theName Object name; when specified, this parameter is used
11940                         for result publication in the study. Otherwise, if automatic
11941                         publication is switched on, default value is used for result name.
11942
11943             Returns:
11944                a newly created GEOM group
11945
11946             Example of usage:
11947                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11948
11949             """
11950             # Example: see GEOM_TestOthers.py
11951             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11952             RaiseIfFailed("CreateGroup", self.GroupOp)
11953             self._autoPublish(anObj, theName, "group")
11954             return anObj
11955
11956         ## Adds a sub-object with ID theSubShapeId to the group
11957         #  @param theGroup is a GEOM group to which the new sub-shape is added
11958         #  @param theSubShapeID is a sub-shape ID in the main object.
11959         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11960         #
11961         #  @ref tui_working_with_groups_page "Example"
11962         @ManageTransactions("GroupOp")
11963         def AddObject(self,theGroup, theSubShapeID):
11964             """
11965             Adds a sub-object with ID theSubShapeId to the group
11966
11967             Parameters:
11968                 theGroup       is a GEOM group to which the new sub-shape is added
11969                 theSubShapeID  is a sub-shape ID in the main object.
11970
11971             Note:
11972                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11973             """
11974             # Example: see GEOM_TestOthers.py
11975             self.GroupOp.AddObject(theGroup, theSubShapeID)
11976             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11977                 RaiseIfFailed("AddObject", self.GroupOp)
11978                 pass
11979             pass
11980
11981         ## Removes a sub-object with ID \a theSubShapeId from the group
11982         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11983         #  @param theSubShapeID is a sub-shape ID in the main object.
11984         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11985         #
11986         #  @ref tui_working_with_groups_page "Example"
11987         @ManageTransactions("GroupOp")
11988         def RemoveObject(self,theGroup, theSubShapeID):
11989             """
11990             Removes a sub-object with ID theSubShapeId from the group
11991
11992             Parameters:
11993                 theGroup is a GEOM group from which the new sub-shape is removed
11994                 theSubShapeID is a sub-shape ID in the main object.
11995
11996             Note:
11997                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11998             """
11999             # Example: see GEOM_TestOthers.py
12000             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
12001             RaiseIfFailed("RemoveObject", self.GroupOp)
12002             pass
12003
12004         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12005         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12006         #  @param theSubShapes is a list of sub-shapes to be added.
12007         #
12008         #  @ref tui_working_with_groups_page "Example"
12009         @ManageTransactions("GroupOp")
12010         def UnionList (self,theGroup, theSubShapes):
12011             """
12012             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12013
12014             Parameters:
12015                 theGroup is a GEOM group to which the new sub-shapes are added.
12016                 theSubShapes is a list of sub-shapes to be added.
12017             """
12018             # Example: see GEOM_TestOthers.py
12019             self.GroupOp.UnionList(theGroup, theSubShapes)
12020             RaiseIfFailed("UnionList", self.GroupOp)
12021             pass
12022
12023         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12024         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12025         #  @param theSubShapes is a list of indices of sub-shapes to be added.
12026         #
12027         #  @ref swig_UnionIDs "Example"
12028         @ManageTransactions("GroupOp")
12029         def UnionIDs(self,theGroup, theSubShapes):
12030             """
12031             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12032
12033             Parameters:
12034                 theGroup is a GEOM group to which the new sub-shapes are added.
12035                 theSubShapes is a list of indices of sub-shapes to be added.
12036             """
12037             # Example: see GEOM_TestOthers.py
12038             self.GroupOp.UnionIDs(theGroup, theSubShapes)
12039             RaiseIfFailed("UnionIDs", self.GroupOp)
12040             pass
12041
12042         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12043         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12044         #  @param theSubShapes is a list of sub-shapes to be removed.
12045         #
12046         #  @ref tui_working_with_groups_page "Example"
12047         @ManageTransactions("GroupOp")
12048         def DifferenceList (self,theGroup, theSubShapes):
12049             """
12050             Removes from the group all the given shapes. No errors, if some shapes are not included.
12051
12052             Parameters:
12053                 theGroup is a GEOM group from which the sub-shapes are removed.
12054                 theSubShapes is a list of sub-shapes to be removed.
12055             """
12056             # Example: see GEOM_TestOthers.py
12057             self.GroupOp.DifferenceList(theGroup, theSubShapes)
12058             RaiseIfFailed("DifferenceList", self.GroupOp)
12059             pass
12060
12061         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12062         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12063         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
12064         #
12065         #  @ref swig_DifferenceIDs "Example"
12066         @ManageTransactions("GroupOp")
12067         def DifferenceIDs(self,theGroup, theSubShapes):
12068             """
12069             Removes from the group all the given shapes. No errors, if some shapes are not included.
12070
12071             Parameters:
12072                 theGroup is a GEOM group from which the sub-shapes are removed.
12073                 theSubShapes is a list of indices of sub-shapes to be removed.
12074             """
12075             # Example: see GEOM_TestOthers.py
12076             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
12077             RaiseIfFailed("DifferenceIDs", self.GroupOp)
12078             pass
12079
12080         ## Union of two groups.
12081         #  New group is created. It will contain all entities
12082         #  which are present in groups theGroup1 and theGroup2.
12083         #  @param theGroup1, theGroup2 are the initial GEOM groups
12084         #                              to create the united group from.
12085         #  @param theName Object name; when specified, this parameter is used
12086         #         for result publication in the study. Otherwise, if automatic
12087         #         publication is switched on, default value is used for result name.
12088         #
12089         #  @return a newly created GEOM group.
12090         #
12091         #  @ref tui_union_groups_anchor "Example"
12092         @ManageTransactions("GroupOp")
12093         def UnionGroups (self, theGroup1, theGroup2, theName=None):
12094             """
12095             Union of two groups.
12096             New group is created. It will contain all entities
12097             which are present in groups theGroup1 and theGroup2.
12098
12099             Parameters:
12100                 theGroup1, theGroup2 are the initial GEOM groups
12101                                      to create the united group from.
12102                 theName Object name; when specified, this parameter is used
12103                         for result publication in the study. Otherwise, if automatic
12104                         publication is switched on, default value is used for result name.
12105
12106             Returns:
12107                 a newly created GEOM group.
12108             """
12109             # Example: see GEOM_TestOthers.py
12110             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
12111             RaiseIfFailed("UnionGroups", self.GroupOp)
12112             self._autoPublish(aGroup, theName, "group")
12113             return aGroup
12114
12115         ## Intersection of two groups.
12116         #  New group is created. It will contain only those entities
12117         #  which are present in both groups theGroup1 and theGroup2.
12118         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12119         #  @param theName Object name; when specified, this parameter is used
12120         #         for result publication in the study. Otherwise, if automatic
12121         #         publication is switched on, default value is used for result name.
12122         #
12123         #  @return a newly created GEOM group.
12124         #
12125         #  @ref tui_intersect_groups_anchor "Example"
12126         @ManageTransactions("GroupOp")
12127         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
12128             """
12129             Intersection of two groups.
12130             New group is created. It will contain only those entities
12131             which are present in both groups theGroup1 and theGroup2.
12132
12133             Parameters:
12134                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12135                 theName Object name; when specified, this parameter is used
12136                         for result publication in the study. Otherwise, if automatic
12137                         publication is switched on, default value is used for result name.
12138
12139             Returns:
12140                 a newly created GEOM group.
12141             """
12142             # Example: see GEOM_TestOthers.py
12143             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
12144             RaiseIfFailed("IntersectGroups", self.GroupOp)
12145             self._autoPublish(aGroup, theName, "group")
12146             return aGroup
12147
12148         ## Cut of two groups.
12149         #  New group is created. It will contain entities which are
12150         #  present in group theGroup1 but are not present in group theGroup2.
12151         #  @param theGroup1 is a GEOM group to include elements of.
12152         #  @param theGroup2 is a GEOM group to exclude elements of.
12153         #  @param theName Object name; when specified, this parameter is used
12154         #         for result publication in the study. Otherwise, if automatic
12155         #         publication is switched on, default value is used for result name.
12156         #
12157         #  @return a newly created GEOM group.
12158         #
12159         #  @ref tui_cut_groups_anchor "Example"
12160         @ManageTransactions("GroupOp")
12161         def CutGroups (self, theGroup1, theGroup2, theName=None):
12162             """
12163             Cut of two groups.
12164             New group is created. It will contain entities which are
12165             present in group theGroup1 but are not present in group theGroup2.
12166
12167             Parameters:
12168                 theGroup1 is a GEOM group to include elements of.
12169                 theGroup2 is a GEOM group to exclude 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.CutGroups(theGroup1, theGroup2)
12179             RaiseIfFailed("CutGroups", self.GroupOp)
12180             self._autoPublish(aGroup, theName, "group")
12181             return aGroup
12182
12183         ## Union of list of groups.
12184         #  New group is created. It will contain all entities that are
12185         #  present in groups listed in theGList.
12186         #  @param theGList is a list of GEOM groups to create the united group from.
12187         #  @param theName Object name; when specified, this parameter is used
12188         #         for result publication in the study. Otherwise, if automatic
12189         #         publication is switched on, default value is used for result name.
12190         #
12191         #  @return a newly created GEOM group.
12192         #
12193         #  @ref tui_union_groups_anchor "Example"
12194         @ManageTransactions("GroupOp")
12195         def UnionListOfGroups (self, theGList, theName=None):
12196             """
12197             Union of list of groups.
12198             New group is created. It will contain all entities that are
12199             present in groups listed in theGList.
12200
12201             Parameters:
12202                 theGList is a list of GEOM groups to create the united group from.
12203                 theName Object name; when specified, this parameter is used
12204                         for result publication in the study. Otherwise, if automatic
12205                         publication is switched on, default value is used for result name.
12206
12207             Returns:
12208                 a newly created GEOM group.
12209             """
12210             # Example: see GEOM_TestOthers.py
12211             aGroup = self.GroupOp.UnionListOfGroups(theGList)
12212             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
12213             self._autoPublish(aGroup, theName, "group")
12214             return aGroup
12215
12216         ## Cut of lists of groups.
12217         #  New group is created. It will contain only entities
12218         #  which are present in groups listed in theGList.
12219         #  @param theGList is a list of GEOM groups to include elements of.
12220         #  @param theName Object name; when specified, this parameter is used
12221         #         for result publication in the study. Otherwise, if automatic
12222         #         publication is switched on, default value is used for result name.
12223         #
12224         #  @return a newly created GEOM group.
12225         #
12226         #  @ref tui_intersect_groups_anchor "Example"
12227         @ManageTransactions("GroupOp")
12228         def IntersectListOfGroups (self, theGList, theName=None):
12229             """
12230             Cut of lists of groups.
12231             New group is created. It will contain only entities
12232             which are present in groups listed in theGList.
12233
12234             Parameters:
12235                 theGList is a list of GEOM groups to include elements of.
12236                 theName Object name; when specified, this parameter is used
12237                         for result publication in the study. Otherwise, if automatic
12238                         publication is switched on, default value is used for result name.
12239
12240             Returns:
12241                 a newly created GEOM group.
12242             """
12243             # Example: see GEOM_TestOthers.py
12244             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
12245             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
12246             self._autoPublish(aGroup, theName, "group")
12247             return aGroup
12248
12249         ## Cut of lists of groups.
12250         #  New group is created. It will contain only entities
12251         #  which are present in groups listed in theGList1 but
12252         #  are not present in groups from theGList2.
12253         #  @param theGList1 is a list of GEOM groups to include elements of.
12254         #  @param theGList2 is a list of GEOM groups to exclude elements of.
12255         #  @param theName Object name; when specified, this parameter is used
12256         #         for result publication in the study. Otherwise, if automatic
12257         #         publication is switched on, default value is used for result name.
12258         #
12259         #  @return a newly created GEOM group.
12260         #
12261         #  @ref tui_cut_groups_anchor "Example"
12262         @ManageTransactions("GroupOp")
12263         def CutListOfGroups (self, theGList1, theGList2, theName=None):
12264             """
12265             Cut of lists of groups.
12266             New group is created. It will contain only entities
12267             which are present in groups listed in theGList1 but
12268             are not present in groups from theGList2.
12269
12270             Parameters:
12271                 theGList1 is a list of GEOM groups to include elements of.
12272                 theGList2 is a list of GEOM groups to exclude elements of.
12273                 theName Object name; when specified, this parameter is used
12274                         for result publication in the study. Otherwise, if automatic
12275                         publication is switched on, default value is used for result name.
12276
12277             Returns:
12278                 a newly created GEOM group.
12279             """
12280             # Example: see GEOM_TestOthers.py
12281             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
12282             RaiseIfFailed("CutListOfGroups", self.GroupOp)
12283             self._autoPublish(aGroup, theName, "group")
12284             return aGroup
12285
12286         ## Returns a list of sub-objects ID stored in the group
12287         #  @param theGroup is a GEOM group for which a list of IDs is requested
12288         #
12289         #  @ref swig_GetObjectIDs "Example"
12290         @ManageTransactions("GroupOp")
12291         def GetObjectIDs(self,theGroup):
12292             """
12293             Returns a list of sub-objects ID stored in the group
12294
12295             Parameters:
12296                 theGroup is a GEOM group for which a list of IDs is requested
12297             """
12298             # Example: see GEOM_TestOthers.py
12299             ListIDs = self.GroupOp.GetObjects(theGroup)
12300             RaiseIfFailed("GetObjects", self.GroupOp)
12301             return ListIDs
12302
12303         ## Returns a type of sub-objects stored in the group
12304         #  @param theGroup is a GEOM group which type is returned.
12305         #
12306         #  @ref swig_GetType "Example"
12307         @ManageTransactions("GroupOp")
12308         def GetType(self,theGroup):
12309             """
12310             Returns a type of sub-objects stored in the group
12311
12312             Parameters:
12313                 theGroup is a GEOM group which type is returned.
12314             """
12315             # Example: see GEOM_TestOthers.py
12316             aType = self.GroupOp.GetType(theGroup)
12317             RaiseIfFailed("GetType", self.GroupOp)
12318             return aType
12319
12320         ## Convert a type of geom object from id to string value
12321         #  @param theId is a GEOM obect type id.
12322         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12323         #  @ref swig_GetType "Example"
12324         def ShapeIdToType(self, theId):
12325             """
12326             Convert a type of geom object from id to string value
12327
12328             Parameters:
12329                 theId is a GEOM obect type id.
12330
12331             Returns:
12332                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12333             """
12334             if theId == 0:
12335                 return "COPY"
12336             if theId == 1:
12337                 return "IMPORT"
12338             if theId == 2:
12339                 return "POINT"
12340             if theId == 3:
12341                 return "VECTOR"
12342             if theId == 4:
12343                 return "PLANE"
12344             if theId == 5:
12345                 return "LINE"
12346             if theId == 6:
12347                 return "TORUS"
12348             if theId == 7:
12349                 return "BOX"
12350             if theId == 8:
12351                 return "CYLINDER"
12352             if theId == 9:
12353                 return "CONE"
12354             if theId == 10:
12355                 return "SPHERE"
12356             if theId == 11:
12357                 return "PRISM"
12358             if theId == 12:
12359                 return "REVOLUTION"
12360             if theId == 13:
12361                 return "BOOLEAN"
12362             if theId == 14:
12363                 return "PARTITION"
12364             if theId == 15:
12365                 return "POLYLINE"
12366             if theId == 16:
12367                 return "CIRCLE"
12368             if theId == 17:
12369                 return "SPLINE"
12370             if theId == 18:
12371                 return "ELLIPSE"
12372             if theId == 19:
12373                 return "CIRC_ARC"
12374             if theId == 20:
12375                 return "FILLET"
12376             if theId == 21:
12377                 return "CHAMFER"
12378             if theId == 22:
12379                 return "EDGE"
12380             if theId == 23:
12381                 return "WIRE"
12382             if theId == 24:
12383                 return "FACE"
12384             if theId == 25:
12385                 return "SHELL"
12386             if theId == 26:
12387                 return "SOLID"
12388             if theId == 27:
12389                 return "COMPOUND"
12390             if theId == 28:
12391                 return "SUBSHAPE"
12392             if theId == 29:
12393                 return "PIPE"
12394             if theId == 30:
12395                 return "ARCHIMEDE"
12396             if theId == 31:
12397                 return "FILLING"
12398             if theId == 32:
12399                 return "EXPLODE"
12400             if theId == 33:
12401                 return "GLUED"
12402             if theId == 34:
12403                 return "SKETCHER"
12404             if theId == 35:
12405                 return "CDG"
12406             if theId == 36:
12407                 return "FREE_BOUNDS"
12408             if theId == 37:
12409                 return "GROUP"
12410             if theId == 38:
12411                 return "BLOCK"
12412             if theId == 39:
12413                 return "MARKER"
12414             if theId == 40:
12415                 return "THRUSECTIONS"
12416             if theId == 41:
12417                 return "COMPOUNDFILTER"
12418             if theId == 42:
12419                 return "SHAPES_ON_SHAPE"
12420             if theId == 43:
12421                 return "ELLIPSE_ARC"
12422             if theId == 44:
12423                 return "3DSKETCHER"
12424             if theId == 45:
12425                 return "FILLET_2D"
12426             if theId == 46:
12427                 return "FILLET_1D"
12428             if theId == 201:
12429                 return "PIPETSHAPE"
12430             return "Shape Id not exist."
12431
12432         ## Returns a main shape associated with the group
12433         #  @param theGroup is a GEOM group for which a main shape object is requested
12434         #  @return a GEOM object which is a main shape for theGroup
12435         #
12436         #  @ref swig_GetMainShape "Example"
12437         @ManageTransactions("GroupOp")
12438         def GetMainShape(self,theGroup):
12439             """
12440             Returns a main shape associated with the group
12441
12442             Parameters:
12443                 theGroup is a GEOM group for which a main shape object is requested
12444
12445             Returns:
12446                 a GEOM object which is a main shape for theGroup
12447
12448             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
12449             """
12450             # Example: see GEOM_TestOthers.py
12451             anObj = self.GroupOp.GetMainShape(theGroup)
12452             RaiseIfFailed("GetMainShape", self.GroupOp)
12453             return anObj
12454
12455         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
12456         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12457         #  @param theShape given shape (see GEOM.GEOM_Object)
12458         #  @param min_length minimum length of edges of theShape
12459         #  @param max_length maximum length of edges of theShape
12460         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12461         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12462         #  @param theName Object name; when specified, this parameter is used
12463         #         for result publication in the study. Otherwise, if automatic
12464         #         publication is switched on, default value is used for result name.
12465         #
12466         #  @return a newly created GEOM group of edges
12467         #
12468         #  @@ref swig_todo "Example"
12469         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
12470             """
12471             Create group of edges of theShape, whose length is in range [min_length, max_length].
12472             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12473
12474             Parameters:
12475                 theShape given shape
12476                 min_length minimum length of edges of theShape
12477                 max_length maximum length of edges of theShape
12478                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12479                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12480                 theName Object name; when specified, this parameter is used
12481                         for result publication in the study. Otherwise, if automatic
12482                         publication is switched on, default value is used for result name.
12483
12484              Returns:
12485                 a newly created GEOM group of edges.
12486             """
12487             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
12488             edges_in_range = []
12489             for edge in edges:
12490                 Props = self.BasicProperties(edge)
12491                 if min_length <= Props[0] and Props[0] <= max_length:
12492                     if (not include_min) and (min_length == Props[0]):
12493                         skip = 1
12494                     else:
12495                         if (not include_max) and (Props[0] == max_length):
12496                             skip = 1
12497                         else:
12498                             edges_in_range.append(edge)
12499
12500             if len(edges_in_range) <= 0:
12501                 print "No edges found by given criteria"
12502                 return None
12503
12504             # note: auto-publishing is done in self.CreateGroup()
12505             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
12506             self.UnionList(group_edges, edges_in_range)
12507
12508             return group_edges
12509
12510         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
12511         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12512         #  @param min_length minimum length of edges of selected shape
12513         #  @param max_length maximum length of edges of selected shape
12514         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12515         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12516         #  @return a newly created GEOM group of edges
12517         #  @ref swig_todo "Example"
12518         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
12519             """
12520             Create group of edges of selected shape, whose length is in range [min_length, max_length].
12521             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12522
12523             Parameters:
12524                 min_length minimum length of edges of selected shape
12525                 max_length maximum length of edges of selected shape
12526                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12527                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12528
12529              Returns:
12530                 a newly created GEOM group of edges.
12531             """
12532             nb_selected = sg.SelectedCount()
12533             if nb_selected < 1:
12534                 print "Select a shape before calling this function, please."
12535                 return 0
12536             if nb_selected > 1:
12537                 print "Only one shape must be selected"
12538                 return 0
12539
12540             id_shape = sg.getSelected(0)
12541             shape = IDToObject( id_shape )
12542
12543             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
12544
12545             left_str  = " < "
12546             right_str = " < "
12547             if include_min: left_str  = " <= "
12548             if include_max: right_str  = " <= "
12549
12550             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
12551                                     + left_str + "length" + right_str + `max_length`)
12552
12553             sg.updateObjBrowser(1)
12554
12555             return group_edges
12556
12557         # end of l3_groups
12558         ## @}
12559
12560         ## @addtogroup l4_advanced
12561         ## @{
12562
12563         ## Create a T-shape object with specified caracteristics for the main
12564         #  and the incident pipes (radius, width, half-length).
12565         #  The extremities of the main pipe are located on junctions points P1 and P2.
12566         #  The extremity of the incident pipe is located on junction point P3.
12567         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12568         #  the main plane of the T-shape is XOY.
12569         #
12570         #  @param theR1 Internal radius of main pipe
12571         #  @param theW1 Width of main pipe
12572         #  @param theL1 Half-length of main pipe
12573         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12574         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12575         #  @param theL2 Half-length of incident pipe
12576         #
12577         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12578         #  @param theP1 1st junction point of main pipe
12579         #  @param theP2 2nd junction point of main pipe
12580         #  @param theP3 Junction point of incident pipe
12581         #
12582         #  @param theRL Internal radius of left thickness reduction
12583         #  @param theWL Width of left thickness reduction
12584         #  @param theLtransL Length of left transition part
12585         #  @param theLthinL Length of left thin part
12586         #
12587         #  @param theRR Internal radius of right thickness reduction
12588         #  @param theWR Width of right thickness reduction
12589         #  @param theLtransR Length of right transition part
12590         #  @param theLthinR Length of right thin part
12591         #
12592         #  @param theRI Internal radius of incident thickness reduction
12593         #  @param theWI Width of incident thickness reduction
12594         #  @param theLtransI Length of incident transition part
12595         #  @param theLthinI Length of incident thin part
12596         #
12597         #  @param theName Object name; when specified, this parameter is used
12598         #         for result publication in the study. Otherwise, if automatic
12599         #         publication is switched on, default value is used for result name.
12600         #
12601         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12602         #
12603         #  @ref tui_creation_pipetshape "Example"
12604         @ManageTransactions("AdvOp")
12605         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
12606                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
12607                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12608                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12609                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12610                             theName=None):
12611             """
12612             Create a T-shape object with specified caracteristics for the main
12613             and the incident pipes (radius, width, half-length).
12614             The extremities of the main pipe are located on junctions points P1 and P2.
12615             The extremity of the incident pipe is located on junction point P3.
12616             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12617             the main plane of the T-shape is XOY.
12618
12619             Parameters:
12620                 theR1 Internal radius of main pipe
12621                 theW1 Width of main pipe
12622                 theL1 Half-length of main pipe
12623                 theR2 Internal radius of incident pipe (R2 < R1)
12624                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12625                 theL2 Half-length of incident pipe
12626                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12627                 theP1 1st junction point of main pipe
12628                 theP2 2nd junction point of main pipe
12629                 theP3 Junction point of incident pipe
12630
12631                 theRL Internal radius of left thickness reduction
12632                 theWL Width of left thickness reduction
12633                 theLtransL Length of left transition part
12634                 theLthinL Length of left thin part
12635
12636                 theRR Internal radius of right thickness reduction
12637                 theWR Width of right thickness reduction
12638                 theLtransR Length of right transition part
12639                 theLthinR Length of right thin part
12640
12641                 theRI Internal radius of incident thickness reduction
12642                 theWI Width of incident thickness reduction
12643                 theLtransI Length of incident transition part
12644                 theLthinI Length of incident thin part
12645
12646                 theName Object name; when specified, this parameter is used
12647                         for result publication in the study. Otherwise, if automatic
12648                         publication is switched on, default value is used for result name.
12649
12650             Returns:
12651                 List of GEOM_Object, containing the created shape and propagation groups.
12652
12653             Example of usage:
12654                 # create PipeTShape object
12655                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
12656                 # create PipeTShape object with position
12657                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
12658                 # create PipeTShape object with left thickness reduction
12659                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
12660             """
12661             theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
12662             if (theP1 and theP2 and theP3):
12663                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12664                                                                 theRL, theWL, theLtransL, theLthinL,
12665                                                                 theRR, theWR, theLtransR, theLthinR,
12666                                                                 theRI, theWI, theLtransI, theLthinI,
12667                                                                 theHexMesh, theP1, theP2, theP3)
12668             else:
12669                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
12670                                                     theRL, theWL, theLtransL, theLthinL,
12671                                                     theRR, theWR, theLtransR, theLthinR,
12672                                                     theRI, theWI, theLtransI, theLthinI,
12673                                                     theHexMesh)
12674             RaiseIfFailed("MakePipeTShape", self.AdvOp)
12675             if Parameters: anObj[0].SetParameters(Parameters)
12676             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12677             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12678             return anObj
12679
12680         ## Create a T-shape object with chamfer and with specified caracteristics for the main
12681         #  and the incident pipes (radius, width, half-length). The chamfer is
12682         #  created on the junction of the pipes.
12683         #  The extremities of the main pipe are located on junctions points P1 and P2.
12684         #  The extremity of the incident pipe is located on junction point P3.
12685         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12686         #  the main plane of the T-shape is XOY.
12687         #  @param theR1 Internal radius of main pipe
12688         #  @param theW1 Width of main pipe
12689         #  @param theL1 Half-length of main pipe
12690         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12691         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12692         #  @param theL2 Half-length of incident pipe
12693         #  @param theH Height of the chamfer.
12694         #  @param theW Width of the chamfer.
12695         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12696         #  @param theP1 1st junction point of main pipe
12697         #  @param theP2 2nd junction point of main pipe
12698         #  @param theP3 Junction point of incident pipe
12699         #
12700         #  @param theRL Internal radius of left thickness reduction
12701         #  @param theWL Width of left thickness reduction
12702         #  @param theLtransL Length of left transition part
12703         #  @param theLthinL Length of left thin part
12704         #
12705         #  @param theRR Internal radius of right thickness reduction
12706         #  @param theWR Width of right thickness reduction
12707         #  @param theLtransR Length of right transition part
12708         #  @param theLthinR Length of right thin part
12709         #
12710         #  @param theRI Internal radius of incident thickness reduction
12711         #  @param theWI Width of incident thickness reduction
12712         #  @param theLtransI Length of incident transition part
12713         #  @param theLthinI Length of incident thin part
12714         #
12715         #  @param theName Object name; when specified, this parameter is used
12716         #         for result publication in the study. Otherwise, if automatic
12717         #         publication is switched on, default value is used for result name.
12718         #
12719         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12720         #
12721         #  @ref tui_creation_pipetshape "Example"
12722         @ManageTransactions("AdvOp")
12723         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
12724                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12725                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12726                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12727                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12728                                    theName=None):
12729             """
12730             Create a T-shape object with chamfer and with specified caracteristics for the main
12731             and the incident pipes (radius, width, half-length). The chamfer is
12732             created on the junction of the pipes.
12733             The extremities of the main pipe are located on junctions points P1 and P2.
12734             The extremity of the incident pipe is located on junction point P3.
12735             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12736             the main plane of the T-shape is XOY.
12737
12738             Parameters:
12739                 theR1 Internal radius of main pipe
12740                 theW1 Width of main pipe
12741                 theL1 Half-length of main pipe
12742                 theR2 Internal radius of incident pipe (R2 < R1)
12743                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12744                 theL2 Half-length of incident pipe
12745                 theH Height of the chamfer.
12746                 theW Width of the chamfer.
12747                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12748                 theP1 1st junction point of main pipe
12749                 theP2 2nd junction point of main pipe
12750                 theP3 Junction point of incident pipe
12751
12752                 theRL Internal radius of left thickness reduction
12753                 theWL Width of left thickness reduction
12754                 theLtransL Length of left transition part
12755                 theLthinL Length of left thin part
12756
12757                 theRR Internal radius of right thickness reduction
12758                 theWR Width of right thickness reduction
12759                 theLtransR Length of right transition part
12760                 theLthinR Length of right thin part
12761
12762                 theRI Internal radius of incident thickness reduction
12763                 theWI Width of incident thickness reduction
12764                 theLtransI Length of incident transition part
12765                 theLthinI Length of incident thin part
12766
12767                 theName Object name; when specified, this parameter is used
12768                         for result publication in the study. Otherwise, if automatic
12769                         publication is switched on, default value is used for result name.
12770
12771             Returns:
12772                 List of GEOM_Object, containing the created shape and propagation groups.
12773
12774             Example of usage:
12775                 # create PipeTShape with chamfer object
12776                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
12777                 # create PipeTShape with chamfer object with position
12778                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
12779                 # create PipeTShape with chamfer object with left thickness reduction
12780                 pipetshapechamfer_thr = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
12781             """
12782             theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
12783             if (theP1 and theP2 and theP3):
12784               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12785                                                                      theRL, theWL, theLtransL, theLthinL,
12786                                                                      theRR, theWR, theLtransR, theLthinR,
12787                                                                      theRI, theWI, theLtransI, theLthinI,
12788                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
12789             else:
12790               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
12791                                                          theRL, theWL, theLtransL, theLthinL,
12792                                                          theRR, theWR, theLtransR, theLthinR,
12793                                                          theRI, theWI, theLtransI, theLthinI,
12794                                                          theH, theW, theHexMesh)
12795             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
12796             if Parameters: anObj[0].SetParameters(Parameters)
12797             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12798             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12799             return anObj
12800
12801         ## Create a T-shape object with fillet and with specified caracteristics for the main
12802         #  and the incident pipes (radius, width, half-length). The fillet is
12803         #  created on the junction of the pipes.
12804         #  The extremities of the main pipe are located on junctions points P1 and P2.
12805         #  The extremity of the incident pipe is located on junction point P3.
12806         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12807         #  the main plane of the T-shape is XOY.
12808         #  @param theR1 Internal radius of main pipe
12809         #  @param theW1 Width of main pipe
12810         #  @param theL1 Half-length of main pipe
12811         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12812         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12813         #  @param theL2 Half-length of incident pipe
12814         #  @param theRF Radius of curvature of fillet.
12815         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12816         #  @param theP1 1st junction point of main pipe
12817         #  @param theP2 2nd junction point of main pipe
12818         #  @param theP3 Junction point of incident pipe
12819         #
12820         #  @param theRL Internal radius of left thickness reduction
12821         #  @param theWL Width of left thickness reduction
12822         #  @param theLtransL Length of left transition part
12823         #  @param theLthinL Length of left thin part
12824         #
12825         #  @param theRR Internal radius of right thickness reduction
12826         #  @param theWR Width of right thickness reduction
12827         #  @param theLtransR Length of right transition part
12828         #  @param theLthinR Length of right thin part
12829         #
12830         #  @param theRI Internal radius of incident thickness reduction
12831         #  @param theWI Width of incident thickness reduction
12832         #  @param theLtransI Length of incident transition part
12833         #  @param theLthinI Length of incident thin part
12834         #
12835         #  @param theName Object name; when specified, this parameter is used
12836         #         for result publication in the study. Otherwise, if automatic
12837         #         publication is switched on, default value is used for result name.
12838         #
12839         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12840         #
12841         #  @ref tui_creation_pipetshape "Example"
12842         @ManageTransactions("AdvOp")
12843         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12844                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12845                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12846                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12847                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12848                                   theName=None):
12849             """
12850             Create a T-shape object with fillet and with specified caracteristics for the main
12851             and the incident pipes (radius, width, half-length). The fillet is
12852             created on the junction of the pipes.
12853             The extremities of the main pipe are located on junctions points P1 and P2.
12854             The extremity of the incident pipe is located on junction point P3.
12855
12856             Parameters:
12857                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12858                 the main plane of the T-shape is XOY.
12859                 theR1 Internal radius of main pipe
12860                 theW1 Width of main pipe
12861                 heL1 Half-length of main pipe
12862                 theR2 Internal radius of incident pipe (R2 < R1)
12863                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12864                 theL2 Half-length of incident pipe
12865                 theRF Radius of curvature of fillet.
12866                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12867                 theP1 1st junction point of main pipe
12868                 theP2 2nd junction point of main pipe
12869                 theP3 Junction point of incident pipe
12870
12871                 theRL Internal radius of left thickness reduction
12872                 theWL Width of left thickness reduction
12873                 theLtransL Length of left transition part
12874                 theLthinL Length of left thin part
12875
12876                 theRR Internal radius of right thickness reduction
12877                 theWR Width of right thickness reduction
12878                 theLtransR Length of right transition part
12879                 theLthinR Length of right thin part
12880
12881                 theRI Internal radius of incident thickness reduction
12882                 theWI Width of incident thickness reduction
12883                 theLtransI Length of incident transition part
12884                 theLthinI Length of incident thin part
12885
12886                 theName Object name; when specified, this parameter is used
12887                         for result publication in the study. Otherwise, if automatic
12888                         publication is switched on, default value is used for result name.
12889
12890             Returns:
12891                 List of GEOM_Object, containing the created shape and propagation groups.
12892
12893             Example of usage:
12894                 # create PipeTShape with fillet object
12895                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12896                 # create PipeTShape with fillet object with position
12897                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12898                 # create PipeTShape with fillet object with left thickness reduction
12899                 pipetshapefillet_thr = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
12900             """
12901             theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
12902             if (theP1 and theP2 and theP3):
12903               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12904                                                                     theRL, theWL, theLtransL, theLthinL,
12905                                                                     theRR, theWR, theLtransR, theLthinR,
12906                                                                     theRI, theWI, theLtransI, theLthinI,
12907                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12908             else:
12909               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12910                                                         theRL, theWL, theLtransL, theLthinL,
12911                                                         theRR, theWR, theLtransR, theLthinR,
12912                                                         theRI, theWI, theLtransI, theLthinI,
12913                                                         theRF, theHexMesh)
12914             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
12915             if Parameters: anObj[0].SetParameters(Parameters)
12916             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12917             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12918             return anObj
12919
12920         ## This function allows creating a disk already divided into blocks. It
12921         #  can be used to create divided pipes for later meshing in hexaedra.
12922         #  @param theR Radius of the disk
12923         #  @param theOrientation Orientation of the plane on which the disk will be built
12924         #         1 = XOY, 2 = OYZ, 3 = OZX
12925         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12926         #  @param theName Object name; when specified, this parameter is used
12927         #         for result publication in the study. Otherwise, if automatic
12928         #         publication is switched on, default value is used for result name.
12929         #
12930         #  @return New GEOM_Object, containing the created shape.
12931         #
12932         #  @ref tui_creation_divideddisk "Example"
12933         @ManageTransactions("AdvOp")
12934         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
12935             """
12936             Creates a disk, divided into blocks. It can be used to create divided pipes
12937             for later meshing in hexaedra.
12938
12939             Parameters:
12940                 theR Radius of the disk
12941                 theOrientation Orientation of the plane on which the disk will be built:
12942                                1 = XOY, 2 = OYZ, 3 = OZX
12943                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12944                 theName Object name; when specified, this parameter is used
12945                         for result publication in the study. Otherwise, if automatic
12946                         publication is switched on, default value is used for result name.
12947
12948             Returns:
12949                 New GEOM_Object, containing the created shape.
12950             """
12951             theR, Parameters = ParseParameters(theR)
12952             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
12953             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
12954             if Parameters: anObj.SetParameters(Parameters)
12955             self._autoPublish(anObj, theName, "dividedDisk")
12956             return anObj
12957
12958         ## This function allows creating a disk already divided into blocks. It
12959         #  can be used to create divided pipes for later meshing in hexaedra.
12960         #  @param theCenter Center of the disk
12961         #  @param theVector Normal vector to the plane of the created disk
12962         #  @param theRadius Radius of the disk
12963         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12964         #  @param theName Object name; when specified, this parameter is used
12965         #         for result publication in the study. Otherwise, if automatic
12966         #         publication is switched on, default value is used for result name.
12967         #
12968         #  @return New GEOM_Object, containing the created shape.
12969         #
12970         #  @ref tui_creation_divideddisk "Example"
12971         @ManageTransactions("AdvOp")
12972         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
12973             """
12974             Creates a disk already divided into blocks. It can be used to create divided pipes
12975             for later meshing in hexaedra.
12976
12977             Parameters:
12978                 theCenter Center of the disk
12979                 theVector Normal vector to the plane of the created disk
12980                 theRadius Radius of the disk
12981                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12982                 theName Object name; when specified, this parameter is used
12983                         for result publication in the study. Otherwise, if automatic
12984                         publication is switched on, default value is used for result name.
12985
12986             Returns:
12987                 New GEOM_Object, containing the created shape.
12988             """
12989             theRadius, Parameters = ParseParameters(theRadius)
12990             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
12991             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
12992             if Parameters: anObj.SetParameters(Parameters)
12993             self._autoPublish(anObj, theName, "dividedDisk")
12994             return anObj
12995
12996         ## Builds a cylinder prepared for hexa meshes
12997         #  @param theR Radius of the cylinder
12998         #  @param theH Height of the cylinder
12999         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
13000         #  @param theName Object name; when specified, this parameter is used
13001         #         for result publication in the study. Otherwise, if automatic
13002         #         publication is switched on, default value is used for result name.
13003         #
13004         #  @return New GEOM_Object, containing the created shape.
13005         #
13006         #  @ref tui_creation_dividedcylinder "Example"
13007         @ManageTransactions("AdvOp")
13008         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
13009             """
13010             Builds a cylinder prepared for hexa meshes
13011
13012             Parameters:
13013                 theR Radius of the cylinder
13014                 theH Height of the cylinder
13015                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
13016                 theName Object name; when specified, this parameter is used
13017                         for result publication in the study. Otherwise, if automatic
13018                         publication is switched on, default value is used for result name.
13019
13020             Returns:
13021                 New GEOM_Object, containing the created shape.
13022             """
13023             theR, theH, Parameters = ParseParameters(theR, theH)
13024             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
13025             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
13026             if Parameters: anObj.SetParameters(Parameters)
13027             self._autoPublish(anObj, theName, "dividedCylinder")
13028             return anObj
13029
13030         ## Create a surface from a cloud of points
13031         #  @param thelPoints list of points. Compounds of points are
13032         #         accepted as well.
13033         #  @param theNbMax maximum number of Bezier pieces in the resulting
13034         #         surface.
13035         #  @param theDegMax maximum degree of the resulting BSpline surface.
13036         #  @param theDMax 3D tolerance of initial approximation.
13037         #  @param theName Object name; when specified, this parameter is used
13038         #         for result publication in the study. Otherwise, if automatic
13039         #         publication is switched on, default value is used for result name.
13040         #  @return New GEOM_Object, containing the created shape.
13041         #  @note 3D tolerance of initial approximation represents a tolerance of
13042         #        initial plate surface approximation. If this parameter is equal
13043         #        to 0 (default value) it is computed. In this case an error of
13044         #        initial plate surface computation is used as the approximation
13045         #        tolerance. This error represents a maximal distance between
13046         #        computed plate surface and given points.
13047         #
13048         #  @ref tui_creation_smoothingsurface "Example"
13049         @ManageTransactions("AdvOp")
13050         def MakeSmoothingSurface(self, thelPoints, theNbMax=2, theDegMax=8,
13051                                  theDMax=0.0, theName=None):
13052             """
13053             Create a surface from a cloud of points
13054
13055             Parameters:
13056                 thelPoints list of points. Compounds of points are
13057                            accepted as well.
13058                 theNbMax maximum number of Bezier pieces in the resulting
13059                          surface.
13060                 theDegMax maximum degree of the resulting BSpline surface.
13061                 theDMax 3D tolerance of initial approximation.
13062                 theName Object name; when specified, this parameter is used
13063                         for result publication in the study. Otherwise, if automatic
13064                         publication is switched on, default value is used for result name.
13065
13066             Returns:
13067                 New GEOM_Object, containing the created shape.
13068
13069             Note:
13070                 3D tolerance of initial approximation represents a tolerance of
13071                 initial plate surface approximation. If this parameter is equal
13072                 to 0 (default value) it is computed. In this case an error of
13073                 initial plate surface computation is used as the approximation
13074                 tolerance. This error represents a maximal distance between
13075                 computed plate surface and given points.
13076             """
13077             anObj = self.AdvOp.MakeSmoothingSurface(thelPoints, theNbMax,
13078                                                     theDegMax, theDMax)
13079             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
13080             self._autoPublish(anObj, theName, "smoothing")
13081             return anObj
13082
13083         ## Export a shape to XAO format
13084         #  @param shape The shape to export
13085         #  @param groups The list of groups to export
13086         #  @param fields The list of fields to export
13087         #  @param author The author of the export
13088         #  @param fileName The name of the file to export
13089         #  @return boolean
13090         #
13091         #  @ref tui_exportxao "Example"
13092         @ManageTransactions("InsertOp")
13093         def ExportXAO(self, shape, groups, fields, author, fileName):
13094             res = self.InsertOp.ExportXAO(shape, groups, fields, author, fileName)
13095             RaiseIfFailed("ExportXAO", self.InsertOp)
13096             return res
13097
13098         ## Import a shape from XAO format
13099         #  @param shape Shape to export
13100         #  @param fileName The name of the file to import
13101         #  @return tuple (res, shape, subShapes, groups, fields)
13102         #       res Flag indicating if the import was successful
13103         #       shape The imported shape
13104         #       subShapes The list of imported subShapes
13105         #       groups The list of imported groups
13106         #       fields The list of imported fields
13107         #
13108         #  @ref tui_importxao "Example"
13109         @ManageTransactions("InsertOp")
13110         def ImportXAO(self, fileName):
13111             res = self.InsertOp.ImportXAO(fileName)
13112             RaiseIfFailed("ImportXAO", self.InsertOp)
13113             return res
13114
13115         #@@ insert new functions before this line @@ do not remove this line @@#
13116
13117         # end of l4_advanced
13118         ## @}
13119
13120         ## Create a copy of the given object
13121         #
13122         #  @param theOriginal geometry object for copy
13123         #  @param theName Object name; when specified, this parameter is used
13124         #         for result publication in the study. Otherwise, if automatic
13125         #         publication is switched on, default value is used for result name.
13126         #
13127         #  @return New GEOM_Object, containing the copied shape.
13128         #
13129         #  @ingroup l1_geomBuilder_auxiliary
13130         #  @ref swig_MakeCopy "Example"
13131         @ManageTransactions("InsertOp")
13132         def MakeCopy(self, theOriginal, theName=None):
13133             """
13134             Create a copy of the given object
13135
13136             Parameters:
13137                 theOriginal geometry object for copy
13138                 theName Object name; when specified, this parameter is used
13139                         for result publication in the study. Otherwise, if automatic
13140                         publication is switched on, default value is used for result name.
13141
13142             Returns:
13143                 New GEOM_Object, containing the copied shape.
13144
13145             Example of usage: Copy = geompy.MakeCopy(Box)
13146             """
13147             # Example: see GEOM_TestAll.py
13148             anObj = self.InsertOp.MakeCopy(theOriginal)
13149             RaiseIfFailed("MakeCopy", self.InsertOp)
13150             self._autoPublish(anObj, theName, "copy")
13151             return anObj
13152
13153         ## Add Path to load python scripts from
13154         #  @param Path a path to load python scripts from
13155         #  @ingroup l1_geomBuilder_auxiliary
13156         def addPath(self,Path):
13157             """
13158             Add Path to load python scripts from
13159
13160             Parameters:
13161                 Path a path to load python scripts from
13162             """
13163             if (sys.path.count(Path) < 1):
13164                 sys.path.append(Path)
13165                 pass
13166             pass
13167
13168         ## Load marker texture from the file
13169         #  @param Path a path to the texture file
13170         #  @return unique texture identifier
13171         #  @ingroup l1_geomBuilder_auxiliary
13172         @ManageTransactions("InsertOp")
13173         def LoadTexture(self, Path):
13174             """
13175             Load marker texture from the file
13176
13177             Parameters:
13178                 Path a path to the texture file
13179
13180             Returns:
13181                 unique texture identifier
13182             """
13183             # Example: see GEOM_TestAll.py
13184             ID = self.InsertOp.LoadTexture(Path)
13185             RaiseIfFailed("LoadTexture", self.InsertOp)
13186             return ID
13187
13188         ## Get internal name of the object based on its study entry
13189         #  @note This method does not provide an unique identifier of the geometry object.
13190         #  @note This is internal function of GEOM component, though it can be used outside it for
13191         #  appropriate reason (e.g. for identification of geometry object).
13192         #  @param obj geometry object
13193         #  @return unique object identifier
13194         #  @ingroup l1_geomBuilder_auxiliary
13195         def getObjectID(self, obj):
13196             """
13197             Get internal name of the object based on its study entry.
13198             Note: this method does not provide an unique identifier of the geometry object.
13199             It is an internal function of GEOM component, though it can be used outside GEOM for
13200             appropriate reason (e.g. for identification of geometry object).
13201
13202             Parameters:
13203                 obj geometry object
13204
13205             Returns:
13206                 unique object identifier
13207             """
13208             ID = ""
13209             entry = salome.ObjectToID(obj)
13210             if entry is not None:
13211                 lst = entry.split(":")
13212                 if len(lst) > 0:
13213                     ID = lst[-1] # -1 means last item in the list
13214                     return "GEOM_" + ID
13215             return ID
13216
13217
13218
13219         ## Add marker texture. @a Width and @a Height parameters
13220         #  specify width and height of the texture in pixels.
13221         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13222         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13223         #  parameter should be unpacked string, in which '1' symbols represent opaque
13224         #  pixels and '0' represent transparent pixels of the texture bitmap.
13225         #
13226         #  @param Width texture width in pixels
13227         #  @param Height texture height in pixels
13228         #  @param Texture texture data
13229         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13230         #  @return unique texture identifier
13231         #  @ingroup l1_geomBuilder_auxiliary
13232         @ManageTransactions("InsertOp")
13233         def AddTexture(self, Width, Height, Texture, RowData=False):
13234             """
13235             Add marker texture. Width and Height parameters
13236             specify width and height of the texture in pixels.
13237             If RowData is True, Texture parameter should represent texture data
13238             packed into the byte array. If RowData is False (default), Texture
13239             parameter should be unpacked string, in which '1' symbols represent opaque
13240             pixels and '0' represent transparent pixels of the texture bitmap.
13241
13242             Parameters:
13243                 Width texture width in pixels
13244                 Height texture height in pixels
13245                 Texture texture data
13246                 RowData if True, Texture data are packed in the byte stream
13247
13248             Returns:
13249                 return unique texture identifier
13250             """
13251             if not RowData: Texture = PackData(Texture)
13252             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13253             RaiseIfFailed("AddTexture", self.InsertOp)
13254             return ID
13255
13256         ## Creates a new folder object. It is a container for any GEOM objects.
13257         #  @param Name name of the container
13258         #  @param Father parent object. If None,
13259         #         folder under 'Geometry' root object will be created.
13260         #  @return a new created folder
13261         #  @ingroup l1_publish_data
13262         def NewFolder(self, Name, Father=None):
13263             """
13264             Create a new folder object. It is an auxiliary container for any GEOM objects.
13265
13266             Parameters:
13267                 Name name of the container
13268                 Father parent object. If None,
13269                 folder under 'Geometry' root object will be created.
13270
13271             Returns:
13272                 a new created folder
13273             """
13274             if not Father: Father = self.father
13275             return self.CreateFolder(Name, Father)
13276
13277         ## Move object to the specified folder
13278         #  @param Object object to move
13279         #  @param Folder target folder
13280         #  @ingroup l1_publish_data
13281         def PutToFolder(self, Object, Folder):
13282             """
13283             Move object to the specified folder
13284
13285             Parameters:
13286                 Object object to move
13287                 Folder target folder
13288             """
13289             self.MoveToFolder(Object, Folder)
13290             pass
13291
13292         ## Move list of objects to the specified folder
13293         #  @param ListOfSO list of objects to move
13294         #  @param Folder target folder
13295         #  @ingroup l1_publish_data
13296         def PutListToFolder(self, ListOfSO, Folder):
13297             """
13298             Move list of objects to the specified folder
13299
13300             Parameters:
13301                 ListOfSO list of objects to move
13302                 Folder target folder
13303             """
13304             self.MoveListToFolder(ListOfSO, Folder)
13305             pass
13306
13307         ## @addtogroup l2_field
13308         ## @{
13309
13310         ## Creates a field
13311         #  @param shape the shape the field lies on
13312         #  @param name the field name
13313         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13314         #  @param dimension dimension of the shape the field lies on
13315         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13316         #  @param componentNames names of components
13317         #  @return a created field
13318         @ManageTransactions("FieldOp")
13319         def CreateField(self, shape, name, type, dimension, componentNames):
13320             """
13321             Creates a field
13322
13323             Parameters:
13324                 shape the shape the field lies on
13325                 name  the field name
13326                 type  type of field data
13327                 dimension dimension of the shape the field lies on
13328                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13329                 componentNames names of components
13330
13331             Returns:
13332                 a created field
13333             """
13334             if isinstance( type, int ):
13335                 if type < 0 or type > 3:
13336                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
13337                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13338
13339             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13340             RaiseIfFailed("CreateField", self.FieldOp)
13341             global geom
13342             geom._autoPublish( f, "", name)
13343             return f
13344
13345         ## Removes a field from the GEOM component
13346         #  @param field the field to remove
13347         def RemoveField(self, field):
13348             "Removes a field from the GEOM component"
13349             global geom
13350             if isinstance( field, GEOM._objref_GEOM_Field ):
13351                 geom.RemoveObject( field )
13352             elif isinstance( field, geomField ):
13353                 geom.RemoveObject( field.field )
13354             else:
13355                 raise RuntimeError, "RemoveField() : the object is not a field"
13356             return
13357
13358         ## Returns number of fields on a shape
13359         @ManageTransactions("FieldOp")
13360         def CountFields(self, shape):
13361             "Returns number of fields on a shape"
13362             nb = self.FieldOp.CountFields( shape )
13363             RaiseIfFailed("CountFields", self.FieldOp)
13364             return nb
13365
13366         ## Returns all fields on a shape
13367         @ManageTransactions("FieldOp")
13368         def GetFields(self, shape):
13369             "Returns all fields on a shape"
13370             ff = self.FieldOp.GetFields( shape )
13371             RaiseIfFailed("GetFields", self.FieldOp)
13372             return ff
13373
13374         ## Returns a field on a shape by its name
13375         @ManageTransactions("FieldOp")
13376         def GetField(self, shape, name):
13377             "Returns a field on a shape by its name"
13378             f = self.FieldOp.GetField( shape, name )
13379             RaiseIfFailed("GetField", self.FieldOp)
13380             return f
13381
13382         # end of l2_field
13383         ## @}
13384
13385
13386 import omniORB
13387 # Register the new proxy for GEOM_Gen
13388 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13389
13390
13391 ## Field on Geometry
13392 #  @ingroup l2_field
13393 class geomField( GEOM._objref_GEOM_Field ):
13394
13395     def __init__(self):
13396         GEOM._objref_GEOM_Field.__init__(self)
13397         self.field = GEOM._objref_GEOM_Field
13398         return
13399
13400     ## Returns the shape the field lies on
13401     def getShape(self):
13402         "Returns the shape the field lies on"
13403         return self.field.GetShape(self)
13404
13405     ## Returns the field name
13406     def getName(self):
13407         "Returns the field name"
13408         return self.field.GetName(self)
13409
13410     ## Returns type of field data as integer [0-3]
13411     def getType(self):
13412         "Returns type of field data"
13413         return self.field.GetDataType(self)._v
13414
13415     ## Returns type of field data:
13416     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13417     def getTypeEnum(self):
13418         "Returns type of field data"
13419         return self.field.GetDataType(self)
13420
13421     ## Returns dimension of the shape the field lies on:
13422     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13423     def getDimension(self):
13424         """Returns dimension of the shape the field lies on:
13425         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13426         return self.field.GetDimension(self)
13427
13428     ## Returns names of components
13429     def getComponents(self):
13430         "Returns names of components"
13431         return self.field.GetComponents(self)
13432
13433     ## Adds a time step to the field
13434     #  @param step the time step number further used as the step identifier
13435     #  @param stamp the time step time
13436     #  @param values the values of the time step
13437     def addStep(self, step, stamp, values):
13438         "Adds a time step to the field"
13439         stp = self.field.AddStep( self, step, stamp )
13440         if not stp:
13441             raise RuntimeError, \
13442                   "Field.addStep() : Error: step %s already exists in this field"%step
13443         global geom
13444         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13445         self.setValues( step, values )
13446         return stp
13447
13448     ## Remove a time step from the field
13449     def removeStep(self,step):
13450         "Remove a time step from the field"
13451         stepSO = None
13452         try:
13453             stepObj = self.field.GetStep( self, step )
13454             if stepObj:
13455                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13456         except:
13457             #import traceback
13458             #traceback.print_exc()
13459             pass
13460         self.field.RemoveStep( self, step )
13461         if stepSO:
13462             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13463         return
13464
13465     ## Returns number of time steps in the field
13466     def countSteps(self):
13467         "Returns number of time steps in the field"
13468         return self.field.CountSteps(self)
13469
13470     ## Returns a list of time step IDs in the field
13471     def getSteps(self):
13472         "Returns a list of time step IDs in the field"
13473         return self.field.GetSteps(self)
13474
13475     ## Returns a time step by its ID
13476     def getStep(self,step):
13477         "Returns a time step by its ID"
13478         stp = self.field.GetStep(self, step)
13479         if not stp:
13480             raise RuntimeError, "Step %s is missing from this field"%step
13481         return stp
13482
13483     ## Returns the time of the field step
13484     def getStamp(self,step):
13485         "Returns the time of the field step"
13486         return self.getStep(step).GetStamp()
13487
13488     ## Changes the time of the field step
13489     def setStamp(self, step, stamp):
13490         "Changes the time of the field step"
13491         return self.getStep(step).SetStamp(stamp)
13492
13493     ## Returns values of the field step
13494     def getValues(self, step):
13495         "Returns values of the field step"
13496         return self.getStep(step).GetValues()
13497
13498     ## Changes values of the field step
13499     def setValues(self, step, values):
13500         "Changes values of the field step"
13501         stp = self.getStep(step)
13502         errBeg = "Field.setValues(values) : Error: "
13503         try:
13504             ok = stp.SetValues( values )
13505         except Exception, e:
13506             excStr = str(e)
13507             if excStr.find("WrongPythonType") > 0:
13508                 raise RuntimeError, errBeg +\
13509                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
13510             raise RuntimeError, errBeg + str(e)
13511         if not ok:
13512             nbOK = self.field.GetArraySize(self)
13513             nbKO = len(values)
13514             if nbOK != nbKO:
13515                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
13516             else:
13517                 raise RuntimeError, errBeg + "failed"
13518         return
13519
13520     pass # end of class geomField
13521
13522 # Register the new proxy for GEOM_Field
13523 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
13524
13525
13526 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
13527 #  interface to GEOM operations.
13528 #
13529 #  Typical use is:
13530 #  \code
13531 #    import salome
13532 #    salome.salome_init()
13533 #    from salome.geom import geomBuilder
13534 #    geompy = geomBuilder.New(salome.myStudy)
13535 #  \endcode
13536 #  @param  study     SALOME study, generally obtained by salome.myStudy.
13537 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13538 #  @return geomBuilder instance
13539 def New( study, instance=None):
13540     """
13541     Create a new geomBuilder instance.The geomBuilder class provides the Python
13542     interface to GEOM operations.
13543
13544     Typical use is:
13545         import salome
13546         salome.salome_init()
13547         from salome.geom import geomBuilder
13548         geompy = geomBuilder.New(salome.myStudy)
13549
13550     Parameters:
13551         study     SALOME study, generally obtained by salome.myStudy.
13552         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13553     Returns:
13554         geomBuilder instance
13555     """
13556     #print "New geomBuilder ", study, instance
13557     global engine
13558     global geom
13559     global doLcc
13560     engine = instance
13561     if engine is None:
13562       doLcc = True
13563     geom = geomBuilder()
13564     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13565     geom.init_geom(study)
13566     return geom