Salome HOME
0022747: [EDF] Improvement of Get Shared Shapes operation
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup geomBuilder geomBuilder Python module
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ##
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ##
50 ## For example, consider the following Python script:
51 ##
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New(salome.myStudy)
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ##
60 ## Last two lines can be replaced by one-line instruction:
61 ##
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ##
66 ## ... or simply
67 ##
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, "nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, ("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ##
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New(salome.myStudy)
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100)
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still containes all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## It is possible to customize the representation of the geometrical
148 ## data in the data tree; this can be done by using folders. A folder can
149 ## be created in the study tree using function
150 ## \ref geomBuilder.geomBuilder.NewFolder() "NewFolder()"
151 ## (by default it is created under the "Geometry" root object).
152 ## As soon as folder is created, any published geometry object
153 ## can be moved into it.
154 ##
155 ## For example:
156 ##
157 ## @code
158 ## import salome
159 ## from salome.geom import geomBuilder
160 ## geompy = geomBuilder.New(salome.myStudy)
161 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box")
162 ## # the box was created and published in the study
163 ## folder = geompy.NewFolder("Primitives")
164 ## # an empty "Primitives" folder was created under default "Geometry" root object
165 ## geompy.PutToFolder(box, folder)
166 ## # the box was moved into "Primitives" folder
167 ## @endcode
168 ##
169 ## Subfolders are also can be created by specifying another folder as a parent:
170 ##
171 ## @code
172 ## subfolder = geompy.NewFolder("3D", folder)
173 ## # "3D" folder was created under "Primitives" folder
174 ## @endcode
175 ##
176 ## @note
177 ## - Folder container is just a representation layer object that
178 ## deals with already published objects only. So, any geometry object
179 ## should be published in the study (for example, with
180 ## \ref geomBuilder.geomBuilder.PutToFolder() "addToStudy()" function)
181 ## BEFORE moving it into any existing folder.
182 ## - \ref geomBuilder.geomBuilder.PutToFolder() "PutToFolder()" function
183 ## does not change physical position of geometry object in the study tree,
184 ## it only affects on the representation of the data tree.
185 ## - It is impossible to publish geometry object using any folder as father.
186 ##
187 ##  \defgroup l1_publish_data
188 ##  \defgroup l1_geomBuilder_auxiliary
189 ##  \defgroup l1_geomBuilder_purpose
190 ## @}
191
192 ## @defgroup l1_publish_data Publishing results in SALOME study
193
194 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
195
196 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
197 ## @{
198 ##   @defgroup l2_import_export Importing/exporting geometrical objects
199 ##   @defgroup l2_creating      Creating geometrical objects
200 ##   @{
201 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
202 ##     @{
203 ##       @defgroup l4_curves        Creating Curves
204
205 ##     @}
206 ##     @defgroup l3_3d_primitives Creating 3D Primitives
207 ##     @defgroup l3_complex       Creating Complex Objects
208 ##     @defgroup l3_groups        Working with groups
209 ##     @defgroup l3_blocks        Building by blocks
210 ##     @{
211 ##       @defgroup l4_blocks_measure Check and Improve
212
213 ##     @}
214 ##     @defgroup l3_sketcher      Sketcher
215 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
216 ##     @{
217 ##       @defgroup l4_decompose     Decompose objects
218 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
219 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
220 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
221 ##       @defgroup l4_advanced      Advanced objects creation functions
222
223 ##     @}
224
225 ##   @}
226 ##   @defgroup l2_transforming  Transforming geometrical objects
227 ##   @{
228 ##     @defgroup l3_basic_op      Basic Operations
229 ##     @defgroup l3_boolean       Boolean Operations
230 ##     @defgroup l3_transform     Transformation Operations
231 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
232 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
233 ##     @defgroup l3_blocks_op     Blocks Operations
234 ##     @defgroup l3_healing       Repairing Operations
235 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
236
237 ##   @}
238 ##   @defgroup l2_measure       Using measurement tools
239 ##   @defgroup l2_field         Field on Geometry
240
241 ## @}
242
243 # initialize SALOME session in try/except block
244 # to avoid problems in some cases, e.g. when generating documentation
245 try:
246     import salome
247     salome.salome_init()
248     from salome import *
249 except:
250     pass
251
252 from salome_notebook import *
253
254 import GEOM
255 import math
256 import os
257 import functools
258
259 from salome.geom.gsketcher import Sketcher3D, Sketcher2D, Polyline2D
260
261 # service function
262 def _toListOfNames(_names, _size=-1):
263     l = []
264     import types
265     if type(_names) in [types.ListType, types.TupleType]:
266         for i in _names: l.append(i)
267     elif _names:
268         l.append(_names)
269     if l and len(l) < _size:
270         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
271     return l
272
273 # Decorator function to manage transactions for all geometric operations.
274 def ManageTransactions(theOpeName):
275     def MTDecorator(theFunction):
276         # To keep the original function name an documentation.
277         @functools.wraps(theFunction)
278         def OpenCallClose(self, *args, **kwargs):
279             # Open transaction
280             anOperation = getattr(self, theOpeName)
281             anOperation.StartOperation()
282             try:
283                 # Call the function
284                 res = theFunction(self, *args, **kwargs)
285                 # Commit transaction
286                 anOperation.FinishOperation()
287                 return res
288             except:
289                 # Abort transaction
290                 anOperation.AbortOperation()
291                 raise
292         return OpenCallClose
293     return MTDecorator
294
295 ## Raise an Error, containing the Method_name, if Operation is Failed
296 ## @ingroup l1_geomBuilder_auxiliary
297 def RaiseIfFailed (Method_name, Operation):
298     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
299         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
300
301 ## Return list of variables value from salome notebook
302 ## @ingroup l1_geomBuilder_auxiliary
303 def ParseParameters(*parameters):
304     Result = []
305     StringResult = []
306     for parameter in parameters:
307         if isinstance(parameter, list):
308             lResults = ParseParameters(*parameter)
309             if len(lResults) > 0:
310                 Result.append(lResults[:-1])
311                 StringResult += lResults[-1].split(":")
312                 pass
313             pass
314         else:
315             if isinstance(parameter,str):
316                 if notebook.isVariable(parameter):
317                     Result.append(notebook.get(parameter))
318                 else:
319                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
320                 pass
321             else:
322                 Result.append(parameter)
323                 pass
324             StringResult.append(str(parameter))
325             pass
326         pass
327     if Result:
328         Result.append(":".join(StringResult))
329     else:
330         Result = ":".join(StringResult)
331     return Result
332
333 ## Return list of variables value from salome notebook
334 ## @ingroup l1_geomBuilder_auxiliary
335 def ParseList(list):
336     Result = []
337     StringResult = ""
338     for parameter in list:
339         if isinstance(parameter,str) and notebook.isVariable(parameter):
340             Result.append(str(notebook.get(parameter)))
341             pass
342         else:
343             Result.append(str(parameter))
344             pass
345
346         StringResult = StringResult + str(parameter)
347         StringResult = StringResult + ":"
348         pass
349     StringResult = StringResult[:len(StringResult)-1]
350     return Result, StringResult
351
352 ## Return list of variables value from salome notebook
353 ## @ingroup l1_geomBuilder_auxiliary
354 def ParseSketcherCommand(command):
355     Result = ""
356     StringResult = ""
357     sections = command.split(":")
358     for section in sections:
359         parameters = section.split(" ")
360         paramIndex = 1
361         for parameter in parameters:
362             if paramIndex > 1 and parameter.find("'") != -1:
363                 parameter = parameter.replace("'","")
364                 if notebook.isVariable(parameter):
365                     Result = Result + str(notebook.get(parameter)) + " "
366                     pass
367                 else:
368                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
369                     pass
370                 pass
371             else:
372                 Result = Result + str(parameter) + " "
373                 pass
374             if paramIndex > 1:
375                 StringResult = StringResult + parameter
376                 StringResult = StringResult + ":"
377                 pass
378             paramIndex = paramIndex + 1
379             pass
380         Result = Result[:len(Result)-1] + ":"
381         pass
382     Result = Result[:len(Result)-1]
383     return Result, StringResult
384
385 ## Helper function which can be used to pack the passed string to the byte data.
386 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
387 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
388 ## For example,
389 ## \code
390 ## val = PackData("10001110") # val = 0xAE
391 ## val = PackData("1")        # val = 0x80
392 ## \endcode
393 ## @param data unpacked data - a string containing '1' and '0' symbols
394 ## @return data packed to the byte stream
395 ## @ingroup l1_geomBuilder_auxiliary
396 def PackData(data):
397     """
398     Helper function which can be used to pack the passed string to the byte data.
399     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
400     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
401
402     Parameters:
403         data unpacked data - a string containing '1' and '0' symbols
404
405     Returns:
406         data packed to the byte stream
407
408     Example of usage:
409         val = PackData("10001110") # val = 0xAE
410         val = PackData("1")        # val = 0x80
411     """
412     bytes = len(data)/8
413     if len(data)%8: bytes += 1
414     res = ""
415     for b in range(bytes):
416         d = data[b*8:(b+1)*8]
417         val = 0
418         for i in range(8):
419             val *= 2
420             if i < len(d):
421                 if d[i] == "1": val += 1
422                 elif d[i] != "0":
423                     raise "Invalid symbol %s" % d[i]
424                 pass
425             pass
426         res += chr(val)
427         pass
428     return res
429
430 ## Read bitmap texture from the text file.
431 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
432 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
433 ## The function returns width and height of the pixmap in pixels and byte stream representing
434 ## texture bitmap itself.
435 ##
436 ## This function can be used to read the texture to the byte stream in order to pass it to
437 ## the AddTexture() function of geomBuilder class.
438 ## For example,
439 ## \code
440 ## from salome.geom import geomBuilder
441 ## geompy = geomBuilder.New(salome.myStudy)
442 ## texture = geompy.readtexture('mytexture.dat')
443 ## texture = geompy.AddTexture(*texture)
444 ## obj.SetMarkerTexture(texture)
445 ## \endcode
446 ## @param fname texture file name
447 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
448 ## @ingroup l1_geomBuilder_auxiliary
449 def ReadTexture(fname):
450     """
451     Read bitmap texture from the text file.
452     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
453     A zero symbol ('0') represents transparent pixel of the texture bitmap.
454     The function returns width and height of the pixmap in pixels and byte stream representing
455     texture bitmap itself.
456     This function can be used to read the texture to the byte stream in order to pass it to
457     the AddTexture() function of geomBuilder class.
458
459     Parameters:
460         fname texture file name
461
462     Returns:
463         sequence of tree values: texture's width, height in pixels and its byte stream
464
465     Example of usage:
466         from salome.geom import geomBuilder
467         geompy = geomBuilder.New(salome.myStudy)
468         texture = geompy.readtexture('mytexture.dat')
469         texture = geompy.AddTexture(*texture)
470         obj.SetMarkerTexture(texture)
471     """
472     try:
473         f = open(fname)
474         lines = [ l.strip() for l in f.readlines()]
475         f.close()
476         maxlen = 0
477         if lines: maxlen = max([len(x) for x in lines])
478         lenbytes = maxlen/8
479         if maxlen%8: lenbytes += 1
480         bytedata=""
481         for line in lines:
482             if len(line)%8:
483                 lenline = (len(line)/8+1)*8
484                 pass
485             else:
486                 lenline = (len(line)/8)*8
487                 pass
488             for i in range(lenline/8):
489                 byte=""
490                 for j in range(8):
491                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
492                     else: byte += "0"
493                     pass
494                 bytedata += PackData(byte)
495                 pass
496             for i in range(lenline/8, lenbytes):
497                 bytedata += PackData("0")
498             pass
499         return lenbytes*8, len(lines), bytedata
500     except:
501         pass
502     return 0, 0, ""
503
504 ## Returns a long value from enumeration type
505 #  Can be used for CORBA enumerator types like GEOM.shape_type
506 #  @param theItem enumeration type
507 #  @ingroup l1_geomBuilder_auxiliary
508 def EnumToLong(theItem):
509     """
510     Returns a long value from enumeration type
511     Can be used for CORBA enumerator types like geomBuilder.ShapeType
512
513     Parameters:
514         theItem enumeration type
515     """
516     ret = theItem
517     if hasattr(theItem, "_v"): ret = theItem._v
518     return ret
519
520 ## Pack an argument into a list
521 def ToList( arg ):
522     if isinstance( arg, list ):
523         return arg
524     if hasattr( arg, "__getitem__" ):
525         return list( arg )
526     return [ arg ]
527
528 ## Information about closed/unclosed state of shell or wire
529 #  @ingroup l1_geomBuilder_auxiliary
530 class info:
531     """
532     Information about closed/unclosed state of shell or wire
533     """
534     UNKNOWN  = 0
535     CLOSED   = 1
536     UNCLOSED = 2
537
538 ## Private class used to bind calls of plugin operations to geomBuilder
539 class PluginOperation:
540   def __init__(self, operation, function):
541     self.operation = operation
542     self.function = function
543     pass
544
545   @ManageTransactions("operation")
546   def __call__(self, *args):
547     res = self.function(self.operation, *args)
548     RaiseIfFailed(self.function.__name__, self.operation)
549     return res
550
551 # Warning: geom is a singleton
552 geom = None
553 engine = None
554 doLcc = False
555 created = False
556
557 class geomBuilder(object, GEOM._objref_GEOM_Gen):
558
559         ## Enumeration ShapeType as a dictionary. \n
560         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
561         #  @ingroup l1_geomBuilder_auxiliary
562         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8, "FLAT":9}
563
564         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
565         #  and a list of parameters, describing the shape.
566         #  List of parameters, describing the shape:
567         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
568         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
569         #
570         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
571         #
572         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
573         #
574         #  - SPHERE:       [xc yc zc            R]
575         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
576         #  - BOX:          [xc yc zc                      ax ay az]
577         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
578         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
579         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
580         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
581         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
582         #
583         #  - SPHERE2D:     [xc yc zc            R]
584         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
585         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
586         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
587         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
588         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
589         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
590         #  - PLANE:        [xo yo zo  dx dy dz]
591         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
592         #  - FACE:                                       [nb_edges  nb_vertices]
593         #
594         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
595         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
596         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
597         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
598         #  - LINE:         [xo yo zo  dx dy dz]
599         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
600         #  - EDGE:                                                 [nb_vertices]
601         #
602         #  - VERTEX:       [x  y  z]
603         #  @ingroup l1_geomBuilder_auxiliary
604         kind = GEOM.GEOM_IKindOfShape
605
606         def __new__(cls):
607             global engine
608             global geom
609             global doLcc
610             global created
611             #print "==== __new__ ", engine, geom, doLcc, created
612             if geom is None:
613                 # geom engine is either retrieved from engine, or created
614                 geom = engine
615                 # Following test avoids a recursive loop
616                 if doLcc:
617                     if geom is not None:
618                         # geom engine not created: existing engine found
619                         doLcc = False
620                     if doLcc and not created:
621                         doLcc = False
622                         # FindOrLoadComponent called:
623                         # 1. CORBA resolution of server
624                         # 2. the __new__ method is called again
625                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
626                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
627                         #print "====1 ",geom
628                 else:
629                     # FindOrLoadComponent not called
630                     if geom is None:
631                         # geomBuilder instance is created from lcc.FindOrLoadComponent
632                         #print "==== super ", engine, geom, doLcc, created
633                         geom = super(geomBuilder,cls).__new__(cls)
634                         #print "====2 ",geom
635                     else:
636                         # geom engine not created: existing engine found
637                         #print "==== existing ", engine, geom, doLcc, created
638                         pass
639                 #print "return geom 1 ", geom
640                 return geom
641
642             #print "return geom 2 ", geom
643             return geom
644
645         def __init__(self):
646             global created
647             #print "-------- geomBuilder __init__ --- ", created, self
648             if not created:
649               created = True
650               GEOM._objref_GEOM_Gen.__init__(self)
651               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
652               self.myBuilder = None
653               self.myStudyId = 0
654               self.father    = None
655
656               self.BasicOp  = None
657               self.CurvesOp = None
658               self.PrimOp   = None
659               self.ShapesOp = None
660               self.HealOp   = None
661               self.InsertOp = None
662               self.BoolOp   = None
663               self.TrsfOp   = None
664               self.LocalOp  = None
665               self.MeasuOp  = None
666               self.BlocksOp = None
667               self.GroupOp  = None
668               self.FieldOp  = None
669             pass
670
671         ## Process object publication in the study, as follows:
672         #  - if @a theName is specified (not None), the object is published in the study
673         #    with this name, not taking into account "auto-publishing" option;
674         #  - if @a theName is NOT specified, the object is published in the study
675         #    (using default name, which can be customized using @a theDefaultName parameter)
676         #    only if auto-publishing is switched on.
677         #
678         #  @param theObj  object, a subject for publishing
679         #  @param theName object name for study
680         #  @param theDefaultName default name for the auto-publishing
681         #
682         #  @sa addToStudyAuto()
683         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
684             # ---
685             def _item_name(_names, _defname, _idx=-1):
686                 if not _names: _names = _defname
687                 if type(_names) in [types.ListType, types.TupleType]:
688                     if _idx >= 0:
689                         if _idx >= len(_names) or not _names[_idx]:
690                             if type(_defname) not in [types.ListType, types.TupleType]:
691                                 _name = "%s_%d"%(_defname, _idx+1)
692                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
693                                 _name = _defname[_idx]
694                             else:
695                                 _name = "%noname_%d"%(dn, _idx+1)
696                             pass
697                         else:
698                             _name = _names[_idx]
699                         pass
700                     else:
701                         # must be wrong  usage
702                         _name = _names[0]
703                     pass
704                 else:
705                     if _idx >= 0:
706                         _name = "%s_%d"%(_names, _idx+1)
707                     else:
708                         _name = _names
709                     pass
710                 return _name
711             # ---
712             def _publish( _name, _obj ):
713                 fatherObj = None
714                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
715                     fatherObj = _obj.GetShape()
716                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
717                     fatherObj = _obj.GetField()
718                 elif not _obj.IsMainShape():
719                     fatherObj = _obj.GetMainShape()
720                     pass
721                 if fatherObj and fatherObj.GetStudyEntry():
722                     self.addToStudyInFather(fatherObj, _obj, _name)
723                 else:
724                     self.addToStudy(_obj, _name)
725                     pass
726                 return
727             # ---
728             if not theObj:
729                 return # null object
730             if not theName and not self.myMaxNbSubShapesAllowed:
731                 return # nothing to do: auto-publishing is disabled
732             if not theName and not theDefaultName:
733                 return # neither theName nor theDefaultName is given
734             import types
735             if type(theObj) in [types.ListType, types.TupleType]:
736                 # list of objects is being published
737                 idx = 0
738                 for obj in theObj:
739                     if not obj: continue # bad object
740                     name = _item_name(theName, theDefaultName, idx)
741                     _publish( name, obj )
742                     idx = idx+1
743                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
744                     pass
745                 pass
746             else:
747                 # single object is published
748                 name = _item_name(theName, theDefaultName)
749                 _publish( name, theObj )
750             pass
751
752         ## @addtogroup l1_geomBuilder_auxiliary
753         ## @{
754         def init_geom(self,theStudy):
755             self.myStudy = theStudy
756             self.myStudyId = self.myStudy._get_StudyId()
757             self.myBuilder = self.myStudy.NewBuilder()
758             self.father = self.myStudy.FindComponent("GEOM")
759             notebook.myStudy = theStudy
760             if self.father is None:
761                 self.father = self.myBuilder.NewComponent("GEOM")
762                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
763                 FName = A1._narrow(SALOMEDS.AttributeName)
764                 FName.SetValue("Geometry")
765                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
766                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
767                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
768                 self.myBuilder.DefineComponentInstance(self.father,self)
769                 pass
770             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
771             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
772             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
773             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
774             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
775             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
776             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
777             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
778             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
779             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
780             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
781             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
782             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
783
784             # set GEOM as root in the use case tree
785             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
786             self.myUseCaseBuilder.SetRootCurrent()
787             self.myUseCaseBuilder.Append(self.father)
788             pass
789
790         def GetPluginOperations(self, studyID, libraryName):
791             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
792             return op
793
794         ## Enable / disable results auto-publishing
795         #
796         #  The automatic publishing is managed in the following way:
797         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
798         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
799         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
800         #  value passed as parameter has the same effect.
801         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
802         #  maximum number of sub-shapes allowed for publishing is set to specified value.
803         #
804         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
805         #  @ingroup l1_publish_data
806         def addToStudyAuto(self, maxNbSubShapes=-1):
807             """
808             Enable / disable results auto-publishing
809
810             The automatic publishing is managed in the following way:
811             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
812             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
813             maximum number of sub-shapes allowed for publishing is unlimited; any negative
814             value passed as parameter has the same effect.
815             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
816             maximum number of sub-shapes allowed for publishing is set to this value.
817
818             Parameters:
819                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
820
821             Example of usage:
822                 geompy.addToStudyAuto()   # enable auto-publishing
823                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
824                 geompy.addToStudyAuto(0)  # disable auto-publishing
825             """
826             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
827             pass
828
829         ## Dump component to the Python script
830         #  This method overrides IDL function to allow default values for the parameters.
831         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
832             """
833             Dump component to the Python script
834             This method overrides IDL function to allow default values for the parameters.
835             """
836             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
837
838         ## Get name for sub-shape aSubObj of shape aMainObj
839         #
840         # @ref swig_SubShapeName "Example"
841         @ManageTransactions("ShapesOp")
842         def SubShapeName(self,aSubObj, aMainObj):
843             """
844             Get name for sub-shape aSubObj of shape aMainObj
845             """
846             # Example: see GEOM_TestAll.py
847
848             #aSubId  = orb.object_to_string(aSubObj)
849             #aMainId = orb.object_to_string(aMainObj)
850             #index = gg.getIndexTopology(aSubId, aMainId)
851             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
852             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
853             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
854             return name
855
856         ## Publish in study aShape with name aName
857         #
858         #  \param aShape the shape to be published
859         #  \param aName  the name for the shape
860         #  \param doRestoreSubShapes if True, finds and publishes also
861         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
862         #         and published sub-shapes of arguments
863         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
864         #                                                  these arguments description
865         #  \return study entry of the published shape in form of string
866         #
867         #  @ingroup l1_publish_data
868         #  @ref swig_all_addtostudy "Example"
869         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
870                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
871             """
872             Publish in study aShape with name aName
873
874             Parameters:
875                 aShape the shape to be published
876                 aName  the name for the shape
877                 doRestoreSubShapes if True, finds and publishes also
878                                    sub-shapes of aShape, corresponding to its arguments
879                                    and published sub-shapes of arguments
880                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
881                                                          these arguments description
882
883             Returns:
884                 study entry of the published shape in form of string
885
886             Example of usage:
887                 id_block1 = geompy.addToStudy(Block1, "Block 1")
888             """
889             # Example: see GEOM_TestAll.py
890             try:
891                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
892                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
893                 if doRestoreSubShapes:
894                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
895                                             theFindMethod, theInheritFirstArg, True )
896             except:
897                 print "addToStudy() failed"
898                 return ""
899             return aShape.GetStudyEntry()
900
901         ## Publish in study aShape with name aName as sub-object of previously published aFather
902         #  \param aFather previously published object
903         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
904         #  \param aName  the name for the shape
905         #
906         #  \return study entry of the published shape in form of string
907         #
908         #  @ingroup l1_publish_data
909         #  @ref swig_all_addtostudyInFather "Example"
910         def addToStudyInFather(self, aFather, aShape, aName):
911             """
912             Publish in study aShape with name aName as sub-object of previously published aFather
913
914             Parameters:
915                 aFather previously published object
916                 aShape the shape to be published as sub-object of aFather
917                 aName  the name for the shape
918
919             Returns:
920                 study entry of the published shape in form of string
921             """
922             # Example: see GEOM_TestAll.py
923             try:
924                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
925                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
926             except:
927                 print "addToStudyInFather() failed"
928                 return ""
929             return aShape.GetStudyEntry()
930
931         ## Unpublish object in study
932         #
933         #  \param obj the object to be unpublished
934         def hideInStudy(self, obj):
935             """
936             Unpublish object in study
937
938             Parameters:
939                 obj the object to be unpublished
940             """
941             ior = salome.orb.object_to_string(obj)
942             aSObject = self.myStudy.FindObjectIOR(ior)
943             if aSObject is not None:
944                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
945                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
946                 drwAttribute.SetDrawable(False)
947                 # hide references if any
948                 vso = self.myStudy.FindDependances(aSObject);
949                 for refObj in vso :
950                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
951                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
952                     drwAttribute.SetDrawable(False)
953                     pass
954                 pass
955
956         # end of l1_geomBuilder_auxiliary
957         ## @}
958
959         ## @addtogroup l3_restore_ss
960         ## @{
961
962         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
963         #  To be used from python scripts out of addToStudy() (non-default usage)
964         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
965         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
966         #                   If this list is empty, all operation arguments will be published
967         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
968         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
969         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
970         #                            Do not publish sub-shapes in place of arguments, but only
971         #                            in place of sub-shapes of the first argument,
972         #                            because the whole shape corresponds to the first argument.
973         #                            Mainly to be used after transformations, but it also can be
974         #                            usefull after partition with one object shape, and some other
975         #                            operations, where only the first argument has to be considered.
976         #                            If theObject has only one argument shape, this flag is automatically
977         #                            considered as True, not regarding really passed value.
978         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
979         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
980         #  \return list of published sub-shapes
981         #
982         #  @ref tui_restore_prs_params "Example"
983         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
984                               theInheritFirstArg=False, theAddPrefix=True):
985             """
986             Publish sub-shapes, standing for arguments and sub-shapes of arguments
987             To be used from python scripts out of geompy.addToStudy (non-default usage)
988
989             Parameters:
990                 theObject published GEOM.GEOM_Object, arguments of which will be published
991                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
992                           If this list is empty, all operation arguments will be published
993                 theFindMethod method to search sub-shapes, corresponding to arguments and
994                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
995                 theInheritFirstArg set properties of the first argument for theObject.
996                                    Do not publish sub-shapes in place of arguments, but only
997                                    in place of sub-shapes of the first argument,
998                                    because the whole shape corresponds to the first argument.
999                                    Mainly to be used after transformations, but it also can be
1000                                    usefull after partition with one object shape, and some other
1001                                    operations, where only the first argument has to be considered.
1002                                    If theObject has only one argument shape, this flag is automatically
1003                                    considered as True, not regarding really passed value.
1004                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1005                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1006             Returns:
1007                 list of published sub-shapes
1008             """
1009             # Example: see GEOM_TestAll.py
1010             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
1011                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1012
1013         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1014         #  To be used from python scripts out of addToStudy() (non-default usage)
1015         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1016         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1017         #                   If this list is empty, all operation arguments will be published
1018         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1019         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1020         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1021         #                            Do not publish sub-shapes in place of arguments, but only
1022         #                            in place of sub-shapes of the first argument,
1023         #                            because the whole shape corresponds to the first argument.
1024         #                            Mainly to be used after transformations, but it also can be
1025         #                            usefull after partition with one object shape, and some other
1026         #                            operations, where only the first argument has to be considered.
1027         #                            If theObject has only one argument shape, this flag is automatically
1028         #                            considered as True, not regarding really passed value.
1029         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1030         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1031         #  \return list of published sub-shapes
1032         #
1033         #  @ref tui_restore_prs_params "Example"
1034         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1035                                    theInheritFirstArg=False, theAddPrefix=True):
1036             """
1037             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1038             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1039
1040             Parameters:
1041                 theObject published GEOM.GEOM_Object, arguments of which will be published
1042                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1043                           If this list is empty, all operation arguments will be published
1044                 theFindMethod method to search sub-shapes, corresponding to arguments and
1045                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1046                 theInheritFirstArg set properties of the first argument for theObject.
1047                                    Do not publish sub-shapes in place of arguments, but only
1048                                    in place of sub-shapes of the first argument,
1049                                    because the whole shape corresponds to the first argument.
1050                                    Mainly to be used after transformations, but it also can be
1051                                    usefull after partition with one object shape, and some other
1052                                    operations, where only the first argument has to be considered.
1053                                    If theObject has only one argument shape, this flag is automatically
1054                                    considered as True, not regarding really passed value.
1055                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1056                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1057
1058             Returns:
1059                 list of published sub-shapes
1060             """
1061             # Example: see GEOM_TestAll.py
1062             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1063                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1064
1065         # end of l3_restore_ss
1066         ## @}
1067
1068         ## @addtogroup l3_basic_go
1069         ## @{
1070
1071         ## Create point by three coordinates.
1072         #  @param theX The X coordinate of the point.
1073         #  @param theY The Y coordinate of the point.
1074         #  @param theZ The Z coordinate of the point.
1075         #  @param theName Object name; when specified, this parameter is used
1076         #         for result publication in the study. Otherwise, if automatic
1077         #         publication is switched on, default value is used for result name.
1078         #
1079         #  @return New GEOM.GEOM_Object, containing the created point.
1080         #
1081         #  @ref tui_creation_point "Example"
1082         @ManageTransactions("BasicOp")
1083         def MakeVertex(self, theX, theY, theZ, theName=None):
1084             """
1085             Create point by three coordinates.
1086
1087             Parameters:
1088                 theX The X coordinate of the point.
1089                 theY The Y coordinate of the point.
1090                 theZ The Z coordinate of the point.
1091                 theName Object name; when specified, this parameter is used
1092                         for result publication in the study. Otherwise, if automatic
1093                         publication is switched on, default value is used for result name.
1094
1095             Returns:
1096                 New GEOM.GEOM_Object, containing the created point.
1097             """
1098             # Example: see GEOM_TestAll.py
1099             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1100             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1101             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1102             anObj.SetParameters(Parameters)
1103             self._autoPublish(anObj, theName, "vertex")
1104             return anObj
1105
1106         ## Create a point, distant from the referenced point
1107         #  on the given distances along the coordinate axes.
1108         #  @param theReference The referenced point.
1109         #  @param theX Displacement from the referenced point along OX axis.
1110         #  @param theY Displacement from the referenced point along OY axis.
1111         #  @param theZ Displacement from the referenced point along OZ axis.
1112         #  @param theName Object name; when specified, this parameter is used
1113         #         for result publication in the study. Otherwise, if automatic
1114         #         publication is switched on, default value is used for result name.
1115         #
1116         #  @return New GEOM.GEOM_Object, containing the created point.
1117         #
1118         #  @ref tui_creation_point "Example"
1119         @ManageTransactions("BasicOp")
1120         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1121             """
1122             Create a point, distant from the referenced point
1123             on the given distances along the coordinate axes.
1124
1125             Parameters:
1126                 theReference The referenced point.
1127                 theX Displacement from the referenced point along OX axis.
1128                 theY Displacement from the referenced point along OY axis.
1129                 theZ Displacement from the referenced point along OZ axis.
1130                 theName Object name; when specified, this parameter is used
1131                         for result publication in the study. Otherwise, if automatic
1132                         publication is switched on, default value is used for result name.
1133
1134             Returns:
1135                 New GEOM.GEOM_Object, containing the created point.
1136             """
1137             # Example: see GEOM_TestAll.py
1138             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1139             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1140             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1141             anObj.SetParameters(Parameters)
1142             self._autoPublish(anObj, theName, "vertex")
1143             return anObj
1144
1145         ## Create a point, corresponding to the given parameter on the given curve.
1146         #  @param theRefCurve The referenced curve.
1147         #  @param theParameter Value of parameter on the referenced curve.
1148         #  @param theName Object name; when specified, this parameter is used
1149         #         for result publication in the study. Otherwise, if automatic
1150         #         publication is switched on, default value is used for result name.
1151         #
1152         #  @return New GEOM.GEOM_Object, containing the created point.
1153         #
1154         #  @ref tui_creation_point "Example"
1155         @ManageTransactions("BasicOp")
1156         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1157             """
1158             Create a point, corresponding to the given parameter on the given curve.
1159
1160             Parameters:
1161                 theRefCurve The referenced curve.
1162                 theParameter Value of parameter on the referenced curve.
1163                 theName Object name; when specified, this parameter is used
1164                         for result publication in the study. Otherwise, if automatic
1165                         publication is switched on, default value is used for result name.
1166
1167             Returns:
1168                 New GEOM.GEOM_Object, containing the created point.
1169
1170             Example of usage:
1171                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1172             """
1173             # Example: see GEOM_TestAll.py
1174             theParameter, Parameters = ParseParameters(theParameter)
1175             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1176             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1177             anObj.SetParameters(Parameters)
1178             self._autoPublish(anObj, theName, "vertex")
1179             return anObj
1180
1181         ## Create a point by projection give coordinates on the given curve
1182         #  @param theRefCurve The referenced curve.
1183         #  @param theX X-coordinate in 3D space
1184         #  @param theY Y-coordinate in 3D space
1185         #  @param theZ Z-coordinate in 3D space
1186         #  @param theName Object name; when specified, this parameter is used
1187         #         for result publication in the study. Otherwise, if automatic
1188         #         publication is switched on, default value is used for result name.
1189         #
1190         #  @return New GEOM.GEOM_Object, containing the created point.
1191         #
1192         #  @ref tui_creation_point "Example"
1193         @ManageTransactions("BasicOp")
1194         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1195             """
1196             Create a point by projection give coordinates on the given curve
1197
1198             Parameters:
1199                 theRefCurve The referenced curve.
1200                 theX X-coordinate in 3D space
1201                 theY Y-coordinate in 3D space
1202                 theZ Z-coordinate in 3D space
1203                 theName Object name; when specified, this parameter is used
1204                         for result publication in the study. Otherwise, if automatic
1205                         publication is switched on, default value is used for result name.
1206
1207             Returns:
1208                 New GEOM.GEOM_Object, containing the created point.
1209
1210             Example of usage:
1211                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1212             """
1213             # Example: see GEOM_TestAll.py
1214             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1215             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1216             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1217             anObj.SetParameters(Parameters)
1218             self._autoPublish(anObj, theName, "vertex")
1219             return anObj
1220
1221         ## Create a point, corresponding to the given length on the given curve.
1222         #  @param theRefCurve The referenced curve.
1223         #  @param theLength Length on the referenced curve. It can be negative.
1224         #  @param theStartPoint Point allowing to choose the direction for the calculation
1225         #                       of the length. If None, start from the first point of theRefCurve.
1226         #  @param theName Object name; when specified, this parameter is used
1227         #         for result publication in the study. Otherwise, if automatic
1228         #         publication is switched on, default value is used for result name.
1229         #
1230         #  @return New GEOM.GEOM_Object, containing the created point.
1231         #
1232         #  @ref tui_creation_point "Example"
1233         @ManageTransactions("BasicOp")
1234         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1235             """
1236             Create a point, corresponding to the given length on the given curve.
1237
1238             Parameters:
1239                 theRefCurve The referenced curve.
1240                 theLength Length on the referenced curve. It can be negative.
1241                 theStartPoint Point allowing to choose the direction for the calculation
1242                               of the length. If None, start from the first point of theRefCurve.
1243                 theName Object name; when specified, this parameter is used
1244                         for result publication in the study. Otherwise, if automatic
1245                         publication is switched on, default value is used for result name.
1246
1247             Returns:
1248                 New GEOM.GEOM_Object, containing the created point.
1249             """
1250             # Example: see GEOM_TestAll.py
1251             theLength, Parameters = ParseParameters(theLength)
1252             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1253             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1254             anObj.SetParameters(Parameters)
1255             self._autoPublish(anObj, theName, "vertex")
1256             return anObj
1257
1258         ## Create a point, corresponding to the given parameters on the
1259         #    given surface.
1260         #  @param theRefSurf The referenced surface.
1261         #  @param theUParameter Value of U-parameter on the referenced surface.
1262         #  @param theVParameter Value of V-parameter on the referenced surface.
1263         #  @param theName Object name; when specified, this parameter is used
1264         #         for result publication in the study. Otherwise, if automatic
1265         #         publication is switched on, default value is used for result name.
1266         #
1267         #  @return New GEOM.GEOM_Object, containing the created point.
1268         #
1269         #  @ref swig_MakeVertexOnSurface "Example"
1270         @ManageTransactions("BasicOp")
1271         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1272             """
1273             Create a point, corresponding to the given parameters on the
1274             given surface.
1275
1276             Parameters:
1277                 theRefSurf The referenced surface.
1278                 theUParameter Value of U-parameter on the referenced surface.
1279                 theVParameter Value of V-parameter on the referenced surface.
1280                 theName Object name; when specified, this parameter is used
1281                         for result publication in the study. Otherwise, if automatic
1282                         publication is switched on, default value is used for result name.
1283
1284             Returns:
1285                 New GEOM.GEOM_Object, containing the created point.
1286
1287             Example of usage:
1288                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1289             """
1290             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1291             # Example: see GEOM_TestAll.py
1292             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1293             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1294             anObj.SetParameters(Parameters);
1295             self._autoPublish(anObj, theName, "vertex")
1296             return anObj
1297
1298         ## Create a point by projection give coordinates on the given surface
1299         #  @param theRefSurf The referenced surface.
1300         #  @param theX X-coordinate in 3D space
1301         #  @param theY Y-coordinate in 3D space
1302         #  @param theZ Z-coordinate in 3D space
1303         #  @param theName Object name; when specified, this parameter is used
1304         #         for result publication in the study. Otherwise, if automatic
1305         #         publication is switched on, default value is used for result name.
1306         #
1307         #  @return New GEOM.GEOM_Object, containing the created point.
1308         #
1309         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1310         @ManageTransactions("BasicOp")
1311         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1312             """
1313             Create a point by projection give coordinates on the given surface
1314
1315             Parameters:
1316                 theRefSurf The referenced surface.
1317                 theX X-coordinate in 3D space
1318                 theY Y-coordinate in 3D space
1319                 theZ Z-coordinate in 3D space
1320                 theName Object name; when specified, this parameter is used
1321                         for result publication in the study. Otherwise, if automatic
1322                         publication is switched on, default value is used for result name.
1323
1324             Returns:
1325                 New GEOM.GEOM_Object, containing the created point.
1326
1327             Example of usage:
1328                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1329             """
1330             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1331             # Example: see GEOM_TestAll.py
1332             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1333             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1334             anObj.SetParameters(Parameters);
1335             self._autoPublish(anObj, theName, "vertex")
1336             return anObj
1337
1338         ## Create a point, which lays on the given face.
1339         #  The point will lay in arbitrary place of the face.
1340         #  The only condition on it is a non-zero distance to the face boundary.
1341         #  Such point can be used to uniquely identify the face inside any
1342         #  shape in case, when the shape does not contain overlapped faces.
1343         #  @param theFace The referenced face.
1344         #  @param theName Object name; when specified, this parameter is used
1345         #         for result publication in the study. Otherwise, if automatic
1346         #         publication is switched on, default value is used for result name.
1347         #
1348         #  @return New GEOM.GEOM_Object, containing the created point.
1349         #
1350         #  @ref swig_MakeVertexInsideFace "Example"
1351         @ManageTransactions("BasicOp")
1352         def MakeVertexInsideFace (self, theFace, theName=None):
1353             """
1354             Create a point, which lays on the given face.
1355             The point will lay in arbitrary place of the face.
1356             The only condition on it is a non-zero distance to the face boundary.
1357             Such point can be used to uniquely identify the face inside any
1358             shape in case, when the shape does not contain overlapped faces.
1359
1360             Parameters:
1361                 theFace The referenced face.
1362                 theName Object name; when specified, this parameter is used
1363                         for result publication in the study. Otherwise, if automatic
1364                         publication is switched on, default value is used for result name.
1365
1366             Returns:
1367                 New GEOM.GEOM_Object, containing the created point.
1368
1369             Example of usage:
1370                 p_on_face = geompy.MakeVertexInsideFace(Face)
1371             """
1372             # Example: see GEOM_TestAll.py
1373             anObj = self.BasicOp.MakePointOnFace(theFace)
1374             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1375             self._autoPublish(anObj, theName, "vertex")
1376             return anObj
1377
1378         ## Create a point on intersection of two lines.
1379         #  @param theRefLine1, theRefLine2 The referenced lines.
1380         #  @param theName Object name; when specified, this parameter is used
1381         #         for result publication in the study. Otherwise, if automatic
1382         #         publication is switched on, default value is used for result name.
1383         #
1384         #  @return New GEOM.GEOM_Object, containing the created point.
1385         #
1386         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1387         @ManageTransactions("BasicOp")
1388         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1389             """
1390             Create a point on intersection of two lines.
1391
1392             Parameters:
1393                 theRefLine1, theRefLine2 The referenced lines.
1394                 theName Object name; when specified, this parameter is used
1395                         for result publication in the study. Otherwise, if automatic
1396                         publication is switched on, default value is used for result name.
1397
1398             Returns:
1399                 New GEOM.GEOM_Object, containing the created point.
1400             """
1401             # Example: see GEOM_TestAll.py
1402             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1403             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1404             self._autoPublish(anObj, theName, "vertex")
1405             return anObj
1406
1407         ## Create a tangent, corresponding to the given parameter on the given curve.
1408         #  @param theRefCurve The referenced curve.
1409         #  @param theParameter Value of parameter on the referenced curve.
1410         #  @param theName Object name; when specified, this parameter is used
1411         #         for result publication in the study. Otherwise, if automatic
1412         #         publication is switched on, default value is used for result name.
1413         #
1414         #  @return New GEOM.GEOM_Object, containing the created tangent.
1415         #
1416         #  @ref swig_MakeTangentOnCurve "Example"
1417         @ManageTransactions("BasicOp")
1418         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1419             """
1420             Create a tangent, corresponding to the given parameter on the given curve.
1421
1422             Parameters:
1423                 theRefCurve The referenced curve.
1424                 theParameter Value of parameter on the referenced curve.
1425                 theName Object name; when specified, this parameter is used
1426                         for result publication in the study. Otherwise, if automatic
1427                         publication is switched on, default value is used for result name.
1428
1429             Returns:
1430                 New GEOM.GEOM_Object, containing the created tangent.
1431
1432             Example of usage:
1433                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1434             """
1435             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1436             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1437             self._autoPublish(anObj, theName, "tangent")
1438             return anObj
1439
1440         ## Create a tangent plane, corresponding to the given parameter on the given face.
1441         #  @param theFace The face for which tangent plane should be built.
1442         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1443         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1444         #  @param theTrimSize the size of plane.
1445         #  @param theName Object name; when specified, this parameter is used
1446         #         for result publication in the study. Otherwise, if automatic
1447         #         publication is switched on, default value is used for result name.
1448         #
1449         #  @return New GEOM.GEOM_Object, containing the created tangent.
1450         #
1451         #  @ref swig_MakeTangentPlaneOnFace "Example"
1452         @ManageTransactions("BasicOp")
1453         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1454             """
1455             Create a tangent plane, corresponding to the given parameter on the given face.
1456
1457             Parameters:
1458                 theFace The face for which tangent plane should be built.
1459                 theParameterV vertical value of the center point (0.0 - 1.0).
1460                 theParameterU horisontal value of the center point (0.0 - 1.0).
1461                 theTrimSize the size of plane.
1462                 theName Object name; when specified, this parameter is used
1463                         for result publication in the study. Otherwise, if automatic
1464                         publication is switched on, default value is used for result name.
1465
1466            Returns:
1467                 New GEOM.GEOM_Object, containing the created tangent.
1468
1469            Example of usage:
1470                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1471             """
1472             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1473             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1474             self._autoPublish(anObj, theName, "tangent")
1475             return anObj
1476
1477         ## Create a vector with the given components.
1478         #  @param theDX X component of the vector.
1479         #  @param theDY Y component of the vector.
1480         #  @param theDZ Z component of the vector.
1481         #  @param theName Object name; when specified, this parameter is used
1482         #         for result publication in the study. Otherwise, if automatic
1483         #         publication is switched on, default value is used for result name.
1484         #
1485         #  @return New GEOM.GEOM_Object, containing the created vector.
1486         #
1487         #  @ref tui_creation_vector "Example"
1488         @ManageTransactions("BasicOp")
1489         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1490             """
1491             Create a vector with the given components.
1492
1493             Parameters:
1494                 theDX X component of the vector.
1495                 theDY Y component of the vector.
1496                 theDZ Z component of the vector.
1497                 theName Object name; when specified, this parameter is used
1498                         for result publication in the study. Otherwise, if automatic
1499                         publication is switched on, default value is used for result name.
1500
1501             Returns:
1502                 New GEOM.GEOM_Object, containing the created vector.
1503             """
1504             # Example: see GEOM_TestAll.py
1505             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1506             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1507             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1508             anObj.SetParameters(Parameters)
1509             self._autoPublish(anObj, theName, "vector")
1510             return anObj
1511
1512         ## Create a vector between two points.
1513         #  @param thePnt1 Start point for the vector.
1514         #  @param thePnt2 End point for the vector.
1515         #  @param theName Object name; when specified, this parameter is used
1516         #         for result publication in the study. Otherwise, if automatic
1517         #         publication is switched on, default value is used for result name.
1518         #
1519         #  @return New GEOM.GEOM_Object, containing the created vector.
1520         #
1521         #  @ref tui_creation_vector "Example"
1522         @ManageTransactions("BasicOp")
1523         def MakeVector(self, thePnt1, thePnt2, theName=None):
1524             """
1525             Create a vector between two points.
1526
1527             Parameters:
1528                 thePnt1 Start point for the vector.
1529                 thePnt2 End point for the vector.
1530                 theName Object name; when specified, this parameter is used
1531                         for result publication in the study. Otherwise, if automatic
1532                         publication is switched on, default value is used for result name.
1533
1534             Returns:
1535                 New GEOM.GEOM_Object, containing the created vector.
1536             """
1537             # Example: see GEOM_TestAll.py
1538             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1539             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1540             self._autoPublish(anObj, theName, "vector")
1541             return anObj
1542
1543         ## Create a line, passing through the given point
1544         #  and parrallel to the given direction
1545         #  @param thePnt Point. The resulting line will pass through it.
1546         #  @param theDir Direction. The resulting line will be parallel to it.
1547         #  @param theName Object name; when specified, this parameter is used
1548         #         for result publication in the study. Otherwise, if automatic
1549         #         publication is switched on, default value is used for result name.
1550         #
1551         #  @return New GEOM.GEOM_Object, containing the created line.
1552         #
1553         #  @ref tui_creation_line "Example"
1554         @ManageTransactions("BasicOp")
1555         def MakeLine(self, thePnt, theDir, theName=None):
1556             """
1557             Create a line, passing through the given point
1558             and parrallel to the given direction
1559
1560             Parameters:
1561                 thePnt Point. The resulting line will pass through it.
1562                 theDir Direction. The resulting line will be parallel to it.
1563                 theName Object name; when specified, this parameter is used
1564                         for result publication in the study. Otherwise, if automatic
1565                         publication is switched on, default value is used for result name.
1566
1567             Returns:
1568                 New GEOM.GEOM_Object, containing the created line.
1569             """
1570             # Example: see GEOM_TestAll.py
1571             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1572             RaiseIfFailed("MakeLine", self.BasicOp)
1573             self._autoPublish(anObj, theName, "line")
1574             return anObj
1575
1576         ## Create a line, passing through the given points
1577         #  @param thePnt1 First of two points, defining the line.
1578         #  @param thePnt2 Second of two points, defining the line.
1579         #  @param theName Object name; when specified, this parameter is used
1580         #         for result publication in the study. Otherwise, if automatic
1581         #         publication is switched on, default value is used for result name.
1582         #
1583         #  @return New GEOM.GEOM_Object, containing the created line.
1584         #
1585         #  @ref tui_creation_line "Example"
1586         @ManageTransactions("BasicOp")
1587         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1588             """
1589             Create a line, passing through the given points
1590
1591             Parameters:
1592                 thePnt1 First of two points, defining the line.
1593                 thePnt2 Second of two points, defining the line.
1594                 theName Object name; when specified, this parameter is used
1595                         for result publication in the study. Otherwise, if automatic
1596                         publication is switched on, default value is used for result name.
1597
1598             Returns:
1599                 New GEOM.GEOM_Object, containing the created line.
1600             """
1601             # Example: see GEOM_TestAll.py
1602             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1603             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1604             self._autoPublish(anObj, theName, "line")
1605             return anObj
1606
1607         ## Create a line on two faces intersection.
1608         #  @param theFace1 First of two faces, defining the line.
1609         #  @param theFace2 Second of two faces, defining the line.
1610         #  @param theName Object name; when specified, this parameter is used
1611         #         for result publication in the study. Otherwise, if automatic
1612         #         publication is switched on, default value is used for result name.
1613         #
1614         #  @return New GEOM.GEOM_Object, containing the created line.
1615         #
1616         #  @ref swig_MakeLineTwoFaces "Example"
1617         @ManageTransactions("BasicOp")
1618         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1619             """
1620             Create a line on two faces intersection.
1621
1622             Parameters:
1623                 theFace1 First of two faces, defining the line.
1624                 theFace2 Second of two faces, defining the line.
1625                 theName Object name; when specified, this parameter is used
1626                         for result publication in the study. Otherwise, if automatic
1627                         publication is switched on, default value is used for result name.
1628
1629             Returns:
1630                 New GEOM.GEOM_Object, containing the created line.
1631             """
1632             # Example: see GEOM_TestAll.py
1633             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1634             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1635             self._autoPublish(anObj, theName, "line")
1636             return anObj
1637
1638         ## Create a plane, passing through the given point
1639         #  and normal to the given vector.
1640         #  @param thePnt Point, the plane has to pass through.
1641         #  @param theVec Vector, defining the plane normal direction.
1642         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1643         #  @param theName Object name; when specified, this parameter is used
1644         #         for result publication in the study. Otherwise, if automatic
1645         #         publication is switched on, default value is used for result name.
1646         #
1647         #  @return New GEOM.GEOM_Object, containing the created plane.
1648         #
1649         #  @ref tui_creation_plane "Example"
1650         @ManageTransactions("BasicOp")
1651         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1652             """
1653             Create a plane, passing through the given point
1654             and normal to the given vector.
1655
1656             Parameters:
1657                 thePnt Point, the plane has to pass through.
1658                 theVec Vector, defining the plane normal direction.
1659                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1660                 theName Object name; when specified, this parameter is used
1661                         for result publication in the study. Otherwise, if automatic
1662                         publication is switched on, default value is used for result name.
1663
1664             Returns:
1665                 New GEOM.GEOM_Object, containing the created plane.
1666             """
1667             # Example: see GEOM_TestAll.py
1668             theTrimSize, Parameters = ParseParameters(theTrimSize);
1669             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1670             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1671             anObj.SetParameters(Parameters)
1672             self._autoPublish(anObj, theName, "plane")
1673             return anObj
1674
1675         ## Create a plane, passing through the three given points
1676         #  @param thePnt1 First of three points, defining the plane.
1677         #  @param thePnt2 Second of three points, defining the plane.
1678         #  @param thePnt3 Fird of three points, defining the plane.
1679         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1680         #  @param theName Object name; when specified, this parameter is used
1681         #         for result publication in the study. Otherwise, if automatic
1682         #         publication is switched on, default value is used for result name.
1683         #
1684         #  @return New GEOM.GEOM_Object, containing the created plane.
1685         #
1686         #  @ref tui_creation_plane "Example"
1687         @ManageTransactions("BasicOp")
1688         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1689             """
1690             Create a plane, passing through the three given points
1691
1692             Parameters:
1693                 thePnt1 First of three points, defining the plane.
1694                 thePnt2 Second of three points, defining the plane.
1695                 thePnt3 Fird of three points, defining the plane.
1696                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1697                 theName Object name; when specified, this parameter is used
1698                         for result publication in the study. Otherwise, if automatic
1699                         publication is switched on, default value is used for result name.
1700
1701             Returns:
1702                 New GEOM.GEOM_Object, containing the created plane.
1703             """
1704             # Example: see GEOM_TestAll.py
1705             theTrimSize, Parameters = ParseParameters(theTrimSize);
1706             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1707             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1708             anObj.SetParameters(Parameters)
1709             self._autoPublish(anObj, theName, "plane")
1710             return anObj
1711
1712         ## Create a plane, similar to the existing one, but with another size of representing face.
1713         #  @param theFace Referenced plane or LCS(Marker).
1714         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1715         #  @param theName Object name; when specified, this parameter is used
1716         #         for result publication in the study. Otherwise, if automatic
1717         #         publication is switched on, default value is used for result name.
1718         #
1719         #  @return New GEOM.GEOM_Object, containing the created plane.
1720         #
1721         #  @ref tui_creation_plane "Example"
1722         @ManageTransactions("BasicOp")
1723         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1724             """
1725             Create a plane, similar to the existing one, but with another size of representing face.
1726
1727             Parameters:
1728                 theFace Referenced plane or LCS(Marker).
1729                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1730                 theName Object name; when specified, this parameter is used
1731                         for result publication in the study. Otherwise, if automatic
1732                         publication is switched on, default value is used for result name.
1733
1734             Returns:
1735                 New GEOM.GEOM_Object, containing the created plane.
1736             """
1737             # Example: see GEOM_TestAll.py
1738             theTrimSize, Parameters = ParseParameters(theTrimSize);
1739             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1740             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1741             anObj.SetParameters(Parameters)
1742             self._autoPublish(anObj, theName, "plane")
1743             return anObj
1744
1745         ## Create a plane, passing through the 2 vectors
1746         #  with center in a start point of the first vector.
1747         #  @param theVec1 Vector, defining center point and plane direction.
1748         #  @param theVec2 Vector, defining the plane normal direction.
1749         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1750         #  @param theName Object name; when specified, this parameter is used
1751         #         for result publication in the study. Otherwise, if automatic
1752         #         publication is switched on, default value is used for result name.
1753         #
1754         #  @return New GEOM.GEOM_Object, containing the created plane.
1755         #
1756         #  @ref tui_creation_plane "Example"
1757         @ManageTransactions("BasicOp")
1758         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1759             """
1760             Create a plane, passing through the 2 vectors
1761             with center in a start point of the first vector.
1762
1763             Parameters:
1764                 theVec1 Vector, defining center point and plane direction.
1765                 theVec2 Vector, defining the plane normal direction.
1766                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1767                 theName Object name; when specified, this parameter is used
1768                         for result publication in the study. Otherwise, if automatic
1769                         publication is switched on, default value is used for result name.
1770
1771             Returns:
1772                 New GEOM.GEOM_Object, containing the created plane.
1773             """
1774             # Example: see GEOM_TestAll.py
1775             theTrimSize, Parameters = ParseParameters(theTrimSize);
1776             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1777             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1778             anObj.SetParameters(Parameters)
1779             self._autoPublish(anObj, theName, "plane")
1780             return anObj
1781
1782         ## Create a plane, based on a Local coordinate system.
1783         #  @param theLCS  coordinate system, defining plane.
1784         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1785         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1786         #  @param theName Object name; when specified, this parameter is used
1787         #         for result publication in the study. Otherwise, if automatic
1788         #         publication is switched on, default value is used for result name.
1789         #
1790         #  @return New GEOM.GEOM_Object, containing the created plane.
1791         #
1792         #  @ref tui_creation_plane "Example"
1793         @ManageTransactions("BasicOp")
1794         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1795             """
1796             Create a plane, based on a Local coordinate system.
1797
1798            Parameters:
1799                 theLCS  coordinate system, defining plane.
1800                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1801                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1802                 theName Object name; when specified, this parameter is used
1803                         for result publication in the study. Otherwise, if automatic
1804                         publication is switched on, default value is used for result name.
1805
1806             Returns:
1807                 New GEOM.GEOM_Object, containing the created plane.
1808             """
1809             # Example: see GEOM_TestAll.py
1810             theTrimSize, Parameters = ParseParameters(theTrimSize);
1811             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1812             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1813             anObj.SetParameters(Parameters)
1814             self._autoPublish(anObj, theName, "plane")
1815             return anObj
1816
1817         ## Create a local coordinate system.
1818         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1819         #  @param XDX,XDY,XDZ Three components of OX direction
1820         #  @param YDX,YDY,YDZ Three components of OY direction
1821         #  @param theName Object name; when specified, this parameter is used
1822         #         for result publication in the study. Otherwise, if automatic
1823         #         publication is switched on, default value is used for result name.
1824         #
1825         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1826         #
1827         #  @ref swig_MakeMarker "Example"
1828         @ManageTransactions("BasicOp")
1829         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1830             """
1831             Create a local coordinate system.
1832
1833             Parameters:
1834                 OX,OY,OZ Three coordinates of coordinate system origin.
1835                 XDX,XDY,XDZ Three components of OX direction
1836                 YDX,YDY,YDZ Three components of OY direction
1837                 theName Object name; when specified, this parameter is used
1838                         for result publication in the study. Otherwise, if automatic
1839                         publication is switched on, default value is used for result name.
1840
1841             Returns:
1842                 New GEOM.GEOM_Object, containing the created coordinate system.
1843             """
1844             # Example: see GEOM_TestAll.py
1845             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1846             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1847             RaiseIfFailed("MakeMarker", self.BasicOp)
1848             anObj.SetParameters(Parameters)
1849             self._autoPublish(anObj, theName, "lcs")
1850             return anObj
1851
1852         ## Create a local coordinate system from shape.
1853         #  @param theShape The initial shape to detect the coordinate system.
1854         #  @param theName Object name; when specified, this parameter is used
1855         #         for result publication in the study. Otherwise, if automatic
1856         #         publication is switched on, default value is used for result name.
1857         #
1858         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1859         #
1860         #  @ref tui_creation_lcs "Example"
1861         @ManageTransactions("BasicOp")
1862         def MakeMarkerFromShape(self, theShape, theName=None):
1863             """
1864             Create a local coordinate system from shape.
1865
1866             Parameters:
1867                 theShape The initial shape to detect the coordinate system.
1868                 theName Object name; when specified, this parameter is used
1869                         for result publication in the study. Otherwise, if automatic
1870                         publication is switched on, default value is used for result name.
1871
1872             Returns:
1873                 New GEOM.GEOM_Object, containing the created coordinate system.
1874             """
1875             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1876             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1877             self._autoPublish(anObj, theName, "lcs")
1878             return anObj
1879
1880         ## Create a local coordinate system from point and two vectors.
1881         #  @param theOrigin Point of coordinate system origin.
1882         #  @param theXVec Vector of X direction
1883         #  @param theYVec Vector of Y direction
1884         #  @param theName Object name; when specified, this parameter is used
1885         #         for result publication in the study. Otherwise, if automatic
1886         #         publication is switched on, default value is used for result name.
1887         #
1888         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1889         #
1890         #  @ref tui_creation_lcs "Example"
1891         @ManageTransactions("BasicOp")
1892         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1893             """
1894             Create a local coordinate system from point and two vectors.
1895
1896             Parameters:
1897                 theOrigin Point of coordinate system origin.
1898                 theXVec Vector of X direction
1899                 theYVec Vector of Y direction
1900                 theName Object name; when specified, this parameter is used
1901                         for result publication in the study. Otherwise, if automatic
1902                         publication is switched on, default value is used for result name.
1903
1904             Returns:
1905                 New GEOM.GEOM_Object, containing the created coordinate system.
1906
1907             """
1908             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1909             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1910             self._autoPublish(anObj, theName, "lcs")
1911             return anObj
1912
1913         # end of l3_basic_go
1914         ## @}
1915
1916         ## @addtogroup l4_curves
1917         ## @{
1918
1919         ##  Create an arc of circle, passing through three given points.
1920         #  @param thePnt1 Start point of the arc.
1921         #  @param thePnt2 Middle point of the arc.
1922         #  @param thePnt3 End point of the arc.
1923         #  @param theName Object name; when specified, this parameter is used
1924         #         for result publication in the study. Otherwise, if automatic
1925         #         publication is switched on, default value is used for result name.
1926         #
1927         #  @return New GEOM.GEOM_Object, containing the created arc.
1928         #
1929         #  @ref swig_MakeArc "Example"
1930         @ManageTransactions("CurvesOp")
1931         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1932             """
1933             Create an arc of circle, passing through three given points.
1934
1935             Parameters:
1936                 thePnt1 Start point of the arc.
1937                 thePnt2 Middle point of the arc.
1938                 thePnt3 End point of the arc.
1939                 theName Object name; when specified, this parameter is used
1940                         for result publication in the study. Otherwise, if automatic
1941                         publication is switched on, default value is used for result name.
1942
1943             Returns:
1944                 New GEOM.GEOM_Object, containing the created arc.
1945             """
1946             # Example: see GEOM_TestAll.py
1947             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1948             RaiseIfFailed("MakeArc", self.CurvesOp)
1949             self._autoPublish(anObj, theName, "arc")
1950             return anObj
1951
1952         ##  Create an arc of circle from a center and 2 points.
1953         #  @param thePnt1 Center of the arc
1954         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1955         #  @param thePnt3 End point of the arc (Gives also a direction)
1956         #  @param theSense Orientation of the arc
1957         #  @param theName Object name; when specified, this parameter is used
1958         #         for result publication in the study. Otherwise, if automatic
1959         #         publication is switched on, default value is used for result name.
1960         #
1961         #  @return New GEOM.GEOM_Object, containing the created arc.
1962         #
1963         #  @ref swig_MakeArc "Example"
1964         @ManageTransactions("CurvesOp")
1965         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1966             """
1967             Create an arc of circle from a center and 2 points.
1968
1969             Parameters:
1970                 thePnt1 Center of the arc
1971                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1972                 thePnt3 End point of the arc (Gives also a direction)
1973                 theSense Orientation of the arc
1974                 theName Object name; when specified, this parameter is used
1975                         for result publication in the study. Otherwise, if automatic
1976                         publication is switched on, default value is used for result name.
1977
1978             Returns:
1979                 New GEOM.GEOM_Object, containing the created arc.
1980             """
1981             # Example: see GEOM_TestAll.py
1982             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1983             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1984             self._autoPublish(anObj, theName, "arc")
1985             return anObj
1986
1987         ##  Create an arc of ellipse, of center and two points.
1988         #  @param theCenter Center of the arc.
1989         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1990         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1991         #  @param theName Object name; when specified, this parameter is used
1992         #         for result publication in the study. Otherwise, if automatic
1993         #         publication is switched on, default value is used for result name.
1994         #
1995         #  @return New GEOM.GEOM_Object, containing the created arc.
1996         #
1997         #  @ref swig_MakeArc "Example"
1998         @ManageTransactions("CurvesOp")
1999         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2000             """
2001             Create an arc of ellipse, of center and two points.
2002
2003             Parameters:
2004                 theCenter Center of the arc.
2005                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2006                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2007                 theName Object name; when specified, this parameter is used
2008                         for result publication in the study. Otherwise, if automatic
2009                         publication is switched on, default value is used for result name.
2010
2011             Returns:
2012                 New GEOM.GEOM_Object, containing the created arc.
2013             """
2014             # Example: see GEOM_TestAll.py
2015             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2016             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2017             self._autoPublish(anObj, theName, "arc")
2018             return anObj
2019
2020         ## Create a circle with given center, normal vector and radius.
2021         #  @param thePnt Circle center.
2022         #  @param theVec Vector, normal to the plane of the circle.
2023         #  @param theR Circle radius.
2024         #  @param theName Object name; when specified, this parameter is used
2025         #         for result publication in the study. Otherwise, if automatic
2026         #         publication is switched on, default value is used for result name.
2027         #
2028         #  @return New GEOM.GEOM_Object, containing the created circle.
2029         #
2030         #  @ref tui_creation_circle "Example"
2031         @ManageTransactions("CurvesOp")
2032         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2033             """
2034             Create a circle with given center, normal vector and radius.
2035
2036             Parameters:
2037                 thePnt Circle center.
2038                 theVec Vector, normal to the plane of the circle.
2039                 theR Circle radius.
2040                 theName Object name; when specified, this parameter is used
2041                         for result publication in the study. Otherwise, if automatic
2042                         publication is switched on, default value is used for result name.
2043
2044             Returns:
2045                 New GEOM.GEOM_Object, containing the created circle.
2046             """
2047             # Example: see GEOM_TestAll.py
2048             theR, Parameters = ParseParameters(theR)
2049             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2050             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2051             anObj.SetParameters(Parameters)
2052             self._autoPublish(anObj, theName, "circle")
2053             return anObj
2054
2055         ## Create a circle with given radius.
2056         #  Center of the circle will be in the origin of global
2057         #  coordinate system and normal vector will be codirected with Z axis
2058         #  @param theR Circle radius.
2059         #  @param theName Object name; when specified, this parameter is used
2060         #         for result publication in the study. Otherwise, if automatic
2061         #         publication is switched on, default value is used for result name.
2062         #
2063         #  @return New GEOM.GEOM_Object, containing the created circle.
2064         @ManageTransactions("CurvesOp")
2065         def MakeCircleR(self, theR, theName=None):
2066             """
2067             Create a circle with given radius.
2068             Center of the circle will be in the origin of global
2069             coordinate system and normal vector will be codirected with Z axis
2070
2071             Parameters:
2072                 theR Circle radius.
2073                 theName Object name; when specified, this parameter is used
2074                         for result publication in the study. Otherwise, if automatic
2075                         publication is switched on, default value is used for result name.
2076
2077             Returns:
2078                 New GEOM.GEOM_Object, containing the created circle.
2079             """
2080             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2081             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2082             self._autoPublish(anObj, theName, "circle")
2083             return anObj
2084
2085         ## Create a circle, passing through three given points
2086         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2087         #  @param theName Object name; when specified, this parameter is used
2088         #         for result publication in the study. Otherwise, if automatic
2089         #         publication is switched on, default value is used for result name.
2090         #
2091         #  @return New GEOM.GEOM_Object, containing the created circle.
2092         #
2093         #  @ref tui_creation_circle "Example"
2094         @ManageTransactions("CurvesOp")
2095         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2096             """
2097             Create a circle, passing through three given points
2098
2099             Parameters:
2100                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2101                 theName Object name; when specified, this parameter is used
2102                         for result publication in the study. Otherwise, if automatic
2103                         publication is switched on, default value is used for result name.
2104
2105             Returns:
2106                 New GEOM.GEOM_Object, containing the created circle.
2107             """
2108             # Example: see GEOM_TestAll.py
2109             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2110             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2111             self._autoPublish(anObj, theName, "circle")
2112             return anObj
2113
2114         ## Create a circle, with given point1 as center,
2115         #  passing through the point2 as radius and laying in the plane,
2116         #  defined by all three given points.
2117         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2118         #  @param theName Object name; when specified, this parameter is used
2119         #         for result publication in the study. Otherwise, if automatic
2120         #         publication is switched on, default value is used for result name.
2121         #
2122         #  @return New GEOM.GEOM_Object, containing the created circle.
2123         #
2124         #  @ref swig_MakeCircle "Example"
2125         @ManageTransactions("CurvesOp")
2126         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2127             """
2128             Create a circle, with given point1 as center,
2129             passing through the point2 as radius and laying in the plane,
2130             defined by all three given points.
2131
2132             Parameters:
2133                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2134                 theName Object name; when specified, this parameter is used
2135                         for result publication in the study. Otherwise, if automatic
2136                         publication is switched on, default value is used for result name.
2137
2138             Returns:
2139                 New GEOM.GEOM_Object, containing the created circle.
2140             """
2141             # Example: see GEOM_example6.py
2142             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2143             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2144             self._autoPublish(anObj, theName, "circle")
2145             return anObj
2146
2147         ## Create an ellipse with given center, normal vector and radiuses.
2148         #  @param thePnt Ellipse center.
2149         #  @param theVec Vector, normal to the plane of the ellipse.
2150         #  @param theRMajor Major ellipse radius.
2151         #  @param theRMinor Minor ellipse radius.
2152         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2153         #  @param theName Object name; when specified, this parameter is used
2154         #         for result publication in the study. Otherwise, if automatic
2155         #         publication is switched on, default value is used for result name.
2156         #
2157         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2158         #
2159         #  @ref tui_creation_ellipse "Example"
2160         @ManageTransactions("CurvesOp")
2161         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2162             """
2163             Create an ellipse with given center, normal vector and radiuses.
2164
2165             Parameters:
2166                 thePnt Ellipse center.
2167                 theVec Vector, normal to the plane of the ellipse.
2168                 theRMajor Major ellipse radius.
2169                 theRMinor Minor ellipse radius.
2170                 theVecMaj Vector, direction of the ellipse's main axis.
2171                 theName Object name; when specified, this parameter is used
2172                         for result publication in the study. Otherwise, if automatic
2173                         publication is switched on, default value is used for result name.
2174
2175             Returns:
2176                 New GEOM.GEOM_Object, containing the created ellipse.
2177             """
2178             # Example: see GEOM_TestAll.py
2179             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2180             if theVecMaj is not None:
2181                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2182             else:
2183                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2184                 pass
2185             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2186             anObj.SetParameters(Parameters)
2187             self._autoPublish(anObj, theName, "ellipse")
2188             return anObj
2189
2190         ## Create an ellipse with given radiuses.
2191         #  Center of the ellipse will be in the origin of global
2192         #  coordinate system and normal vector will be codirected with Z axis
2193         #  @param theRMajor Major ellipse radius.
2194         #  @param theRMinor Minor ellipse radius.
2195         #  @param theName Object name; when specified, this parameter is used
2196         #         for result publication in the study. Otherwise, if automatic
2197         #         publication is switched on, default value is used for result name.
2198         #
2199         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2200         @ManageTransactions("CurvesOp")
2201         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2202             """
2203             Create an ellipse with given radiuses.
2204             Center of the ellipse will be in the origin of global
2205             coordinate system and normal vector will be codirected with Z axis
2206
2207             Parameters:
2208                 theRMajor Major ellipse radius.
2209                 theRMinor Minor ellipse radius.
2210                 theName Object name; when specified, this parameter is used
2211                         for result publication in the study. Otherwise, if automatic
2212                         publication is switched on, default value is used for result name.
2213
2214             Returns:
2215             New GEOM.GEOM_Object, containing the created ellipse.
2216             """
2217             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2218             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2219             self._autoPublish(anObj, theName, "ellipse")
2220             return anObj
2221
2222         ## Create a polyline on the set of points.
2223         #  @param thePoints Sequence of points for the polyline.
2224         #  @param theIsClosed If True, build a closed wire.
2225         #  @param theName Object name; when specified, this parameter is used
2226         #         for result publication in the study. Otherwise, if automatic
2227         #         publication is switched on, default value is used for result name.
2228         #
2229         #  @return New GEOM.GEOM_Object, containing the created polyline.
2230         #
2231         #  @ref tui_creation_curve "Example"
2232         @ManageTransactions("CurvesOp")
2233         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2234             """
2235             Create a polyline on the set of points.
2236
2237             Parameters:
2238                 thePoints Sequence of points for the polyline.
2239                 theIsClosed If True, build a closed wire.
2240                 theName Object name; when specified, this parameter is used
2241                         for result publication in the study. Otherwise, if automatic
2242                         publication is switched on, default value is used for result name.
2243
2244             Returns:
2245                 New GEOM.GEOM_Object, containing the created polyline.
2246             """
2247             # Example: see GEOM_TestAll.py
2248             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2249             RaiseIfFailed("MakePolyline", self.CurvesOp)
2250             self._autoPublish(anObj, theName, "polyline")
2251             return anObj
2252
2253         ## Create bezier curve on the set of points.
2254         #  @param thePoints Sequence of points for the bezier curve.
2255         #  @param theIsClosed If True, build a closed curve.
2256         #  @param theName Object name; when specified, this parameter is used
2257         #         for result publication in the study. Otherwise, if automatic
2258         #         publication is switched on, default value is used for result name.
2259         #
2260         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2261         #
2262         #  @ref tui_creation_curve "Example"
2263         @ManageTransactions("CurvesOp")
2264         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2265             """
2266             Create bezier curve on the set of points.
2267
2268             Parameters:
2269                 thePoints Sequence of points for the bezier curve.
2270                 theIsClosed If True, build a closed curve.
2271                 theName Object name; when specified, this parameter is used
2272                         for result publication in the study. Otherwise, if automatic
2273                         publication is switched on, default value is used for result name.
2274
2275             Returns:
2276                 New GEOM.GEOM_Object, containing the created bezier curve.
2277             """
2278             # Example: see GEOM_TestAll.py
2279             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2280             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2281             self._autoPublish(anObj, theName, "bezier")
2282             return anObj
2283
2284         ## Create B-Spline curve on the set of points.
2285         #  @param thePoints Sequence of points for the B-Spline curve.
2286         #  @param theIsClosed If True, build a closed curve.
2287         #  @param theDoReordering If TRUE, the algo does not follow the order of
2288         #                         \a thePoints but searches for the closest vertex.
2289         #  @param theName Object name; when specified, this parameter is used
2290         #         for result publication in the study. Otherwise, if automatic
2291         #         publication is switched on, default value is used for result name.
2292         #
2293         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2294         #
2295         #  @ref tui_creation_curve "Example"
2296         @ManageTransactions("CurvesOp")
2297         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2298             """
2299             Create B-Spline curve on the set of points.
2300
2301             Parameters:
2302                 thePoints Sequence of points for the B-Spline curve.
2303                 theIsClosed If True, build a closed curve.
2304                 theDoReordering If True, the algo does not follow the order of
2305                                 thePoints but searches for the closest vertex.
2306                 theName Object name; when specified, this parameter is used
2307                         for result publication in the study. Otherwise, if automatic
2308                         publication is switched on, default value is used for result name.
2309
2310             Returns:
2311                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2312             """
2313             # Example: see GEOM_TestAll.py
2314             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2315             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2316             self._autoPublish(anObj, theName, "bspline")
2317             return anObj
2318
2319         ## Create B-Spline curve on the set of points.
2320         #  @param thePoints Sequence of points for the B-Spline curve.
2321         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2322         #  @param theLastVec Vector object, defining the curve direction at its last point.
2323         #  @param theName Object name; when specified, this parameter is used
2324         #         for result publication in the study. Otherwise, if automatic
2325         #         publication is switched on, default value is used for result name.
2326         #
2327         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2328         #
2329         #  @ref tui_creation_curve "Example"
2330         @ManageTransactions("CurvesOp")
2331         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2332             """
2333             Create B-Spline curve on the set of points.
2334
2335             Parameters:
2336                 thePoints Sequence of points for the B-Spline curve.
2337                 theFirstVec Vector object, defining the curve direction at its first point.
2338                 theLastVec Vector object, defining the curve direction at its last point.
2339                 theName Object name; when specified, this parameter is used
2340                         for result publication in the study. Otherwise, if automatic
2341                         publication is switched on, default value is used for result name.
2342
2343             Returns:
2344                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2345             """
2346             # Example: see GEOM_TestAll.py
2347             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2348             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2349             self._autoPublish(anObj, theName, "bspline")
2350             return anObj
2351
2352         ## Creates a curve using the parametric definition of the basic points.
2353         #  @param thexExpr parametric equation of the coordinates X.
2354         #  @param theyExpr parametric equation of the coordinates Y.
2355         #  @param thezExpr parametric equation of the coordinates Z.
2356         #  @param theParamMin the minimal value of the parameter.
2357         #  @param theParamMax the maximum value of the parameter.
2358         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2359         #  @param theCurveType the type of the curve,
2360         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2361         #  @param theNewMethod flag for switching to the new method if the flag is set to false a deprecated method is used which can lead to a bug.
2362         #  @param theName Object name; when specified, this parameter is used
2363         #         for result publication in the study. Otherwise, if automatic
2364         #         publication is switched on, default value is used for result name.
2365         #
2366         #  @return New GEOM.GEOM_Object, containing the created curve.
2367         #
2368         #  @ref tui_creation_curve "Example"
2369         @ManageTransactions("CurvesOp")
2370         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2371                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2372             """
2373             Creates a curve using the parametric definition of the basic points.
2374
2375             Parameters:
2376                 thexExpr parametric equation of the coordinates X.
2377                 theyExpr parametric equation of the coordinates Y.
2378                 thezExpr parametric equation of the coordinates Z.
2379                 theParamMin the minimal value of the parameter.
2380                 theParamMax the maximum value of the parameter.
2381                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2382                 theCurveType the type of the curve,
2383                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2384                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2385                              method is used which can lead to a bug.
2386                 theName Object name; when specified, this parameter is used
2387                         for result publication in the study. Otherwise, if automatic
2388                         publication is switched on, default value is used for result name.
2389
2390             Returns:
2391                 New GEOM.GEOM_Object, containing the created curve.
2392             """
2393             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2394             if theNewMethod:
2395               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2396             else:
2397               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2398             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2399             anObj.SetParameters(Parameters)
2400             self._autoPublish(anObj, theName, "curve")
2401             return anObj
2402
2403         ## Create an isoline curve on a face.
2404         #  @param theFace the face for which an isoline is created.
2405         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2406         #         creation.
2407         #  @param theParameter the U parameter for U-isoline or V parameter
2408         #         for V-isoline.
2409         #  @param theName Object name; when specified, this parameter is used
2410         #         for result publication in the study. Otherwise, if automatic
2411         #         publication is switched on, default value is used for result name.
2412         #
2413         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2414         #          a compound of edges.
2415         #
2416         #  @ref tui_creation_curve "Example"
2417         @ManageTransactions("CurvesOp")
2418         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2419             """
2420             Create an isoline curve on a face.
2421
2422             Parameters:
2423                 theFace the face for which an isoline is created.
2424                 IsUIsoline True for U-isoline creation; False for V-isoline
2425                            creation.
2426                 theParameter the U parameter for U-isoline or V parameter
2427                              for V-isoline.
2428                 theName Object name; when specified, this parameter is used
2429                         for result publication in the study. Otherwise, if automatic
2430                         publication is switched on, default value is used for result name.
2431
2432             Returns:
2433                 New GEOM.GEOM_Object, containing the created isoline edge or a
2434                 compound of edges.
2435             """
2436             # Example: see GEOM_TestAll.py
2437             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2438             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2439             if IsUIsoline:
2440                 self._autoPublish(anObj, theName, "U-Isoline")
2441             else:
2442                 self._autoPublish(anObj, theName, "V-Isoline")
2443             return anObj
2444
2445         # end of l4_curves
2446         ## @}
2447
2448         ## @addtogroup l3_sketcher
2449         ## @{
2450
2451         ## Create a sketcher (wire or face), following the textual description,
2452         #  passed through <VAR>theCommand</VAR> argument. \n
2453         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2454         #  Format of the description string have to be the following:
2455         #
2456         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2457         #
2458         #  Where:
2459         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2460         #  - CMD is one of
2461         #     - "R angle" : Set the direction by angle
2462         #     - "D dx dy" : Set the direction by DX & DY
2463         #     .
2464         #       \n
2465         #     - "TT x y" : Create segment by point at X & Y
2466         #     - "T dx dy" : Create segment by point with DX & DY
2467         #     - "L length" : Create segment by direction & Length
2468         #     - "IX x" : Create segment by direction & Intersect. X
2469         #     - "IY y" : Create segment by direction & Intersect. Y
2470         #     .
2471         #       \n
2472         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2473         #     - "AA x y": Create arc by point at X & Y
2474         #     - "A dx dy" : Create arc by point with DX & DY
2475         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2476         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2477         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2478         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2479         #     .
2480         #       \n
2481         #     - "WW" : Close Wire (to finish)
2482         #     - "WF" : Close Wire and build face (to finish)
2483         #     .
2484         #        \n
2485         #  - Flag1 (= reverse) is 0 or 2 ...
2486         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2487         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2488         #     .
2489         #        \n
2490         #  - Flag2 (= control tolerance) is 0 or 1 ...
2491         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2492         #     - if 1 the wire is built only if the end point is on the arc
2493         #       with a tolerance of 10^-7 on the distance else the creation fails
2494         #
2495         #  @param theCommand String, defining the sketcher in local
2496         #                    coordinates of the working plane.
2497         #  @param theWorkingPlane Nine double values, defining origin,
2498         #                         OZ and OX directions of the working plane.
2499         #  @param theName Object name; when specified, this parameter is used
2500         #         for result publication in the study. Otherwise, if automatic
2501         #         publication is switched on, default value is used for result name.
2502         #
2503         #  @return New GEOM.GEOM_Object, containing the created wire.
2504         #
2505         #  @ref tui_sketcher_page "Example"
2506         @ManageTransactions("CurvesOp")
2507         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2508             """
2509             Create a sketcher (wire or face), following the textual description, passed
2510             through theCommand argument.
2511             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2512             Format of the description string have to be the following:
2513                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2514             Where:
2515             - x1, y1 are coordinates of the first sketcher point (zero by default),
2516             - CMD is one of
2517                - "R angle" : Set the direction by angle
2518                - "D dx dy" : Set the direction by DX & DY
2519
2520                - "TT x y" : Create segment by point at X & Y
2521                - "T dx dy" : Create segment by point with DX & DY
2522                - "L length" : Create segment by direction & Length
2523                - "IX x" : Create segment by direction & Intersect. X
2524                - "IY y" : Create segment by direction & Intersect. Y
2525
2526                - "C radius length" : Create arc by direction, radius and length(in degree)
2527                - "AA x y": Create arc by point at X & Y
2528                - "A dx dy" : Create arc by point with DX & DY
2529                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2530                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2531                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2532                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2533
2534                - "WW" : Close Wire (to finish)
2535                - "WF" : Close Wire and build face (to finish)
2536
2537             - Flag1 (= reverse) is 0 or 2 ...
2538                - if 0 the drawn arc is the one of lower angle (< Pi)
2539                - if 2 the drawn arc ius the one of greater angle (> Pi)
2540
2541             - Flag2 (= control tolerance) is 0 or 1 ...
2542                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2543                - if 1 the wire is built only if the end point is on the arc
2544                  with a tolerance of 10^-7 on the distance else the creation fails
2545
2546             Parameters:
2547                 theCommand String, defining the sketcher in local
2548                            coordinates of the working plane.
2549                 theWorkingPlane Nine double values, defining origin,
2550                                 OZ and OX directions of the working plane.
2551                 theName Object name; when specified, this parameter is used
2552                         for result publication in the study. Otherwise, if automatic
2553                         publication is switched on, default value is used for result name.
2554
2555             Returns:
2556                 New GEOM.GEOM_Object, containing the created wire.
2557             """
2558             # Example: see GEOM_TestAll.py
2559             theCommand,Parameters = ParseSketcherCommand(theCommand)
2560             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2561             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2562             anObj.SetParameters(Parameters)
2563             self._autoPublish(anObj, theName, "wire")
2564             return anObj
2565
2566         ## Create a sketcher (wire or face), following the textual description,
2567         #  passed through <VAR>theCommand</VAR> argument. \n
2568         #  For format of the description string see MakeSketcher() method.\n
2569         #  @param theCommand String, defining the sketcher in local
2570         #                    coordinates of the working plane.
2571         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2572         #  @param theName Object name; when specified, this parameter is used
2573         #         for result publication in the study. Otherwise, if automatic
2574         #         publication is switched on, default value is used for result name.
2575         #
2576         #  @return New GEOM.GEOM_Object, containing the created wire.
2577         #
2578         #  @ref tui_sketcher_page "Example"
2579         @ManageTransactions("CurvesOp")
2580         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2581             """
2582             Create a sketcher (wire or face), following the textual description,
2583             passed through theCommand argument.
2584             For format of the description string see geompy.MakeSketcher() method.
2585
2586             Parameters:
2587                 theCommand String, defining the sketcher in local
2588                            coordinates of the working plane.
2589                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2590                 theName Object name; when specified, this parameter is used
2591                         for result publication in the study. Otherwise, if automatic
2592                         publication is switched on, default value is used for result name.
2593
2594             Returns:
2595                 New GEOM.GEOM_Object, containing the created wire.
2596             """
2597             theCommand,Parameters = ParseSketcherCommand(theCommand)
2598             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2599             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2600             anObj.SetParameters(Parameters)
2601             self._autoPublish(anObj, theName, "wire")
2602             return anObj
2603
2604         ## Obtain a 2D sketcher interface
2605         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2606         def Sketcher2D (self):
2607             """
2608             Obtain a 2D sketcher interface.
2609
2610             Example of usage:
2611                sk = geompy.Sketcher2D()
2612                sk.addPoint(20, 20)
2613                sk.addSegmentRelative(15, 70)
2614                sk.addSegmentPerpY(50)
2615                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2616                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2617                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2618                sk.close()
2619                Sketch_1 = sk.wire(geomObj_1)
2620             """
2621             sk = Sketcher2D (self)
2622             return sk
2623
2624         ## Create a sketcher wire, following the numerical description,
2625         #  passed through <VAR>theCoordinates</VAR> argument. \n
2626         #  @param theCoordinates double values, defining points to create a wire,
2627         #                                                      passing from it.
2628         #  @param theName Object name; when specified, this parameter is used
2629         #         for result publication in the study. Otherwise, if automatic
2630         #         publication is switched on, default value is used for result name.
2631         #
2632         #  @return New GEOM.GEOM_Object, containing the created wire.
2633         #
2634         #  @ref tui_3dsketcher_page "Example"
2635         @ManageTransactions("CurvesOp")
2636         def Make3DSketcher(self, theCoordinates, theName=None):
2637             """
2638             Create a sketcher wire, following the numerical description,
2639             passed through theCoordinates argument.
2640
2641             Parameters:
2642                 theCoordinates double values, defining points to create a wire,
2643                                passing from it.
2644                 theName Object name; when specified, this parameter is used
2645                         for result publication in the study. Otherwise, if automatic
2646                         publication is switched on, default value is used for result name.
2647
2648             Returns:
2649                 New GEOM_Object, containing the created wire.
2650             """
2651             theCoordinates,Parameters = ParseParameters(theCoordinates)
2652             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2653             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2654             anObj.SetParameters(Parameters)
2655             self._autoPublish(anObj, theName, "wire")
2656             return anObj
2657
2658         ## Obtain a 3D sketcher interface
2659         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2660         #
2661         #  @ref tui_3dsketcher_page "Example"
2662         def Sketcher3D (self):
2663             """
2664             Obtain a 3D sketcher interface.
2665
2666             Example of usage:
2667                 sk = geompy.Sketcher3D()
2668                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2669                 sk.addPointsRelative(0, 0, 130)
2670                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2671                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2672                 sk.close()
2673                 a3D_Sketcher_1 = sk.wire()
2674             """
2675             sk = Sketcher3D (self)
2676             return sk
2677
2678         ## Obtain a 2D polyline creation interface
2679         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2680         #
2681         #  @ref tui_3dsketcher_page "Example"
2682         def Polyline2D (self):
2683             """
2684             Obtain a 2D polyline creation interface.
2685
2686             Example of usage:
2687                 pl = geompy.Polyline2D()
2688                 pl.addSection("section 1", GEOM.Polyline, True)
2689                 pl.addPoints(0, 0, 10, 0, 10, 10)
2690                 pl.addSection("section 2", GEOM.Interpolation, False)
2691                 pl.addPoints(20, 0, 30, 0, 30, 10)
2692                 resultObj = pl.result(WorkingPlane)
2693             """
2694             pl = Polyline2D (self)
2695             return pl
2696
2697         # end of l3_sketcher
2698         ## @}
2699
2700         ## @addtogroup l3_3d_primitives
2701         ## @{
2702
2703         ## Create a box by coordinates of two opposite vertices.
2704         #
2705         #  @param x1,y1,z1 double values, defining first point it.
2706         #  @param x2,y2,z2 double values, defining first point it.
2707         #  @param theName Object name; when specified, this parameter is used
2708         #         for result publication in the study. Otherwise, if automatic
2709         #         publication is switched on, default value is used for result name.
2710         #
2711         #  @return New GEOM.GEOM_Object, containing the created box.
2712         #
2713         #  @ref tui_creation_box "Example"
2714         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2715             """
2716             Create a box by coordinates of two opposite vertices.
2717
2718             Parameters:
2719                 x1,y1,z1 double values, defining first point.
2720                 x2,y2,z2 double values, defining second point.
2721                 theName Object name; when specified, this parameter is used
2722                         for result publication in the study. Otherwise, if automatic
2723                         publication is switched on, default value is used for result name.
2724
2725             Returns:
2726                 New GEOM.GEOM_Object, containing the created box.
2727             """
2728             # Example: see GEOM_TestAll.py
2729             pnt1 = self.MakeVertex(x1,y1,z1)
2730             pnt2 = self.MakeVertex(x2,y2,z2)
2731             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2732             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2733
2734         ## Create a box with specified dimensions along the coordinate axes
2735         #  and with edges, parallel to the coordinate axes.
2736         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2737         #  @param theDX Length of Box edges, parallel to OX axis.
2738         #  @param theDY Length of Box edges, parallel to OY axis.
2739         #  @param theDZ Length of Box edges, parallel to OZ axis.
2740         #  @param theName Object name; when specified, this parameter is used
2741         #         for result publication in the study. Otherwise, if automatic
2742         #         publication is switched on, default value is used for result name.
2743         #
2744         #  @return New GEOM.GEOM_Object, containing the created box.
2745         #
2746         #  @ref tui_creation_box "Example"
2747         @ManageTransactions("PrimOp")
2748         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2749             """
2750             Create a box with specified dimensions along the coordinate axes
2751             and with edges, parallel to the coordinate axes.
2752             Center of the box will be at point (DX/2, DY/2, DZ/2).
2753
2754             Parameters:
2755                 theDX Length of Box edges, parallel to OX axis.
2756                 theDY Length of Box edges, parallel to OY axis.
2757                 theDZ Length of Box edges, parallel to OZ axis.
2758                 theName Object name; when specified, this parameter is used
2759                         for result publication in the study. Otherwise, if automatic
2760                         publication is switched on, default value is used for result name.
2761
2762             Returns:
2763                 New GEOM.GEOM_Object, containing the created box.
2764             """
2765             # Example: see GEOM_TestAll.py
2766             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2767             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2768             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2769             anObj.SetParameters(Parameters)
2770             self._autoPublish(anObj, theName, "box")
2771             return anObj
2772
2773         ## Create a box with two specified opposite vertices,
2774         #  and with edges, parallel to the coordinate axes
2775         #  @param thePnt1 First of two opposite vertices.
2776         #  @param thePnt2 Second of two opposite vertices.
2777         #  @param theName Object name; when specified, this parameter is used
2778         #         for result publication in the study. Otherwise, if automatic
2779         #         publication is switched on, default value is used for result name.
2780         #
2781         #  @return New GEOM.GEOM_Object, containing the created box.
2782         #
2783         #  @ref tui_creation_box "Example"
2784         @ManageTransactions("PrimOp")
2785         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2786             """
2787             Create a box with two specified opposite vertices,
2788             and with edges, parallel to the coordinate axes
2789
2790             Parameters:
2791                 thePnt1 First of two opposite vertices.
2792                 thePnt2 Second of two opposite vertices.
2793                 theName Object name; when specified, this parameter is used
2794                         for result publication in the study. Otherwise, if automatic
2795                         publication is switched on, default value is used for result name.
2796
2797             Returns:
2798                 New GEOM.GEOM_Object, containing the created box.
2799             """
2800             # Example: see GEOM_TestAll.py
2801             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2802             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2803             self._autoPublish(anObj, theName, "box")
2804             return anObj
2805
2806         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2807         #  @param theH height of Face.
2808         #  @param theW width of Face.
2809         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2810         #  @param theName Object name; when specified, this parameter is used
2811         #         for result publication in the study. Otherwise, if automatic
2812         #         publication is switched on, default value is used for result name.
2813         #
2814         #  @return New GEOM.GEOM_Object, containing the created face.
2815         #
2816         #  @ref tui_creation_face "Example"
2817         @ManageTransactions("PrimOp")
2818         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2819             """
2820             Create a face with specified dimensions with edges parallel to coordinate axes.
2821
2822             Parameters:
2823                 theH height of Face.
2824                 theW width of Face.
2825                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2826                 theName Object name; when specified, this parameter is used
2827                         for result publication in the study. Otherwise, if automatic
2828                         publication is switched on, default value is used for result name.
2829
2830             Returns:
2831                 New GEOM.GEOM_Object, containing the created face.
2832             """
2833             # Example: see GEOM_TestAll.py
2834             theH,theW,Parameters = ParseParameters(theH, theW)
2835             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2836             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2837             anObj.SetParameters(Parameters)
2838             self._autoPublish(anObj, theName, "rectangle")
2839             return anObj
2840
2841         ## Create a face from another plane and two sizes,
2842         #  vertical size and horisontal size.
2843         #  @param theObj   Normale vector to the creating face or
2844         #  the face object.
2845         #  @param theH     Height (vertical size).
2846         #  @param theW     Width (horisontal size).
2847         #  @param theName Object name; when specified, this parameter is used
2848         #         for result publication in the study. Otherwise, if automatic
2849         #         publication is switched on, default value is used for result name.
2850         #
2851         #  @return New GEOM.GEOM_Object, containing the created face.
2852         #
2853         #  @ref tui_creation_face "Example"
2854         @ManageTransactions("PrimOp")
2855         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2856             """
2857             Create a face from another plane and two sizes,
2858             vertical size and horisontal size.
2859
2860             Parameters:
2861                 theObj   Normale vector to the creating face or
2862                          the face object.
2863                 theH     Height (vertical size).
2864                 theW     Width (horisontal size).
2865                 theName Object name; when specified, this parameter is used
2866                         for result publication in the study. Otherwise, if automatic
2867                         publication is switched on, default value is used for result name.
2868
2869             Returns:
2870                 New GEOM_Object, containing the created face.
2871             """
2872             # Example: see GEOM_TestAll.py
2873             theH,theW,Parameters = ParseParameters(theH, theW)
2874             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2875             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2876             anObj.SetParameters(Parameters)
2877             self._autoPublish(anObj, theName, "rectangle")
2878             return anObj
2879
2880         ## Create a disk with given center, normal vector and radius.
2881         #  @param thePnt Disk center.
2882         #  @param theVec Vector, normal to the plane of the disk.
2883         #  @param theR Disk radius.
2884         #  @param theName Object name; when specified, this parameter is used
2885         #         for result publication in the study. Otherwise, if automatic
2886         #         publication is switched on, default value is used for result name.
2887         #
2888         #  @return New GEOM.GEOM_Object, containing the created disk.
2889         #
2890         #  @ref tui_creation_disk "Example"
2891         @ManageTransactions("PrimOp")
2892         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2893             """
2894             Create a disk with given center, normal vector and radius.
2895
2896             Parameters:
2897                 thePnt Disk center.
2898                 theVec Vector, normal to the plane of the disk.
2899                 theR Disk radius.
2900                 theName Object name; when specified, this parameter is used
2901                         for result publication in the study. Otherwise, if automatic
2902                         publication is switched on, default value is used for result name.
2903
2904             Returns:
2905                 New GEOM.GEOM_Object, containing the created disk.
2906             """
2907             # Example: see GEOM_TestAll.py
2908             theR,Parameters = ParseParameters(theR)
2909             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2910             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2911             anObj.SetParameters(Parameters)
2912             self._autoPublish(anObj, theName, "disk")
2913             return anObj
2914
2915         ## Create a disk, passing through three given points
2916         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2917         #  @param theName Object name; when specified, this parameter is used
2918         #         for result publication in the study. Otherwise, if automatic
2919         #         publication is switched on, default value is used for result name.
2920         #
2921         #  @return New GEOM.GEOM_Object, containing the created disk.
2922         #
2923         #  @ref tui_creation_disk "Example"
2924         @ManageTransactions("PrimOp")
2925         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2926             """
2927             Create a disk, passing through three given points
2928
2929             Parameters:
2930                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2931                 theName Object name; when specified, this parameter is used
2932                         for result publication in the study. Otherwise, if automatic
2933                         publication is switched on, default value is used for result name.
2934
2935             Returns:
2936                 New GEOM.GEOM_Object, containing the created disk.
2937             """
2938             # Example: see GEOM_TestAll.py
2939             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2940             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2941             self._autoPublish(anObj, theName, "disk")
2942             return anObj
2943
2944         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2945         #  @param theR Radius of Face.
2946         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2947         #  @param theName Object name; when specified, this parameter is used
2948         #         for result publication in the study. Otherwise, if automatic
2949         #         publication is switched on, default value is used for result name.
2950         #
2951         #  @return New GEOM.GEOM_Object, containing the created disk.
2952         #
2953         #  @ref tui_creation_face "Example"
2954         @ManageTransactions("PrimOp")
2955         def MakeDiskR(self, theR, theOrientation, theName=None):
2956             """
2957             Create a disk with specified dimensions along OX-OY coordinate axes.
2958
2959             Parameters:
2960                 theR Radius of Face.
2961                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2962                 theName Object name; when specified, this parameter is used
2963                         for result publication in the study. Otherwise, if automatic
2964                         publication is switched on, default value is used for result name.
2965
2966             Returns:
2967                 New GEOM.GEOM_Object, containing the created disk.
2968
2969             Example of usage:
2970                 Disk3 = geompy.MakeDiskR(100., 1)
2971             """
2972             # Example: see GEOM_TestAll.py
2973             theR,Parameters = ParseParameters(theR)
2974             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2975             RaiseIfFailed("MakeDiskR", self.PrimOp)
2976             anObj.SetParameters(Parameters)
2977             self._autoPublish(anObj, theName, "disk")
2978             return anObj
2979
2980         ## Create a cylinder with given base point, axis, radius and height.
2981         #  @param thePnt Central point of cylinder base.
2982         #  @param theAxis Cylinder axis.
2983         #  @param theR Cylinder radius.
2984         #  @param theH Cylinder height.
2985         #  @param theName Object name; when specified, this parameter is used
2986         #         for result publication in the study. Otherwise, if automatic
2987         #         publication is switched on, default value is used for result name.
2988         #
2989         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2990         #
2991         #  @ref tui_creation_cylinder "Example"
2992         @ManageTransactions("PrimOp")
2993         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2994             """
2995             Create a cylinder with given base point, axis, radius and height.
2996
2997             Parameters:
2998                 thePnt Central point of cylinder base.
2999                 theAxis Cylinder axis.
3000                 theR Cylinder radius.
3001                 theH Cylinder height.
3002                 theName Object name; when specified, this parameter is used
3003                         for result publication in the study. Otherwise, if automatic
3004                         publication is switched on, default value is used for result name.
3005
3006             Returns:
3007                 New GEOM.GEOM_Object, containing the created cylinder.
3008             """
3009             # Example: see GEOM_TestAll.py
3010             theR,theH,Parameters = ParseParameters(theR, theH)
3011             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3012             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3013             anObj.SetParameters(Parameters)
3014             self._autoPublish(anObj, theName, "cylinder")
3015             return anObj
3016             
3017         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3018         #  @param thePnt Central point of cylinder base.
3019         #  @param theAxis Cylinder axis.
3020         #  @param theR Cylinder radius.
3021         #  @param theH Cylinder height.
3022         #  @param theA Cylinder angle in radians.
3023         #  @param theName Object name; when specified, this parameter is used
3024         #         for result publication in the study. Otherwise, if automatic
3025         #         publication is switched on, default value is used for result name.
3026         #
3027         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3028         #
3029         #  @ref tui_creation_cylinder "Example"
3030         @ManageTransactions("PrimOp")
3031         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3032             """
3033             Create a portion of cylinder with given base point, axis, radius, height and angle.
3034
3035             Parameters:
3036                 thePnt Central point of cylinder base.
3037                 theAxis Cylinder axis.
3038                 theR Cylinder radius.
3039                 theH Cylinder height.
3040                 theA Cylinder angle in radians.
3041                 theName Object name; when specified, this parameter is used
3042                         for result publication in the study. Otherwise, if automatic
3043                         publication is switched on, default value is used for result name.
3044
3045             Returns:
3046                 New GEOM.GEOM_Object, containing the created cylinder.
3047             """
3048             # Example: see GEOM_TestAll.py
3049             flag = False
3050             if isinstance(theA,str):
3051                 flag = True
3052             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3053             if flag:
3054                 theA = theA*math.pi/180.
3055             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3056             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3057             anObj.SetParameters(Parameters)
3058             self._autoPublish(anObj, theName, "cylinder")
3059             return anObj
3060
3061         ## Create a cylinder with given radius and height at
3062         #  the origin of coordinate system. Axis of the cylinder
3063         #  will be collinear to the OZ axis of the coordinate system.
3064         #  @param theR Cylinder radius.
3065         #  @param theH Cylinder height.
3066         #  @param theName Object name; when specified, this parameter is used
3067         #         for result publication in the study. Otherwise, if automatic
3068         #         publication is switched on, default value is used for result name.
3069         #
3070         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3071         #
3072         #  @ref tui_creation_cylinder "Example"
3073         @ManageTransactions("PrimOp")
3074         def MakeCylinderRH(self, theR, theH, theName=None):
3075             """
3076             Create a cylinder with given radius and height at
3077             the origin of coordinate system. Axis of the cylinder
3078             will be collinear to the OZ axis of the coordinate system.
3079
3080             Parameters:
3081                 theR Cylinder radius.
3082                 theH Cylinder height.
3083                 theName Object name; when specified, this parameter is used
3084                         for result publication in the study. Otherwise, if automatic
3085                         publication is switched on, default value is used for result name.
3086
3087             Returns:
3088                 New GEOM.GEOM_Object, containing the created cylinder.
3089             """
3090             # Example: see GEOM_TestAll.py
3091             theR,theH,Parameters = ParseParameters(theR, theH)
3092             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3093             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3094             anObj.SetParameters(Parameters)
3095             self._autoPublish(anObj, theName, "cylinder")
3096             return anObj
3097             
3098         ## Create a portion of cylinder with given radius, height and angle at
3099         #  the origin of coordinate system. Axis of the cylinder
3100         #  will be collinear to the OZ axis of the coordinate system.
3101         #  @param theR Cylinder radius.
3102         #  @param theH Cylinder height.
3103         #  @param theA Cylinder angle in radians.
3104         #  @param theName Object name; when specified, this parameter is used
3105         #         for result publication in the study. Otherwise, if automatic
3106         #         publication is switched on, default value is used for result name.
3107         #
3108         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3109         #
3110         #  @ref tui_creation_cylinder "Example"
3111         @ManageTransactions("PrimOp")
3112         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3113             """
3114             Create a portion of cylinder with given radius, height and angle at
3115             the origin of coordinate system. Axis of the cylinder
3116             will be collinear to the OZ axis of the coordinate system.
3117
3118             Parameters:
3119                 theR Cylinder radius.
3120                 theH Cylinder height.
3121                 theA Cylinder angle in radians.
3122                 theName Object name; when specified, this parameter is used
3123                         for result publication in the study. Otherwise, if automatic
3124                         publication is switched on, default value is used for result name.
3125
3126             Returns:
3127                 New GEOM.GEOM_Object, containing the created cylinder.
3128             """
3129             # Example: see GEOM_TestAll.py
3130             flag = False
3131             if isinstance(theA,str):
3132                 flag = True
3133             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3134             if flag:
3135                 theA = theA*math.pi/180.
3136             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3137             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3138             anObj.SetParameters(Parameters)
3139             self._autoPublish(anObj, theName, "cylinder")
3140             return anObj
3141
3142         ## Create a sphere with given center and radius.
3143         #  @param thePnt Sphere center.
3144         #  @param theR Sphere radius.
3145         #  @param theName Object name; when specified, this parameter is used
3146         #         for result publication in the study. Otherwise, if automatic
3147         #         publication is switched on, default value is used for result name.
3148         #
3149         #  @return New GEOM.GEOM_Object, containing the created sphere.
3150         #
3151         #  @ref tui_creation_sphere "Example"
3152         @ManageTransactions("PrimOp")
3153         def MakeSpherePntR(self, thePnt, theR, theName=None):
3154             """
3155             Create a sphere with given center and radius.
3156
3157             Parameters:
3158                 thePnt Sphere center.
3159                 theR Sphere radius.
3160                 theName Object name; when specified, this parameter is used
3161                         for result publication in the study. Otherwise, if automatic
3162                         publication is switched on, default value is used for result name.
3163
3164             Returns:
3165                 New GEOM.GEOM_Object, containing the created sphere.
3166             """
3167             # Example: see GEOM_TestAll.py
3168             theR,Parameters = ParseParameters(theR)
3169             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3170             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3171             anObj.SetParameters(Parameters)
3172             self._autoPublish(anObj, theName, "sphere")
3173             return anObj
3174
3175         ## Create a sphere with given center and radius.
3176         #  @param x,y,z Coordinates of sphere center.
3177         #  @param theR Sphere radius.
3178         #  @param theName Object name; when specified, this parameter is used
3179         #         for result publication in the study. Otherwise, if automatic
3180         #         publication is switched on, default value is used for result name.
3181         #
3182         #  @return New GEOM.GEOM_Object, containing the created sphere.
3183         #
3184         #  @ref tui_creation_sphere "Example"
3185         def MakeSphere(self, x, y, z, theR, theName=None):
3186             """
3187             Create a sphere with given center and radius.
3188
3189             Parameters:
3190                 x,y,z Coordinates of sphere center.
3191                 theR Sphere radius.
3192                 theName Object name; when specified, this parameter is used
3193                         for result publication in the study. Otherwise, if automatic
3194                         publication is switched on, default value is used for result name.
3195
3196             Returns:
3197                 New GEOM.GEOM_Object, containing the created sphere.
3198             """
3199             # Example: see GEOM_TestAll.py
3200             point = self.MakeVertex(x, y, z)
3201             # note: auto-publishing is done in self.MakeSpherePntR()
3202             anObj = self.MakeSpherePntR(point, theR, theName)
3203             return anObj
3204
3205         ## Create a sphere with given radius at the origin of coordinate system.
3206         #  @param theR Sphere radius.
3207         #  @param theName Object name; when specified, this parameter is used
3208         #         for result publication in the study. Otherwise, if automatic
3209         #         publication is switched on, default value is used for result name.
3210         #
3211         #  @return New GEOM.GEOM_Object, containing the created sphere.
3212         #
3213         #  @ref tui_creation_sphere "Example"
3214         @ManageTransactions("PrimOp")
3215         def MakeSphereR(self, theR, theName=None):
3216             """
3217             Create a sphere with given radius at the origin of coordinate system.
3218
3219             Parameters:
3220                 theR Sphere radius.
3221                 theName Object name; when specified, this parameter is used
3222                         for result publication in the study. Otherwise, if automatic
3223                         publication is switched on, default value is used for result name.
3224
3225             Returns:
3226                 New GEOM.GEOM_Object, containing the created sphere.
3227             """
3228             # Example: see GEOM_TestAll.py
3229             theR,Parameters = ParseParameters(theR)
3230             anObj = self.PrimOp.MakeSphereR(theR)
3231             RaiseIfFailed("MakeSphereR", self.PrimOp)
3232             anObj.SetParameters(Parameters)
3233             self._autoPublish(anObj, theName, "sphere")
3234             return anObj
3235
3236         ## Create a cone with given base point, axis, height and radiuses.
3237         #  @param thePnt Central point of the first cone base.
3238         #  @param theAxis Cone axis.
3239         #  @param theR1 Radius of the first cone base.
3240         #  @param theR2 Radius of the second cone base.
3241         #    \note If both radiuses are non-zero, the cone will be truncated.
3242         #    \note If the radiuses are equal, a cylinder will be created instead.
3243         #  @param theH Cone height.
3244         #  @param theName Object name; when specified, this parameter is used
3245         #         for result publication in the study. Otherwise, if automatic
3246         #         publication is switched on, default value is used for result name.
3247         #
3248         #  @return New GEOM.GEOM_Object, containing the created cone.
3249         #
3250         #  @ref tui_creation_cone "Example"
3251         @ManageTransactions("PrimOp")
3252         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3253             """
3254             Create a cone with given base point, axis, height and radiuses.
3255
3256             Parameters:
3257                 thePnt Central point of the first cone base.
3258                 theAxis Cone axis.
3259                 theR1 Radius of the first cone base.
3260                 theR2 Radius of the second cone base.
3261                 theH Cone height.
3262                 theName Object name; when specified, this parameter is used
3263                         for result publication in the study. Otherwise, if automatic
3264                         publication is switched on, default value is used for result name.
3265
3266             Note:
3267                 If both radiuses are non-zero, the cone will be truncated.
3268                 If the radiuses are equal, a cylinder will be created instead.
3269
3270             Returns:
3271                 New GEOM.GEOM_Object, containing the created cone.
3272             """
3273             # Example: see GEOM_TestAll.py
3274             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3275             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3276             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3277             anObj.SetParameters(Parameters)
3278             self._autoPublish(anObj, theName, "cone")
3279             return anObj
3280
3281         ## Create a cone with given height and radiuses at
3282         #  the origin of coordinate system. Axis of the cone will
3283         #  be collinear to the OZ axis of the coordinate system.
3284         #  @param theR1 Radius of the first cone base.
3285         #  @param theR2 Radius of the second cone base.
3286         #    \note If both radiuses are non-zero, the cone will be truncated.
3287         #    \note If the radiuses are equal, a cylinder will be created instead.
3288         #  @param theH Cone height.
3289         #  @param theName Object name; when specified, this parameter is used
3290         #         for result publication in the study. Otherwise, if automatic
3291         #         publication is switched on, default value is used for result name.
3292         #
3293         #  @return New GEOM.GEOM_Object, containing the created cone.
3294         #
3295         #  @ref tui_creation_cone "Example"
3296         @ManageTransactions("PrimOp")
3297         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3298             """
3299             Create a cone with given height and radiuses at
3300             the origin of coordinate system. Axis of the cone will
3301             be collinear to the OZ axis of the coordinate system.
3302
3303             Parameters:
3304                 theR1 Radius of the first cone base.
3305                 theR2 Radius of the second cone base.
3306                 theH Cone height.
3307                 theName Object name; when specified, this parameter is used
3308                         for result publication in the study. Otherwise, if automatic
3309                         publication is switched on, default value is used for result name.
3310
3311             Note:
3312                 If both radiuses are non-zero, the cone will be truncated.
3313                 If the radiuses are equal, a cylinder will be created instead.
3314
3315             Returns:
3316                 New GEOM.GEOM_Object, containing the created cone.
3317             """
3318             # Example: see GEOM_TestAll.py
3319             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3320             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3321             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3322             anObj.SetParameters(Parameters)
3323             self._autoPublish(anObj, theName, "cone")
3324             return anObj
3325
3326         ## Create a torus with given center, normal vector and radiuses.
3327         #  @param thePnt Torus central point.
3328         #  @param theVec Torus axis of symmetry.
3329         #  @param theRMajor Torus major radius.
3330         #  @param theRMinor Torus minor radius.
3331         #  @param theName Object name; when specified, this parameter is used
3332         #         for result publication in the study. Otherwise, if automatic
3333         #         publication is switched on, default value is used for result name.
3334         #
3335         #  @return New GEOM.GEOM_Object, containing the created torus.
3336         #
3337         #  @ref tui_creation_torus "Example"
3338         @ManageTransactions("PrimOp")
3339         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3340             """
3341             Create a torus with given center, normal vector and radiuses.
3342
3343             Parameters:
3344                 thePnt Torus central point.
3345                 theVec Torus axis of symmetry.
3346                 theRMajor Torus major radius.
3347                 theRMinor Torus minor radius.
3348                 theName Object name; when specified, this parameter is used
3349                         for result publication in the study. Otherwise, if automatic
3350                         publication is switched on, default value is used for result name.
3351
3352            Returns:
3353                 New GEOM.GEOM_Object, containing the created torus.
3354             """
3355             # Example: see GEOM_TestAll.py
3356             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3357             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3358             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3359             anObj.SetParameters(Parameters)
3360             self._autoPublish(anObj, theName, "torus")
3361             return anObj
3362
3363         ## Create a torus with given radiuses at the origin of coordinate system.
3364         #  @param theRMajor Torus major radius.
3365         #  @param theRMinor Torus minor radius.
3366         #  @param theName Object name; when specified, this parameter is used
3367         #         for result publication in the study. Otherwise, if automatic
3368         #         publication is switched on, default value is used for result name.
3369         #
3370         #  @return New GEOM.GEOM_Object, containing the created torus.
3371         #
3372         #  @ref tui_creation_torus "Example"
3373         @ManageTransactions("PrimOp")
3374         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3375             """
3376            Create a torus with given radiuses at the origin of coordinate system.
3377
3378            Parameters:
3379                 theRMajor Torus major radius.
3380                 theRMinor Torus minor radius.
3381                 theName Object name; when specified, this parameter is used
3382                         for result publication in the study. Otherwise, if automatic
3383                         publication is switched on, default value is used for result name.
3384
3385            Returns:
3386                 New GEOM.GEOM_Object, containing the created torus.
3387             """
3388             # Example: see GEOM_TestAll.py
3389             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3390             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3391             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3392             anObj.SetParameters(Parameters)
3393             self._autoPublish(anObj, theName, "torus")
3394             return anObj
3395
3396         # end of l3_3d_primitives
3397         ## @}
3398
3399         ## @addtogroup l3_complex
3400         ## @{
3401
3402         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3403         #  @param theBase Base shape to be extruded.
3404         #  @param thePoint1 First end of extrusion vector.
3405         #  @param thePoint2 Second end of extrusion vector.
3406         #  @param theScaleFactor Use it to make prism with scaled second base.
3407         #                        Nagative value means not scaled second base.
3408         #  @param theName Object name; when specified, this parameter is used
3409         #         for result publication in the study. Otherwise, if automatic
3410         #         publication is switched on, default value is used for result name.
3411         #
3412         #  @return New GEOM.GEOM_Object, containing the created prism.
3413         #
3414         #  @ref tui_creation_prism "Example"
3415         @ManageTransactions("PrimOp")
3416         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3417             """
3418             Create a shape by extrusion of the base shape along a vector, defined by two points.
3419
3420             Parameters:
3421                 theBase Base shape to be extruded.
3422                 thePoint1 First end of extrusion vector.
3423                 thePoint2 Second end of extrusion vector.
3424                 theScaleFactor Use it to make prism with scaled second base.
3425                                Nagative value means not scaled second base.
3426                 theName Object name; when specified, this parameter is used
3427                         for result publication in the study. Otherwise, if automatic
3428                         publication is switched on, default value is used for result name.
3429
3430             Returns:
3431                 New GEOM.GEOM_Object, containing the created prism.
3432             """
3433             # Example: see GEOM_TestAll.py
3434             anObj = None
3435             Parameters = ""
3436             if theScaleFactor > 0:
3437                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3438                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3439             else:
3440                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3441             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3442             anObj.SetParameters(Parameters)
3443             self._autoPublish(anObj, theName, "prism")
3444             return anObj
3445
3446         ## Create a shape by extrusion of the base shape along a
3447         #  vector, defined by two points, in 2 Ways (forward/backward).
3448         #  @param theBase Base shape to be extruded.
3449         #  @param thePoint1 First end of extrusion vector.
3450         #  @param thePoint2 Second end of extrusion vector.
3451         #  @param theName Object name; when specified, this parameter is used
3452         #         for result publication in the study. Otherwise, if automatic
3453         #         publication is switched on, default value is used for result name.
3454         #
3455         #  @return New GEOM.GEOM_Object, containing the created prism.
3456         #
3457         #  @ref tui_creation_prism "Example"
3458         @ManageTransactions("PrimOp")
3459         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3460             """
3461             Create a shape by extrusion of the base shape along a
3462             vector, defined by two points, in 2 Ways (forward/backward).
3463
3464             Parameters:
3465                 theBase Base shape to be extruded.
3466                 thePoint1 First end of extrusion vector.
3467                 thePoint2 Second end of extrusion vector.
3468                 theName Object name; when specified, this parameter is used
3469                         for result publication in the study. Otherwise, if automatic
3470                         publication is switched on, default value is used for result name.
3471
3472             Returns:
3473                 New GEOM.GEOM_Object, containing the created prism.
3474             """
3475             # Example: see GEOM_TestAll.py
3476             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3477             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3478             self._autoPublish(anObj, theName, "prism")
3479             return anObj
3480
3481         ## Create a shape by extrusion of the base shape along the vector,
3482         #  i.e. all the space, transfixed by the base shape during its translation
3483         #  along the vector on the given distance.
3484         #  @param theBase Base shape to be extruded.
3485         #  @param theVec Direction of extrusion.
3486         #  @param theH Prism dimension along theVec.
3487         #  @param theScaleFactor Use it to make prism with scaled second base.
3488         #                        Negative value means not scaled second base.
3489         #  @param theName Object name; when specified, this parameter is used
3490         #         for result publication in the study. Otherwise, if automatic
3491         #         publication is switched on, default value is used for result name.
3492         #
3493         #  @return New GEOM.GEOM_Object, containing the created prism.
3494         #
3495         #  @ref tui_creation_prism "Example"
3496         @ManageTransactions("PrimOp")
3497         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3498             """
3499             Create a shape by extrusion of the base shape along the vector,
3500             i.e. all the space, transfixed by the base shape during its translation
3501             along the vector on the given distance.
3502
3503             Parameters:
3504                 theBase Base shape to be extruded.
3505                 theVec Direction of extrusion.
3506                 theH Prism dimension along theVec.
3507                 theScaleFactor Use it to make prism with scaled second base.
3508                                Negative value means not scaled second base.
3509                 theName Object name; when specified, this parameter is used
3510                         for result publication in the study. Otherwise, if automatic
3511                         publication is switched on, default value is used for result name.
3512
3513             Returns:
3514                 New GEOM.GEOM_Object, containing the created prism.
3515             """
3516             # Example: see GEOM_TestAll.py
3517             anObj = None
3518             Parameters = ""
3519             if theScaleFactor > 0:
3520                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3521                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3522             else:
3523                 theH,Parameters = ParseParameters(theH)
3524                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3525             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3526             anObj.SetParameters(Parameters)
3527             self._autoPublish(anObj, theName, "prism")
3528             return anObj
3529
3530         ## Create a shape by extrusion of the base shape along the vector,
3531         #  i.e. all the space, transfixed by the base shape during its translation
3532         #  along the vector on the given distance in 2 Ways (forward/backward).
3533         #  @param theBase Base shape to be extruded.
3534         #  @param theVec Direction of extrusion.
3535         #  @param theH Prism dimension along theVec in forward direction.
3536         #  @param theName Object name; when specified, this parameter is used
3537         #         for result publication in the study. Otherwise, if automatic
3538         #         publication is switched on, default value is used for result name.
3539         #
3540         #  @return New GEOM.GEOM_Object, containing the created prism.
3541         #
3542         #  @ref tui_creation_prism "Example"
3543         @ManageTransactions("PrimOp")
3544         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3545             """
3546             Create a shape by extrusion of the base shape along the vector,
3547             i.e. all the space, transfixed by the base shape during its translation
3548             along the vector on the given distance in 2 Ways (forward/backward).
3549
3550             Parameters:
3551                 theBase Base shape to be extruded.
3552                 theVec Direction of extrusion.
3553                 theH Prism dimension along theVec in forward direction.
3554                 theName Object name; when specified, this parameter is used
3555                         for result publication in the study. Otherwise, if automatic
3556                         publication is switched on, default value is used for result name.
3557
3558             Returns:
3559                 New GEOM.GEOM_Object, containing the created prism.
3560             """
3561             # Example: see GEOM_TestAll.py
3562             theH,Parameters = ParseParameters(theH)
3563             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3564             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3565             anObj.SetParameters(Parameters)
3566             self._autoPublish(anObj, theName, "prism")
3567             return anObj
3568
3569         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3570         #  @param theBase Base shape to be extruded.
3571         #  @param theDX, theDY, theDZ Directions of extrusion.
3572         #  @param theScaleFactor Use it to make prism with scaled second base.
3573         #                        Nagative value means not scaled second base.
3574         #  @param theName Object name; when specified, this parameter is used
3575         #         for result publication in the study. Otherwise, if automatic
3576         #         publication is switched on, default value is used for result name.
3577         #
3578         #  @return New GEOM.GEOM_Object, containing the created prism.
3579         #
3580         #  @ref tui_creation_prism "Example"
3581         @ManageTransactions("PrimOp")
3582         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3583             """
3584             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3585
3586             Parameters:
3587                 theBase Base shape to be extruded.
3588                 theDX, theDY, theDZ Directions of extrusion.
3589                 theScaleFactor Use it to make prism with scaled second base.
3590                                Nagative value means not scaled second base.
3591                 theName Object name; when specified, this parameter is used
3592                         for result publication in the study. Otherwise, if automatic
3593                         publication is switched on, default value is used for result name.
3594
3595             Returns:
3596                 New GEOM.GEOM_Object, containing the created prism.
3597             """
3598             # Example: see GEOM_TestAll.py
3599             anObj = None
3600             Parameters = ""
3601             if theScaleFactor > 0:
3602                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3603                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3604             else:
3605                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3606                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3607             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3608             anObj.SetParameters(Parameters)
3609             self._autoPublish(anObj, theName, "prism")
3610             return anObj
3611
3612         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3613         #  i.e. all the space, transfixed by the base shape during its translation
3614         #  along the vector on the given distance in 2 Ways (forward/backward).
3615         #  @param theBase Base shape to be extruded.
3616         #  @param theDX, theDY, theDZ Directions of extrusion.
3617         #  @param theName Object name; when specified, this parameter is used
3618         #         for result publication in the study. Otherwise, if automatic
3619         #         publication is switched on, default value is used for result name.
3620         #
3621         #  @return New GEOM.GEOM_Object, containing the created prism.
3622         #
3623         #  @ref tui_creation_prism "Example"
3624         @ManageTransactions("PrimOp")
3625         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3626             """
3627             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3628             i.e. all the space, transfixed by the base shape during its translation
3629             along the vector on the given distance in 2 Ways (forward/backward).
3630
3631             Parameters:
3632                 theBase Base shape to be extruded.
3633                 theDX, theDY, theDZ Directions of extrusion.
3634                 theName Object name; when specified, this parameter is used
3635                         for result publication in the study. Otherwise, if automatic
3636                         publication is switched on, default value is used for result name.
3637
3638             Returns:
3639                 New GEOM.GEOM_Object, containing the created prism.
3640             """
3641             # Example: see GEOM_TestAll.py
3642             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3643             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3644             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3645             anObj.SetParameters(Parameters)
3646             self._autoPublish(anObj, theName, "prism")
3647             return anObj
3648
3649         ## Create a shape by revolution of the base shape around the axis
3650         #  on the given angle, i.e. all the space, transfixed by the base
3651         #  shape during its rotation around the axis on the given angle.
3652         #  @param theBase Base shape to be rotated.
3653         #  @param theAxis Rotation axis.
3654         #  @param theAngle Rotation angle in radians.
3655         #  @param theName Object name; when specified, this parameter is used
3656         #         for result publication in the study. Otherwise, if automatic
3657         #         publication is switched on, default value is used for result name.
3658         #
3659         #  @return New GEOM.GEOM_Object, containing the created revolution.
3660         #
3661         #  @ref tui_creation_revolution "Example"
3662         @ManageTransactions("PrimOp")
3663         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3664             """
3665             Create a shape by revolution of the base shape around the axis
3666             on the given angle, i.e. all the space, transfixed by the base
3667             shape during its rotation around the axis on the given angle.
3668
3669             Parameters:
3670                 theBase Base shape to be rotated.
3671                 theAxis Rotation axis.
3672                 theAngle Rotation angle in radians.
3673                 theName Object name; when specified, this parameter is used
3674                         for result publication in the study. Otherwise, if automatic
3675                         publication is switched on, default value is used for result name.
3676
3677             Returns:
3678                 New GEOM.GEOM_Object, containing the created revolution.
3679             """
3680             # Example: see GEOM_TestAll.py
3681             theAngle,Parameters = ParseParameters(theAngle)
3682             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3683             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3684             anObj.SetParameters(Parameters)
3685             self._autoPublish(anObj, theName, "revolution")
3686             return anObj
3687
3688         ## Create a shape by revolution of the base shape around the axis
3689         #  on the given angle, i.e. all the space, transfixed by the base
3690         #  shape during its rotation around the axis on the given angle in
3691         #  both directions (forward/backward)
3692         #  @param theBase Base shape to be rotated.
3693         #  @param theAxis Rotation axis.
3694         #  @param theAngle Rotation angle in radians.
3695         #  @param theName Object name; when specified, this parameter is used
3696         #         for result publication in the study. Otherwise, if automatic
3697         #         publication is switched on, default value is used for result name.
3698         #
3699         #  @return New GEOM.GEOM_Object, containing the created revolution.
3700         #
3701         #  @ref tui_creation_revolution "Example"
3702         @ManageTransactions("PrimOp")
3703         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3704             """
3705             Create a shape by revolution of the base shape around the axis
3706             on the given angle, i.e. all the space, transfixed by the base
3707             shape during its rotation around the axis on the given angle in
3708             both directions (forward/backward).
3709
3710             Parameters:
3711                 theBase Base shape to be rotated.
3712                 theAxis Rotation axis.
3713                 theAngle Rotation angle in radians.
3714                 theName Object name; when specified, this parameter is used
3715                         for result publication in the study. Otherwise, if automatic
3716                         publication is switched on, default value is used for result name.
3717
3718             Returns:
3719                 New GEOM.GEOM_Object, containing the created revolution.
3720             """
3721             theAngle,Parameters = ParseParameters(theAngle)
3722             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3723             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3724             anObj.SetParameters(Parameters)
3725             self._autoPublish(anObj, theName, "revolution")
3726             return anObj
3727
3728         ## Create a face from a given set of contours.
3729         #  @param theContours either a list or a compound of edges/wires.
3730         #  @param theMinDeg a minimal degree of BSpline surface to create.
3731         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3732         #  @param theTol2D a 2d tolerance to be reached.
3733         #  @param theTol3D a 3d tolerance to be reached.
3734         #  @param theNbIter a number of iteration of approximation algorithm.
3735         #  @param theMethod Kind of method to perform filling operation
3736         #         (see GEOM.filling_oper_method enum).
3737         #  @param isApprox if True, BSpline curves are generated in the process
3738         #                  of surface construction. By default it is False, that means
3739         #                  the surface is created using given curves. The usage of
3740         #                  Approximation makes the algorithm work slower, but allows
3741         #                  building the surface for rather complex cases.
3742         #  @param theName Object name; when specified, this parameter is used
3743         #         for result publication in the study. Otherwise, if automatic
3744         #         publication is switched on, default value is used for result name.
3745         #
3746         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3747         #
3748         #  @ref tui_creation_filling "Example"
3749         @ManageTransactions("PrimOp")
3750         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3751                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3752             """
3753             Create a face from a given set of contours.
3754
3755             Parameters:
3756                 theContours either a list or a compound of edges/wires.
3757                 theMinDeg a minimal degree of BSpline surface to create.
3758                 theMaxDeg a maximal degree of BSpline surface to create.
3759                 theTol2D a 2d tolerance to be reached.
3760                 theTol3D a 3d tolerance to be reached.
3761                 theNbIter a number of iteration of approximation algorithm.
3762                 theMethod Kind of method to perform filling operation
3763                           (see GEOM.filling_oper_method enum).
3764                 isApprox if True, BSpline curves are generated in the process
3765                          of surface construction. By default it is False, that means
3766                          the surface is created using given curves. The usage of
3767                          Approximation makes the algorithm work slower, but allows
3768                          building the surface for rather complex cases.
3769                 theName Object name; when specified, this parameter is used
3770                         for result publication in the study. Otherwise, if automatic
3771                         publication is switched on, default value is used for result name.
3772
3773             Returns:
3774                 New GEOM.GEOM_Object (face), containing the created filling surface.
3775
3776             Example of usage:
3777                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3778             """
3779             # Example: see GEOM_TestAll.py
3780             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3781             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3782                                             theTol2D, theTol3D, theNbIter,
3783                                             theMethod, isApprox)
3784             RaiseIfFailed("MakeFilling", self.PrimOp)
3785             anObj.SetParameters(Parameters)
3786             self._autoPublish(anObj, theName, "filling")
3787             return anObj
3788
3789
3790         ## Create a face from a given set of contours.
3791         #  This method corresponds to MakeFilling() with isApprox=True.
3792         #  @param theContours either a list or a compound of edges/wires.
3793         #  @param theMinDeg a minimal degree of BSpline surface to create.
3794         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3795         #  @param theTol3D a 3d tolerance to be reached.
3796         #  @param theName Object name; when specified, this parameter is used
3797         #         for result publication in the study. Otherwise, if automatic
3798         #         publication is switched on, default value is used for result name.
3799         #
3800         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3801         #
3802         #  @ref tui_creation_filling "Example"
3803         @ManageTransactions("PrimOp")
3804         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3805             """
3806             Create a filling from the given compound of contours.
3807             This method corresponds to MakeFilling() with isApprox=True.
3808
3809             Parameters:
3810                 theContours either a list or a compound of edges/wires.
3811                 theMinDeg a minimal degree of BSpline surface to create.
3812                 theMaxDeg a maximal degree of BSpline surface to create.
3813                 theTol3D a 3d tolerance to be reached.
3814                 theName Object name; when specified, this parameter is used
3815                         for result publication in the study. Otherwise, if automatic
3816                         publication is switched on, default value is used for result name.
3817
3818             Returns:
3819                 New GEOM.GEOM_Object (face), containing the created filling surface.
3820
3821             Example of usage:
3822                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3823             """
3824             # Example: see GEOM_TestAll.py
3825             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3826             anObj = self.PrimOp.MakeFilling(theContours, theMinDeg, theMaxDeg,
3827                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3828             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3829             anObj.SetParameters(Parameters)
3830             self._autoPublish(anObj, theName, "filling")
3831             return anObj
3832
3833         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3834         #  @param theSeqSections - set of specified sections.
3835         #  @param theModeSolid - mode defining building solid or shell
3836         #  @param thePreci - precision 3D used for smoothing
3837         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3838         #  @param theName Object name; when specified, this parameter is used
3839         #         for result publication in the study. Otherwise, if automatic
3840         #         publication is switched on, default value is used for result name.
3841         #
3842         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3843         #
3844         #  @ref swig_todo "Example"
3845         @ManageTransactions("PrimOp")
3846         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3847             """
3848             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3849
3850             Parameters:
3851                 theSeqSections - set of specified sections.
3852                 theModeSolid - mode defining building solid or shell
3853                 thePreci - precision 3D used for smoothing
3854                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3855                 theName Object name; when specified, this parameter is used
3856                         for result publication in the study. Otherwise, if automatic
3857                         publication is switched on, default value is used for result name.
3858
3859             Returns:
3860                 New GEOM.GEOM_Object, containing the created shell or solid.
3861             """
3862             # Example: see GEOM_TestAll.py
3863             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3864             RaiseIfFailed("MakeThruSections", self.PrimOp)
3865             self._autoPublish(anObj, theName, "filling")
3866             return anObj
3867
3868         ## Create a shape by extrusion of the base shape along
3869         #  the path shape. The path shape can be a wire or an edge.
3870         #  @param theBase Base shape to be extruded.
3871         #  @param thePath Path shape to extrude the base shape along it.
3872         #  @param theName Object name; when specified, this parameter is used
3873         #         for result publication in the study. Otherwise, if automatic
3874         #         publication is switched on, default value is used for result name.
3875         #
3876         #  @return New GEOM.GEOM_Object, containing the created pipe.
3877         #
3878         #  @ref tui_creation_pipe "Example"
3879         @ManageTransactions("PrimOp")
3880         def MakePipe(self, theBase, thePath, theName=None):
3881             """
3882             Create a shape by extrusion of the base shape along
3883             the path shape. The path shape can be a wire or an edge.
3884
3885             Parameters:
3886                 theBase Base shape to be extruded.
3887                 thePath Path shape to extrude the base shape along it.
3888                 theName Object name; when specified, this parameter is used
3889                         for result publication in the study. Otherwise, if automatic
3890                         publication is switched on, default value is used for result name.
3891
3892             Returns:
3893                 New GEOM.GEOM_Object, containing the created pipe.
3894             """
3895             # Example: see GEOM_TestAll.py
3896             anObj = self.PrimOp.MakePipe(theBase, thePath)
3897             RaiseIfFailed("MakePipe", self.PrimOp)
3898             self._autoPublish(anObj, theName, "pipe")
3899             return anObj
3900
3901         ## Create a shape by extrusion of the profile shape along
3902         #  the path shape. The path shape can be a wire or an edge.
3903         #  the several profiles can be specified in the several locations of path.
3904         #  @param theSeqBases - list of  Bases shape to be extruded.
3905         #  @param theLocations - list of locations on the path corresponding
3906         #                        specified list of the Bases shapes. Number of locations
3907         #                        should be equal to number of bases or list of locations can be empty.
3908         #  @param thePath - Path shape to extrude the base shape along it.
3909         #  @param theWithContact - the mode defining that the section is translated to be in
3910         #                          contact with the spine.
3911         #  @param theWithCorrection - defining that the section is rotated to be
3912         #                             orthogonal to the spine tangent in the correspondent point
3913         #  @param theName Object name; when specified, this parameter is used
3914         #         for result publication in the study. Otherwise, if automatic
3915         #         publication is switched on, default value is used for result name.
3916         #
3917         #  @return New GEOM.GEOM_Object, containing the created pipe.
3918         #
3919         #  @ref tui_creation_pipe_with_diff_sec "Example"
3920         @ManageTransactions("PrimOp")
3921         def MakePipeWithDifferentSections(self, theSeqBases,
3922                                           theLocations, thePath,
3923                                           theWithContact, theWithCorrection, theName=None):
3924             """
3925             Create a shape by extrusion of the profile shape along
3926             the path shape. The path shape can be a wire or an edge.
3927             the several profiles can be specified in the several locations of path.
3928
3929             Parameters:
3930                 theSeqBases - list of  Bases shape to be extruded.
3931                 theLocations - list of locations on the path corresponding
3932                                specified list of the Bases shapes. Number of locations
3933                                should be equal to number of bases or list of locations can be empty.
3934                 thePath - Path shape to extrude the base shape along it.
3935                 theWithContact - the mode defining that the section is translated to be in
3936                                  contact with the spine(0/1)
3937                 theWithCorrection - defining that the section is rotated to be
3938                                     orthogonal to the spine tangent in the correspondent point (0/1)
3939                 theName Object name; when specified, this parameter is used
3940                         for result publication in the study. Otherwise, if automatic
3941                         publication is switched on, default value is used for result name.
3942
3943             Returns:
3944                 New GEOM.GEOM_Object, containing the created pipe.
3945             """
3946             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3947                                                               theLocations, thePath,
3948                                                               theWithContact, theWithCorrection)
3949             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3950             self._autoPublish(anObj, theName, "pipe")
3951             return anObj
3952
3953         ## Create a shape by extrusion of the profile shape along
3954         #  the path shape. The path shape can be a wire or a edge.
3955         #  the several profiles can be specified in the several locations of path.
3956         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3957         #                       shell or face. If number of faces in neighbour sections
3958         #                       aren't coincided result solid between such sections will
3959         #                       be created using external boundaries of this shells.
3960         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3961         #                          This list is used for searching correspondences between
3962         #                          faces in the sections. Size of this list must be equal
3963         #                          to size of list of base shapes.
3964         #  @param theLocations - list of locations on the path corresponding
3965         #                        specified list of the Bases shapes. Number of locations
3966         #                        should be equal to number of bases. First and last
3967         #                        locations must be coincided with first and last vertexes
3968         #                        of path correspondingly.
3969         #  @param thePath - Path shape to extrude the base shape along it.
3970         #  @param theWithContact - the mode defining that the section is translated to be in
3971         #                          contact with the spine.
3972         #  @param theWithCorrection - defining that the section is rotated to be
3973         #                             orthogonal to the spine tangent in the correspondent point
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_with_shell_sec "Example"
3981         @ManageTransactions("PrimOp")
3982         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3983                                       theLocations, thePath,
3984                                       theWithContact, theWithCorrection, theName=None):
3985             """
3986             Create a shape by extrusion of the profile shape along
3987             the path shape. The path shape can be a wire or a edge.
3988             the several profiles can be specified in the several locations of path.
3989
3990             Parameters:
3991                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3992                               shell or face. If number of faces in neighbour sections
3993                               aren't coincided result solid between such sections will
3994                               be created using external boundaries of this shells.
3995                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3996                                  This list is used for searching correspondences between
3997                                  faces in the sections. Size of this list must be equal
3998                                  to size of list of base shapes.
3999                 theLocations - list of locations on the path corresponding
4000                                specified list of the Bases shapes. Number of locations
4001                                should be equal to number of bases. First and last
4002                                locations must be coincided with first and last vertexes
4003                                of path correspondingly.
4004                 thePath - Path shape to extrude the base shape along it.
4005                 theWithContact - the mode defining that the section is translated to be in
4006                                  contact with the spine (0/1)
4007                 theWithCorrection - defining that the section is rotated to be
4008                                     orthogonal to the spine tangent in the correspondent point (0/1)
4009                 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             Returns:
4014                 New GEOM.GEOM_Object, containing the created solids.
4015             """
4016             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4017                                                           theLocations, thePath,
4018                                                           theWithContact, theWithCorrection)
4019             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4020             self._autoPublish(anObj, theName, "pipe")
4021             return anObj
4022
4023         ## Create a shape by extrusion of the profile shape along
4024         #  the path shape. This function is used only for debug pipe
4025         #  functionality - it is a version of function MakePipeWithShellSections()
4026         #  which give a possibility to recieve information about
4027         #  creating pipe between each pair of sections step by step.
4028         @ManageTransactions("PrimOp")
4029         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4030                                              theLocations, thePath,
4031                                              theWithContact, theWithCorrection, theName=None):
4032             """
4033             Create a shape by extrusion of the profile shape along
4034             the path shape. This function is used only for debug pipe
4035             functionality - it is a version of previous function
4036             geompy.MakePipeWithShellSections() which give a possibility to
4037             recieve information about creating pipe between each pair of
4038             sections step by step.
4039             """
4040             res = []
4041             nbsect = len(theSeqBases)
4042             nbsubsect = len(theSeqSubBases)
4043             #print "nbsect = ",nbsect
4044             for i in range(1,nbsect):
4045                 #print "  i = ",i
4046                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4047                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4048                 tmpSeqSubBases = []
4049                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4050                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4051                                                               tmpLocations, thePath,
4052                                                               theWithContact, theWithCorrection)
4053                 if self.PrimOp.IsDone() == 0:
4054                     print "Problems with pipe creation between ",i," and ",i+1," sections"
4055                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4056                     break
4057                 else:
4058                     print "Pipe between ",i," and ",i+1," sections is OK"
4059                     res.append(anObj)
4060                     pass
4061                 pass
4062
4063             resc = self.MakeCompound(res)
4064             #resc = self.MakeSewing(res, 0.001)
4065             #print "resc: ",resc
4066             self._autoPublish(resc, theName, "pipe")
4067             return resc
4068
4069         ## Create solids between given sections
4070         #  @param theSeqBases - list of sections (shell or face).
4071         #  @param theLocations - list of corresponding vertexes
4072         #  @param theName Object name; when specified, this parameter is used
4073         #         for result publication in the study. Otherwise, if automatic
4074         #         publication is switched on, default value is used for result name.
4075         #
4076         #  @return New GEOM.GEOM_Object, containing the created solids.
4077         #
4078         #  @ref tui_creation_pipe_without_path "Example"
4079         @ManageTransactions("PrimOp")
4080         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
4081             """
4082             Create solids between given sections
4083
4084             Parameters:
4085                 theSeqBases - list of sections (shell or face).
4086                 theLocations - list of corresponding vertexes
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                 New GEOM.GEOM_Object, containing the created solids.
4093             """
4094             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
4095             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4096             self._autoPublish(anObj, theName, "pipe")
4097             return anObj
4098
4099         ## Create a shape by extrusion of the base shape along
4100         #  the path shape with constant bi-normal direction along the given vector.
4101         #  The path shape can be a wire or an edge.
4102         #  @param theBase Base shape to be extruded.
4103         #  @param thePath Path shape to extrude the base shape along it.
4104         #  @param theVec Vector defines a constant binormal direction to keep the
4105         #                same angle beetween the direction and the sections
4106         #                along the sweep surface.
4107         #  @param theName Object name; when specified, this parameter is used
4108         #         for result publication in the study. Otherwise, if automatic
4109         #         publication is switched on, default value is used for result name.
4110         #
4111         #  @return New GEOM.GEOM_Object, containing the created pipe.
4112         #
4113         #  @ref tui_creation_pipe "Example"
4114         @ManageTransactions("PrimOp")
4115         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
4116             """
4117             Create a shape by extrusion of the base shape along
4118             the path shape with constant bi-normal direction along the given vector.
4119             The path shape can be a wire or an edge.
4120
4121             Parameters:
4122                 theBase Base shape to be extruded.
4123                 thePath Path shape to extrude the base shape along it.
4124                 theVec Vector defines a constant binormal direction to keep the
4125                        same angle beetween the direction and the sections
4126                        along the sweep surface.
4127                 theName Object name; when specified, this parameter is used
4128                         for result publication in the study. Otherwise, if automatic
4129                         publication is switched on, default value is used for result name.
4130
4131             Returns:
4132                 New GEOM.GEOM_Object, containing the created pipe.
4133             """
4134             # Example: see GEOM_TestAll.py
4135             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
4136             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4137             self._autoPublish(anObj, theName, "pipe")
4138             return anObj
4139
4140         ## Makes a thick solid from a face or a shell
4141         #  @param theShape Face or Shell to be thicken
4142         #  @param theThickness Thickness of the resulting solid
4143         #  @param theName Object name; when specified, this parameter is used
4144         #         for result publication in the study. Otherwise, if automatic
4145         #         publication is switched on, default value is used for result name.
4146         #
4147         #  @return New GEOM.GEOM_Object, containing the created solid
4148         #
4149         @ManageTransactions("PrimOp")
4150         def MakeThickSolid(self, theShape, theThickness, theName=None):
4151             """
4152             Make a thick solid from a face or a shell
4153
4154             Parameters:
4155                  theShape Face or Shell to be thicken
4156                  theThickness Thickness of the resulting solid
4157                  theName Object name; when specified, this parameter is used
4158                  for result publication in the study. Otherwise, if automatic
4159                  publication is switched on, default value is used for result name.
4160
4161             Returns:
4162                 New GEOM.GEOM_Object, containing the created solid
4163             """
4164             # Example: see GEOM_TestAll.py
4165             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
4166             RaiseIfFailed("MakeThickening", self.PrimOp)
4167             self._autoPublish(anObj, theName, "pipe")
4168             return anObj
4169
4170
4171         ## Modifies a face or a shell to make it a thick solid
4172         #  @param theShape Face or Shell to be thicken
4173         #  @param theThickness Thickness of the resulting solid
4174         #
4175         #  @return The modified shape
4176         #
4177         @ManageTransactions("PrimOp")
4178         def Thicken(self, theShape, theThickness):
4179             """
4180             Modifies a face or a shell to make it a thick solid
4181
4182             Parameters:
4183                 theBase Base shape to be extruded.
4184                 thePath Path shape to extrude the base shape along it.
4185                 theName Object name; when specified, this parameter is used
4186                         for result publication in the study. Otherwise, if automatic
4187                         publication is switched on, default value is used for result name.
4188
4189             Returns:
4190                 The modified shape
4191             """
4192             # Example: see GEOM_TestAll.py
4193             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
4194             RaiseIfFailed("MakeThickening", self.PrimOp)
4195             return anObj
4196
4197         ## Build a middle path of a pipe-like shape.
4198         #  The path shape can be a wire or an edge.
4199         #  @param theShape It can be closed or unclosed pipe-like shell
4200         #                  or a pipe-like solid.
4201         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4202         #                            should be wires or faces of theShape.
4203         #  @param theName Object name; when specified, this parameter is used
4204         #         for result publication in the study. Otherwise, if automatic
4205         #         publication is switched on, default value is used for result name.
4206         #
4207         #  @note It is not assumed that exact or approximate copy of theShape
4208         #        can be obtained by applying existing Pipe operation on the
4209         #        resulting "Path" wire taking theBase1 as the base - it is not
4210         #        always possible; though in some particular cases it might work
4211         #        it is not guaranteed. Thus, RestorePath function should not be
4212         #        considered as an exact reverse operation of the Pipe.
4213         #
4214         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4215         #                                source pipe's "path".
4216         #
4217         #  @ref tui_creation_pipe_path "Example"
4218         @ManageTransactions("PrimOp")
4219         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4220             """
4221             Build a middle path of a pipe-like shape.
4222             The path shape can be a wire or an edge.
4223
4224             Parameters:
4225                 theShape It can be closed or unclosed pipe-like shell
4226                          or a pipe-like solid.
4227                 theBase1, theBase2 Two bases of the supposed pipe. This
4228                                    should be wires or faces of theShape.
4229                 theName Object name; when specified, this parameter is used
4230                         for result publication in the study. Otherwise, if automatic
4231                         publication is switched on, default value is used for result name.
4232
4233             Returns:
4234                 New GEOM_Object, containing an edge or wire that represent
4235                                  source pipe's path.
4236             """
4237             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4238             RaiseIfFailed("RestorePath", self.PrimOp)
4239             self._autoPublish(anObj, theName, "path")
4240             return anObj
4241
4242         ## Build a middle path of a pipe-like shape.
4243         #  The path shape can be a wire or an edge.
4244         #  @param theShape It can be closed or unclosed pipe-like shell
4245         #                  or a pipe-like solid.
4246         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4247         #                                should be lists of edges of theShape.
4248         #  @param theName Object name; when specified, this parameter is used
4249         #         for result publication in the study. Otherwise, if automatic
4250         #         publication is switched on, default value is used for result name.
4251         #
4252         #  @note It is not assumed that exact or approximate copy of theShape
4253         #        can be obtained by applying existing Pipe operation on the
4254         #        resulting "Path" wire taking theBase1 as the base - it is not
4255         #        always possible; though in some particular cases it might work
4256         #        it is not guaranteed. Thus, RestorePath function should not be
4257         #        considered as an exact reverse operation of the Pipe.
4258         #
4259         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4260         #                                source pipe's "path".
4261         #
4262         #  @ref tui_creation_pipe_path "Example"
4263         @ManageTransactions("PrimOp")
4264         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4265             """
4266             Build a middle path of a pipe-like shape.
4267             The path shape can be a wire or an edge.
4268
4269             Parameters:
4270                 theShape It can be closed or unclosed pipe-like shell
4271                          or a pipe-like solid.
4272                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4273                                        should be lists of edges of theShape.
4274                 theName Object name; when specified, this parameter is used
4275                         for result publication in the study. Otherwise, if automatic
4276                         publication is switched on, default value is used for result name.
4277
4278             Returns:
4279                 New GEOM_Object, containing an edge or wire that represent
4280                                  source pipe's path.
4281             """
4282             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4283             RaiseIfFailed("RestorePath", self.PrimOp)
4284             self._autoPublish(anObj, theName, "path")
4285             return anObj
4286
4287         # end of l3_complex
4288         ## @}
4289
4290         ## @addtogroup l3_advanced
4291         ## @{
4292
4293         ## Create a linear edge with specified ends.
4294         #  @param thePnt1 Point for the first end of edge.
4295         #  @param thePnt2 Point for the second end of edge.
4296         #  @param theName Object name; when specified, this parameter is used
4297         #         for result publication in the study. Otherwise, if automatic
4298         #         publication is switched on, default value is used for result name.
4299         #
4300         #  @return New GEOM.GEOM_Object, containing the created edge.
4301         #
4302         #  @ref tui_creation_edge "Example"
4303         @ManageTransactions("ShapesOp")
4304         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4305             """
4306             Create a linear edge with specified ends.
4307
4308             Parameters:
4309                 thePnt1 Point for the first end of edge.
4310                 thePnt2 Point for the second end of edge.
4311                 theName Object name; when specified, this parameter is used
4312                         for result publication in the study. Otherwise, if automatic
4313                         publication is switched on, default value is used for result name.
4314
4315             Returns:
4316                 New GEOM.GEOM_Object, containing the created edge.
4317             """
4318             # Example: see GEOM_TestAll.py
4319             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4320             RaiseIfFailed("MakeEdge", self.ShapesOp)
4321             self._autoPublish(anObj, theName, "edge")
4322             return anObj
4323
4324         ## Create a new edge, corresponding to the given length on the given curve.
4325         #  @param theRefCurve The referenced curve (edge).
4326         #  @param theLength Length on the referenced curve. It can be negative.
4327         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4328         #                       at the end of \a theRefCurve, close to the selected point.
4329         #                       If None, start from the first point of \a theRefCurve.
4330         #  @param theName Object name; when specified, this parameter is used
4331         #         for result publication in the study. Otherwise, if automatic
4332         #         publication is switched on, default value is used for result name.
4333         #
4334         #  @return New GEOM.GEOM_Object, containing the created edge.
4335         #
4336         #  @ref tui_creation_edge "Example"
4337         @ManageTransactions("ShapesOp")
4338         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4339             """
4340             Create a new edge, corresponding to the given length on the given curve.
4341
4342             Parameters:
4343                 theRefCurve The referenced curve (edge).
4344                 theLength Length on the referenced curve. It can be negative.
4345                 theStartPoint Any point can be selected for it, the new edge will begin
4346                               at the end of theRefCurve, close to the selected point.
4347                               If None, start from the first point of theRefCurve.
4348                 theName Object name; when specified, this parameter is used
4349                         for result publication in the study. Otherwise, if automatic
4350                         publication is switched on, default value is used for result name.
4351
4352             Returns:
4353                 New GEOM.GEOM_Object, containing the created edge.
4354             """
4355             # Example: see GEOM_TestAll.py
4356             theLength, Parameters = ParseParameters(theLength)
4357             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4358             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4359             anObj.SetParameters(Parameters)
4360             self._autoPublish(anObj, theName, "edge")
4361             return anObj
4362
4363         ## Create an edge from specified wire.
4364         #  @param theWire source Wire
4365         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4366         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4367         #  @param theName Object name; when specified, this parameter is used
4368         #         for result publication in the study. Otherwise, if automatic
4369         #         publication is switched on, default value is used for result name.
4370         #
4371         #  @return New GEOM.GEOM_Object, containing the created edge.
4372         #
4373         #  @ref tui_creation_edge "Example"
4374         @ManageTransactions("ShapesOp")
4375         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4376             """
4377             Create an edge from specified wire.
4378
4379             Parameters:
4380                 theWire source Wire
4381                 theLinearTolerance linear tolerance value (default = 1e-07)
4382                 theAngularTolerance angular tolerance value (default = 1e-12)
4383                 theName Object name; when specified, this parameter is used
4384                         for result publication in the study. Otherwise, if automatic
4385                         publication is switched on, default value is used for result name.
4386
4387             Returns:
4388                 New GEOM.GEOM_Object, containing the created edge.
4389             """
4390             # Example: see GEOM_TestAll.py
4391             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4392             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4393             self._autoPublish(anObj, theName, "edge")
4394             return anObj
4395
4396         ## Create a wire from the set of edges and wires.
4397         #  @param theEdgesAndWires List of edges and/or wires.
4398         #  @param theTolerance Maximum distance between vertices, that will be merged.
4399         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4400         #  @param theName Object name; when specified, this parameter is used
4401         #         for result publication in the study. Otherwise, if automatic
4402         #         publication is switched on, default value is used for result name.
4403         #
4404         #  @return New GEOM.GEOM_Object, containing the created wire.
4405         #
4406         #  @ref tui_creation_wire "Example"
4407         @ManageTransactions("ShapesOp")
4408         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4409             """
4410             Create a wire from the set of edges and wires.
4411
4412             Parameters:
4413                 theEdgesAndWires List of edges and/or wires.
4414                 theTolerance Maximum distance between vertices, that will be merged.
4415                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4416                 theName Object name; when specified, this parameter is used
4417                         for result publication in the study. Otherwise, if automatic
4418                         publication is switched on, default value is used for result name.
4419
4420             Returns:
4421                 New GEOM.GEOM_Object, containing the created wire.
4422             """
4423             # Example: see GEOM_TestAll.py
4424             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4425             RaiseIfFailed("MakeWire", self.ShapesOp)
4426             self._autoPublish(anObj, theName, "wire")
4427             return anObj
4428
4429         ## Create a face on the given wire.
4430         #  @param theWire closed Wire or Edge to build the face on.
4431         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4432         #                        If the tolerance of the obtained planar face is less
4433         #                        than 1e-06, this face will be returned, otherwise the
4434         #                        algorithm tries to build any suitable face on the given
4435         #                        wire and prints a warning message.
4436         #  @param theName Object name; when specified, this parameter is used
4437         #         for result publication in the study. Otherwise, if automatic
4438         #         publication is switched on, default value is used for result name.
4439         #
4440         #  @return New GEOM.GEOM_Object, containing the created face.
4441         #
4442         #  @ref tui_creation_face "Example"
4443         @ManageTransactions("ShapesOp")
4444         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4445             """
4446             Create a face on the given wire.
4447
4448             Parameters:
4449                 theWire closed Wire or Edge to build the face on.
4450                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4451                                If the tolerance of the obtained planar face is less
4452                                than 1e-06, this face will be returned, otherwise the
4453                                algorithm tries to build any suitable face on the given
4454                                wire and prints a warning message.
4455                 theName Object name; when specified, this parameter is used
4456                         for result publication in the study. Otherwise, if automatic
4457                         publication is switched on, default value is used for result name.
4458
4459             Returns:
4460                 New GEOM.GEOM_Object, containing the created face.
4461             """
4462             # Example: see GEOM_TestAll.py
4463             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4464             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4465                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4466             else:
4467                 RaiseIfFailed("MakeFace", self.ShapesOp)
4468             self._autoPublish(anObj, theName, "face")
4469             return anObj
4470
4471         ## Create a face on the given wires set.
4472         #  @param theWires List of closed wires or edges to build the face on.
4473         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4474         #                        If the tolerance of the obtained planar face is less
4475         #                        than 1e-06, this face will be returned, otherwise the
4476         #                        algorithm tries to build any suitable face on the given
4477         #                        wire and prints a warning message.
4478         #  @param theName Object name; when specified, this parameter is used
4479         #         for result publication in the study. Otherwise, if automatic
4480         #         publication is switched on, default value is used for result name.
4481         #
4482         #  @return New GEOM.GEOM_Object, containing the created face.
4483         #
4484         #  @ref tui_creation_face "Example"
4485         @ManageTransactions("ShapesOp")
4486         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4487             """
4488             Create a face on the given wires set.
4489
4490             Parameters:
4491                 theWires List of closed wires or edges to build the face on.
4492                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4493                                If the tolerance of the obtained planar face is less
4494                                than 1e-06, this face will be returned, otherwise the
4495                                algorithm tries to build any suitable face on the given
4496                                wire and prints a warning message.
4497                 theName Object name; when specified, this parameter is used
4498                         for result publication in the study. Otherwise, if automatic
4499                         publication is switched on, default value is used for result name.
4500
4501             Returns:
4502                 New GEOM.GEOM_Object, containing the created face.
4503             """
4504             # Example: see GEOM_TestAll.py
4505             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4506             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4507                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4508             else:
4509                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4510             self._autoPublish(anObj, theName, "face")
4511             return anObj
4512
4513         ## See MakeFaceWires() method for details.
4514         #
4515         #  @ref tui_creation_face "Example 1"
4516         #  \n @ref swig_MakeFaces  "Example 2"
4517         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4518             """
4519             See geompy.MakeFaceWires() method for details.
4520             """
4521             # Example: see GEOM_TestOthers.py
4522             # note: auto-publishing is done in self.MakeFaceWires()
4523             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4524             return anObj
4525
4526         ## Create a face based on a surface from given face bounded
4527         #  by given wire.
4528         #  @param theFace the face whose surface is used to create a new face.
4529         #  @param theWire the wire that will bound a new face.
4530         #  @param theName Object name; when specified, this parameter is used
4531         #         for result publication in the study. Otherwise, if automatic
4532         #         publication is switched on, default value is used for result name.
4533         #
4534         #  @return New GEOM.GEOM_Object, containing the created face.
4535         #
4536         #  @ref tui_creation_face "Example"
4537         @ManageTransactions("ShapesOp")
4538         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4539             """
4540             Create a face based on a surface from given face bounded
4541             by given wire.
4542
4543             Parameters:
4544                 theFace the face whose surface is used to create a new face.
4545                 theWire the wire that will bound a new face.
4546                 theName Object name; when specified, this parameter is used
4547                         for result publication in the study. Otherwise, if automatic
4548                         publication is switched on, default value is used for result name.
4549
4550             Returns:
4551                 New GEOM.GEOM_Object, containing the created face.
4552             """
4553             # Example: see GEOM_TestAll.py
4554             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4555             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4556             self._autoPublish(anObj, theName, "face")
4557             return anObj
4558           
4559         ## Create a face from a set of edges with the given constraints.
4560         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4561         #         - edges should form a closed wire;
4562         #         - for each edge, constraint face is optional: if a constraint face is missing
4563         #           for some edge, this means that there no constraint associated with this edge.
4564         #  @param theName Object name; when specified, this parameter is used
4565         #         for result publication in the study. Otherwise, if automatic
4566         #         publication is switched on, default value is used for result name.
4567         # 
4568         # @return New GEOM.GEOM_Object, containing the created face.
4569         # 
4570         # @ref tui_creation_face "Example"
4571         @ManageTransactions("ShapesOp")
4572         def MakeFaceWithConstraints(self, theConstraints, theName=None):
4573             """
4574             Create a face from a set of edges with the given constraints.
4575
4576             Parameters:
4577                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4578                         - edges should form a closed wire;
4579                         - for each edge, constraint face is optional: if a constraint face is missing
4580                           for some edge, this means that there no constraint associated with this edge.
4581                 theName Object name; when specified, this parameter is used
4582                         for result publication in the study. Otherwise, if automatic
4583                         publication is switched on, default value is used for result name.
4584
4585             Returns:
4586                 New GEOM.GEOM_Object, containing the created face.
4587             """
4588             # Example: see GEOM_TestAll.py
4589             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
4590             if anObj is None:
4591                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
4592             self._autoPublish(anObj, theName, "face")
4593             return anObj
4594
4595         ## Create a shell from the set of faces and shells.
4596         #  @param theFacesAndShells List of faces and/or shells.
4597         #  @param theName Object name; when specified, this parameter is used
4598         #         for result publication in the study. Otherwise, if automatic
4599         #         publication is switched on, default value is used for result name.
4600         #
4601         #  @return New GEOM.GEOM_Object, containing the created shell.
4602         #
4603         #  @ref tui_creation_shell "Example"
4604         @ManageTransactions("ShapesOp")
4605         def MakeShell(self, theFacesAndShells, theName=None):
4606             """
4607             Create a shell from the set of faces and shells.
4608
4609             Parameters:
4610                 theFacesAndShells List of faces and/or shells.
4611                 theName Object name; when specified, this parameter is used
4612                         for result publication in the study. Otherwise, if automatic
4613                         publication is switched on, default value is used for result name.
4614
4615             Returns:
4616                 New GEOM.GEOM_Object, containing the created shell.
4617             """
4618             # Example: see GEOM_TestAll.py
4619             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4620             RaiseIfFailed("MakeShell", self.ShapesOp)
4621             self._autoPublish(anObj, theName, "shell")
4622             return anObj
4623
4624         ## Create a solid, bounded by the given shells.
4625         #  @param theShells Sequence of bounding shells.
4626         #  @param theName Object name; when specified, this parameter is used
4627         #         for result publication in the study. Otherwise, if automatic
4628         #         publication is switched on, default value is used for result name.
4629         #
4630         #  @return New GEOM.GEOM_Object, containing the created solid.
4631         #
4632         #  @ref tui_creation_solid "Example"
4633         @ManageTransactions("ShapesOp")
4634         def MakeSolid(self, theShells, theName=None):
4635             """
4636             Create a solid, bounded by the given shells.
4637
4638             Parameters:
4639                 theShells Sequence of bounding shells.
4640                 theName Object name; when specified, this parameter is used
4641                         for result publication in the study. Otherwise, if automatic
4642                         publication is switched on, default value is used for result name.
4643
4644             Returns:
4645                 New GEOM.GEOM_Object, containing the created solid.
4646             """
4647             # Example: see GEOM_TestAll.py
4648             theShells = ToList(theShells)
4649             if len(theShells) == 1:
4650                 descr = self._IsGoodForSolid(theShells[0])
4651                 #if len(descr) > 0:
4652                 #    raise RuntimeError, "MakeSolidShells : " + descr
4653                 if descr == "WRN_SHAPE_UNCLOSED":
4654                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4655             anObj = self.ShapesOp.MakeSolidShells(theShells)
4656             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4657             self._autoPublish(anObj, theName, "solid")
4658             return anObj
4659
4660         ## Create a compound of the given shapes.
4661         #  @param theShapes List of shapes to put in compound.
4662         #  @param theName Object name; when specified, this parameter is used
4663         #         for result publication in the study. Otherwise, if automatic
4664         #         publication is switched on, default value is used for result name.
4665         #
4666         #  @return New GEOM.GEOM_Object, containing the created compound.
4667         #
4668         #  @ref tui_creation_compound "Example"
4669         @ManageTransactions("ShapesOp")
4670         def MakeCompound(self, theShapes, theName=None):
4671             """
4672             Create a compound of the given shapes.
4673
4674             Parameters:
4675                 theShapes List of shapes to put in compound.
4676                 theName Object name; when specified, this parameter is used
4677                         for result publication in the study. Otherwise, if automatic
4678                         publication is switched on, default value is used for result name.
4679
4680             Returns:
4681                 New GEOM.GEOM_Object, containing the created compound.
4682             """
4683             # Example: see GEOM_TestAll.py
4684             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
4685             RaiseIfFailed("MakeCompound", self.ShapesOp)
4686             self._autoPublish(anObj, theName, "compound")
4687             return anObj
4688         
4689         ## Create a solid (or solids) from the set of faces and/or shells.
4690         #  @param theFacesOrShells List of faces and/or shells.
4691         #  @param isIntersect If TRUE, forces performing intersections
4692         #         between arguments; otherwise (default) intersection is not performed.
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 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
4698         #
4699         #  @ref tui_creation_solid_from_faces "Example"
4700         @ManageTransactions("ShapesOp")
4701         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
4702             """
4703             Create a solid (or solids) from the set of connected faces and/or shells.
4704
4705             Parameters:
4706                 theFacesOrShells List of faces and/or shells.
4707                 isIntersect If TRUE, forces performing intersections
4708                         between arguments; otherwise (default) intersection is not performed
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                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
4715             """
4716             # Example: see GEOM_TestAll.py
4717             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
4718             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
4719             self._autoPublish(anObj, theName, "solid")
4720             return anObj
4721
4722         # end of l3_advanced
4723         ## @}
4724
4725         ## @addtogroup l2_measure
4726         ## @{
4727
4728         ## Gives quantity of faces in the given shape.
4729         #  @param theShape Shape to count faces of.
4730         #  @return Quantity of faces.
4731         #
4732         #  @ref swig_NumberOf "Example"
4733         @ManageTransactions("ShapesOp")
4734         def NumberOfFaces(self, theShape):
4735             """
4736             Gives quantity of faces in the given shape.
4737
4738             Parameters:
4739                 theShape Shape to count faces of.
4740
4741             Returns:
4742                 Quantity of faces.
4743             """
4744             # Example: see GEOM_TestOthers.py
4745             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4746             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4747             return nb_faces
4748
4749         ## Gives quantity of edges in the given shape.
4750         #  @param theShape Shape to count edges of.
4751         #  @return Quantity of edges.
4752         #
4753         #  @ref swig_NumberOf "Example"
4754         @ManageTransactions("ShapesOp")
4755         def NumberOfEdges(self, theShape):
4756             """
4757             Gives quantity of edges in the given shape.
4758
4759             Parameters:
4760                 theShape Shape to count edges of.
4761
4762             Returns:
4763                 Quantity of edges.
4764             """
4765             # Example: see GEOM_TestOthers.py
4766             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4767             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4768             return nb_edges
4769
4770         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4771         #  @param theShape Shape to count sub-shapes of.
4772         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4773         #  @return Quantity of sub-shapes of given type.
4774         #
4775         #  @ref swig_NumberOf "Example"
4776         @ManageTransactions("ShapesOp")
4777         def NumberOfSubShapes(self, theShape, theShapeType):
4778             """
4779             Gives quantity of sub-shapes of type theShapeType in the given shape.
4780
4781             Parameters:
4782                 theShape Shape to count sub-shapes of.
4783                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4784
4785             Returns:
4786                 Quantity of sub-shapes of given type.
4787             """
4788             # Example: see GEOM_TestOthers.py
4789             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4790             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4791             return nb_ss
4792
4793         ## Gives quantity of solids in the given shape.
4794         #  @param theShape Shape to count solids in.
4795         #  @return Quantity of solids.
4796         #
4797         #  @ref swig_NumberOf "Example"
4798         @ManageTransactions("ShapesOp")
4799         def NumberOfSolids(self, theShape):
4800             """
4801             Gives quantity of solids in the given shape.
4802
4803             Parameters:
4804                 theShape Shape to count solids in.
4805
4806             Returns:
4807                 Quantity of solids.
4808             """
4809             # Example: see GEOM_TestOthers.py
4810             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4811             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4812             return nb_solids
4813
4814         # end of l2_measure
4815         ## @}
4816
4817         ## @addtogroup l3_healing
4818         ## @{
4819
4820         ## Reverses an orientation the given shape.
4821         #  @param theShape Shape to be reversed.
4822         #  @param theName Object name; when specified, this parameter is used
4823         #         for result publication in the study. Otherwise, if automatic
4824         #         publication is switched on, default value is used for result name.
4825         #
4826         #  @return The reversed copy of theShape.
4827         #
4828         #  @ref swig_ChangeOrientation "Example"
4829         @ManageTransactions("ShapesOp")
4830         def ChangeOrientation(self, theShape, theName=None):
4831             """
4832             Reverses an orientation the given shape.
4833
4834             Parameters:
4835                 theShape Shape to be reversed.
4836                 theName Object name; when specified, this parameter is used
4837                         for result publication in the study. Otherwise, if automatic
4838                         publication is switched on, default value is used for result name.
4839
4840             Returns:
4841                 The reversed copy of theShape.
4842             """
4843             # Example: see GEOM_TestAll.py
4844             anObj = self.ShapesOp.ChangeOrientation(theShape)
4845             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4846             self._autoPublish(anObj, theName, "reversed")
4847             return anObj
4848
4849         ## See ChangeOrientation() method for details.
4850         #
4851         #  @ref swig_OrientationChange "Example"
4852         def OrientationChange(self, theShape, theName=None):
4853             """
4854             See geompy.ChangeOrientation method for details.
4855             """
4856             # Example: see GEOM_TestOthers.py
4857             # note: auto-publishing is done in self.ChangeOrientation()
4858             anObj = self.ChangeOrientation(theShape, theName)
4859             return anObj
4860
4861         # end of l3_healing
4862         ## @}
4863
4864         ## @addtogroup l4_obtain
4865         ## @{
4866
4867         ## Retrieve all free faces from the given shape.
4868         #  Free face is a face, which is not shared between two shells of the shape.
4869         #  @param theShape Shape to find free faces in.
4870         #  @return List of IDs of all free faces, contained in theShape.
4871         #
4872         #  @ref tui_free_faces_page "Example"
4873         @ManageTransactions("ShapesOp")
4874         def GetFreeFacesIDs(self,theShape):
4875             """
4876             Retrieve all free faces from the given shape.
4877             Free face is a face, which is not shared between two shells of the shape.
4878
4879             Parameters:
4880                 theShape Shape to find free faces in.
4881
4882             Returns:
4883                 List of IDs of all free faces, contained in theShape.
4884             """
4885             # Example: see GEOM_TestOthers.py
4886             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4887             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4888             return anIDs
4889
4890         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4891         #  @param theShape1 Shape to find sub-shapes in.
4892         #  @param theShape2 Shape to find shared sub-shapes with.
4893         #  @param theShapeType Type of sub-shapes to be retrieved.
4894         #  @param theName Object name; when specified, this parameter is used
4895         #         for result publication in the study. Otherwise, if automatic
4896         #         publication is switched on, default value is used for result name.
4897         #
4898         #  @return List of sub-shapes of theShape1, shared with theShape2.
4899         #
4900         #  @ref swig_GetSharedShapes "Example"
4901         @ManageTransactions("ShapesOp")
4902         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4903             """
4904             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4905
4906             Parameters:
4907                 theShape1 Shape to find sub-shapes in.
4908                 theShape2 Shape to find shared sub-shapes with.
4909                 theShapeType Type of sub-shapes to be retrieved.
4910                 theName Object name; when specified, this parameter is used
4911                         for result publication in the study. Otherwise, if automatic
4912                         publication is switched on, default value is used for result name.
4913
4914             Returns:
4915                 List of sub-shapes of theShape1, shared with theShape2.
4916             """
4917             # Example: see GEOM_TestOthers.py
4918             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4919             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4920             self._autoPublish(aList, theName, "shared")
4921             return aList
4922
4923         ## Get sub-shapes, shared by input shapes.
4924         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
4925         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
4926         #  @param theMultiShare Specifies what type of shares should be checked:
4927         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
4928         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
4929         #  @param theName Object name; when specified, this parameter is used
4930         #         for result publication in the study. Otherwise, if automatic
4931         #         publication is switched on, default value is used for result name.
4932         #
4933         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
4934         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
4935         #        and all rest input shapes are returned.
4936         #
4937         #  @return List of all found sub-shapes.
4938         #
4939         #  Examples:
4940         #  - @ref tui_shared_shapes "Example 1"
4941         #  - @ref swig_GetSharedShapes "Example 2"
4942         @ManageTransactions("ShapesOp")
4943         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
4944             """
4945             Get sub-shapes, shared by input shapes.
4946
4947             Parameters:
4948                 theShapes Either a list or compound of shapes to find common sub-shapes of.
4949                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
4950                 theMultiShare Specifies what type of shares should be checked:
4951                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
4952                   - False: causes to search sub-shapes shared between couples of input shapes.
4953                 theName Object name; when specified, this parameter is used
4954                         for result publication in the study. Otherwise, if automatic
4955                         publication is switched on, default value is used for result name.
4956
4957             Note: if theShapes contains single compound, the shares between all possible couples of 
4958                   its top-level shapes are returned; otherwise, only shares between 1st input shape
4959                   and all rest input shapes are returned.
4960
4961             Returns:
4962                 List of all found sub-shapes.
4963             """
4964             # Example: see GEOM_TestOthers.py
4965             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
4966             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4967             self._autoPublish(aList, theName, "shared")
4968             return aList
4969
4970         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4971         #  situated relatively the specified plane by the certain way,
4972         #  defined through <VAR>theState</VAR> parameter.
4973         #  @param theShape Shape to find sub-shapes of.
4974         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4975         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4976         #                direction and location of the plane to find shapes on.
4977         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4978         #  @param theName Object name; when specified, this parameter is used
4979         #         for result publication in the study. Otherwise, if automatic
4980         #         publication is switched on, default value is used for result name.
4981         #
4982         #  @return List of all found sub-shapes.
4983         #
4984         #  @ref swig_GetShapesOnPlane "Example"
4985         @ManageTransactions("ShapesOp")
4986         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4987             """
4988             Find in theShape all sub-shapes of type theShapeType,
4989             situated relatively the specified plane by the certain way,
4990             defined through theState parameter.
4991
4992             Parameters:
4993                 theShape Shape to find sub-shapes of.
4994                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4995                 theAx1 Vector (or line, or linear edge), specifying normal
4996                        direction and location of the plane to find shapes on.
4997                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4998                 theName Object name; when specified, this parameter is used
4999                         for result publication in the study. Otherwise, if automatic
5000                         publication is switched on, default value is used for result name.
5001
5002             Returns:
5003                 List of all found sub-shapes.
5004             """
5005             # Example: see GEOM_TestOthers.py
5006             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
5007             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
5008             self._autoPublish(aList, theName, "shapeOnPlane")
5009             return aList
5010
5011         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5012         #  situated relatively the specified plane by the certain way,
5013         #  defined through <VAR>theState</VAR> parameter.
5014         #  @param theShape Shape to find sub-shapes of.
5015         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5016         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5017         #                direction and location of the plane to find shapes on.
5018         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5019         #
5020         #  @return List of all found sub-shapes indices.
5021         #
5022         #  @ref swig_GetShapesOnPlaneIDs "Example"
5023         @ManageTransactions("ShapesOp")
5024         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
5025             """
5026             Find in theShape all sub-shapes of type theShapeType,
5027             situated relatively the specified plane by the certain way,
5028             defined through theState parameter.
5029
5030             Parameters:
5031                 theShape Shape to find sub-shapes of.
5032                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5033                 theAx1 Vector (or line, or linear edge), specifying normal
5034                        direction and location of the plane to find shapes on.
5035                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5036
5037             Returns:
5038                 List of all found sub-shapes indices.
5039             """
5040             # Example: see GEOM_TestOthers.py
5041             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
5042             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
5043             return aList
5044
5045         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5046         #  situated relatively the specified plane by the certain way,
5047         #  defined through <VAR>theState</VAR> parameter.
5048         #  @param theShape Shape to find sub-shapes of.
5049         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5050         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5051         #                direction of the plane to find shapes on.
5052         #  @param thePnt Point specifying location of the plane to find shapes on.
5053         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5054         #  @param theName Object name; when specified, this parameter is used
5055         #         for result publication in the study. Otherwise, if automatic
5056         #         publication is switched on, default value is used for result name.
5057         #
5058         #  @return List of all found sub-shapes.
5059         #
5060         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5061         @ManageTransactions("ShapesOp")
5062         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
5063             """
5064             Find in theShape all sub-shapes of type theShapeType,
5065             situated relatively the specified plane by the certain way,
5066             defined through theState parameter.
5067
5068             Parameters:
5069                 theShape Shape to find sub-shapes of.
5070                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5071                 theAx1 Vector (or line, or linear edge), specifying normal
5072                        direction and location of the plane to find shapes on.
5073                 thePnt Point specifying location of the plane to find shapes on.
5074                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5075                 theName Object name; when specified, this parameter is used
5076                         for result publication in the study. Otherwise, if automatic
5077                         publication is switched on, default value is used for result name.
5078
5079             Returns:
5080                 List of all found sub-shapes.
5081             """
5082             # Example: see GEOM_TestOthers.py
5083             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5084                                                                theAx1, thePnt, theState)
5085             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5086             self._autoPublish(aList, theName, "shapeOnPlane")
5087             return aList
5088
5089         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5090         #  situated relatively the specified plane by the certain way,
5091         #  defined through <VAR>theState</VAR> parameter.
5092         #  @param theShape Shape to find sub-shapes of.
5093         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5094         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5095         #                direction of the plane to find shapes on.
5096         #  @param thePnt Point specifying location of the plane to find shapes on.
5097         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5098         #
5099         #  @return List of all found sub-shapes indices.
5100         #
5101         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5102         @ManageTransactions("ShapesOp")
5103         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5104             """
5105             Find in theShape all sub-shapes of type theShapeType,
5106             situated relatively the specified plane by the certain way,
5107             defined through theState parameter.
5108
5109             Parameters:
5110                 theShape Shape to find sub-shapes of.
5111                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5112                 theAx1 Vector (or line, or linear edge), specifying normal
5113                        direction and location of the plane to find shapes on.
5114                 thePnt Point specifying location of the plane to find shapes on.
5115                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5116
5117             Returns:
5118                 List of all found sub-shapes indices.
5119             """
5120             # Example: see GEOM_TestOthers.py
5121             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5122                                                                   theAx1, thePnt, theState)
5123             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5124             return aList
5125
5126         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5127         #  the specified cylinder by the certain way, defined through \a theState parameter.
5128         #  @param theShape Shape to find sub-shapes of.
5129         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5130         #  @param theAxis Vector (or line, or linear edge), specifying
5131         #                 axis of the cylinder to find shapes on.
5132         #  @param theRadius Radius of the cylinder to find shapes on.
5133         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5134         #  @param theName Object name; when specified, this parameter is used
5135         #         for result publication in the study. Otherwise, if automatic
5136         #         publication is switched on, default value is used for result name.
5137         #
5138         #  @return List of all found sub-shapes.
5139         #
5140         #  @ref swig_GetShapesOnCylinder "Example"
5141         @ManageTransactions("ShapesOp")
5142         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5143             """
5144             Find in theShape all sub-shapes of type theShapeType, situated relatively
5145             the specified cylinder by the certain way, defined through theState parameter.
5146
5147             Parameters:
5148                 theShape Shape to find sub-shapes of.
5149                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5150                 theAxis Vector (or line, or linear edge), specifying
5151                         axis of the cylinder to find shapes on.
5152                 theRadius Radius of the cylinder to find shapes on.
5153                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5154                 theName Object name; when specified, this parameter is used
5155                         for result publication in the study. Otherwise, if automatic
5156                         publication is switched on, default value is used for result name.
5157
5158             Returns:
5159                 List of all found sub-shapes.
5160             """
5161             # Example: see GEOM_TestOthers.py
5162             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5163             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5164             self._autoPublish(aList, theName, "shapeOnCylinder")
5165             return aList
5166
5167         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5168         #  the specified cylinder by the certain way, defined through \a theState parameter.
5169         #  @param theShape Shape to find sub-shapes of.
5170         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5171         #  @param theAxis Vector (or line, or linear edge), specifying
5172         #                 axis of the cylinder to find shapes on.
5173         #  @param theRadius Radius of the cylinder to find shapes on.
5174         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5175         #
5176         #  @return List of all found sub-shapes indices.
5177         #
5178         #  @ref swig_GetShapesOnCylinderIDs "Example"
5179         @ManageTransactions("ShapesOp")
5180         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5181             """
5182             Find in theShape all sub-shapes of type theShapeType, situated relatively
5183             the specified cylinder by the certain way, defined through theState parameter.
5184
5185             Parameters:
5186                 theShape Shape to find sub-shapes of.
5187                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5188                 theAxis Vector (or line, or linear edge), specifying
5189                         axis of the cylinder to find shapes on.
5190                 theRadius Radius of the cylinder to find shapes on.
5191                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5192
5193             Returns:
5194                 List of all found sub-shapes indices.
5195             """
5196             # Example: see GEOM_TestOthers.py
5197             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5198             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5199             return aList
5200
5201         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5202         #  the specified cylinder by the certain way, defined through \a theState parameter.
5203         #  @param theShape Shape to find sub-shapes of.
5204         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5205         #  @param theAxis Vector (or line, or linear edge), specifying
5206         #                 axis of the cylinder to find shapes on.
5207         #  @param thePnt Point specifying location of the bottom of the cylinder.
5208         #  @param theRadius Radius of the cylinder to find shapes on.
5209         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5210         #  @param theName Object name; when specified, this parameter is used
5211         #         for result publication in the study. Otherwise, if automatic
5212         #         publication is switched on, default value is used for result name.
5213         #
5214         #  @return List of all found sub-shapes.
5215         #
5216         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5217         @ManageTransactions("ShapesOp")
5218         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5219             """
5220             Find in theShape all sub-shapes of type theShapeType, situated relatively
5221             the specified cylinder by the certain way, defined through theState parameter.
5222
5223             Parameters:
5224                 theShape Shape to find sub-shapes of.
5225                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5226                 theAxis Vector (or line, or linear edge), specifying
5227                         axis of the cylinder to find shapes on.
5228                 theRadius Radius of the cylinder to find shapes on.
5229                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5230                 theName Object name; when specified, this parameter is used
5231                         for result publication in the study. Otherwise, if automatic
5232                         publication is switched on, default value is used for result name.
5233
5234             Returns:
5235                 List of all found sub-shapes.
5236             """
5237             # Example: see GEOM_TestOthers.py
5238             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5239             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5240             self._autoPublish(aList, theName, "shapeOnCylinder")
5241             return aList
5242
5243         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5244         #  the specified cylinder by the certain way, defined through \a theState parameter.
5245         #  @param theShape Shape to find sub-shapes of.
5246         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5247         #  @param theAxis Vector (or line, or linear edge), specifying
5248         #                 axis of the cylinder to find shapes on.
5249         #  @param thePnt Point specifying location of the bottom of the cylinder.
5250         #  @param theRadius Radius of the cylinder to find shapes on.
5251         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5252         #
5253         #  @return List of all found sub-shapes indices
5254         #
5255         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5256         @ManageTransactions("ShapesOp")
5257         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5258             """
5259             Find in theShape all sub-shapes of type theShapeType, situated relatively
5260             the specified cylinder by the certain way, defined through theState parameter.
5261
5262             Parameters:
5263                 theShape Shape to find sub-shapes of.
5264                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5265                 theAxis Vector (or line, or linear edge), specifying
5266                         axis of the cylinder to find shapes on.
5267                 theRadius Radius of the cylinder to find shapes on.
5268                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5269
5270             Returns:
5271                 List of all found sub-shapes indices.
5272             """
5273             # Example: see GEOM_TestOthers.py
5274             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5275             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5276             return aList
5277
5278         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5279         #  the specified sphere by the certain way, defined through \a theState parameter.
5280         #  @param theShape Shape to find sub-shapes of.
5281         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5282         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5283         #  @param theRadius Radius of the sphere to find shapes on.
5284         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5285         #  @param theName Object name; when specified, this parameter is used
5286         #         for result publication in the study. Otherwise, if automatic
5287         #         publication is switched on, default value is used for result name.
5288         #
5289         #  @return List of all found sub-shapes.
5290         #
5291         #  @ref swig_GetShapesOnSphere "Example"
5292         @ManageTransactions("ShapesOp")
5293         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5294             """
5295             Find in theShape all sub-shapes of type theShapeType, situated relatively
5296             the specified sphere by the certain way, defined through theState parameter.
5297
5298             Parameters:
5299                 theShape Shape to find sub-shapes of.
5300                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5301                 theCenter Point, specifying center of the sphere to find shapes on.
5302                 theRadius Radius of the sphere to find shapes on.
5303                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5304                 theName Object name; when specified, this parameter is used
5305                         for result publication in the study. Otherwise, if automatic
5306                         publication is switched on, default value is used for result name.
5307
5308             Returns:
5309                 List of all found sub-shapes.
5310             """
5311             # Example: see GEOM_TestOthers.py
5312             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5313             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5314             self._autoPublish(aList, theName, "shapeOnSphere")
5315             return aList
5316
5317         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5318         #  the specified sphere by the certain way, defined through \a theState parameter.
5319         #  @param theShape Shape to find sub-shapes of.
5320         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5321         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5322         #  @param theRadius Radius of the sphere to find shapes on.
5323         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5324         #
5325         #  @return List of all found sub-shapes indices.
5326         #
5327         #  @ref swig_GetShapesOnSphereIDs "Example"
5328         @ManageTransactions("ShapesOp")
5329         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5330             """
5331             Find in theShape all sub-shapes of type theShapeType, situated relatively
5332             the specified sphere by the certain way, defined through theState parameter.
5333
5334             Parameters:
5335                 theShape Shape to find sub-shapes of.
5336                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5337                 theCenter Point, specifying center of the sphere to find shapes on.
5338                 theRadius Radius of the sphere to find shapes on.
5339                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5340
5341             Returns:
5342                 List of all found sub-shapes indices.
5343             """
5344             # Example: see GEOM_TestOthers.py
5345             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5346             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5347             return aList
5348
5349         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5350         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5351         #  @param theShape Shape to find sub-shapes of.
5352         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5353         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5354         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5355         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5356         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5357         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5358         #  @param theName Object name; when specified, this parameter is used
5359         #         for result publication in the study. Otherwise, if automatic
5360         #         publication is switched on, default value is used for result name.
5361         #
5362         #  @return List of all found sub-shapes.
5363         #
5364         #  @ref swig_GetShapesOnQuadrangle "Example"
5365         @ManageTransactions("ShapesOp")
5366         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5367                                   theTopLeftPoint, theTopRigthPoint,
5368                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5369             """
5370             Find in theShape all sub-shapes of type theShapeType, situated relatively
5371             the specified quadrangle by the certain way, defined through theState parameter.
5372
5373             Parameters:
5374                 theShape Shape to find sub-shapes of.
5375                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5376                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5377                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5378                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5379                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5380                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5381                 theName Object name; when specified, this parameter is used
5382                         for result publication in the study. Otherwise, if automatic
5383                         publication is switched on, default value is used for result name.
5384
5385             Returns:
5386                 List of all found sub-shapes.
5387             """
5388             # Example: see GEOM_TestOthers.py
5389             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5390                                                         theTopLeftPoint, theTopRigthPoint,
5391                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5392             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5393             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5394             return aList
5395
5396         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5397         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5398         #  @param theShape Shape to find sub-shapes of.
5399         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5400         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5401         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5402         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5403         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5404         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5405         #
5406         #  @return List of all found sub-shapes indices.
5407         #
5408         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5409         @ManageTransactions("ShapesOp")
5410         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5411                                      theTopLeftPoint, theTopRigthPoint,
5412                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5413             """
5414             Find in theShape all sub-shapes of type theShapeType, situated relatively
5415             the specified quadrangle by the certain way, defined through theState parameter.
5416
5417             Parameters:
5418                 theShape Shape to find sub-shapes of.
5419                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5420                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5421                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5422                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5423                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5424                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5425
5426             Returns:
5427                 List of all found sub-shapes indices.
5428             """
5429
5430             # Example: see GEOM_TestOthers.py
5431             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5432                                                            theTopLeftPoint, theTopRigthPoint,
5433                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5434             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5435             return aList
5436
5437         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5438         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5439         #  @param theBox Shape for relative comparing.
5440         #  @param theShape Shape to find sub-shapes of.
5441         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5442         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5443         #  @param theName Object name; when specified, this parameter is used
5444         #         for result publication in the study. Otherwise, if automatic
5445         #         publication is switched on, default value is used for result name.
5446         #
5447         #  @return List of all found sub-shapes.
5448         #
5449         #  @ref swig_GetShapesOnBox "Example"
5450         @ManageTransactions("ShapesOp")
5451         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5452             """
5453             Find in theShape all sub-shapes of type theShapeType, situated relatively
5454             the specified theBox by the certain way, defined through theState parameter.
5455
5456             Parameters:
5457                 theBox Shape for relative comparing.
5458                 theShape Shape to find sub-shapes of.
5459                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5460                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5461                 theName Object name; when specified, this parameter is used
5462                         for result publication in the study. Otherwise, if automatic
5463                         publication is switched on, default value is used for result name.
5464
5465             Returns:
5466                 List of all found sub-shapes.
5467             """
5468             # Example: see GEOM_TestOthers.py
5469             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5470             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5471             self._autoPublish(aList, theName, "shapeOnBox")
5472             return aList
5473
5474         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5475         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5476         #  @param theBox Shape for relative comparing.
5477         #  @param theShape Shape to find sub-shapes of.
5478         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5479         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5480         #
5481         #  @return List of all found sub-shapes indices.
5482         #
5483         #  @ref swig_GetShapesOnBoxIDs "Example"
5484         @ManageTransactions("ShapesOp")
5485         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5486             """
5487             Find in theShape all sub-shapes of type theShapeType, situated relatively
5488             the specified theBox by the certain way, defined through theState parameter.
5489
5490             Parameters:
5491                 theBox Shape for relative comparing.
5492                 theShape Shape to find sub-shapes of.
5493                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5494                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5495
5496             Returns:
5497                 List of all found sub-shapes indices.
5498             """
5499             # Example: see GEOM_TestOthers.py
5500             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5501             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5502             return aList
5503
5504         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5505         #  situated relatively the specified \a theCheckShape by the
5506         #  certain way, defined through \a theState parameter.
5507         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5508         #  @param theShape Shape to find sub-shapes of.
5509         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5510         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5511         #  @param theName Object name; when specified, this parameter is used
5512         #         for result publication in the study. Otherwise, if automatic
5513         #         publication is switched on, default value is used for result name.
5514         #
5515         #  @return List of all found sub-shapes.
5516         #
5517         #  @ref swig_GetShapesOnShape "Example"
5518         @ManageTransactions("ShapesOp")
5519         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5520             """
5521             Find in theShape all sub-shapes of type theShapeType,
5522             situated relatively the specified theCheckShape by the
5523             certain way, defined through theState parameter.
5524
5525             Parameters:
5526                 theCheckShape Shape for relative comparing. It must be a solid.
5527                 theShape Shape to find sub-shapes of.
5528                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5529                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5530                 theName Object name; when specified, this parameter is used
5531                         for result publication in the study. Otherwise, if automatic
5532                         publication is switched on, default value is used for result name.
5533
5534             Returns:
5535                 List of all found sub-shapes.
5536             """
5537             # Example: see GEOM_TestOthers.py
5538             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5539                                                    theShapeType, theState)
5540             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5541             self._autoPublish(aList, theName, "shapeOnShape")
5542             return aList
5543
5544         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5545         #  situated relatively the specified \a theCheckShape by the
5546         #  certain way, defined through \a theState parameter.
5547         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5548         #  @param theShape Shape to find sub-shapes of.
5549         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5550         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5551         #  @param theName Object name; when specified, this parameter is used
5552         #         for result publication in the study. Otherwise, if automatic
5553         #         publication is switched on, default value is used for result name.
5554         #
5555         #  @return All found sub-shapes as compound.
5556         #
5557         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5558         @ManageTransactions("ShapesOp")
5559         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5560             """
5561             Find in theShape all sub-shapes of type theShapeType,
5562             situated relatively the specified theCheckShape by the
5563             certain way, defined through theState parameter.
5564
5565             Parameters:
5566                 theCheckShape Shape for relative comparing. It must be a solid.
5567                 theShape Shape to find sub-shapes of.
5568                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5569                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5570                 theName Object name; when specified, this parameter is used
5571                         for result publication in the study. Otherwise, if automatic
5572                         publication is switched on, default value is used for result name.
5573
5574             Returns:
5575                 All found sub-shapes as compound.
5576             """
5577             # Example: see GEOM_TestOthers.py
5578             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5579                                                              theShapeType, theState)
5580             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5581             self._autoPublish(anObj, theName, "shapeOnShape")
5582             return anObj
5583
5584         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5585         #  situated relatively the specified \a theCheckShape by the
5586         #  certain way, defined through \a theState parameter.
5587         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5588         #  @param theShape Shape to find sub-shapes of.
5589         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5590         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5591         #
5592         #  @return List of all found sub-shapes indices.
5593         #
5594         #  @ref swig_GetShapesOnShapeIDs "Example"
5595         @ManageTransactions("ShapesOp")
5596         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5597             """
5598             Find in theShape all sub-shapes of type theShapeType,
5599             situated relatively the specified theCheckShape by the
5600             certain way, defined through theState parameter.
5601
5602             Parameters:
5603                 theCheckShape Shape for relative comparing. It must be a solid.
5604                 theShape Shape to find sub-shapes of.
5605                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5606                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5607
5608             Returns:
5609                 List of all found sub-shapes indices.
5610             """
5611             # Example: see GEOM_TestOthers.py
5612             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5613                                                       theShapeType, theState)
5614             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5615             return aList
5616
5617         ## Get sub-shape(s) of theShapeWhere, which are
5618         #  coincident with \a theShapeWhat or could be a part of it.
5619         #  @param theShapeWhere Shape to find sub-shapes of.
5620         #  @param theShapeWhat Shape, specifying what to find.
5621         #  @param isNewImplementation implementation of GetInPlace functionality
5622         #             (default = False, old alghorithm based on shape properties)
5623         #  @param theName Object name; when specified, this parameter is used
5624         #         for result publication in the study. Otherwise, if automatic
5625         #         publication is switched on, default value is used for result name.
5626         #
5627         #  @return Group of all found sub-shapes or a single found sub-shape.
5628         #
5629         #  @note This function has a restriction on argument shapes.
5630         #        If \a theShapeWhere has curved parts with significantly
5631         #        outstanding centres (i.e. the mass centre of a part is closer to
5632         #        \a theShapeWhat than to the part), such parts will not be found.
5633         #        @image html get_in_place_lost_part.png
5634         #
5635         #  @ref swig_GetInPlace "Example"
5636         @ManageTransactions("ShapesOp")
5637         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5638             """
5639             Get sub-shape(s) of theShapeWhere, which are
5640             coincident with  theShapeWhat or could be a part of it.
5641
5642             Parameters:
5643                 theShapeWhere Shape to find sub-shapes of.
5644                 theShapeWhat Shape, specifying what to find.
5645                 isNewImplementation Implementation of GetInPlace functionality
5646                                     (default = False, old alghorithm based on shape properties)
5647                 theName Object name; when specified, this parameter is used
5648                         for result publication in the study. Otherwise, if automatic
5649                         publication is switched on, default value is used for result name.
5650
5651             Returns:
5652                 Group of all found sub-shapes or a single found sub-shape.
5653
5654
5655             Note:
5656                 This function has a restriction on argument shapes.
5657                 If theShapeWhere has curved parts with significantly
5658                 outstanding centres (i.e. the mass centre of a part is closer to
5659                 theShapeWhat than to the part), such parts will not be found.
5660             """
5661             # Example: see GEOM_TestOthers.py
5662             anObj = None
5663             if isNewImplementation:
5664                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5665             else:
5666                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5667                 pass
5668             RaiseIfFailed("GetInPlace", self.ShapesOp)
5669             self._autoPublish(anObj, theName, "inplace")
5670             return anObj
5671
5672         ## Get sub-shape(s) of \a theShapeWhere, which are
5673         #  coincident with \a theShapeWhat or could be a part of it.
5674         #
5675         #  Implementation of this method is based on a saved history of an operation,
5676         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5677         #  arguments (an argument shape or a sub-shape of an argument shape).
5678         #  The operation could be the Partition or one of boolean operations,
5679         #  performed on simple shapes (not on compounds).
5680         #
5681         #  @param theShapeWhere Shape to find sub-shapes of.
5682         #  @param theShapeWhat Shape, specifying what to find (must be in the
5683         #                      building history of the ShapeWhere).
5684         #  @param theName Object name; when specified, this parameter is used
5685         #         for result publication in the study. Otherwise, if automatic
5686         #         publication is switched on, default value is used for result name.
5687         #
5688         #  @return Group of all found sub-shapes or a single found sub-shape.
5689         #
5690         #  @ref swig_GetInPlace "Example"
5691         @ManageTransactions("ShapesOp")
5692         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5693             """
5694             Implementation of this method is based on a saved history of an operation,
5695             produced theShapeWhere. The theShapeWhat must be among this operation's
5696             arguments (an argument shape or a sub-shape of an argument shape).
5697             The operation could be the Partition or one of boolean operations,
5698             performed on simple shapes (not on compounds).
5699
5700             Parameters:
5701                 theShapeWhere Shape to find sub-shapes of.
5702                 theShapeWhat Shape, specifying what to find (must be in the
5703                                 building history of the ShapeWhere).
5704                 theName Object name; when specified, this parameter is used
5705                         for result publication in the study. Otherwise, if automatic
5706                         publication is switched on, default value is used for result name.
5707
5708             Returns:
5709                 Group of all found sub-shapes or a single found sub-shape.
5710             """
5711             # Example: see GEOM_TestOthers.py
5712             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5713             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5714             self._autoPublish(anObj, theName, "inplace")
5715             return anObj
5716
5717         ## Get sub-shape of theShapeWhere, which is
5718         #  equal to \a theShapeWhat.
5719         #  @param theShapeWhere Shape to find sub-shape of.
5720         #  @param theShapeWhat Shape, specifying what to find.
5721         #  @param theName Object name; when specified, this parameter is used
5722         #         for result publication in the study. Otherwise, if automatic
5723         #         publication is switched on, default value is used for result name.
5724         #
5725         #  @return New GEOM.GEOM_Object for found sub-shape.
5726         #
5727         #  @ref swig_GetSame "Example"
5728         @ManageTransactions("ShapesOp")
5729         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5730             """
5731             Get sub-shape of theShapeWhere, which is
5732             equal to theShapeWhat.
5733
5734             Parameters:
5735                 theShapeWhere Shape to find sub-shape of.
5736                 theShapeWhat Shape, specifying what to find.
5737                 theName Object name; when specified, this parameter is used
5738                         for result publication in the study. Otherwise, if automatic
5739                         publication is switched on, default value is used for result name.
5740
5741             Returns:
5742                 New GEOM.GEOM_Object for found sub-shape.
5743             """
5744             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5745             RaiseIfFailed("GetSame", self.ShapesOp)
5746             self._autoPublish(anObj, theName, "sameShape")
5747             return anObj
5748
5749
5750         ## Get sub-shape indices of theShapeWhere, which is
5751         #  equal to \a theShapeWhat.
5752         #  @param theShapeWhere Shape to find sub-shape of.
5753         #  @param theShapeWhat Shape, specifying what to find.
5754         #  @return List of all found sub-shapes indices.
5755         #
5756         #  @ref swig_GetSame "Example"
5757         @ManageTransactions("ShapesOp")
5758         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5759             """
5760             Get sub-shape indices of theShapeWhere, which is
5761             equal to theShapeWhat.
5762
5763             Parameters:
5764                 theShapeWhere Shape to find sub-shape of.
5765                 theShapeWhat Shape, specifying what to find.
5766
5767             Returns:
5768                 List of all found sub-shapes indices.
5769             """
5770             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5771             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5772             return anObj
5773
5774         ## Resize the input edge with the new Min and Max parameters.
5775         #  The input edge parameters range is [0, 1]. If theMin parameter is
5776         #  negative, the input edge is extended, otherwise it is shrinked by
5777         #  theMin parameter. If theMax is greater than 1, the edge is extended,
5778         #  otherwise it is shrinked by theMax parameter.
5779         #  @param theEdge the input edge to be resized.
5780         #  @param theMin the minimal parameter value.
5781         #  @param theMax the maximal parameter value.
5782         #  @param theName Object name; when specified, this parameter is used
5783         #         for result publication in the study. Otherwise, if automatic
5784         #         publication is switched on, default value is used for result name.
5785         #  @return New GEOM.GEOM_Object, containing the created edge.
5786         #
5787         #  @ref tui_extend "Example"
5788         @ManageTransactions("ShapesOp")
5789         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
5790             """
5791             Resize the input edge with the new Min and Max parameters.
5792             The input edge parameters range is [0, 1]. If theMin parameter is
5793             negative, the input edge is extended, otherwise it is shrinked by
5794             theMin parameter. If theMax is greater than 1, the edge is extended,
5795             otherwise it is shrinked by theMax parameter.
5796
5797             Parameters:
5798                 theEdge the input edge to be resized.
5799                 theMin the minimal parameter value.
5800                 theMax the maximal parameter value.
5801                 theName Object name; when specified, this parameter is used
5802                         for result publication in the study. Otherwise, if automatic
5803                         publication is switched on, default value is used for result name.
5804
5805             Returns:
5806                 New GEOM.GEOM_Object, containing the created edge.
5807             """
5808             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
5809             RaiseIfFailed("ExtendEdge", self.ShapesOp)
5810             self._autoPublish(anObj, theName, "edge")
5811             return anObj
5812
5813         ## Resize the input face with the new UMin, UMax, VMin and VMax
5814         #  parameters. The input face U and V parameters range is [0, 1]. If
5815         #  theUMin parameter is negative, the input face is extended, otherwise
5816         #  it is shrinked along U direction by theUMin parameter. If theUMax is
5817         #  greater than 1, the face is extended, otherwise it is shrinked along
5818         #  U direction by theUMax parameter. So as for theVMin, theVMax and
5819         #  V direction of the input face.
5820         #  @param theFace the input face to be resized.
5821         #  @param theUMin the minimal U parameter value.
5822         #  @param theUMax the maximal U parameter value.
5823         #  @param theVMin the minimal V parameter value.
5824         #  @param theVMax the maximal V parameter value.
5825         #  @param theName Object name; when specified, this parameter is used
5826         #         for result publication in the study. Otherwise, if automatic
5827         #         publication is switched on, default value is used for result name.
5828         #  @return New GEOM.GEOM_Object, containing the created face.
5829         #
5830         #  @ref tui_extend "Example"
5831         @ManageTransactions("ShapesOp")
5832         def ExtendFace(self, theFace, theUMin, theUMax,
5833                        theVMin, theVMax, theName=None):
5834             """
5835             Resize the input face with the new UMin, UMax, VMin and VMax
5836             parameters. The input face U and V parameters range is [0, 1]. If
5837             theUMin parameter is negative, the input face is extended, otherwise
5838             it is shrinked along U direction by theUMin parameter. If theUMax is
5839             greater than 1, the face is extended, otherwise it is shrinked along
5840             U direction by theUMax parameter. So as for theVMin, theVMax and
5841             V direction of the input face.
5842
5843             Parameters:
5844                 theFace the input face to be resized.
5845                 theUMin the minimal U parameter value.
5846                 theUMax the maximal U parameter value.
5847                 theVMin the minimal V parameter value.
5848                 theVMax the maximal V parameter value.
5849                 theName Object name; when specified, this parameter is used
5850                         for result publication in the study. Otherwise, if automatic
5851                         publication is switched on, default value is used for result name.
5852
5853             Returns:
5854                 New GEOM.GEOM_Object, containing the created face.
5855             """
5856             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
5857                                              theVMin, theVMax)
5858             RaiseIfFailed("ExtendFace", self.ShapesOp)
5859             self._autoPublish(anObj, theName, "face")
5860             return anObj
5861
5862         ## This function takes some face as input parameter and creates new
5863         #  GEOM_Object, i.e. topological shape by extracting underlying surface
5864         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
5865         #  parameters of the source face (in the parametrical space).
5866         #  @param theFace the input face.
5867         #  @param theName Object name; when specified, this parameter is used
5868         #         for result publication in the study. Otherwise, if automatic
5869         #         publication is switched on, default value is used for result name.
5870         #  @return New GEOM.GEOM_Object, containing the created face.
5871         #
5872         #  @ref tui_creation_surface "Example"
5873         @ManageTransactions("ShapesOp")
5874         def MakeSurfaceFromFace(self, theFace, theName=None):
5875             """
5876             This function takes some face as input parameter and creates new
5877             GEOM_Object, i.e. topological shape by extracting underlying surface
5878             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
5879             parameters of the source face (in the parametrical space).
5880
5881             Parameters:
5882                 theFace the input face.
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                 New GEOM.GEOM_Object, containing the created face.
5889             """
5890             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
5891             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
5892             self._autoPublish(anObj, theName, "surface")
5893             return anObj
5894
5895         # end of l4_obtain
5896         ## @}
5897
5898         ## @addtogroup l4_access
5899         ## @{
5900
5901         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5902         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5903         #  @param aShape Shape to get sub-shape of.
5904         #  @param ListOfID List of sub-shapes indices.
5905         #  @param theName Object name; when specified, this parameter is used
5906         #         for result publication in the study. Otherwise, if automatic
5907         #         publication is switched on, default value is used for result name.
5908         #
5909         #  @return Found sub-shape.
5910         #
5911         #  @ref swig_all_decompose "Example"
5912         def GetSubShape(self, aShape, ListOfID, theName=None):
5913             """
5914             Obtain a composite sub-shape of aShape, composed from sub-shapes
5915             of aShape, selected by their unique IDs inside aShape
5916
5917             Parameters:
5918                 aShape Shape to get sub-shape of.
5919                 ListOfID List of sub-shapes indices.
5920                 theName Object name; when specified, this parameter is used
5921                         for result publication in the study. Otherwise, if automatic
5922                         publication is switched on, default value is used for result name.
5923
5924             Returns:
5925                 Found sub-shape.
5926             """
5927             # Example: see GEOM_TestAll.py
5928             anObj = self.AddSubShape(aShape,ListOfID)
5929             self._autoPublish(anObj, theName, "subshape")
5930             return anObj
5931
5932         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5933         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5934         #  @param aShape Shape to get sub-shape of.
5935         #  @param aSubShape Sub-shapes of aShape.
5936         #  @return ID of found sub-shape.
5937         #
5938         #  @ref swig_all_decompose "Example"
5939         @ManageTransactions("LocalOp")
5940         def GetSubShapeID(self, aShape, aSubShape):
5941             """
5942             Obtain unique ID of sub-shape aSubShape inside aShape
5943             of aShape, selected by their unique IDs inside aShape
5944
5945             Parameters:
5946                aShape Shape to get sub-shape of.
5947                aSubShape Sub-shapes of aShape.
5948
5949             Returns:
5950                ID of found sub-shape.
5951             """
5952             # Example: see GEOM_TestAll.py
5953             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5954             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5955             return anID
5956
5957         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5958         #  This function is provided for performance purpose. The complexity is O(n) with n
5959         #  the number of subobjects of aShape
5960         #  @param aShape Shape to get sub-shape of.
5961         #  @param aSubShapes Sub-shapes of aShape.
5962         #  @return list of IDs of found sub-shapes.
5963         #
5964         #  @ref swig_all_decompose "Example"
5965         @ManageTransactions("ShapesOp")
5966         def GetSubShapesIDs(self, aShape, aSubShapes):
5967             """
5968             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5969             This function is provided for performance purpose. The complexity is O(n) with n
5970             the number of subobjects of aShape
5971
5972             Parameters:
5973                aShape Shape to get sub-shape of.
5974                aSubShapes Sub-shapes of aShape.
5975
5976             Returns:
5977                List of IDs of found sub-shape.
5978             """
5979             # Example: see GEOM_TestAll.py
5980             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5981             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5982             return anIDs
5983
5984         # end of l4_access
5985         ## @}
5986
5987         ## @addtogroup l4_decompose
5988         ## @{
5989
5990         ## Get all sub-shapes and groups of \a theShape,
5991         #  that were created already by any other methods.
5992         #  @param theShape Any shape.
5993         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5994         #                       returned, else all found sub-shapes and groups.
5995         #  @return List of existing sub-objects of \a theShape.
5996         #
5997         #  @ref swig_all_decompose "Example"
5998         @ManageTransactions("ShapesOp")
5999         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6000             """
6001             Get all sub-shapes and groups of theShape,
6002             that were created already by any other methods.
6003
6004             Parameters:
6005                 theShape Any shape.
6006                 theGroupsOnly If this parameter is TRUE, only groups will be
6007                                  returned, else all found sub-shapes and groups.
6008
6009             Returns:
6010                 List of existing sub-objects of theShape.
6011             """
6012             # Example: see GEOM_TestAll.py
6013             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6014             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6015             return ListObj
6016
6017         ## Get all groups of \a theShape,
6018         #  that were created already by any other methods.
6019         #  @param theShape Any shape.
6020         #  @return List of existing groups of \a theShape.
6021         #
6022         #  @ref swig_all_decompose "Example"
6023         @ManageTransactions("ShapesOp")
6024         def GetGroups(self, theShape):
6025             """
6026             Get all groups of theShape,
6027             that were created already by any other methods.
6028
6029             Parameters:
6030                 theShape Any shape.
6031
6032             Returns:
6033                 List of existing groups of theShape.
6034             """
6035             # Example: see GEOM_TestAll.py
6036             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6037             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6038             return ListObj
6039
6040         ## Explode a shape on sub-shapes of a given type.
6041         #  If the shape itself matches the type, it is also returned.
6042         #  @param aShape Shape to be exploded.
6043         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6044         #  @param theName Object name; when specified, this parameter is used
6045         #         for result publication in the study. Otherwise, if automatic
6046         #         publication is switched on, default value is used for result name.
6047         #
6048         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6049         #
6050         #  @ref swig_all_decompose "Example"
6051         @ManageTransactions("ShapesOp")
6052         def SubShapeAll(self, aShape, aType, theName=None):
6053             """
6054             Explode a shape on sub-shapes of a given type.
6055             If the shape itself matches the type, it is also returned.
6056
6057             Parameters:
6058                 aShape Shape to be exploded.
6059                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6060                 theName Object name; when specified, this parameter is used
6061                         for result publication in the study. Otherwise, if automatic
6062                         publication is switched on, default value is used for result name.
6063
6064             Returns:
6065                 List of sub-shapes of type theShapeType, contained in theShape.
6066             """
6067             # Example: see GEOM_TestAll.py
6068             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6069             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6070             self._autoPublish(ListObj, theName, "subshape")
6071             return ListObj
6072
6073         ## Explode a shape on sub-shapes of a given type.
6074         #  @param aShape Shape to be exploded.
6075         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6076         #  @return List of IDs of sub-shapes.
6077         #
6078         #  @ref swig_all_decompose "Example"
6079         @ManageTransactions("ShapesOp")
6080         def SubShapeAllIDs(self, aShape, aType):
6081             """
6082             Explode a shape on sub-shapes of a given type.
6083
6084             Parameters:
6085                 aShape Shape to be exploded (see geompy.ShapeType)
6086                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6087
6088             Returns:
6089                 List of IDs of sub-shapes.
6090             """
6091             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6092             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6093             return ListObj
6094
6095         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6096         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6097         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6098         #  @param aShape Shape to get sub-shape of.
6099         #  @param ListOfInd List of sub-shapes indices.
6100         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6101         #  @param theName Object name; when specified, this parameter is used
6102         #         for result publication in the study. Otherwise, if automatic
6103         #         publication is switched on, default value is used for result name.
6104         #
6105         #  @return A compound of sub-shapes of aShape.
6106         #
6107         #  @ref swig_all_decompose "Example"
6108         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6109             """
6110             Obtain a compound of sub-shapes of aShape,
6111             selected by their indices in list of all sub-shapes of type aType.
6112             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6113
6114             Parameters:
6115                 aShape Shape to get sub-shape of.
6116                 ListOfID List of sub-shapes indices.
6117                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6118                 theName Object name; when specified, this parameter is used
6119                         for result publication in the study. Otherwise, if automatic
6120                         publication is switched on, default value is used for result name.
6121
6122             Returns:
6123                 A compound of sub-shapes of aShape.
6124             """
6125             # Example: see GEOM_TestAll.py
6126             ListOfIDs = []
6127             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6128             for ind in ListOfInd:
6129                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6130             # note: auto-publishing is done in self.GetSubShape()
6131             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6132             return anObj
6133
6134         ## Explode a shape on sub-shapes of a given type.
6135         #  Sub-shapes will be sorted taking into account their gravity centers,
6136         #  to provide stable order of sub-shapes.
6137         #  If the shape itself matches the type, it is also returned.
6138         #  @param aShape Shape to be exploded.
6139         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6140         #  @param theName Object name; when specified, this parameter is used
6141         #         for result publication in the study. Otherwise, if automatic
6142         #         publication is switched on, default value is used for result name.
6143         #
6144         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6145         #
6146         #  @ref swig_SubShapeAllSorted "Example"
6147         @ManageTransactions("ShapesOp")
6148         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6149             """
6150             Explode a shape on sub-shapes of a given type.
6151             Sub-shapes will be sorted taking into account their gravity centers,
6152             to provide stable order of sub-shapes.
6153             If the shape itself matches the type, it is also returned.
6154
6155             Parameters:
6156                 aShape Shape to be exploded.
6157                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6158                 theName Object name; when specified, this parameter is used
6159                         for result publication in the study. Otherwise, if automatic
6160                         publication is switched on, default value is used for result name.
6161
6162             Returns:
6163                 List of sub-shapes of type theShapeType, contained in theShape.
6164             """
6165             # Example: see GEOM_TestAll.py
6166             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6167             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6168             self._autoPublish(ListObj, theName, "subshape")
6169             return ListObj
6170
6171         ## Explode a shape on sub-shapes of a given type.
6172         #  Sub-shapes will be sorted taking into account their gravity centers,
6173         #  to provide stable order of sub-shapes.
6174         #  @param aShape Shape to be exploded.
6175         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6176         #  @return List of IDs of sub-shapes.
6177         #
6178         #  @ref swig_all_decompose "Example"
6179         @ManageTransactions("ShapesOp")
6180         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6181             """
6182             Explode a shape on sub-shapes of a given type.
6183             Sub-shapes will be sorted taking into account their gravity centers,
6184             to provide stable order of sub-shapes.
6185
6186             Parameters:
6187                 aShape Shape to be exploded.
6188                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6189
6190             Returns:
6191                 List of IDs of sub-shapes.
6192             """
6193             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6194             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6195             return ListIDs
6196
6197         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6198         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6199         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6200         #  @param aShape Shape to get sub-shape of.
6201         #  @param ListOfInd List of sub-shapes indices.
6202         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
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 A compound of sub-shapes of aShape.
6208         #
6209         #  @ref swig_all_decompose "Example"
6210         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6211             """
6212             Obtain a compound of sub-shapes of aShape,
6213             selected by they indices in sorted list of all sub-shapes of type aType.
6214             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6215
6216             Parameters:
6217                 aShape Shape to get sub-shape of.
6218                 ListOfID List of sub-shapes indices.
6219                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6220                 theName Object name; when specified, this parameter is used
6221                         for result publication in the study. Otherwise, if automatic
6222                         publication is switched on, default value is used for result name.
6223
6224             Returns:
6225                 A compound of sub-shapes of aShape.
6226             """
6227             # Example: see GEOM_TestAll.py
6228             ListOfIDs = []
6229             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6230             for ind in ListOfInd:
6231                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6232             # note: auto-publishing is done in self.GetSubShape()
6233             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6234             return anObj
6235
6236         ## Extract shapes (excluding the main shape) of given type.
6237         #  @param aShape The shape.
6238         #  @param aType  The shape type (see ShapeType())
6239         #  @param isSorted Boolean flag to switch sorting on/off.
6240         #  @param theName Object name; when specified, this parameter is used
6241         #         for result publication in the study. Otherwise, if automatic
6242         #         publication is switched on, default value is used for result name.
6243         #
6244         #  @return List of sub-shapes of type aType, contained in aShape.
6245         #
6246         #  @ref swig_FilletChamfer "Example"
6247         @ManageTransactions("ShapesOp")
6248         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6249             """
6250             Extract shapes (excluding the main shape) of given type.
6251
6252             Parameters:
6253                 aShape The shape.
6254                 aType  The shape type (see geompy.ShapeType)
6255                 isSorted Boolean flag to switch sorting on/off.
6256                 theName Object name; when specified, this parameter is used
6257                         for result publication in the study. Otherwise, if automatic
6258                         publication is switched on, default value is used for result name.
6259
6260             Returns:
6261                 List of sub-shapes of type aType, contained in aShape.
6262             """
6263             # Example: see GEOM_TestAll.py
6264             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6265             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6266             self._autoPublish(ListObj, theName, "subshape")
6267             return ListObj
6268
6269         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6270         #  @param aShape Main shape.
6271         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6272         #  @param theName Object name; when specified, this parameter is used
6273         #         for result publication in the study. Otherwise, if automatic
6274         #         publication is switched on, default value is used for result name.
6275         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6276         #
6277         #  @ref swig_all_decompose "Example"
6278         @ManageTransactions("ShapesOp")
6279         def SubShapes(self, aShape, anIDs, theName=None):
6280             """
6281             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6282
6283             Parameters:
6284                 aShape Main shape.
6285                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6286                 theName Object name; when specified, this parameter is used
6287                         for result publication in the study. Otherwise, if automatic
6288                         publication is switched on, default value is used for result name.
6289
6290             Returns:
6291                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6292             """
6293             # Example: see GEOM_TestAll.py
6294             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6295             RaiseIfFailed("SubShapes", self.ShapesOp)
6296             self._autoPublish(ListObj, theName, "subshape")
6297             return ListObj
6298
6299         ## Check if the object is a sub-object of another GEOM object.
6300         #  @param aSubObject Checked sub-object (or its parent object, in case if
6301         #         \a theSubObjectIndex is non-zero).
6302         #  @param anObject An object that is checked for ownership (or its parent object,
6303         #         in case if \a theObjectIndex is non-zero).
6304         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6305         #         identifies a sub-object within its parent specified via \a theSubObject.
6306         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6307         #         identifies an object within its parent specified via \a theObject.
6308         #  @return TRUE, if the given object contains sub-object.
6309         @ManageTransactions("ShapesOp")
6310         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6311             """
6312             Check if the object is a sub-object of another GEOM object.
6313             
6314             Parameters:
6315                 aSubObject Checked sub-object (or its parent object, in case if
6316                     \a theSubObjectIndex is non-zero).
6317                 anObject An object that is checked for ownership (or its parent object,
6318                     in case if \a theObjectIndex is non-zero).
6319                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6320                     identifies a sub-object within its parent specified via \a theSubObject.
6321                 anObjectIndex When non-zero, specifies a sub-shape index that
6322                     identifies an object within its parent specified via \a theObject.
6323
6324             Returns
6325                 TRUE, if the given object contains sub-object.
6326             """
6327             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6328             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6329             return IsOk
6330
6331         # end of l4_decompose
6332         ## @}
6333
6334         ## @addtogroup l4_decompose_d
6335         ## @{
6336
6337         ## Deprecated method
6338         #  It works like SubShapeAllSortedCentres(), but wrongly
6339         #  defines centres of faces, shells and solids.
6340         @ManageTransactions("ShapesOp")
6341         def SubShapeAllSorted(self, aShape, aType, theName=None):
6342             """
6343             Deprecated method
6344             It works like geompy.SubShapeAllSortedCentres, but wrongly
6345             defines centres of faces, shells and solids.
6346             """
6347             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6348             RaiseIfFailed("MakeExplode", self.ShapesOp)
6349             self._autoPublish(ListObj, theName, "subshape")
6350             return ListObj
6351
6352         ## Deprecated method
6353         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6354         #  defines centres of faces, shells and solids.
6355         @ManageTransactions("ShapesOp")
6356         def SubShapeAllSortedIDs(self, aShape, aType):
6357             """
6358             Deprecated method
6359             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6360             defines centres of faces, shells and solids.
6361             """
6362             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6363             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6364             return ListIDs
6365
6366         ## Deprecated method
6367         #  It works like SubShapeSortedCentres(), but has a bug
6368         #  (wrongly defines centres of faces, shells and solids).
6369         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6370             """
6371             Deprecated method
6372             It works like geompy.SubShapeSortedCentres, but has a bug
6373             (wrongly defines centres of faces, shells and solids).
6374             """
6375             ListOfIDs = []
6376             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6377             for ind in ListOfInd:
6378                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6379             # note: auto-publishing is done in self.GetSubShape()
6380             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6381             return anObj
6382
6383         # end of l4_decompose_d
6384         ## @}
6385
6386         ## @addtogroup l3_healing
6387         ## @{
6388
6389         ## Apply a sequence of Shape Healing operators to the given object.
6390         #  @param theShape Shape to be processed.
6391         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6392         #  @param theParameters List of names of parameters
6393         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6394         #  @param theValues List of values of parameters, in the same order
6395         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6396         #  @param theName Object name; when specified, this parameter is used
6397         #         for result publication in the study. Otherwise, if automatic
6398         #         publication is switched on, default value is used for result name.
6399         #
6400         #  <b> Operators and Parameters: </b> \n
6401         #
6402         #  * \b FixShape - corrects invalid shapes. \n
6403         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6404         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6405         #
6406         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6407         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6408         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6409         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6410         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6411         #  - \b DropSmallSolids.WidthFactorThreshold - defines maximum value of <em>2V/S</em> of a solid which is considered small, where \a V is volume and \a S is surface area of the solid. \n
6412         #  - \b DropSmallSolids.VolumeThreshold - defines maximum volume of a solid which is considered small. If the both tolerances are privided a solid is considered small if it meets the both criteria. \n
6413         #  - \b DropSmallSolids.MergeSolids - if "1", small solids are removed; if "0" small solids are merged to adjacent non-small solids or left untouched if cannot be merged. \n
6414         #
6415         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6416         #    surfaces in segments using a certain angle. \n
6417         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6418         #    if Angle=180, four if Angle=90, etc). \n
6419         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6420         #
6421         #  * \b SplitClosedFaces - splits closed faces in segments.
6422         #    The number of segments depends on the number of splitting points.\n
6423         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6424         #
6425         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6426         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6427         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6428         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6429         #   This and the previous parameters can take the following values:\n
6430         #   \b Parametric \b Continuity \n
6431         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6432         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6433         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6434         #    ruling out sharp edges).\n
6435         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6436         #       are of the same magnitude).\n
6437         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6438         #    or surfaces (d/du C(u)) are the same at junction. \n
6439         #   \b Geometric \b Continuity \n
6440         #   \b G1: first derivatives are proportional at junction.\n
6441         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6442         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6443         #   \b G2: first and second derivatives are proportional at junction.
6444         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6445         #    continuity requires that the underlying parameterization was continuous as well.
6446         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6447         #
6448         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6449         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6450         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6451         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6452         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6453         #       with the specified parameters.\n
6454         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6455         #       with the specified parameters.\n
6456         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6457         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6458         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6459         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6460         #
6461         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6462         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6463         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6464         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6465         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6466         #
6467         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6468         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6469         #
6470         #
6471         #  @return New GEOM.GEOM_Object, containing processed shape.
6472         #
6473         #  \n @ref tui_shape_processing "Example"
6474         @ManageTransactions("HealOp")
6475         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6476             """
6477             Apply a sequence of Shape Healing operators to the given object.
6478
6479             Parameters:
6480                 theShape Shape to be processed.
6481                 theValues List of values of parameters, in the same order
6482                           as parameters are listed in theParameters list.
6483                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6484                 theParameters List of names of parameters
6485                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6486                 theName Object name; when specified, this parameter is used
6487                         for result publication in the study. Otherwise, if automatic
6488                         publication is switched on, default value is used for result name.
6489
6490                 Operators and Parameters:
6491
6492                  * FixShape - corrects invalid shapes.
6493                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6494                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6495                  * FixFaceSize - removes small faces, such as spots and strips.
6496                      * FixFaceSize.Tolerance - defines minimum possible face size.
6497                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
6498                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6499                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
6500                      * DropSmallSolids.WidthFactorThreshold - defines maximum value of 2V/S of a solid which is considered small, where V is volume and S is surface area of the solid.
6501                      * DropSmallSolids.VolumeThreshold - defines maximum volume of a solid which is considered small. If the both tolerances are privided a solid is considered small if it meets the both criteria.
6502                      * DropSmallSolids.MergeSolids - if '1', small solids are removed; if '0' small solids are merged to adjacent non-small solids or left untouched if cannot be merged.
6503
6504                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6505                                 in segments using a certain angle.
6506                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6507                                           if Angle=180, four if Angle=90, etc).
6508                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6509                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6510                                       splitting points.
6511                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6512                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6513                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6514                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6515                      * SplitContinuity.CurveContinuity - required continuity for curves.
6516                        This and the previous parameters can take the following values:
6517
6518                        Parametric Continuity:
6519                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6520                                                    coincidental. The curves or surfaces may still meet at an angle,
6521                                                    giving rise to a sharp corner or edge).
6522                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6523                                                    are parallel, ruling out sharp edges).
6524                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6525                                                   or surfaces are of the same magnitude).
6526                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6527                           curves or surfaces (d/du C(u)) are the same at junction.
6528
6529                        Geometric Continuity:
6530                        G1: first derivatives are proportional at junction.
6531                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6532                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6533                        G2: first and second derivatives are proportional at junction. As the names imply,
6534                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6535                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6536                            geometric continuity of order n, but not vice-versa.
6537                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6538                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6539                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6540                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6541                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6542                                                         the specified parameters.
6543                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6544                                                         the specified parameters.
6545                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6546                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6547                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6548                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6549                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6550                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6551                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6552                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6553                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6554                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6555                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6556
6557             Returns:
6558                 New GEOM.GEOM_Object, containing processed shape.
6559
6560             Note: For more information look through SALOME Geometry User's Guide->
6561                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6562             """
6563             # Example: see GEOM_TestHealing.py
6564             theValues,Parameters = ParseList(theValues)
6565             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6566             # To avoid script failure in case of good argument shape
6567             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6568                 return theShape
6569             RaiseIfFailed("ProcessShape", self.HealOp)
6570             for string in (theOperators + theParameters):
6571                 Parameters = ":" + Parameters
6572                 pass
6573             anObj.SetParameters(Parameters)
6574             self._autoPublish(anObj, theName, "healed")
6575             return anObj
6576
6577         ## Remove faces from the given object (shape).
6578         #  @param theObject Shape to be processed.
6579         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6580         #                  removes ALL faces of the given object.
6581         #  @param theName Object name; when specified, this parameter is used
6582         #         for result publication in the study. Otherwise, if automatic
6583         #         publication is switched on, default value is used for result name.
6584         #
6585         #  @return New GEOM.GEOM_Object, containing processed shape.
6586         #
6587         #  @ref tui_suppress_faces "Example"
6588         @ManageTransactions("HealOp")
6589         def SuppressFaces(self, theObject, theFaces, theName=None):
6590             """
6591             Remove faces from the given object (shape).
6592
6593             Parameters:
6594                 theObject Shape to be processed.
6595                 theFaces Indices of faces to be removed, if EMPTY then the method
6596                          removes ALL faces of the given object.
6597                 theName Object name; when specified, this parameter is used
6598                         for result publication in the study. Otherwise, if automatic
6599                         publication is switched on, default value is used for result name.
6600
6601             Returns:
6602                 New GEOM.GEOM_Object, containing processed shape.
6603             """
6604             # Example: see GEOM_TestHealing.py
6605             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6606             RaiseIfFailed("SuppressFaces", self.HealOp)
6607             self._autoPublish(anObj, theName, "suppressFaces")
6608             return anObj
6609
6610         ## Sewing of faces into a single shell.
6611         #  @param ListShape Shapes to be processed.
6612         #  @param theTolerance Required tolerance value.
6613         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6614         #  @param theName Object name; when specified, this parameter is used
6615         #         for result publication in the study. Otherwise, if automatic
6616         #         publication is switched on, default value is used for result name.
6617         #
6618         #  @return New GEOM.GEOM_Object, containing a result shell.
6619         #
6620         #  @ref tui_sewing "Example"
6621         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6622             """
6623             Sewing of faces into a single shell.
6624
6625             Parameters:
6626                 ListShape Shapes to be processed.
6627                 theTolerance Required tolerance value.
6628                 AllowNonManifold Flag that allows non-manifold sewing.
6629                 theName Object name; when specified, this parameter is used
6630                         for result publication in the study. Otherwise, if automatic
6631                         publication is switched on, default value is used for result name.
6632
6633             Returns:
6634                 New GEOM.GEOM_Object, containing containing a result shell.
6635             """
6636             # Example: see GEOM_TestHealing.py
6637             # note: auto-publishing is done in self.Sew()
6638             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
6639             return anObj
6640
6641         ## Sewing of faces into a single shell.
6642         #  @param ListShape Shapes to be processed.
6643         #  @param theTolerance Required tolerance value.
6644         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6645         #  @param theName Object name; when specified, this parameter is used
6646         #         for result publication in the study. Otherwise, if automatic
6647         #         publication is switched on, default value is used for result name.
6648         #
6649         #  @return New GEOM.GEOM_Object, containing a result shell.
6650         @ManageTransactions("HealOp")
6651         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6652             """
6653             Sewing of faces into a single shell.
6654
6655             Parameters:
6656                 ListShape Shapes to be processed.
6657                 theTolerance Required tolerance value.
6658                 AllowNonManifold Flag that allows non-manifold sewing.
6659                 theName Object name; when specified, this parameter is used
6660                         for result publication in the study. Otherwise, if automatic
6661                         publication is switched on, default value is used for result name.
6662
6663             Returns:
6664                 New GEOM.GEOM_Object, containing a result shell.
6665             """
6666             # Example: see MakeSewing() above
6667             theTolerance,Parameters = ParseParameters(theTolerance)
6668             if AllowNonManifold:
6669                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
6670             else:
6671                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
6672             # To avoid script failure in case of good argument shape
6673             # (Fix of test cases geom/bugs11/L7,L8)
6674             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6675                 return anObj
6676             RaiseIfFailed("Sew", self.HealOp)
6677             anObj.SetParameters(Parameters)
6678             self._autoPublish(anObj, theName, "sewed")
6679             return anObj
6680
6681         ## Rebuild the topology of theSolids by removing
6682         #  the faces that are shared by several solids.
6683         #  @param theSolids A compound or a list of solids to be processed.
6684         #  @param theName Object name; when specified, this parameter is used
6685         #         for result publication in the study. Otherwise, if automatic
6686         #         publication is switched on, default value is used for result name.
6687         #
6688         #  @return New GEOM.GEOM_Object, containing processed shape.
6689         #
6690         #  @ref tui_remove_webs "Example"
6691         @ManageTransactions("HealOp")
6692         def RemoveInternalFaces (self, theSolids, theName=None):
6693             """
6694             Rebuild the topology of theSolids by removing
6695             the faces that are shared by several solids.
6696
6697             Parameters:
6698                 theSolids A compound or a list of solids to be processed.
6699                 theName Object name; when specified, this parameter is used
6700                         for result publication in the study. Otherwise, if automatic
6701                         publication is switched on, default value is used for result name.
6702
6703             Returns:
6704                 New GEOM.GEOM_Object, containing processed shape.
6705             """
6706             # Example: see GEOM_TestHealing.py
6707             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
6708             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6709             self._autoPublish(anObj, theName, "removeWebs")
6710             return anObj
6711
6712         ## Remove internal wires and edges from the given object (face).
6713         #  @param theObject Shape to be processed.
6714         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6715         #                  removes ALL internal wires of the given object.
6716         #  @param theName Object name; when specified, this parameter is used
6717         #         for result publication in the study. Otherwise, if automatic
6718         #         publication is switched on, default value is used for result name.
6719         #
6720         #  @return New GEOM.GEOM_Object, containing processed shape.
6721         #
6722         #  @ref tui_suppress_internal_wires "Example"
6723         @ManageTransactions("HealOp")
6724         def SuppressInternalWires(self, theObject, theWires, theName=None):
6725             """
6726             Remove internal wires and edges from the given object (face).
6727
6728             Parameters:
6729                 theObject Shape to be processed.
6730                 theWires Indices of wires to be removed, if EMPTY then the method
6731                          removes ALL internal wires of the given object.
6732                 theName Object name; when specified, this parameter is used
6733                         for result publication in the study. Otherwise, if automatic
6734                         publication is switched on, default value is used for result name.
6735
6736             Returns:
6737                 New GEOM.GEOM_Object, containing processed shape.
6738             """
6739             # Example: see GEOM_TestHealing.py
6740             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6741             RaiseIfFailed("RemoveIntWires", self.HealOp)
6742             self._autoPublish(anObj, theName, "suppressWires")
6743             return anObj
6744
6745         ## Remove internal closed contours (holes) from the given object.
6746         #  @param theObject Shape to be processed.
6747         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6748         #                  removes ALL internal holes of the given object
6749         #  @param theName Object name; when specified, this parameter is used
6750         #         for result publication in the study. Otherwise, if automatic
6751         #         publication is switched on, default value is used for result name.
6752         #
6753         #  @return New GEOM.GEOM_Object, containing processed shape.
6754         #
6755         #  @ref tui_suppress_holes "Example"
6756         @ManageTransactions("HealOp")
6757         def SuppressHoles(self, theObject, theWires, theName=None):
6758             """
6759             Remove internal closed contours (holes) from the given object.
6760
6761             Parameters:
6762                 theObject Shape to be processed.
6763                 theWires Indices of wires to be removed, if EMPTY then the method
6764                          removes ALL internal holes of the given object
6765                 theName Object name; when specified, this parameter is used
6766                         for result publication in the study. Otherwise, if automatic
6767                         publication is switched on, default value is used for result name.
6768
6769             Returns:
6770                 New GEOM.GEOM_Object, containing processed shape.
6771             """
6772             # Example: see GEOM_TestHealing.py
6773             anObj = self.HealOp.FillHoles(theObject, theWires)
6774             RaiseIfFailed("FillHoles", self.HealOp)
6775             self._autoPublish(anObj, theName, "suppressHoles")
6776             return anObj
6777
6778         ## Close an open wire.
6779         #  @param theObject Shape to be processed.
6780         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6781         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6782         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6783         #                        If False : closure by creation of an edge between ends.
6784         #  @param theName Object name; when specified, this parameter is used
6785         #         for result publication in the study. Otherwise, if automatic
6786         #         publication is switched on, default value is used for result name.
6787         #
6788         #  @return New GEOM.GEOM_Object, containing processed shape.
6789         #
6790         #  @ref tui_close_contour "Example"
6791         @ManageTransactions("HealOp")
6792         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6793             """
6794             Close an open wire.
6795
6796             Parameters:
6797                 theObject Shape to be processed.
6798                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6799                          if [ ], then theObject itself is a wire.
6800                 isCommonVertex If True  : closure by creation of a common vertex,
6801                                If False : closure by creation of an edge between ends.
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                 New GEOM.GEOM_Object, containing processed shape.
6808             """
6809             # Example: see GEOM_TestHealing.py
6810             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6811             RaiseIfFailed("CloseContour", self.HealOp)
6812             self._autoPublish(anObj, theName, "closeContour")
6813             return anObj
6814
6815         ## Addition of a point to a given edge object.
6816         #  @param theObject Shape to be processed.
6817         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6818         #                      if -1, then theObject itself is the edge.
6819         #  @param theValue Value of parameter on edge or length parameter,
6820         #                  depending on \a isByParameter.
6821         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6822         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6823         #  @param theName Object name; when specified, this parameter is used
6824         #         for result publication in the study. Otherwise, if automatic
6825         #         publication is switched on, default value is used for result name.
6826         #
6827         #  @return New GEOM.GEOM_Object, containing processed shape.
6828         #
6829         #  @ref tui_add_point_on_edge "Example"
6830         @ManageTransactions("HealOp")
6831         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6832             """
6833             Addition of a point to a given edge object.
6834
6835             Parameters:
6836                 theObject Shape to be processed.
6837                 theEdgeIndex Index of edge to be divided within theObject's shape,
6838                              if -1, then theObject itself is the edge.
6839                 theValue Value of parameter on edge or length parameter,
6840                          depending on isByParameter.
6841                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6842                               if FALSE : theValue is treated as a length parameter [0..1]
6843                 theName Object name; when specified, this parameter is used
6844                         for result publication in the study. Otherwise, if automatic
6845                         publication is switched on, default value is used for result name.
6846
6847             Returns:
6848                 New GEOM.GEOM_Object, containing processed shape.
6849             """
6850             # Example: see GEOM_TestHealing.py
6851             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6852             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6853             RaiseIfFailed("DivideEdge", self.HealOp)
6854             anObj.SetParameters(Parameters)
6855             self._autoPublish(anObj, theName, "divideEdge")
6856             return anObj
6857
6858         ## Addition of points to a given edge of \a theObject by projecting
6859         #  other points to the given edge.
6860         #  @param theObject Shape to be processed.
6861         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6862         #                      if -1, then theObject itself is the edge.
6863         #  @param thePoints List of points to project to theEdgeIndex-th edge.
6864         #  @param theName Object name; when specified, this parameter is used
6865         #         for result publication in the study. Otherwise, if automatic
6866         #         publication is switched on, default value is used for result name.
6867         #
6868         #  @return New GEOM.GEOM_Object, containing processed shape.
6869         #
6870         #  @ref tui_add_point_on_edge "Example"
6871         @ManageTransactions("HealOp")
6872         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
6873             """
6874             Addition of points to a given edge of \a theObject by projecting
6875             other points to the given edge.
6876
6877             Parameters:
6878                 theObject Shape to be processed.
6879                 theEdgeIndex The edge or its index to be divided within theObject's shape,
6880                              if -1, then theObject itself is the edge.
6881                 thePoints List of points to project to theEdgeIndex-th edge.
6882                 theName Object name; when specified, this parameter is used
6883                         for result publication in the study. Otherwise, if automatic
6884                         publication is switched on, default value is used for result name.
6885
6886             Returns:
6887                 New GEOM.GEOM_Object, containing processed shape.
6888             """
6889             # Example: see GEOM_TestHealing.py
6890             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
6891                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
6892             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
6893             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
6894             self._autoPublish(anObj, theName, "divideEdge")
6895             return anObj
6896
6897         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6898         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6899         #  @param theVertices A list of vertices to suppress. If the list
6900         #                     is empty, all vertices in a wire will be assumed.
6901         #  @param theName Object name; when specified, this parameter is used
6902         #         for result publication in the study. Otherwise, if automatic
6903         #         publication is switched on, default value is used for result name.
6904         #
6905         #  @return New GEOM.GEOM_Object with modified wire.
6906         #
6907         #  @ref tui_fuse_collinear_edges "Example"
6908         @ManageTransactions("HealOp")
6909         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6910             """
6911             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6912
6913             Parameters:
6914                 theWire Wire to minimize the number of C1 continuous edges in.
6915                 theVertices A list of vertices to suppress. If the list
6916                             is empty, all vertices in a wire will be assumed.
6917                 theName Object name; when specified, this parameter is used
6918                         for result publication in the study. Otherwise, if automatic
6919                         publication is switched on, default value is used for result name.
6920
6921             Returns:
6922                 New GEOM.GEOM_Object with modified wire.
6923             """
6924             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6925             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6926             self._autoPublish(anObj, theName, "fuseEdges")
6927             return anObj
6928
6929         ## Change orientation of the given object. Updates given shape.
6930         #  @param theObject Shape to be processed.
6931         #  @return Updated <var>theObject</var>
6932         #
6933         #  @ref swig_todo "Example"
6934         @ManageTransactions("HealOp")
6935         def ChangeOrientationShell(self,theObject):
6936             """
6937             Change orientation of the given object. Updates given shape.
6938
6939             Parameters:
6940                 theObject Shape to be processed.
6941
6942             Returns:
6943                 Updated theObject
6944             """
6945             theObject = self.HealOp.ChangeOrientation(theObject)
6946             RaiseIfFailed("ChangeOrientation", self.HealOp)
6947             pass
6948
6949         ## Change orientation of the given object.
6950         #  @param theObject Shape to be processed.
6951         #  @param theName Object name; when specified, this parameter is used
6952         #         for result publication in the study. Otherwise, if automatic
6953         #         publication is switched on, default value is used for result name.
6954         #
6955         #  @return New GEOM.GEOM_Object, containing processed shape.
6956         #
6957         #  @ref swig_todo "Example"
6958         @ManageTransactions("HealOp")
6959         def ChangeOrientationShellCopy(self, theObject, theName=None):
6960             """
6961             Change orientation of the given object.
6962
6963             Parameters:
6964                 theObject Shape to be processed.
6965                 theName Object name; when specified, this parameter is used
6966                         for result publication in the study. Otherwise, if automatic
6967                         publication is switched on, default value is used for result name.
6968
6969             Returns:
6970                 New GEOM.GEOM_Object, containing processed shape.
6971             """
6972             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6973             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6974             self._autoPublish(anObj, theName, "reversed")
6975             return anObj
6976
6977         ## Try to limit tolerance of the given object by value \a theTolerance.
6978         #  @param theObject Shape to be processed.
6979         #  @param theTolerance Required tolerance value.
6980         #  @param theName Object name; when specified, this parameter is used
6981         #         for result publication in the study. Otherwise, if automatic
6982         #         publication is switched on, default value is used for result name.
6983         #
6984         #  @return New GEOM.GEOM_Object, containing processed shape.
6985         #
6986         #  @ref tui_limit_tolerance "Example"
6987         @ManageTransactions("HealOp")
6988         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6989             """
6990             Try to limit tolerance of the given object by value theTolerance.
6991
6992             Parameters:
6993                 theObject Shape to be processed.
6994                 theTolerance Required tolerance value.
6995                 theName Object name; when specified, this parameter is used
6996                         for result publication in the study. Otherwise, if automatic
6997                         publication is switched on, default value is used for result name.
6998
6999             Returns:
7000                 New GEOM.GEOM_Object, containing processed shape.
7001             """
7002             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7003             RaiseIfFailed("LimitTolerance", self.HealOp)
7004             self._autoPublish(anObj, theName, "limitTolerance")
7005             return anObj
7006
7007         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7008         #  that constitute a free boundary of the given shape.
7009         #  @param theObject Shape to get free boundary of.
7010         #  @param theName Object name; when specified, this parameter is used
7011         #         for result publication in the study. Otherwise, if automatic
7012         #         publication is switched on, default value is used for result name.
7013         #
7014         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7015         #  \n \a status: FALSE, if an error(s) occured during the method execution.
7016         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7017         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7018         #
7019         #  @ref tui_free_boundaries_page "Example"
7020         @ManageTransactions("HealOp")
7021         def GetFreeBoundary(self, theObject, theName=None):
7022             """
7023             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7024             that constitute a free boundary of the given shape.
7025
7026             Parameters:
7027                 theObject Shape to get free boundary of.
7028                 theName Object name; when specified, this parameter is used
7029                         for result publication in the study. Otherwise, if automatic
7030                         publication is switched on, default value is used for result name.
7031
7032             Returns:
7033                 [status, theClosedWires, theOpenWires]
7034                  status: FALSE, if an error(s) occured during the method execution.
7035                  theClosedWires: Closed wires on the free boundary of the given shape.
7036                  theOpenWires: Open wires on the free boundary of the given shape.
7037             """
7038             # Example: see GEOM_TestHealing.py
7039             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7040             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7041             self._autoPublish(anObj[1], theName, "closedWire")
7042             self._autoPublish(anObj[2], theName, "openWire")
7043             return anObj
7044
7045         ## Replace coincident faces in \a theShapes by one face.
7046         #  @param theShapes Initial shapes, either a list or compound of shapes.
7047         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7048         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7049         #                         otherwise all initial shapes.
7050         #  @param theName Object name; when specified, this parameter is used
7051         #         for result publication in the study. Otherwise, if automatic
7052         #         publication is switched on, default value is used for result name.
7053         #
7054         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7055         #
7056         #  @ref tui_glue_faces "Example"
7057         @ManageTransactions("ShapesOp")
7058         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7059             """
7060             Replace coincident faces in theShapes by one face.
7061
7062             Parameters:
7063                 theShapes Initial shapes, either a list or compound of shapes.
7064                 theTolerance Maximum distance between faces, which can be considered as coincident.
7065                 doKeepNonSolids If FALSE, only solids will present in the result,
7066                                 otherwise all initial shapes.
7067                 theName Object name; when specified, this parameter is used
7068                         for result publication in the study. Otherwise, if automatic
7069                         publication is switched on, default value is used for result name.
7070
7071             Returns:
7072                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7073             """
7074             # Example: see GEOM_Spanner.py
7075             theTolerance,Parameters = ParseParameters(theTolerance)
7076             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7077             if anObj is None:
7078                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
7079             anObj.SetParameters(Parameters)
7080             self._autoPublish(anObj, theName, "glueFaces")
7081             return anObj
7082
7083         ## Find coincident faces in \a theShapes for possible gluing.
7084         #  @param theShapes Initial shapes, either a list or compound of shapes.
7085         #  @param theTolerance Maximum distance between faces,
7086         #                      which can be considered as coincident.
7087         #  @param theName Object name; when specified, this parameter is used
7088         #         for result publication in the study. Otherwise, if automatic
7089         #         publication is switched on, default value is used for result name.
7090         #
7091         #  @return GEOM.ListOfGO
7092         #
7093         #  @ref tui_glue_faces "Example"
7094         @ManageTransactions("ShapesOp")
7095         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7096             """
7097             Find coincident faces in theShapes for possible gluing.
7098
7099             Parameters:
7100                 theShapes Initial shapes, either a list or compound of shapes.
7101                 theTolerance Maximum distance between faces,
7102                              which can be considered as coincident.
7103                 theName Object name; when specified, this parameter is used
7104                         for result publication in the study. Otherwise, if automatic
7105                         publication is switched on, default value is used for result name.
7106
7107             Returns:
7108                 GEOM.ListOfGO
7109             """
7110             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7111             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7112             self._autoPublish(anObj, theName, "facesToGlue")
7113             return anObj
7114
7115         ## Replace coincident faces in \a theShapes by one face
7116         #  in compliance with given list of faces
7117         #  @param theShapes Initial shapes, either a list or compound of shapes.
7118         #  @param theTolerance Maximum distance between faces,
7119         #                      which can be considered as coincident.
7120         #  @param theFaces List of faces for gluing.
7121         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7122         #                         otherwise all initial shapes.
7123         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7124         #                        will be glued, otherwise only the edges,
7125         #                        belonging to <VAR>theFaces</VAR>.
7126         #  @param theName Object name; when specified, this parameter is used
7127         #         for result publication in the study. Otherwise, if automatic
7128         #         publication is switched on, default value is used for result name.
7129         #
7130         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7131         #
7132         #  @ref tui_glue_faces "Example"
7133         @ManageTransactions("ShapesOp")
7134         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7135                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7136             """
7137             Replace coincident faces in theShapes by one face
7138             in compliance with given list of faces
7139
7140             Parameters:
7141                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7142                 theTolerance Maximum distance between faces,
7143                              which can be considered as coincident.
7144                 theFaces List of faces for gluing.
7145                 doKeepNonSolids If FALSE, only solids will present in the result,
7146                                 otherwise all initial shapes.
7147                 doGlueAllEdges If TRUE, all coincident edges of theShape
7148                                will be glued, otherwise only the edges,
7149                                belonging to theFaces.
7150                 theName Object name; when specified, this parameter is used
7151                         for result publication in the study. Otherwise, if automatic
7152                         publication is switched on, default value is used for result name.
7153
7154             Returns:
7155                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7156             """
7157             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, theFaces,
7158                                                       doKeepNonSolids, doGlueAllEdges)
7159             if anObj is None:
7160                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
7161             self._autoPublish(anObj, theName, "glueFaces")
7162             return anObj
7163
7164         ## Replace coincident edges in \a theShapes by one edge.
7165         #  @param theShapes Initial shapes, either a list or compound of shapes.
7166         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7167         #  @param theName Object name; when specified, this parameter is used
7168         #         for result publication in the study. Otherwise, if automatic
7169         #         publication is switched on, default value is used for result name.
7170         #
7171         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7172         #
7173         #  @ref tui_glue_edges "Example"
7174         @ManageTransactions("ShapesOp")
7175         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7176             """
7177             Replace coincident edges in theShapes by one edge.
7178
7179             Parameters:
7180                 theShapes Initial shapes, either a list or compound of shapes.
7181                 theTolerance Maximum distance between edges, which can be considered as coincident.
7182                 theName Object name; when specified, this parameter is used
7183                         for result publication in the study. Otherwise, if automatic
7184                         publication is switched on, default value is used for result name.
7185
7186             Returns:
7187                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7188             """
7189             theTolerance,Parameters = ParseParameters(theTolerance)
7190             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7191             if anObj is None:
7192                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
7193             anObj.SetParameters(Parameters)
7194             self._autoPublish(anObj, theName, "glueEdges")
7195             return anObj
7196
7197         ## Find coincident edges in \a theShapes for possible gluing.
7198         #  @param theShapes Initial shapes, either a list or compound of shapes.
7199         #  @param theTolerance Maximum distance between edges,
7200         #                      which can be considered as coincident.
7201         #  @param theName Object name; when specified, this parameter is used
7202         #         for result publication in the study. Otherwise, if automatic
7203         #         publication is switched on, default value is used for result name.
7204         #
7205         #  @return GEOM.ListOfGO
7206         #
7207         #  @ref tui_glue_edges "Example"
7208         @ManageTransactions("ShapesOp")
7209         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7210             """
7211             Find coincident edges in theShapes for possible gluing.
7212
7213             Parameters:
7214                 theShapes Initial shapes, either a list or compound of shapes.
7215                 theTolerance Maximum distance between edges,
7216                              which can be considered as coincident.
7217                 theName Object name; when specified, this parameter is used
7218                         for result publication in the study. Otherwise, if automatic
7219                         publication is switched on, default value is used for result name.
7220
7221             Returns:
7222                 GEOM.ListOfGO
7223             """
7224             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7225             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7226             self._autoPublish(anObj, theName, "edgesToGlue")
7227             return anObj
7228
7229         ## Replace coincident edges in theShapes by one edge
7230         #  in compliance with given list of edges.
7231         #  @param theShapes Initial shapes, either a list or compound of shapes.
7232         #  @param theTolerance Maximum distance between edges,
7233         #                      which can be considered as coincident.
7234         #  @param theEdges List of edges for gluing.
7235         #  @param theName Object name; when specified, this parameter is used
7236         #         for result publication in the study. Otherwise, if automatic
7237         #         publication is switched on, default value is used for result name.
7238         #
7239         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7240         #
7241         #  @ref tui_glue_edges "Example"
7242         @ManageTransactions("ShapesOp")
7243         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7244             """
7245             Replace coincident edges in theShapes by one edge
7246             in compliance with given list of edges.
7247
7248             Parameters:
7249                 theShapes Initial shapes, either a list or compound of shapes.
7250                 theTolerance Maximum distance between edges,
7251                              which can be considered as coincident.
7252                 theEdges List of edges for gluing.
7253                 theName Object name; when specified, this parameter is used
7254                         for result publication in the study. Otherwise, if automatic
7255                         publication is switched on, default value is used for result name.
7256
7257             Returns:
7258                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7259             """
7260             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7261             if anObj is None:
7262                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
7263             self._autoPublish(anObj, theName, "glueEdges")
7264             return anObj
7265
7266         # end of l3_healing
7267         ## @}
7268
7269         ## @addtogroup l3_boolean Boolean Operations
7270         ## @{
7271
7272         # -----------------------------------------------------------------------------
7273         # Boolean (Common, Cut, Fuse, Section)
7274         # -----------------------------------------------------------------------------
7275
7276         ## Perform one of boolean operations on two given shapes.
7277         #  @param theShape1 First argument for boolean operation.
7278         #  @param theShape2 Second argument for boolean operation.
7279         #  @param theOperation Indicates the operation to be done:\n
7280         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7281         #  @param checkSelfInte The flag that tells if the arguments should
7282         #         be checked for self-intersection prior to the operation.
7283         #  @param theName Object name; when specified, this parameter is used
7284         #         for result publication in the study. Otherwise, if automatic
7285         #         publication is switched on, default value is used for result name.
7286         #
7287         #  @note This algorithm doesn't find all types of self-intersections.
7288         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7289         #        vertex/face and edge/face intersections. Face/face
7290         #        intersections detection is switched off as it is a
7291         #        time-consuming operation that gives an impact on performance.
7292         #        To find all self-intersections please use
7293         #        CheckSelfIntersections() method.
7294         #
7295         #  @return New GEOM.GEOM_Object, containing the result shape.
7296         #
7297         #  @ref tui_fuse "Example"
7298         @ManageTransactions("BoolOp")
7299         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7300             """
7301             Perform one of boolean operations on two given shapes.
7302
7303             Parameters:
7304                 theShape1 First argument for boolean operation.
7305                 theShape2 Second argument for boolean operation.
7306                 theOperation Indicates the operation to be done:
7307                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7308                 checkSelfInte The flag that tells if the arguments should
7309                               be checked for self-intersection prior to
7310                               the operation.
7311                 theName Object name; when specified, this parameter is used
7312                         for result publication in the study. Otherwise, if automatic
7313                         publication is switched on, default value is used for result name.
7314
7315             Note:
7316                     This algorithm doesn't find all types of self-intersections.
7317                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7318                     vertex/face and edge/face intersections. Face/face
7319                     intersections detection is switched off as it is a
7320                     time-consuming operation that gives an impact on performance.
7321                     To find all self-intersections please use
7322                     CheckSelfIntersections() method.
7323
7324             Returns:
7325                 New GEOM.GEOM_Object, containing the result shape.
7326             """
7327             # Example: see GEOM_TestAll.py
7328             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7329             RaiseIfFailed("MakeBoolean", self.BoolOp)
7330             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7331             self._autoPublish(anObj, theName, def_names[theOperation])
7332             return anObj
7333
7334         ## Perform Common boolean operation on two given shapes.
7335         #  @param theShape1 First argument for boolean operation.
7336         #  @param theShape2 Second argument for boolean operation.
7337         #  @param checkSelfInte The flag that tells if the arguments should
7338         #         be checked for self-intersection prior to the operation.
7339         #  @param theName Object name; when specified, this parameter is used
7340         #         for result publication in the study. Otherwise, if automatic
7341         #         publication is switched on, default value is used for result name.
7342         #
7343         #  @note This algorithm doesn't find all types of self-intersections.
7344         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7345         #        vertex/face and edge/face intersections. Face/face
7346         #        intersections detection is switched off as it is a
7347         #        time-consuming operation that gives an impact on performance.
7348         #        To find all self-intersections please use
7349         #        CheckSelfIntersections() method.
7350         #
7351         #  @return New GEOM.GEOM_Object, containing the result shape.
7352         #
7353         #  @ref tui_common "Example 1"
7354         #  \n @ref swig_MakeCommon "Example 2"
7355         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7356             """
7357             Perform Common boolean operation on two given shapes.
7358
7359             Parameters:
7360                 theShape1 First argument for boolean operation.
7361                 theShape2 Second argument for boolean operation.
7362                 checkSelfInte The flag that tells if the arguments should
7363                               be checked for self-intersection prior to
7364                               the operation.
7365                 theName Object name; when specified, this parameter is used
7366                         for result publication in the study. Otherwise, if automatic
7367                         publication is switched on, default value is used for result name.
7368
7369             Note:
7370                     This algorithm doesn't find all types of self-intersections.
7371                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7372                     vertex/face and edge/face intersections. Face/face
7373                     intersections detection is switched off as it is a
7374                     time-consuming operation that gives an impact on performance.
7375                     To find all self-intersections please use
7376                     CheckSelfIntersections() method.
7377
7378             Returns:
7379                 New GEOM.GEOM_Object, containing the result shape.
7380             """
7381             # Example: see GEOM_TestOthers.py
7382             # note: auto-publishing is done in self.MakeBoolean()
7383             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7384
7385         ## Perform Cut boolean operation on two given shapes.
7386         #  @param theShape1 First argument for boolean operation.
7387         #  @param theShape2 Second argument for boolean operation.
7388         #  @param checkSelfInte The flag that tells if the arguments should
7389         #         be checked for self-intersection prior to the operation.
7390         #  @param theName Object name; when specified, this parameter is used
7391         #         for result publication in the study. Otherwise, if automatic
7392         #         publication is switched on, default value is used for result name.
7393         #
7394         #  @note This algorithm doesn't find all types of self-intersections.
7395         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7396         #        vertex/face and edge/face intersections. Face/face
7397         #        intersections detection is switched off as it is a
7398         #        time-consuming operation that gives an impact on performance.
7399         #        To find all self-intersections please use
7400         #        CheckSelfIntersections() method.
7401         #
7402         #  @return New GEOM.GEOM_Object, containing the result shape.
7403         #
7404         #  @ref tui_cut "Example 1"
7405         #  \n @ref swig_MakeCommon "Example 2"
7406         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7407             """
7408             Perform Cut boolean operation on two given shapes.
7409
7410             Parameters:
7411                 theShape1 First argument for boolean operation.
7412                 theShape2 Second argument for boolean operation.
7413                 checkSelfInte The flag that tells if the arguments should
7414                               be checked for self-intersection prior to
7415                               the operation.
7416                 theName Object name; when specified, this parameter is used
7417                         for result publication in the study. Otherwise, if automatic
7418                         publication is switched on, default value is used for result name.
7419
7420             Note:
7421                     This algorithm doesn't find all types of self-intersections.
7422                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7423                     vertex/face and edge/face intersections. Face/face
7424                     intersections detection is switched off as it is a
7425                     time-consuming operation that gives an impact on performance.
7426                     To find all self-intersections please use
7427                     CheckSelfIntersections() method.
7428
7429             Returns:
7430                 New GEOM.GEOM_Object, containing the result shape.
7431
7432             """
7433             # Example: see GEOM_TestOthers.py
7434             # note: auto-publishing is done in self.MakeBoolean()
7435             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7436
7437         ## Perform Fuse boolean operation on two given shapes.
7438         #  @param theShape1 First argument for boolean operation.
7439         #  @param theShape2 Second argument for boolean operation.
7440         #  @param checkSelfInte The flag that tells if the arguments should
7441         #         be checked for self-intersection prior to the operation.
7442         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7443         #         operation should be performed during the operation.
7444         #  @param theName Object name; when specified, this parameter is used
7445         #         for result publication in the study. Otherwise, if automatic
7446         #         publication is switched on, default value is used for result name.
7447         #
7448         #  @note This algorithm doesn't find all types of self-intersections.
7449         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7450         #        vertex/face and edge/face intersections. Face/face
7451         #        intersections detection is switched off as it is a
7452         #        time-consuming operation that gives an impact on performance.
7453         #        To find all self-intersections please use
7454         #        CheckSelfIntersections() method.
7455         #
7456         #  @return New GEOM.GEOM_Object, containing the result shape.
7457         #
7458         #  @ref tui_fuse "Example 1"
7459         #  \n @ref swig_MakeCommon "Example 2"
7460         @ManageTransactions("BoolOp")
7461         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7462                      rmExtraEdges=False, theName=None):
7463             """
7464             Perform Fuse boolean operation on two given shapes.
7465
7466             Parameters:
7467                 theShape1 First argument for boolean operation.
7468                 theShape2 Second argument for boolean operation.
7469                 checkSelfInte The flag that tells if the arguments should
7470                               be checked for self-intersection prior to
7471                               the operation.
7472                 rmExtraEdges The flag that tells if Remove Extra Edges
7473                              operation should be performed during the operation.
7474                 theName Object name; when specified, this parameter is used
7475                         for result publication in the study. Otherwise, if automatic
7476                         publication is switched on, default value is used for result name.
7477
7478             Note:
7479                     This algorithm doesn't find all types of self-intersections.
7480                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7481                     vertex/face and edge/face intersections. Face/face
7482                     intersections detection is switched off as it is a
7483                     time-consuming operation that gives an impact on performance.
7484                     To find all self-intersections please use
7485                     CheckSelfIntersections() method.
7486
7487             Returns:
7488                 New GEOM.GEOM_Object, containing the result shape.
7489
7490             """
7491             # Example: see GEOM_TestOthers.py
7492             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7493                                          checkSelfInte, rmExtraEdges)
7494             RaiseIfFailed("MakeFuse", self.BoolOp)
7495             self._autoPublish(anObj, theName, "fuse")
7496             return anObj
7497
7498         ## Perform Section boolean operation on two given shapes.
7499         #  @param theShape1 First argument for boolean operation.
7500         #  @param theShape2 Second argument for boolean operation.
7501         #  @param checkSelfInte The flag that tells if the arguments should
7502         #         be checked for self-intersection prior to the operation.
7503         #         If a self-intersection detected the operation fails.
7504         #  @param theName Object name; when specified, this parameter is used
7505         #         for result publication in the study. Otherwise, if automatic
7506         #         publication is switched on, default value is used for result name.
7507         #  @return New GEOM.GEOM_Object, containing the result shape.
7508         #
7509         #  @ref tui_section "Example 1"
7510         #  \n @ref swig_MakeCommon "Example 2"
7511         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7512             """
7513             Perform Section boolean operation on two given shapes.
7514
7515             Parameters:
7516                 theShape1 First argument for boolean operation.
7517                 theShape2 Second argument for boolean operation.
7518                 checkSelfInte The flag that tells if the arguments should
7519                               be checked for self-intersection prior to the operation.
7520                               If a self-intersection detected the operation fails.
7521                 theName Object name; when specified, this parameter is used
7522                         for result publication in the study. Otherwise, if automatic
7523                         publication is switched on, default value is used for result name.
7524             Returns:
7525                 New GEOM.GEOM_Object, containing the result shape.
7526
7527             """
7528             # Example: see GEOM_TestOthers.py
7529             # note: auto-publishing is done in self.MakeBoolean()
7530             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7531
7532         ## Perform Fuse boolean operation on the list of shapes.
7533         #  @param theShapesList Shapes to be fused.
7534         #  @param checkSelfInte The flag that tells if the arguments should
7535         #         be checked for self-intersection prior to the operation.
7536         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7537         #         operation should be performed during the operation.
7538         #  @param theName Object name; when specified, this parameter is used
7539         #         for result publication in the study. Otherwise, if automatic
7540         #         publication is switched on, default value is used for result name.
7541         #
7542         #  @note This algorithm doesn't find all types of self-intersections.
7543         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7544         #        vertex/face and edge/face intersections. Face/face
7545         #        intersections detection is switched off as it is a
7546         #        time-consuming operation that gives an impact on performance.
7547         #        To find all self-intersections please use
7548         #        CheckSelfIntersections() method.
7549         #
7550         #  @return New GEOM.GEOM_Object, containing the result shape.
7551         #
7552         #  @ref tui_fuse "Example 1"
7553         #  \n @ref swig_MakeCommon "Example 2"
7554         @ManageTransactions("BoolOp")
7555         def MakeFuseList(self, theShapesList, checkSelfInte=False,
7556                          rmExtraEdges=False, theName=None):
7557             """
7558             Perform Fuse boolean operation on the list of shapes.
7559
7560             Parameters:
7561                 theShapesList Shapes to be fused.
7562                 checkSelfInte The flag that tells if the arguments should
7563                               be checked for self-intersection prior to
7564                               the operation.
7565                 rmExtraEdges The flag that tells if Remove Extra Edges
7566                              operation should be performed during the operation.
7567                 theName Object name; when specified, this parameter is used
7568                         for result publication in the study. Otherwise, if automatic
7569                         publication is switched on, default value is used for result name.
7570
7571             Note:
7572                     This algorithm doesn't find all types of self-intersections.
7573                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7574                     vertex/face and edge/face intersections. Face/face
7575                     intersections detection is switched off as it is a
7576                     time-consuming operation that gives an impact on performance.
7577                     To find all self-intersections please use
7578                     CheckSelfIntersections() method.
7579
7580             Returns:
7581                 New GEOM.GEOM_Object, containing the result shape.
7582
7583             """
7584             # Example: see GEOM_TestOthers.py
7585             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
7586                                              rmExtraEdges)
7587             RaiseIfFailed("MakeFuseList", self.BoolOp)
7588             self._autoPublish(anObj, theName, "fuse")
7589             return anObj
7590
7591         ## Perform Common boolean operation on the list of shapes.
7592         #  @param theShapesList Shapes for Common operation.
7593         #  @param checkSelfInte The flag that tells if the arguments should
7594         #         be checked for self-intersection prior to the operation.
7595         #  @param theName Object name; when specified, this parameter is used
7596         #         for result publication in the study. Otherwise, if automatic
7597         #         publication is switched on, default value is used for result name.
7598         #
7599         #  @note This algorithm doesn't find all types of self-intersections.
7600         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7601         #        vertex/face and edge/face intersections. Face/face
7602         #        intersections detection is switched off as it is a
7603         #        time-consuming operation that gives an impact on performance.
7604         #        To find all self-intersections please use
7605         #        CheckSelfIntersections() method.
7606         #
7607         #  @return New GEOM.GEOM_Object, containing the result shape.
7608         #
7609         #  @ref tui_common "Example 1"
7610         #  \n @ref swig_MakeCommon "Example 2"
7611         @ManageTransactions("BoolOp")
7612         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7613             """
7614             Perform Common boolean operation on the list of shapes.
7615
7616             Parameters:
7617                 theShapesList Shapes for Common operation.
7618                 checkSelfInte The flag that tells if the arguments should
7619                               be checked for self-intersection prior to
7620                               the operation.
7621                 theName Object name; when specified, this parameter is used
7622                         for result publication in the study. Otherwise, if automatic
7623                         publication is switched on, default value is used for result name.
7624
7625             Note:
7626                     This algorithm doesn't find all types of self-intersections.
7627                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7628                     vertex/face and edge/face intersections. Face/face
7629                     intersections detection is switched off as it is a
7630                     time-consuming operation that gives an impact on performance.
7631                     To find all self-intersections please use
7632                     CheckSelfIntersections() method.
7633
7634             Returns:
7635                 New GEOM.GEOM_Object, containing the result shape.
7636
7637             """
7638             # Example: see GEOM_TestOthers.py
7639             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7640             RaiseIfFailed("MakeCommonList", self.BoolOp)
7641             self._autoPublish(anObj, theName, "common")
7642             return anObj
7643
7644         ## Perform Cut boolean operation on one object and the list of tools.
7645         #  @param theMainShape The object of the operation.
7646         #  @param theShapesList The list of tools of the operation.
7647         #  @param checkSelfInte The flag that tells if the arguments should
7648         #         be checked for self-intersection prior to the operation.
7649         #  @param theName Object name; when specified, this parameter is used
7650         #         for result publication in the study. Otherwise, if automatic
7651         #         publication is switched on, default value is used for result name.
7652         #
7653         #  @note This algorithm doesn't find all types of self-intersections.
7654         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7655         #        vertex/face and edge/face intersections. Face/face
7656         #        intersections detection is switched off as it is a
7657         #        time-consuming operation that gives an impact on performance.
7658         #        To find all self-intersections please use
7659         #        CheckSelfIntersections() method.
7660         #
7661         #  @return New GEOM.GEOM_Object, containing the result shape.
7662         #
7663         #  @ref tui_cut "Example 1"
7664         #  \n @ref swig_MakeCommon "Example 2"
7665         @ManageTransactions("BoolOp")
7666         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7667             """
7668             Perform Cut boolean operation on one object and the list of tools.
7669
7670             Parameters:
7671                 theMainShape The object of the operation.
7672                 theShapesList The list of tools of the operation.
7673                 checkSelfInte The flag that tells if the arguments should
7674                               be checked for self-intersection prior to
7675                               the operation.
7676                 theName Object name; when specified, this parameter is used
7677                         for result publication in the study. Otherwise, if automatic
7678                         publication is switched on, default value is used for result name.
7679
7680             Note:
7681                     This algorithm doesn't find all types of self-intersections.
7682                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7683                     vertex/face and edge/face intersections. Face/face
7684                     intersections detection is switched off as it is a
7685                     time-consuming operation that gives an impact on performance.
7686                     To find all self-intersections please use
7687                     CheckSelfIntersections() method.
7688
7689             Returns:
7690                 New GEOM.GEOM_Object, containing the result shape.
7691
7692             """
7693             # Example: see GEOM_TestOthers.py
7694             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7695             RaiseIfFailed("MakeCutList", self.BoolOp)
7696             self._autoPublish(anObj, theName, "cut")
7697             return anObj
7698
7699         # end of l3_boolean
7700         ## @}
7701
7702         ## @addtogroup l3_basic_op
7703         ## @{
7704
7705         ## Perform partition operation.
7706         #  @param ListShapes Shapes to be intersected.
7707         #  @param ListTools Shapes to intersect theShapes.
7708         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7709         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7710         #         type will be detected automatically.
7711         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7712         #                             target type (equal to Limit) are kept in the result,
7713         #                             else standalone shapes of lower dimension
7714         #                             are kept also (if they exist).
7715         #
7716         #  @param theName Object name; when specified, this parameter is used
7717         #         for result publication in the study. Otherwise, if automatic
7718         #         publication is switched on, default value is used for result name.
7719         #
7720         #  @note Each compound from ListShapes and ListTools will be exploded
7721         #        in order to avoid possible intersection between shapes from this compound.
7722         #
7723         #  After implementation new version of PartitionAlgo (October 2006)
7724         #  other parameters are ignored by current functionality. They are kept
7725         #  in this function only for support old versions.
7726         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7727         #         Each shape from theKeepInside must belong to theShapes also.
7728         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7729         #         Each shape from theRemoveInside must belong to theShapes also.
7730         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7731         #      @param ListMaterials Material indices for each shape. Make sence,
7732         #         only if theRemoveWebs is TRUE.
7733         #
7734         #  @return New GEOM.GEOM_Object, containing the result shapes.
7735         #
7736         #  @ref tui_partition "Example"
7737         @ManageTransactions("BoolOp")
7738         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7739                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7740                           KeepNonlimitShapes=0, theName=None):
7741             """
7742             Perform partition operation.
7743
7744             Parameters:
7745                 ListShapes Shapes to be intersected.
7746                 ListTools Shapes to intersect theShapes.
7747                 Limit Type of resulting shapes (see geompy.ShapeType)
7748                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7749                       type will be detected automatically.
7750                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7751                                     target type (equal to Limit) are kept in the result,
7752                                     else standalone shapes of lower dimension
7753                                     are kept also (if they exist).
7754
7755                 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             Note:
7759                     Each compound from ListShapes and ListTools will be exploded
7760                     in order to avoid possible intersection between shapes from
7761                     this compound.
7762
7763             After implementation new version of PartitionAlgo (October 2006) other
7764             parameters are ignored by current functionality. They are kept in this
7765             function only for support old versions.
7766
7767             Ignored parameters:
7768                 ListKeepInside Shapes, outside which the results will be deleted.
7769                                Each shape from theKeepInside must belong to theShapes also.
7770                 ListRemoveInside Shapes, inside which the results will be deleted.
7771                                  Each shape from theRemoveInside must belong to theShapes also.
7772                 RemoveWebs If TRUE, perform Glue 3D algorithm.
7773                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
7774
7775             Returns:
7776                 New GEOM.GEOM_Object, containing the result shapes.
7777             """
7778             # Example: see GEOM_TestAll.py
7779             if Limit == self.ShapeType["AUTO"]:
7780                 # automatic detection of the most appropriate shape limit type
7781                 lim = GEOM.SHAPE
7782                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7783                 Limit = EnumToLong(lim)
7784                 pass
7785             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
7786                                               ListKeepInside, ListRemoveInside,
7787                                               Limit, RemoveWebs, ListMaterials,
7788                                               KeepNonlimitShapes);
7789             RaiseIfFailed("MakePartition", self.BoolOp)
7790             self._autoPublish(anObj, theName, "partition")
7791             return anObj
7792
7793         ## Perform partition operation.
7794         #  This method may be useful if it is needed to make a partition for
7795         #  compound contains nonintersected shapes. Performance will be better
7796         #  since intersection between shapes from compound is not performed.
7797         #
7798         #  Description of all parameters as in previous method MakePartition().
7799         #  One additional parameter is provided:
7800         #  @param checkSelfInte The flag that tells if the arguments should
7801         #         be checked for self-intersection prior to the operation.
7802         #
7803         #  @note This algorithm doesn't find all types of self-intersections.
7804         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7805         #        vertex/face and edge/face intersections. Face/face
7806         #        intersections detection is switched off as it is a
7807         #        time-consuming operation that gives an impact on performance.
7808         #        To find all self-intersections please use
7809         #        CheckSelfIntersections() method.
7810         #
7811         #  @note Passed compounds (via ListShapes or via ListTools)
7812         #           have to consist of nonintersecting shapes.
7813         #
7814         #  @return New GEOM.GEOM_Object, containing the result shapes.
7815         #
7816         #  @ref swig_todo "Example"
7817         @ManageTransactions("BoolOp")
7818         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
7819                                                  ListKeepInside=[], ListRemoveInside=[],
7820                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
7821                                                  ListMaterials=[], KeepNonlimitShapes=0,
7822                                                  checkSelfInte=False, theName=None):
7823             """
7824             Perform partition operation.
7825             This method may be useful if it is needed to make a partition for
7826             compound contains nonintersected shapes. Performance will be better
7827             since intersection between shapes from compound is not performed.
7828
7829             Parameters:
7830                 Description of all parameters as in method geompy.MakePartition.
7831                 One additional parameter is provided:
7832                 checkSelfInte The flag that tells if the arguments should
7833                               be checked for self-intersection prior to
7834                               the operation.
7835
7836             Note:
7837                     This algorithm doesn't find all types of self-intersections.
7838                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7839                     vertex/face and edge/face intersections. Face/face
7840                     intersections detection is switched off as it is a
7841                     time-consuming operation that gives an impact on performance.
7842                     To find all self-intersections please use
7843                     CheckSelfIntersections() method.
7844
7845             NOTE:
7846                 Passed compounds (via ListShapes or via ListTools)
7847                 have to consist of nonintersecting shapes.
7848
7849             Returns:
7850                 New GEOM.GEOM_Object, containing the result shapes.
7851             """
7852             if Limit == self.ShapeType["AUTO"]:
7853                 # automatic detection of the most appropriate shape limit type
7854                 lim = GEOM.SHAPE
7855                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7856                 Limit = EnumToLong(lim)
7857                 pass
7858             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7859                                                                      ListKeepInside, ListRemoveInside,
7860                                                                      Limit, RemoveWebs, ListMaterials,
7861                                                                      KeepNonlimitShapes, checkSelfInte);
7862             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7863             self._autoPublish(anObj, theName, "partition")
7864             return anObj
7865
7866         ## See method MakePartition() for more information.
7867         #
7868         #  @ref tui_partition "Example 1"
7869         #  \n @ref swig_Partition "Example 2"
7870         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7871                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7872                       KeepNonlimitShapes=0, theName=None):
7873             """
7874             See method geompy.MakePartition for more information.
7875             """
7876             # Example: see GEOM_TestOthers.py
7877             # note: auto-publishing is done in self.MakePartition()
7878             anObj = self.MakePartition(ListShapes, ListTools,
7879                                        ListKeepInside, ListRemoveInside,
7880                                        Limit, RemoveWebs, ListMaterials,
7881                                        KeepNonlimitShapes, theName);
7882             return anObj
7883
7884         ## Perform partition of the Shape with the Plane
7885         #  @param theShape Shape to be intersected.
7886         #  @param thePlane Tool shape, to intersect theShape.
7887         #  @param theName Object name; when specified, this parameter is used
7888         #         for result publication in the study. Otherwise, if automatic
7889         #         publication is switched on, default value is used for result name.
7890         #
7891         #  @return New GEOM.GEOM_Object, containing the result shape.
7892         #
7893         #  @ref tui_partition "Example"
7894         @ManageTransactions("BoolOp")
7895         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7896             """
7897             Perform partition of the Shape with the Plane
7898
7899             Parameters:
7900                 theShape Shape to be intersected.
7901                 thePlane Tool shape, to intersect theShape.
7902                 theName Object name; when specified, this parameter is used
7903                         for result publication in the study. Otherwise, if automatic
7904                         publication is switched on, default value is used for result name.
7905
7906             Returns:
7907                 New GEOM.GEOM_Object, containing the result shape.
7908             """
7909             # Example: see GEOM_TestAll.py
7910             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7911             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7912             self._autoPublish(anObj, theName, "partition")
7913             return anObj
7914
7915         # end of l3_basic_op
7916         ## @}
7917
7918         ## @addtogroup l3_transform
7919         ## @{
7920
7921         ## Translate the given object along the vector, specified
7922         #  by its end points.
7923         #  @param theObject The object to be translated.
7924         #  @param thePoint1 Start point of translation vector.
7925         #  @param thePoint2 End point of translation vector.
7926         #  @param theCopy Flag used to translate object itself or create a copy.
7927         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7928         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7929         @ManageTransactions("TrsfOp")
7930         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7931             """
7932             Translate the given object along the vector, specified by its end points.
7933
7934             Parameters:
7935                 theObject The object to be translated.
7936                 thePoint1 Start point of translation vector.
7937                 thePoint2 End point of translation vector.
7938                 theCopy Flag used to translate object itself or create a copy.
7939
7940             Returns:
7941                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7942                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7943             """
7944             if theCopy:
7945                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7946             else:
7947                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7948             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7949             return anObj
7950
7951         ## Translate the given object along the vector, specified
7952         #  by its end points, creating its copy before the translation.
7953         #  @param theObject The object to be translated.
7954         #  @param thePoint1 Start point of translation vector.
7955         #  @param thePoint2 End point of translation vector.
7956         #  @param theName Object name; when specified, this parameter is used
7957         #         for result publication in the study. Otherwise, if automatic
7958         #         publication is switched on, default value is used for result name.
7959         #
7960         #  @return New GEOM.GEOM_Object, containing the translated object.
7961         #
7962         #  @ref tui_translation "Example 1"
7963         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7964         @ManageTransactions("TrsfOp")
7965         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7966             """
7967             Translate the given object along the vector, specified
7968             by its end points, creating its copy before the translation.
7969
7970             Parameters:
7971                 theObject The object to be translated.
7972                 thePoint1 Start point of translation vector.
7973                 thePoint2 End point of translation vector.
7974                 theName Object name; when specified, this parameter is used
7975                         for result publication in the study. Otherwise, if automatic
7976                         publication is switched on, default value is used for result name.
7977
7978             Returns:
7979                 New GEOM.GEOM_Object, containing the translated object.
7980             """
7981             # Example: see GEOM_TestAll.py
7982             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7983             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7984             self._autoPublish(anObj, theName, "translated")
7985             return anObj
7986
7987         ## Translate the given object along the vector, specified by its components.
7988         #  @param theObject The object to be translated.
7989         #  @param theDX,theDY,theDZ Components of translation vector.
7990         #  @param theCopy Flag used to translate object itself or create a copy.
7991         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7992         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7993         #
7994         #  @ref tui_translation "Example"
7995         @ManageTransactions("TrsfOp")
7996         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7997             """
7998             Translate the given object along the vector, specified by its components.
7999
8000             Parameters:
8001                 theObject The object to be translated.
8002                 theDX,theDY,theDZ Components of translation vector.
8003                 theCopy Flag used to translate object itself or create a copy.
8004
8005             Returns:
8006                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8007                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8008             """
8009             # Example: see GEOM_TestAll.py
8010             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8011             if theCopy:
8012                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8013             else:
8014                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8015             anObj.SetParameters(Parameters)
8016             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8017             return anObj
8018
8019         ## Translate the given object along the vector, specified
8020         #  by its components, creating its copy before the translation.
8021         #  @param theObject The object to be translated.
8022         #  @param theDX,theDY,theDZ Components of translation vector.
8023         #  @param theName Object name; when specified, this parameter is used
8024         #         for result publication in the study. Otherwise, if automatic
8025         #         publication is switched on, default value is used for result name.
8026         #
8027         #  @return New GEOM.GEOM_Object, containing the translated object.
8028         #
8029         #  @ref tui_translation "Example"
8030         @ManageTransactions("TrsfOp")
8031         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8032             """
8033             Translate the given object along the vector, specified
8034             by its components, creating its copy before the translation.
8035
8036             Parameters:
8037                 theObject The object to be translated.
8038                 theDX,theDY,theDZ Components of translation vector.
8039                 theName Object name; when specified, this parameter is used
8040                         for result publication in the study. Otherwise, if automatic
8041                         publication is switched on, default value is used for result name.
8042
8043             Returns:
8044                 New GEOM.GEOM_Object, containing the translated object.
8045             """
8046             # Example: see GEOM_TestAll.py
8047             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8048             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8049             anObj.SetParameters(Parameters)
8050             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8051             self._autoPublish(anObj, theName, "translated")
8052             return anObj
8053
8054         ## Translate the given object along the given vector.
8055         #  @param theObject The object to be translated.
8056         #  @param theVector The translation vector.
8057         #  @param theCopy Flag used to translate object itself or create a copy.
8058         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8059         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8060         @ManageTransactions("TrsfOp")
8061         def TranslateVector(self, theObject, theVector, theCopy=False):
8062             """
8063             Translate the given object along the given vector.
8064
8065             Parameters:
8066                 theObject The object to be translated.
8067                 theVector The translation vector.
8068                 theCopy Flag used to translate object itself or create a copy.
8069
8070             Returns:
8071                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8072                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8073             """
8074             if theCopy:
8075                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8076             else:
8077                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8078             RaiseIfFailed("TranslateVector", self.TrsfOp)
8079             return anObj
8080
8081         ## Translate the given object along the given vector,
8082         #  creating its copy before the translation.
8083         #  @param theObject The object to be translated.
8084         #  @param theVector The translation vector.
8085         #  @param theName Object name; when specified, this parameter is used
8086         #         for result publication in the study. Otherwise, if automatic
8087         #         publication is switched on, default value is used for result name.
8088         #
8089         #  @return New GEOM.GEOM_Object, containing the translated object.
8090         #
8091         #  @ref tui_translation "Example"
8092         @ManageTransactions("TrsfOp")
8093         def MakeTranslationVector(self, theObject, theVector, theName=None):
8094             """
8095             Translate the given object along the given vector,
8096             creating its copy before the translation.
8097
8098             Parameters:
8099                 theObject The object to be translated.
8100                 theVector The translation vector.
8101                 theName Object name; when specified, this parameter is used
8102                         for result publication in the study. Otherwise, if automatic
8103                         publication is switched on, default value is used for result name.
8104
8105             Returns:
8106                 New GEOM.GEOM_Object, containing the translated object.
8107             """
8108             # Example: see GEOM_TestAll.py
8109             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8110             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8111             self._autoPublish(anObj, theName, "translated")
8112             return anObj
8113
8114         ## Translate the given object along the given vector on given distance.
8115         #  @param theObject The object to be translated.
8116         #  @param theVector The translation vector.
8117         #  @param theDistance The translation distance.
8118         #  @param theCopy Flag used to translate object itself or create a copy.
8119         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8120         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8121         #
8122         #  @ref tui_translation "Example"
8123         @ManageTransactions("TrsfOp")
8124         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8125             """
8126             Translate the given object along the given vector on given distance.
8127
8128             Parameters:
8129                 theObject The object to be translated.
8130                 theVector The translation vector.
8131                 theDistance The translation distance.
8132                 theCopy Flag used to translate object itself or create a copy.
8133
8134             Returns:
8135                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8136                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8137             """
8138             # Example: see GEOM_TestAll.py
8139             theDistance,Parameters = ParseParameters(theDistance)
8140             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8141             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8142             anObj.SetParameters(Parameters)
8143             return anObj
8144
8145         ## Translate the given object along the given vector on given distance,
8146         #  creating its copy before the translation.
8147         #  @param theObject The object to be translated.
8148         #  @param theVector The translation vector.
8149         #  @param theDistance The translation distance.
8150         #  @param theName Object name; when specified, this parameter is used
8151         #         for result publication in the study. Otherwise, if automatic
8152         #         publication is switched on, default value is used for result name.
8153         #
8154         #  @return New GEOM.GEOM_Object, containing the translated object.
8155         #
8156         #  @ref tui_translation "Example"
8157         @ManageTransactions("TrsfOp")
8158         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8159             """
8160             Translate the given object along the given vector on given distance,
8161             creating its copy before the translation.
8162
8163             Parameters:
8164                 theObject The object to be translated.
8165                 theVector The translation vector.
8166                 theDistance The translation distance.
8167                 theName Object name; when specified, this parameter is used
8168                         for result publication in the study. Otherwise, if automatic
8169                         publication is switched on, default value is used for result name.
8170
8171             Returns:
8172                 New GEOM.GEOM_Object, containing the translated object.
8173             """
8174             # Example: see GEOM_TestAll.py
8175             theDistance,Parameters = ParseParameters(theDistance)
8176             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8177             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8178             anObj.SetParameters(Parameters)
8179             self._autoPublish(anObj, theName, "translated")
8180             return anObj
8181
8182         ## Rotate the given object around the given axis on the given angle.
8183         #  @param theObject The object to be rotated.
8184         #  @param theAxis Rotation axis.
8185         #  @param theAngle Rotation angle in radians.
8186         #  @param theCopy Flag used to rotate object itself or create a copy.
8187         #
8188         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8189         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8190         #
8191         #  @ref tui_rotation "Example"
8192         @ManageTransactions("TrsfOp")
8193         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8194             """
8195             Rotate the given object around the given axis on the given angle.
8196
8197             Parameters:
8198                 theObject The object to be rotated.
8199                 theAxis Rotation axis.
8200                 theAngle Rotation angle in radians.
8201                 theCopy Flag used to rotate object itself or create a copy.
8202
8203             Returns:
8204                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8205                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8206             """
8207             # Example: see GEOM_TestAll.py
8208             flag = False
8209             if isinstance(theAngle,str):
8210                 flag = True
8211             theAngle, Parameters = ParseParameters(theAngle)
8212             if flag:
8213                 theAngle = theAngle*math.pi/180.0
8214             if theCopy:
8215                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8216             else:
8217                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8218             RaiseIfFailed("Rotate", self.TrsfOp)
8219             anObj.SetParameters(Parameters)
8220             return anObj
8221
8222         ## Rotate the given object around the given axis
8223         #  on the given angle, creating its copy before the rotation.
8224         #  @param theObject The object to be rotated.
8225         #  @param theAxis Rotation axis.
8226         #  @param theAngle Rotation angle in radians.
8227         #  @param theName Object name; when specified, this parameter is used
8228         #         for result publication in the study. Otherwise, if automatic
8229         #         publication is switched on, default value is used for result name.
8230         #
8231         #  @return New GEOM.GEOM_Object, containing the rotated object.
8232         #
8233         #  @ref tui_rotation "Example"
8234         @ManageTransactions("TrsfOp")
8235         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8236             """
8237             Rotate the given object around the given axis
8238             on the given angle, creating its copy before the rotatation.
8239
8240             Parameters:
8241                 theObject The object to be rotated.
8242                 theAxis Rotation axis.
8243                 theAngle Rotation angle in radians.
8244                 theName Object name; when specified, this parameter is used
8245                         for result publication in the study. Otherwise, if automatic
8246                         publication is switched on, default value is used for result name.
8247
8248             Returns:
8249                 New GEOM.GEOM_Object, containing the rotated object.
8250             """
8251             # Example: see GEOM_TestAll.py
8252             flag = False
8253             if isinstance(theAngle,str):
8254                 flag = True
8255             theAngle, Parameters = ParseParameters(theAngle)
8256             if flag:
8257                 theAngle = theAngle*math.pi/180.0
8258             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8259             RaiseIfFailed("RotateCopy", self.TrsfOp)
8260             anObj.SetParameters(Parameters)
8261             self._autoPublish(anObj, theName, "rotated")
8262             return anObj
8263
8264         ## Rotate given object around vector perpendicular to plane
8265         #  containing three points.
8266         #  @param theObject The object to be rotated.
8267         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8268         #  containing the three points.
8269         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8270         #  @param theCopy Flag used to rotate object itself or create a copy.
8271         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8272         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8273         @ManageTransactions("TrsfOp")
8274         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8275             """
8276             Rotate given object around vector perpendicular to plane
8277             containing three points.
8278
8279             Parameters:
8280                 theObject The object to be rotated.
8281                 theCentPoint central point  the axis is the vector perpendicular to the plane
8282                              containing the three points.
8283                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8284                 theCopy Flag used to rotate object itself or create a copy.
8285
8286             Returns:
8287                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8288                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8289             """
8290             if theCopy:
8291                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8292             else:
8293                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8294             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8295             return anObj
8296
8297         ## Rotate given object around vector perpendicular to plane
8298         #  containing three points, creating its copy before the rotatation.
8299         #  @param theObject The object to be rotated.
8300         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8301         #  containing the three points.
8302         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8303         #  @param theName Object name; when specified, this parameter is used
8304         #         for result publication in the study. Otherwise, if automatic
8305         #         publication is switched on, default value is used for result name.
8306         #
8307         #  @return New GEOM.GEOM_Object, containing the rotated object.
8308         #
8309         #  @ref tui_rotation "Example"
8310         @ManageTransactions("TrsfOp")
8311         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8312             """
8313             Rotate given object around vector perpendicular to plane
8314             containing three points, creating its copy before the rotatation.
8315
8316             Parameters:
8317                 theObject The object to be rotated.
8318                 theCentPoint central point  the axis is the vector perpendicular to the plane
8319                              containing the three points.
8320                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8321                 theName Object name; when specified, this parameter is used
8322                         for result publication in the study. Otherwise, if automatic
8323                         publication is switched on, default value is used for result name.
8324
8325             Returns:
8326                 New GEOM.GEOM_Object, containing the rotated object.
8327             """
8328             # Example: see GEOM_TestAll.py
8329             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8330             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8331             self._autoPublish(anObj, theName, "rotated")
8332             return anObj
8333
8334         ## Scale the given object by the specified factor.
8335         #  @param theObject The object to be scaled.
8336         #  @param thePoint Center point for scaling.
8337         #                  Passing None for it means scaling relatively the origin of global CS.
8338         #  @param theFactor Scaling factor value.
8339         #  @param theCopy Flag used to scale object itself or create a copy.
8340         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8341         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8342         @ManageTransactions("TrsfOp")
8343         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8344             """
8345             Scale the given object by the specified factor.
8346
8347             Parameters:
8348                 theObject The object to be scaled.
8349                 thePoint Center point for scaling.
8350                          Passing None for it means scaling relatively the origin of global CS.
8351                 theFactor Scaling factor value.
8352                 theCopy Flag used to scale object itself or create a copy.
8353
8354             Returns:
8355                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8356                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8357             """
8358             # Example: see GEOM_TestAll.py
8359             theFactor, Parameters = ParseParameters(theFactor)
8360             if theCopy:
8361                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8362             else:
8363                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8364             RaiseIfFailed("Scale", self.TrsfOp)
8365             anObj.SetParameters(Parameters)
8366             return anObj
8367
8368         ## Scale the given object by the factor, creating its copy before the scaling.
8369         #  @param theObject The object to be scaled.
8370         #  @param thePoint Center point for scaling.
8371         #                  Passing None for it means scaling relatively the origin of global CS.
8372         #  @param theFactor Scaling factor value.
8373         #  @param theName Object name; when specified, this parameter is used
8374         #         for result publication in the study. Otherwise, if automatic
8375         #         publication is switched on, default value is used for result name.
8376         #
8377         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8378         #
8379         #  @ref tui_scale "Example"
8380         @ManageTransactions("TrsfOp")
8381         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8382             """
8383             Scale the given object by the factor, creating its copy before the scaling.
8384
8385             Parameters:
8386                 theObject The object to be scaled.
8387                 thePoint Center point for scaling.
8388                          Passing None for it means scaling relatively the origin of global CS.
8389                 theFactor Scaling factor value.
8390                 theName Object name; when specified, this parameter is used
8391                         for result publication in the study. Otherwise, if automatic
8392                         publication is switched on, default value is used for result name.
8393
8394             Returns:
8395                 New GEOM.GEOM_Object, containing the scaled shape.
8396             """
8397             # Example: see GEOM_TestAll.py
8398             theFactor, Parameters = ParseParameters(theFactor)
8399             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8400             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8401             anObj.SetParameters(Parameters)
8402             self._autoPublish(anObj, theName, "scaled")
8403             return anObj
8404
8405         ## Scale the given object by different factors along coordinate axes.
8406         #  @param theObject The object to be scaled.
8407         #  @param thePoint Center point for scaling.
8408         #                  Passing None for it means scaling relatively the origin of global CS.
8409         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8410         #  @param theCopy Flag used to scale object itself or create a copy.
8411         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8412         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8413         @ManageTransactions("TrsfOp")
8414         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8415             """
8416             Scale the given object by different factors along coordinate axes.
8417
8418             Parameters:
8419                 theObject The object to be scaled.
8420                 thePoint Center point for scaling.
8421                             Passing None for it means scaling relatively the origin of global CS.
8422                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8423                 theCopy Flag used to scale object itself or create a copy.
8424
8425             Returns:
8426                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8427                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8428             """
8429             # Example: see GEOM_TestAll.py
8430             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8431             if theCopy:
8432                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8433                                                             theFactorX, theFactorY, theFactorZ)
8434             else:
8435                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8436                                                         theFactorX, theFactorY, theFactorZ)
8437             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8438             anObj.SetParameters(Parameters)
8439             return anObj
8440
8441         ## Scale the given object by different factors along coordinate axes,
8442         #  creating its copy before the scaling.
8443         #  @param theObject The object to be scaled.
8444         #  @param thePoint Center point for scaling.
8445         #                  Passing None for it means scaling relatively the origin of global CS.
8446         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8447         #  @param theName Object name; when specified, this parameter is used
8448         #         for result publication in the study. Otherwise, if automatic
8449         #         publication is switched on, default value is used for result name.
8450         #
8451         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8452         #
8453         #  @ref swig_scale "Example"
8454         @ManageTransactions("TrsfOp")
8455         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8456             """
8457             Scale the given object by different factors along coordinate axes,
8458             creating its copy before the scaling.
8459
8460             Parameters:
8461                 theObject The object to be scaled.
8462                 thePoint Center point for scaling.
8463                             Passing None for it means scaling relatively the origin of global CS.
8464                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8465                 theName Object name; when specified, this parameter is used
8466                         for result publication in the study. Otherwise, if automatic
8467                         publication is switched on, default value is used for result name.
8468
8469             Returns:
8470                 New GEOM.GEOM_Object, containing the scaled shape.
8471             """
8472             # Example: see GEOM_TestAll.py
8473             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8474             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8475                                                         theFactorX, theFactorY, theFactorZ)
8476             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8477             anObj.SetParameters(Parameters)
8478             self._autoPublish(anObj, theName, "scaled")
8479             return anObj
8480
8481         ## Mirror an object relatively the given plane.
8482         #  @param theObject The object to be mirrored.
8483         #  @param thePlane Plane of symmetry.
8484         #  @param theCopy Flag used to mirror object itself or create a copy.
8485         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8486         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8487         @ManageTransactions("TrsfOp")
8488         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8489             """
8490             Mirror an object relatively the given plane.
8491
8492             Parameters:
8493                 theObject The object to be mirrored.
8494                 thePlane Plane of symmetry.
8495                 theCopy Flag used to mirror object itself or create a copy.
8496
8497             Returns:
8498                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8499                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8500             """
8501             if theCopy:
8502                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8503             else:
8504                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8505             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8506             return anObj
8507
8508         ## Create an object, symmetrical
8509         #  to the given one relatively the given plane.
8510         #  @param theObject The object to be mirrored.
8511         #  @param thePlane Plane of symmetry.
8512         #  @param theName Object name; when specified, this parameter is used
8513         #         for result publication in the study. Otherwise, if automatic
8514         #         publication is switched on, default value is used for result name.
8515         #
8516         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8517         #
8518         #  @ref tui_mirror "Example"
8519         @ManageTransactions("TrsfOp")
8520         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8521             """
8522             Create an object, symmetrical to the given one relatively the given plane.
8523
8524             Parameters:
8525                 theObject The object to be mirrored.
8526                 thePlane Plane of symmetry.
8527                 theName Object name; when specified, this parameter is used
8528                         for result publication in the study. Otherwise, if automatic
8529                         publication is switched on, default value is used for result name.
8530
8531             Returns:
8532                 New GEOM.GEOM_Object, containing the mirrored shape.
8533             """
8534             # Example: see GEOM_TestAll.py
8535             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8536             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
8537             self._autoPublish(anObj, theName, "mirrored")
8538             return anObj
8539
8540         ## Mirror an object relatively the given axis.
8541         #  @param theObject The object to be mirrored.
8542         #  @param theAxis Axis of symmetry.
8543         #  @param theCopy Flag used to mirror object itself or create a copy.
8544         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8545         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8546         @ManageTransactions("TrsfOp")
8547         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
8548             """
8549             Mirror an object relatively the given axis.
8550
8551             Parameters:
8552                 theObject The object to be mirrored.
8553                 theAxis Axis of symmetry.
8554                 theCopy Flag used to mirror object itself or create a copy.
8555
8556             Returns:
8557                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8558                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8559             """
8560             if theCopy:
8561                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8562             else:
8563                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
8564             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
8565             return anObj
8566
8567         ## Create an object, symmetrical
8568         #  to the given one relatively the given axis.
8569         #  @param theObject The object to be mirrored.
8570         #  @param theAxis Axis of symmetry.
8571         #  @param theName Object name; when specified, this parameter is used
8572         #         for result publication in the study. Otherwise, if automatic
8573         #         publication is switched on, default value is used for result name.
8574         #
8575         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8576         #
8577         #  @ref tui_mirror "Example"
8578         @ManageTransactions("TrsfOp")
8579         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
8580             """
8581             Create an object, symmetrical to the given one relatively the given axis.
8582
8583             Parameters:
8584                 theObject The object to be mirrored.
8585                 theAxis Axis of symmetry.
8586                 theName Object name; when specified, this parameter is used
8587                         for result publication in the study. Otherwise, if automatic
8588                         publication is switched on, default value is used for result name.
8589
8590             Returns:
8591                 New GEOM.GEOM_Object, containing the mirrored shape.
8592             """
8593             # Example: see GEOM_TestAll.py
8594             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8595             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
8596             self._autoPublish(anObj, theName, "mirrored")
8597             return anObj
8598
8599         ## Mirror an object relatively the given point.
8600         #  @param theObject The object to be mirrored.
8601         #  @param thePoint Point of symmetry.
8602         #  @param theCopy Flag used to mirror object itself or create a copy.
8603         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8604         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8605         @ManageTransactions("TrsfOp")
8606         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8607             """
8608             Mirror an object relatively the given point.
8609
8610             Parameters:
8611                 theObject The object to be mirrored.
8612                 thePoint Point of symmetry.
8613                 theCopy Flag used to mirror object itself or create a copy.
8614
8615             Returns:
8616                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8617                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8618             """
8619             # Example: see GEOM_TestAll.py
8620             if theCopy:
8621                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8622             else:
8623                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8624             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8625             return anObj
8626
8627         ## Create an object, symmetrical
8628         #  to the given one relatively the given point.
8629         #  @param theObject The object to be mirrored.
8630         #  @param thePoint Point of symmetry.
8631         #  @param theName Object name; when specified, this parameter is used
8632         #         for result publication in the study. Otherwise, if automatic
8633         #         publication is switched on, default value is used for result name.
8634         #
8635         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8636         #
8637         #  @ref tui_mirror "Example"
8638         @ManageTransactions("TrsfOp")
8639         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8640             """
8641             Create an object, symmetrical
8642             to the given one relatively the given point.
8643
8644             Parameters:
8645                 theObject The object to be mirrored.
8646                 thePoint Point of symmetry.
8647                 theName Object name; when specified, this parameter is used
8648                         for result publication in the study. Otherwise, if automatic
8649                         publication is switched on, default value is used for result name.
8650
8651             Returns:
8652                 New GEOM.GEOM_Object, containing the mirrored shape.
8653             """
8654             # Example: see GEOM_TestAll.py
8655             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8656             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8657             self._autoPublish(anObj, theName, "mirrored")
8658             return anObj
8659
8660         ## Modify the location of the given object.
8661         #  @param theObject The object to be displaced.
8662         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8663         #                     If \a theStartLCS is NULL, displacement
8664         #                     will be performed from global CS.\n
8665         #                     If \a theObject itself is used as \a theStartLCS,
8666         #                     its location will be changed to \a theEndLCS.
8667         #  @param theEndLCS Coordinate system to perform displacement to it.
8668         #  @param theCopy Flag used to displace object itself or create a copy.
8669         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8670         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8671         @ManageTransactions("TrsfOp")
8672         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8673             """
8674             Modify the Location of the given object by LCS, creating its copy before the setting.
8675
8676             Parameters:
8677                 theObject The object to be displaced.
8678                 theStartLCS Coordinate system to perform displacement from it.
8679                             If theStartLCS is NULL, displacement
8680                             will be performed from global CS.
8681                             If theObject itself is used as theStartLCS,
8682                             its location will be changed to theEndLCS.
8683                 theEndLCS Coordinate system to perform displacement to it.
8684                 theCopy Flag used to displace object itself or create a copy.
8685
8686             Returns:
8687                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8688                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8689             """
8690             # Example: see GEOM_TestAll.py
8691             if theCopy:
8692                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8693             else:
8694                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8695             RaiseIfFailed("Displace", self.TrsfOp)
8696             return anObj
8697
8698         ## Modify the Location of the given object by LCS,
8699         #  creating its copy before the setting.
8700         #  @param theObject The object to be displaced.
8701         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8702         #                     If \a theStartLCS is NULL, displacement
8703         #                     will be performed from global CS.\n
8704         #                     If \a theObject itself is used as \a theStartLCS,
8705         #                     its location will be changed to \a theEndLCS.
8706         #  @param theEndLCS Coordinate system to perform displacement to it.
8707         #  @param theName Object name; when specified, this parameter is used
8708         #         for result publication in the study. Otherwise, if automatic
8709         #         publication is switched on, default value is used for result name.
8710         #
8711         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8712         #
8713         #  @ref tui_modify_location "Example"
8714         @ManageTransactions("TrsfOp")
8715         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8716             """
8717             Modify the Location of the given object by LCS, creating its copy before the setting.
8718
8719             Parameters:
8720                 theObject The object to be displaced.
8721                 theStartLCS Coordinate system to perform displacement from it.
8722                             If theStartLCS is NULL, displacement
8723                             will be performed from global CS.
8724                             If theObject itself is used as theStartLCS,
8725                             its location will be changed to theEndLCS.
8726                 theEndLCS Coordinate system to perform displacement to it.
8727                 theName Object name; when specified, this parameter is used
8728                         for result publication in the study. Otherwise, if automatic
8729                         publication is switched on, default value is used for result name.
8730
8731             Returns:
8732                 New GEOM.GEOM_Object, containing the displaced shape.
8733
8734             Example of usage:
8735                 # create local coordinate systems
8736                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8737                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8738                 # modify the location of the given object
8739                 position = geompy.MakePosition(cylinder, cs1, cs2)
8740             """
8741             # Example: see GEOM_TestAll.py
8742             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8743             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8744             self._autoPublish(anObj, theName, "displaced")
8745             return anObj
8746
8747         ## Modify the Location of the given object by Path.
8748         #  @param  theObject The object to be displaced.
8749         #  @param  thePath Wire or Edge along that the object will be translated.
8750         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
8751         #  @param  theCopy is to create a copy objects if true.
8752         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
8753         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
8754         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
8755         #
8756         #  @ref tui_modify_location "Example"
8757         @ManageTransactions("TrsfOp")
8758         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
8759             """
8760             Modify the Location of the given object by Path.
8761
8762             Parameters:
8763                  theObject The object to be displaced.
8764                  thePath Wire or Edge along that the object will be translated.
8765                  theDistance progress of Path (0 = start location, 1 = end of path location).
8766                  theCopy is to create a copy objects if true.
8767                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8768
8769             Returns:
8770                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
8771                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
8772
8773             Example of usage:
8774                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
8775             """
8776             # Example: see GEOM_TestAll.py
8777             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
8778             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8779             return anObj
8780
8781         ## Modify the Location of the given object by Path, creating its copy before the operation.
8782         #  @param theObject The object to be displaced.
8783         #  @param thePath Wire or Edge along that the object will be translated.
8784         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
8785         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
8786         #  @param theName Object name; when specified, this parameter is used
8787         #         for result publication in the study. Otherwise, if automatic
8788         #         publication is switched on, default value is used for result name.
8789         #
8790         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8791         @ManageTransactions("TrsfOp")
8792         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
8793             """
8794             Modify the Location of the given object by Path, creating its copy before the operation.
8795
8796             Parameters:
8797                  theObject The object to be displaced.
8798                  thePath Wire or Edge along that the object will be translated.
8799                  theDistance progress of Path (0 = start location, 1 = end of path location).
8800                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8801                  theName Object name; when specified, this parameter is used
8802                          for result publication in the study. Otherwise, if automatic
8803                          publication is switched on, default value is used for result name.
8804
8805             Returns:
8806                 New GEOM.GEOM_Object, containing the displaced shape.
8807             """
8808             # Example: see GEOM_TestAll.py
8809             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
8810             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8811             self._autoPublish(anObj, theName, "displaced")
8812             return anObj
8813
8814         ## Offset given shape.
8815         #  @param theObject The base object for the offset.
8816         #  @param theOffset Offset value.
8817         #  @param theCopy Flag used to offset object itself or create a copy.
8818         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8819         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
8820         @ManageTransactions("TrsfOp")
8821         def Offset(self, theObject, theOffset, theCopy=False):
8822             """
8823             Offset given shape.
8824
8825             Parameters:
8826                 theObject The base object for the offset.
8827                 theOffset Offset value.
8828                 theCopy Flag used to offset object itself or create a copy.
8829
8830             Returns:
8831                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8832                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8833             """
8834             theOffset, Parameters = ParseParameters(theOffset)
8835             if theCopy:
8836                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8837             else:
8838                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8839             RaiseIfFailed("Offset", self.TrsfOp)
8840             anObj.SetParameters(Parameters)
8841             return anObj
8842
8843         ## Create new object as offset of the given one.
8844         #  @param theObject The base object for the offset.
8845         #  @param theOffset Offset value.
8846         #  @param theName Object name; when specified, this parameter is used
8847         #         for result publication in the study. Otherwise, if automatic
8848         #         publication is switched on, default value is used for result name.
8849         #
8850         #  @return New GEOM.GEOM_Object, containing the offset object.
8851         #
8852         #  @ref tui_offset "Example"
8853         @ManageTransactions("TrsfOp")
8854         def MakeOffset(self, theObject, theOffset, theName=None):
8855             """
8856             Create new object as offset of the given one.
8857
8858             Parameters:
8859                 theObject The base object for the offset.
8860                 theOffset Offset value.
8861                 theName Object name; when specified, this parameter is used
8862                         for result publication in the study. Otherwise, if automatic
8863                         publication is switched on, default value is used for result name.
8864
8865             Returns:
8866                 New GEOM.GEOM_Object, containing the offset object.
8867
8868             Example of usage:
8869                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8870                  # create a new object as offset of the given object
8871                  offset = geompy.MakeOffset(box, 70.)
8872             """
8873             # Example: see GEOM_TestAll.py
8874             theOffset, Parameters = ParseParameters(theOffset)
8875             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8876             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8877             anObj.SetParameters(Parameters)
8878             self._autoPublish(anObj, theName, "offset")
8879             return anObj
8880
8881         ## Create new object as projection of the given one on another.
8882         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8883         #         Edge and wire are acceptable if @a theTarget is a face.
8884         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
8885         #  @param theName Object name; when specified, this parameter is used
8886         #         for result publication in the study. Otherwise, if automatic
8887         #         publication is switched on, default value is used for result name.
8888         #
8889         #  @return New GEOM.GEOM_Object, containing the projection.
8890         #
8891         #  @ref tui_projection "Example"
8892         @ManageTransactions("TrsfOp")
8893         def MakeProjection(self, theSource, theTarget, theName=None):
8894             """
8895             Create new object as projection of the given one on another.
8896
8897             Parameters:
8898                 theSource The source object for the projection. It can be a point, edge or wire.
8899                           Edge and wire are acceptable if theTarget is a face.
8900                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
8901                 theName Object name; when specified, this parameter is used
8902                         for result publication in the study. Otherwise, if automatic
8903                         publication is switched on, default value is used for result name.
8904
8905             Returns:
8906                 New GEOM.GEOM_Object, containing the projection.
8907             """
8908             # Example: see GEOM_TestAll.py
8909             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8910             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8911             self._autoPublish(anObj, theName, "projection")
8912             return anObj
8913
8914         ## Create a projection projection of the given point on a wire or an edge.
8915         #  If there are no solutions or there are 2 or more solutions It throws an
8916         #  exception.
8917         #  @param thePoint the point to be projected.
8918         #  @param theWire the wire. The edge is accepted as well.
8919         #  @param theName Object name; when specified, this parameter is used
8920         #         for result publication in the study. Otherwise, if automatic
8921         #         publication is switched on, default value is used for result name.
8922         #
8923         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8924         #  \n \a u: The parameter of projection point on edge.
8925         #  \n \a PointOnEdge: The projection point.
8926         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8927         #
8928         #  @ref tui_projection "Example"
8929         @ManageTransactions("TrsfOp")
8930         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8931             """
8932             Create a projection projection of the given point on a wire or an edge.
8933             If there are no solutions or there are 2 or more solutions It throws an
8934             exception.
8935
8936             Parameters:
8937                 thePoint the point to be projected.
8938                 theWire the wire. The edge is accepted as well.
8939                 theName Object name; when specified, this parameter is used
8940                         for result publication in the study. Otherwise, if automatic
8941                         publication is switched on, default value is used for result name.
8942
8943             Returns:
8944                 [u, PointOnEdge, EdgeInWireIndex]
8945                  u: The parameter of projection point on edge.
8946                  PointOnEdge: The projection point.
8947                  EdgeInWireIndex: The index of an edge in a wire.
8948             """
8949             # Example: see GEOM_TestAll.py
8950             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
8951             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
8952             self._autoPublish(anObj[1], theName, "projection")
8953             return anObj
8954
8955         # -----------------------------------------------------------------------------
8956         # Patterns
8957         # -----------------------------------------------------------------------------
8958
8959         ## Translate the given object along the given vector a given number times
8960         #  @param theObject The object to be translated.
8961         #  @param theVector Direction of the translation. DX if None.
8962         #  @param theStep Distance to translate on.
8963         #  @param theNbTimes Quantity of translations to be done.
8964         #  @param theName Object name; when specified, this parameter is used
8965         #         for result publication in the study. Otherwise, if automatic
8966         #         publication is switched on, default value is used for result name.
8967         #
8968         #  @return New GEOM.GEOM_Object, containing compound of all
8969         #          the shapes, obtained after each translation.
8970         #
8971         #  @ref tui_multi_translation "Example"
8972         @ManageTransactions("TrsfOp")
8973         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8974             """
8975             Translate the given object along the given vector a given number times
8976
8977             Parameters:
8978                 theObject The object to be translated.
8979                 theVector Direction of the translation. DX if None.
8980                 theStep Distance to translate on.
8981                 theNbTimes Quantity of translations to be done.
8982                 theName Object name; when specified, this parameter is used
8983                         for result publication in the study. Otherwise, if automatic
8984                         publication is switched on, default value is used for result name.
8985
8986             Returns:
8987                 New GEOM.GEOM_Object, containing compound of all
8988                 the shapes, obtained after each translation.
8989
8990             Example of usage:
8991                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8992             """
8993             # Example: see GEOM_TestAll.py
8994             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8995             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8996             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8997             anObj.SetParameters(Parameters)
8998             self._autoPublish(anObj, theName, "multitranslation")
8999             return anObj
9000
9001         ## Conseqently apply two specified translations to theObject specified number of times.
9002         #  @param theObject The object to be translated.
9003         #  @param theVector1 Direction of the first translation. DX if None.
9004         #  @param theStep1 Step of the first translation.
9005         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9006         #  @param theVector2 Direction of the second translation. DY if None.
9007         #  @param theStep2 Step of the second translation.
9008         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9009         #  @param theName Object name; when specified, this parameter is used
9010         #         for result publication in the study. Otherwise, if automatic
9011         #         publication is switched on, default value is used for result name.
9012         #
9013         #  @return New GEOM.GEOM_Object, containing compound of all
9014         #          the shapes, obtained after each translation.
9015         #
9016         #  @ref tui_multi_translation "Example"
9017         @ManageTransactions("TrsfOp")
9018         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9019                                    theVector2, theStep2, theNbTimes2, theName=None):
9020             """
9021             Conseqently apply two specified translations to theObject specified number of times.
9022
9023             Parameters:
9024                 theObject The object to be translated.
9025                 theVector1 Direction of the first translation. DX if None.
9026                 theStep1 Step of the first translation.
9027                 theNbTimes1 Quantity of translations to be done along theVector1.
9028                 theVector2 Direction of the second translation. DY if None.
9029                 theStep2 Step of the second translation.
9030                 theNbTimes2 Quantity of translations to be done along theVector2.
9031                 theName Object name; when specified, this parameter is used
9032                         for result publication in the study. Otherwise, if automatic
9033                         publication is switched on, default value is used for result name.
9034
9035             Returns:
9036                 New GEOM.GEOM_Object, containing compound of all
9037                 the shapes, obtained after each translation.
9038
9039             Example of usage:
9040                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9041             """
9042             # Example: see GEOM_TestAll.py
9043             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9044             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9045                                                  theVector2, theStep2, theNbTimes2)
9046             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9047             anObj.SetParameters(Parameters)
9048             self._autoPublish(anObj, theName, "multitranslation")
9049             return anObj
9050
9051         ## Rotate the given object around the given axis a given number times.
9052         #  Rotation angle will be 2*PI/theNbTimes.
9053         #  @param theObject The object to be rotated.
9054         #  @param theAxis The rotation axis. DZ if None.
9055         #  @param theNbTimes Quantity of rotations to be done.
9056         #  @param theName Object name; when specified, this parameter is used
9057         #         for result publication in the study. Otherwise, if automatic
9058         #         publication is switched on, default value is used for result name.
9059         #
9060         #  @return New GEOM.GEOM_Object, containing compound of all the
9061         #          shapes, obtained after each rotation.
9062         #
9063         #  @ref tui_multi_rotation "Example"
9064         @ManageTransactions("TrsfOp")
9065         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9066             """
9067             Rotate the given object around the given axis a given number times.
9068             Rotation angle will be 2*PI/theNbTimes.
9069
9070             Parameters:
9071                 theObject The object to be rotated.
9072                 theAxis The rotation axis. DZ if None.
9073                 theNbTimes Quantity of rotations to be done.
9074                 theName Object name; when specified, this parameter is used
9075                         for result publication in the study. Otherwise, if automatic
9076                         publication is switched on, default value is used for result name.
9077
9078             Returns:
9079                 New GEOM.GEOM_Object, containing compound of all the
9080                 shapes, obtained after each rotation.
9081
9082             Example of usage:
9083                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9084             """
9085             # Example: see GEOM_TestAll.py
9086             theNbTimes, Parameters = ParseParameters(theNbTimes)
9087             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9088             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9089             anObj.SetParameters(Parameters)
9090             self._autoPublish(anObj, theName, "multirotation")
9091             return anObj
9092
9093         ## Rotate the given object around the given axis
9094         #  a given number times on the given angle.
9095         #  @param theObject The object to be rotated.
9096         #  @param theAxis The rotation axis. DZ if None.
9097         #  @param theAngleStep Rotation angle in radians.
9098         #  @param theNbTimes Quantity of rotations to be done.
9099         #  @param theName Object name; when specified, this parameter is used
9100         #         for result publication in the study. Otherwise, if automatic
9101         #         publication is switched on, default value is used for result name.
9102         #
9103         #  @return New GEOM.GEOM_Object, containing compound of all the
9104         #          shapes, obtained after each rotation.
9105         #
9106         #  @ref tui_multi_rotation "Example"
9107         @ManageTransactions("TrsfOp")
9108         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9109             """
9110             Rotate the given object around the given axis
9111             a given number times on the given angle.
9112
9113             Parameters:
9114                 theObject The object to be rotated.
9115                 theAxis The rotation axis. DZ if None.
9116                 theAngleStep Rotation angle in radians.
9117                 theNbTimes Quantity of rotations to be done.
9118                 theName Object name; when specified, this parameter is used
9119                         for result publication in the study. Otherwise, if automatic
9120                         publication is switched on, default value is used for result name.
9121
9122             Returns:
9123                 New GEOM.GEOM_Object, containing compound of all the
9124                 shapes, obtained after each rotation.
9125
9126             Example of usage:
9127                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9128             """
9129             # Example: see GEOM_TestAll.py
9130             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9131             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9132             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9133             anObj.SetParameters(Parameters)
9134             self._autoPublish(anObj, theName, "multirotation")
9135             return anObj
9136
9137         ## Rotate the given object around the given axis a given
9138         #  number times and multi-translate each rotation result.
9139         #  Rotation angle will be 2*PI/theNbTimes1.
9140         #  Translation direction passes through center of gravity
9141         #  of rotated shape and its projection on the rotation axis.
9142         #  @param theObject The object to be rotated.
9143         #  @param theAxis Rotation axis. DZ if None.
9144         #  @param theNbTimes1 Quantity of rotations to be done.
9145         #  @param theRadialStep Translation distance.
9146         #  @param theNbTimes2 Quantity of translations to be done.
9147         #  @param theName Object name; when specified, this parameter is used
9148         #         for result publication in the study. Otherwise, if automatic
9149         #         publication is switched on, default value is used for result name.
9150         #
9151         #  @return New GEOM.GEOM_Object, containing compound of all the
9152         #          shapes, obtained after each transformation.
9153         #
9154         #  @ref tui_multi_rotation "Example"
9155         @ManageTransactions("TrsfOp")
9156         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9157             """
9158             Rotate the given object around the
9159             given axis on the given angle a given number
9160             times and multi-translate each rotation result.
9161             Translation direction passes through center of gravity
9162             of rotated shape and its projection on the rotation axis.
9163
9164             Parameters:
9165                 theObject The object to be rotated.
9166                 theAxis Rotation axis. DZ if None.
9167                 theNbTimes1 Quantity of rotations to be done.
9168                 theRadialStep Translation distance.
9169                 theNbTimes2 Quantity of translations to be done.
9170                 theName Object name; when specified, this parameter is used
9171                         for result publication in the study. Otherwise, if automatic
9172                         publication is switched on, default value is used for result name.
9173
9174             Returns:
9175                 New GEOM.GEOM_Object, containing compound of all the
9176                 shapes, obtained after each transformation.
9177
9178             Example of usage:
9179                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9180             """
9181             # Example: see GEOM_TestAll.py
9182             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9183             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9184             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9185             anObj.SetParameters(Parameters)
9186             self._autoPublish(anObj, theName, "multirotation")
9187             return anObj
9188
9189         ## Rotate the given object around the
9190         #  given axis on the given angle a given number
9191         #  times and multi-translate each rotation result.
9192         #  Translation direction passes through center of gravity
9193         #  of rotated shape and its projection on the rotation axis.
9194         #  @param theObject The object to be rotated.
9195         #  @param theAxis Rotation axis. DZ if None.
9196         #  @param theAngleStep Rotation angle in radians.
9197         #  @param theNbTimes1 Quantity of rotations to be done.
9198         #  @param theRadialStep Translation distance.
9199         #  @param theNbTimes2 Quantity of translations to be done.
9200         #  @param theName Object name; when specified, this parameter is used
9201         #         for result publication in the study. Otherwise, if automatic
9202         #         publication is switched on, default value is used for result name.
9203         #
9204         #  @return New GEOM.GEOM_Object, containing compound of all the
9205         #          shapes, obtained after each transformation.
9206         #
9207         #  @ref tui_multi_rotation "Example"
9208         @ManageTransactions("TrsfOp")
9209         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9210             """
9211             Rotate the given object around the
9212             given axis on the given angle a given number
9213             times and multi-translate each rotation result.
9214             Translation direction passes through center of gravity
9215             of rotated shape and its projection on the rotation axis.
9216
9217             Parameters:
9218                 theObject The object to be rotated.
9219                 theAxis Rotation axis. DZ if None.
9220                 theAngleStep Rotation angle in radians.
9221                 theNbTimes1 Quantity of rotations to be done.
9222                 theRadialStep Translation distance.
9223                 theNbTimes2 Quantity of translations to be done.
9224                 theName Object name; when specified, this parameter is used
9225                         for result publication in the study. Otherwise, if automatic
9226                         publication is switched on, default value is used for result name.
9227
9228             Returns:
9229                 New GEOM.GEOM_Object, containing compound of all the
9230                 shapes, obtained after each transformation.
9231
9232             Example of usage:
9233                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9234             """
9235             # Example: see GEOM_TestAll.py
9236             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9237             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9238             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9239             anObj.SetParameters(Parameters)
9240             self._autoPublish(anObj, theName, "multirotation")
9241             return anObj
9242
9243         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9244         #
9245         #  @ref swig_MakeMultiRotation "Example"
9246         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9247             """
9248             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9249
9250             Example of usage:
9251                 pz = geompy.MakeVertex(0, 0, 100)
9252                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9253                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9254             """
9255             # Example: see GEOM_TestOthers.py
9256             aVec = self.MakeLine(aPoint,aDir)
9257             # note: auto-publishing is done in self.MultiRotate1D()
9258             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9259             return anObj
9260
9261         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9262         #
9263         #  @ref swig_MakeMultiRotation "Example"
9264         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9265             """
9266             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9267
9268             Example of usage:
9269                 pz = geompy.MakeVertex(0, 0, 100)
9270                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9271                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9272             """
9273             # Example: see GEOM_TestOthers.py
9274             aVec = self.MakeLine(aPoint,aDir)
9275             # note: auto-publishing is done in self.MultiRotate1D()
9276             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9277             return anObj
9278
9279         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9280         #
9281         #  @ref swig_MakeMultiRotation "Example"
9282         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9283             """
9284             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9285
9286             Example of usage:
9287                 pz = geompy.MakeVertex(0, 0, 100)
9288                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9289                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9290             """
9291             # Example: see GEOM_TestOthers.py
9292             aVec = self.MakeLine(aPoint,aDir)
9293             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9294             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9295             return anObj
9296
9297         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9298         #
9299         #  @ref swig_MakeMultiRotation "Example"
9300         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9301             """
9302             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9303
9304             Example of usage:
9305                 pz = geompy.MakeVertex(0, 0, 100)
9306                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9307                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9308             """
9309             # Example: see GEOM_TestOthers.py
9310             aVec = self.MakeLine(aPoint,aDir)
9311             # note: auto-publishing is done in self.MultiRotate2D()
9312             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9313             return anObj
9314
9315         # end of l3_transform
9316         ## @}
9317
9318         ## @addtogroup l3_transform_d
9319         ## @{
9320
9321         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9322         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9323             """
9324             Deprecated method. Use MultiRotate1DNbTimes instead.
9325             """
9326             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
9327             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9328
9329         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9330         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9331         @ManageTransactions("TrsfOp")
9332         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9333             """
9334             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9335             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9336
9337             Example of usage:
9338                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9339             """
9340             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
9341             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9342             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9343             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9344             anObj.SetParameters(Parameters)
9345             self._autoPublish(anObj, theName, "multirotation")
9346             return anObj
9347
9348         ## The same, as MultiRotate1D(), but axis is given by direction and point
9349         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9350         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9351             """
9352             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9353             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9354
9355             Example of usage:
9356                 pz = geompy.MakeVertex(0, 0, 100)
9357                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9358                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9359             """
9360             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
9361             aVec = self.MakeLine(aPoint,aDir)
9362             # note: auto-publishing is done in self.MultiRotate1D()
9363             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9364             return anObj
9365
9366         ## The same, as MultiRotate2D(), but axis is given by direction and point
9367         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9368         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9369             """
9370             The same, as MultiRotate2D(), but axis is given by direction and point
9371             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9372
9373             Example of usage:
9374                 pz = geompy.MakeVertex(0, 0, 100)
9375                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9376                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
9377             """
9378             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
9379             aVec = self.MakeLine(aPoint,aDir)
9380             # note: auto-publishing is done in self.MultiRotate2D()
9381             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9382             return anObj
9383
9384         # end of l3_transform_d
9385         ## @}
9386
9387         ## @addtogroup l3_local
9388         ## @{
9389
9390         ## Perform a fillet on all edges of the given shape.
9391         #  @param theShape Shape, to perform fillet on.
9392         #  @param theR Fillet radius.
9393         #  @param theName Object name; when specified, this parameter is used
9394         #         for result publication in the study. Otherwise, if automatic
9395         #         publication is switched on, default value is used for result name.
9396         #
9397         #  @return New GEOM.GEOM_Object, containing the result shape.
9398         #
9399         #  @ref tui_fillet "Example 1"
9400         #  \n @ref swig_MakeFilletAll "Example 2"
9401         @ManageTransactions("LocalOp")
9402         def MakeFilletAll(self, theShape, theR, theName=None):
9403             """
9404             Perform a fillet on all edges of the given shape.
9405
9406             Parameters:
9407                 theShape Shape, to perform fillet on.
9408                 theR Fillet radius.
9409                 theName Object name; when specified, this parameter is used
9410                         for result publication in the study. Otherwise, if automatic
9411                         publication is switched on, default value is used for result name.
9412
9413             Returns:
9414                 New GEOM.GEOM_Object, containing the result shape.
9415
9416             Example of usage:
9417                filletall = geompy.MakeFilletAll(prism, 10.)
9418             """
9419             # Example: see GEOM_TestOthers.py
9420             theR,Parameters = ParseParameters(theR)
9421             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
9422             RaiseIfFailed("MakeFilletAll", self.LocalOp)
9423             anObj.SetParameters(Parameters)
9424             self._autoPublish(anObj, theName, "fillet")
9425             return anObj
9426
9427         ## Perform a fillet on the specified edges/faces of the given shape
9428         #  @param theShape Shape, to perform fillet on.
9429         #  @param theR Fillet radius.
9430         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
9431         #  @param theListShapes Global indices of edges/faces to perform fillet on.
9432         #  @param theName Object name; when specified, this parameter is used
9433         #         for result publication in the study. Otherwise, if automatic
9434         #         publication is switched on, default value is used for result name.
9435         #
9436         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9437         #
9438         #  @return New GEOM.GEOM_Object, containing the result shape.
9439         #
9440         #  @ref tui_fillet "Example"
9441         @ManageTransactions("LocalOp")
9442         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
9443             """
9444             Perform a fillet on the specified edges/faces of the given shape
9445
9446             Parameters:
9447                 theShape Shape, to perform fillet on.
9448                 theR Fillet radius.
9449                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
9450                 theListShapes Global indices of edges/faces to perform fillet on.
9451                 theName Object name; when specified, this parameter is used
9452                         for result publication in the study. Otherwise, if automatic
9453                         publication is switched on, default value is used for result name.
9454
9455             Note:
9456                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9457
9458             Returns:
9459                 New GEOM.GEOM_Object, containing the result shape.
9460
9461             Example of usage:
9462                 # get the list of IDs (IDList) for the fillet
9463                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9464                 IDlist_e = []
9465                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9466                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9467                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9468                 # make a fillet on the specified edges of the given shape
9469                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
9470             """
9471             # Example: see GEOM_TestAll.py
9472             theR,Parameters = ParseParameters(theR)
9473             anObj = None
9474             if theShapeType == self.ShapeType["EDGE"]:
9475                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
9476                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
9477             else:
9478                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
9479                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
9480             anObj.SetParameters(Parameters)
9481             self._autoPublish(anObj, theName, "fillet")
9482             return anObj
9483
9484         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
9485         @ManageTransactions("LocalOp")
9486         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
9487             """
9488             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
9489
9490             Example of usage:
9491                 # get the list of IDs (IDList) for the fillet
9492                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9493                 IDlist_e = []
9494                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9495                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9496                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9497                 # make a fillet on the specified edges of the given shape
9498                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
9499             """
9500             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
9501             anObj = None
9502             if theShapeType == self.ShapeType["EDGE"]:
9503                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
9504                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
9505             else:
9506                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
9507                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
9508             anObj.SetParameters(Parameters)
9509             self._autoPublish(anObj, theName, "fillet")
9510             return anObj
9511
9512         ## Perform a fillet on the specified edges of the given shape
9513         #  @param theShape  Wire Shape to perform fillet on.
9514         #  @param theR  Fillet radius.
9515         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9516         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
9517         #    \note The list of vertices could be empty,
9518         #          in this case fillet will done done at all vertices in wire
9519         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
9520         #         by the length of the edges, nearest to the fillet vertex.
9521         #         But sometimes the next edge is C1 continuous with the one, nearest to
9522         #         the fillet point, and such two (or more) edges can be united to allow
9523         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
9524         #         thus ignoring the secant vertex (vertices).
9525         #  @param theName Object name; when specified, this parameter is used
9526         #         for result publication in the study. Otherwise, if automatic
9527         #         publication is switched on, default value is used for result name.
9528         #
9529         #  @return New GEOM.GEOM_Object, containing the result shape.
9530         #
9531         #  @ref tui_fillet2d "Example"
9532         @ManageTransactions("LocalOp")
9533         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
9534             """
9535             Perform a fillet on the specified edges of the given shape
9536
9537             Parameters:
9538                 theShape  Wire Shape to perform fillet on.
9539                 theR  Fillet radius.
9540                 theListOfVertexes Global indices of vertexes to perform fillet on.
9541                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
9542                     by the length of the edges, nearest to the fillet vertex.
9543                     But sometimes the next edge is C1 continuous with the one, nearest to
9544                     the fillet point, and such two (or more) edges can be united to allow
9545                     bigger radius. Set this flag to TRUE to allow collinear edges union,
9546                     thus ignoring the secant vertex (vertices).
9547                 theName Object name; when specified, this parameter is used
9548                         for result publication in the study. Otherwise, if automatic
9549                         publication is switched on, default value is used for result name.
9550             Note:
9551                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9552
9553                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
9554
9555             Returns:
9556                 New GEOM.GEOM_Object, containing the result shape.
9557
9558             Example of usage:
9559                 # create wire
9560                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
9561                 # make fillet at given wire vertices with giver radius
9562                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
9563             """
9564             # Example: see GEOM_TestAll.py
9565             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
9566             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
9567             RaiseIfFailed("MakeFillet1D", self.LocalOp)
9568             anObj.SetParameters(Parameters)
9569             self._autoPublish(anObj, theName, "fillet")
9570             return anObj
9571
9572         ## Perform a fillet at the specified vertices of the given face/shell.
9573         #  @param theShape Face or Shell shape to perform fillet on.
9574         #  @param theR Fillet radius.
9575         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9576         #  @param theName Object name; when specified, this parameter is used
9577         #         for result publication in the study. Otherwise, if automatic
9578         #         publication is switched on, default value is used for result name.
9579         #
9580         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9581         #
9582         #  @return New GEOM.GEOM_Object, containing the result shape.
9583         #
9584         #  @ref tui_fillet2d "Example"
9585         @ManageTransactions("LocalOp")
9586         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
9587             """
9588             Perform a fillet at the specified vertices of the given face/shell.
9589
9590             Parameters:
9591                 theShape  Face or Shell shape to perform fillet on.
9592                 theR  Fillet radius.
9593                 theListOfVertexes Global indices of vertexes to perform fillet on.
9594                 theName Object name; when specified, this parameter is used
9595                         for result publication in the study. Otherwise, if automatic
9596                         publication is switched on, default value is used for result name.
9597             Note:
9598                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9599
9600             Returns:
9601                 New GEOM.GEOM_Object, containing the result shape.
9602
9603             Example of usage:
9604                 face = geompy.MakeFaceHW(100, 100, 1)
9605                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
9606             """
9607             # Example: see GEOM_TestAll.py
9608             theR,Parameters = ParseParameters(theR)
9609             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
9610             RaiseIfFailed("MakeFillet2D", self.LocalOp)
9611             anObj.SetParameters(Parameters)
9612             self._autoPublish(anObj, theName, "fillet")
9613             return anObj
9614
9615         ## Perform a symmetric chamfer on all edges of the given shape.
9616         #  @param theShape Shape, to perform chamfer on.
9617         #  @param theD Chamfer size along each face.
9618         #  @param theName Object name; when specified, this parameter is used
9619         #         for result publication in the study. Otherwise, if automatic
9620         #         publication is switched on, default value is used for result name.
9621         #
9622         #  @return New GEOM.GEOM_Object, containing the result shape.
9623         #
9624         #  @ref tui_chamfer "Example 1"
9625         #  \n @ref swig_MakeChamferAll "Example 2"
9626         @ManageTransactions("LocalOp")
9627         def MakeChamferAll(self, theShape, theD, theName=None):
9628             """
9629             Perform a symmetric chamfer on all edges of the given shape.
9630
9631             Parameters:
9632                 theShape Shape, to perform chamfer on.
9633                 theD Chamfer size along each face.
9634                 theName Object name; when specified, this parameter is used
9635                         for result publication in the study. Otherwise, if automatic
9636                         publication is switched on, default value is used for result name.
9637
9638             Returns:
9639                 New GEOM.GEOM_Object, containing the result shape.
9640
9641             Example of usage:
9642                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9643             """
9644             # Example: see GEOM_TestOthers.py
9645             theD,Parameters = ParseParameters(theD)
9646             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9647             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9648             anObj.SetParameters(Parameters)
9649             self._autoPublish(anObj, theName, "chamfer")
9650             return anObj
9651
9652         ## Perform a chamfer on edges, common to the specified faces,
9653         #  with distance D1 on the Face1
9654         #  @param theShape Shape, to perform chamfer on.
9655         #  @param theD1 Chamfer size along \a theFace1.
9656         #  @param theD2 Chamfer size along \a theFace2.
9657         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9658         #  @param theName Object name; when specified, this parameter is used
9659         #         for result publication in the study. Otherwise, if automatic
9660         #         publication is switched on, default value is used for result name.
9661         #
9662         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9663         #
9664         #  @return New GEOM.GEOM_Object, containing the result shape.
9665         #
9666         #  @ref tui_chamfer "Example"
9667         @ManageTransactions("LocalOp")
9668         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9669             """
9670             Perform a chamfer on edges, common to the specified faces,
9671             with distance D1 on the Face1
9672
9673             Parameters:
9674                 theShape Shape, to perform chamfer on.
9675                 theD1 Chamfer size along theFace1.
9676                 theD2 Chamfer size along theFace2.
9677                 theFace1,theFace2 Global indices of two faces of theShape.
9678                 theName Object name; when specified, this parameter is used
9679                         for result publication in the study. Otherwise, if automatic
9680                         publication is switched on, default value is used for result name.
9681
9682             Note:
9683                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9684
9685             Returns:
9686                 New GEOM.GEOM_Object, containing the result shape.
9687
9688             Example of usage:
9689                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9690                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9691                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9692                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
9693             """
9694             # Example: see GEOM_TestAll.py
9695             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9696             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
9697             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
9698             anObj.SetParameters(Parameters)
9699             self._autoPublish(anObj, theName, "chamfer")
9700             return anObj
9701
9702         ## Perform a chamfer on edges
9703         #  @param theShape Shape, to perform chamfer on.
9704         #  @param theD Chamfer length
9705         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9706         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9707         #  @param theName Object name; when specified, this parameter is used
9708         #         for result publication in the study. Otherwise, if automatic
9709         #         publication is switched on, default value is used for result name.
9710         #
9711         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9712         #
9713         #  @return New GEOM.GEOM_Object, containing the result shape.
9714         @ManageTransactions("LocalOp")
9715         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
9716             """
9717             Perform a chamfer on edges
9718
9719             Parameters:
9720                 theShape Shape, to perform chamfer on.
9721                 theD1 Chamfer size along theFace1.
9722                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
9723                 theFace1,theFace2 Global indices of two faces of theShape.
9724                 theName Object name; when specified, this parameter is used
9725                         for result publication in the study. Otherwise, if automatic
9726                         publication is switched on, default value is used for result name.
9727
9728             Note:
9729                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9730
9731             Returns:
9732                 New GEOM.GEOM_Object, containing the result shape.
9733
9734             Example of usage:
9735                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9736                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9737                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9738                 ang = 30
9739                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
9740             """
9741             flag = False
9742             if isinstance(theAngle,str):
9743                 flag = True
9744             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9745             if flag:
9746                 theAngle = theAngle*math.pi/180.0
9747             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
9748             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
9749             anObj.SetParameters(Parameters)
9750             self._autoPublish(anObj, theName, "chamfer")
9751             return anObj
9752
9753         ## Perform a chamfer on all edges of the specified faces,
9754         #  with distance D1 on the first specified face (if several for one edge)
9755         #  @param theShape Shape, to perform chamfer on.
9756         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
9757         #               connected to the edge, are in \a theFaces, \a theD1
9758         #               will be get along face, which is nearer to \a theFaces beginning.
9759         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
9760         #  @param theFaces Sequence of global indices of faces of \a theShape.
9761         #  @param theName Object name; when specified, this parameter is used
9762         #         for result publication in the study. Otherwise, if automatic
9763         #         publication is switched on, default value is used for result name.
9764         #
9765         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9766         #
9767         #  @return New GEOM.GEOM_Object, containing the result shape.
9768         #
9769         #  @ref tui_chamfer "Example"
9770         @ManageTransactions("LocalOp")
9771         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
9772             """
9773             Perform a chamfer on all edges of the specified faces,
9774             with distance D1 on the first specified face (if several for one edge)
9775
9776             Parameters:
9777                 theShape Shape, to perform chamfer on.
9778                 theD1 Chamfer size along face from  theFaces. If both faces,
9779                       connected to the edge, are in theFaces, theD1
9780                       will be get along face, which is nearer to theFaces beginning.
9781                 theD2 Chamfer size along another of two faces, connected to the edge.
9782                 theFaces Sequence of global indices of faces of theShape.
9783                 theName Object name; when specified, this parameter is used
9784                         for result publication in the study. Otherwise, if automatic
9785                         publication is switched on, default value is used for result name.
9786
9787             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
9788
9789             Returns:
9790                 New GEOM.GEOM_Object, containing the result shape.
9791             """
9792             # Example: see GEOM_TestAll.py
9793             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9794             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
9795             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
9796             anObj.SetParameters(Parameters)
9797             self._autoPublish(anObj, theName, "chamfer")
9798             return anObj
9799
9800         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
9801         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9802         #
9803         #  @ref swig_FilletChamfer "Example"
9804         @ManageTransactions("LocalOp")
9805         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
9806             """
9807             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
9808             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9809             """
9810             flag = False
9811             if isinstance(theAngle,str):
9812                 flag = True
9813             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9814             if flag:
9815                 theAngle = theAngle*math.pi/180.0
9816             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
9817             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
9818             anObj.SetParameters(Parameters)
9819             self._autoPublish(anObj, theName, "chamfer")
9820             return anObj
9821
9822         ## Perform a chamfer on edges,
9823         #  with distance D1 on the first specified face (if several for one edge)
9824         #  @param theShape Shape, to perform chamfer on.
9825         #  @param theD1,theD2 Chamfer size
9826         #  @param theEdges Sequence of edges of \a theShape.
9827         #  @param theName Object name; when specified, this parameter is used
9828         #         for result publication in the study. Otherwise, if automatic
9829         #         publication is switched on, default value is used for result name.
9830         #
9831         #  @return New GEOM.GEOM_Object, containing the result shape.
9832         #
9833         #  @ref swig_FilletChamfer "Example"
9834         @ManageTransactions("LocalOp")
9835         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
9836             """
9837             Perform a chamfer on edges,
9838             with distance D1 on the first specified face (if several for one edge)
9839
9840             Parameters:
9841                 theShape Shape, to perform chamfer on.
9842                 theD1,theD2 Chamfer size
9843                 theEdges Sequence of edges of theShape.
9844                 theName Object name; when specified, this parameter is used
9845                         for result publication in the study. Otherwise, if automatic
9846                         publication is switched on, default value is used for result name.
9847
9848             Returns:
9849                 New GEOM.GEOM_Object, containing the result shape.
9850             """
9851             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9852             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
9853             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
9854             anObj.SetParameters(Parameters)
9855             self._autoPublish(anObj, theName, "chamfer")
9856             return anObj
9857
9858         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
9859         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9860         @ManageTransactions("LocalOp")
9861         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
9862             """
9863             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
9864             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9865             """
9866             flag = False
9867             if isinstance(theAngle,str):
9868                 flag = True
9869             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9870             if flag:
9871                 theAngle = theAngle*math.pi/180.0
9872             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
9873             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
9874             anObj.SetParameters(Parameters)
9875             self._autoPublish(anObj, theName, "chamfer")
9876             return anObj
9877
9878         ## @sa MakeChamferEdge(), MakeChamferFaces()
9879         #
9880         #  @ref swig_MakeChamfer "Example"
9881         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
9882             """
9883             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
9884             """
9885             # Example: see GEOM_TestOthers.py
9886             anObj = None
9887             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
9888             if aShapeType == self.ShapeType["EDGE"]:
9889                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
9890             else:
9891                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
9892             return anObj
9893
9894         ## Remove material from a solid by extrusion of the base shape on the given distance.
9895         #  @param theInit Shape to remove material from. It must be a solid or
9896         #  a compound made of a single solid.
9897         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9898         #  @param theH Prism dimension along the normal to theBase
9899         #  @param theAngle Draft angle in degrees.
9900         #  @param theName Object name; when specified, this parameter is used
9901         #         for result publication in the study. Otherwise, if automatic
9902         #         publication is switched on, default value is used for result name.
9903         #
9904         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
9905         #
9906         #  @ref tui_creation_prism "Example"
9907         @ManageTransactions("PrimOp")
9908         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9909             """
9910             Add material to a solid by extrusion of the base shape on the given distance.
9911
9912             Parameters:
9913                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9914                 theBase Closed edge or wire defining the base shape to be extruded.
9915                 theH Prism dimension along the normal  to theBase
9916                 theAngle Draft angle in degrees.
9917                 theName Object name; when specified, this parameter is used
9918                         for result publication in the study. Otherwise, if automatic
9919                         publication is switched on, default value is used for result name.
9920
9921             Returns:
9922                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9923             """
9924             # Example: see GEOM_TestAll.py
9925             #theH,Parameters = ParseParameters(theH)
9926             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9927             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9928             #anObj.SetParameters(Parameters)
9929             self._autoPublish(anObj, theName, "extrudedCut")
9930             return anObj
9931
9932         ## Add material to a solid by extrusion of the base shape on the given distance.
9933         #  @param theInit Shape to add material to. It must be a solid or
9934         #  a compound made of a single solid.
9935         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9936         #  @param theH Prism dimension along the normal to theBase
9937         #  @param theAngle Draft angle in degrees.
9938         #  @param theName Object name; when specified, this parameter is used
9939         #         for result publication in the study. Otherwise, if automatic
9940         #         publication is switched on, default value is used for result name.
9941         #
9942         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
9943         #
9944         #  @ref tui_creation_prism "Example"
9945         @ManageTransactions("PrimOp")
9946         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
9947             """
9948             Add material to a solid by extrusion of the base shape on the given distance.
9949
9950             Parameters:
9951                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
9952                 theBase Closed edge or wire defining the base shape to be extruded.
9953                 theH Prism dimension along the normal  to theBase
9954                 theAngle Draft angle in degrees.
9955                 theName Object name; when specified, this parameter is used
9956                         for result publication in the study. Otherwise, if automatic
9957                         publication is switched on, default value is used for result name.
9958
9959             Returns:
9960                 New GEOM.GEOM_Object,  containing the initial shape with added material.
9961             """
9962             # Example: see GEOM_TestAll.py
9963             #theH,Parameters = ParseParameters(theH)
9964             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
9965             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9966             #anObj.SetParameters(Parameters)
9967             self._autoPublish(anObj, theName, "extrudedBoss")
9968             return anObj
9969
9970         # end of l3_local
9971         ## @}
9972
9973         ## @addtogroup l3_basic_op
9974         ## @{
9975
9976         ## Perform an Archimde operation on the given shape with given parameters.
9977         #  The object presenting the resulting face is returned.
9978         #  @param theShape Shape to be put in water.
9979         #  @param theWeight Weight of the shape.
9980         #  @param theWaterDensity Density of the water.
9981         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
9982         #  @param theName Object name; when specified, this parameter is used
9983         #         for result publication in the study. Otherwise, if automatic
9984         #         publication is switched on, default value is used for result name.
9985         #
9986         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
9987         #          by a plane, corresponding to water level.
9988         #
9989         #  @ref tui_archimede "Example"
9990         @ManageTransactions("LocalOp")
9991         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9992             """
9993             Perform an Archimde operation on the given shape with given parameters.
9994             The object presenting the resulting face is returned.
9995
9996             Parameters:
9997                 theShape Shape to be put in water.
9998                 theWeight Weight of the shape.
9999                 theWaterDensity Density of the water.
10000                 theMeshDeflection Deflection of the mesh, using to compute the section.
10001                 theName Object name; when specified, this parameter is used
10002                         for result publication in the study. Otherwise, if automatic
10003                         publication is switched on, default value is used for result name.
10004
10005             Returns:
10006                 New GEOM.GEOM_Object, containing a section of theShape
10007                 by a plane, corresponding to water level.
10008             """
10009             # Example: see GEOM_TestAll.py
10010             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10011               theWeight,theWaterDensity,theMeshDeflection)
10012             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10013             RaiseIfFailed("MakeArchimede", self.LocalOp)
10014             anObj.SetParameters(Parameters)
10015             self._autoPublish(anObj, theName, "archimede")
10016             return anObj
10017
10018         # end of l3_basic_op
10019         ## @}
10020
10021         ## @addtogroup l2_measure
10022         ## @{
10023
10024         ## Get point coordinates
10025         #  @return [x, y, z]
10026         #
10027         #  @ref tui_point_coordinates_page "Example"
10028         @ManageTransactions("MeasuOp")
10029         def PointCoordinates(self,Point):
10030             """
10031             Get point coordinates
10032
10033             Returns:
10034                 [x, y, z]
10035             """
10036             # Example: see GEOM_TestMeasures.py
10037             aTuple = self.MeasuOp.PointCoordinates(Point)
10038             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10039             return aTuple
10040
10041         ## Get vector coordinates
10042         #  @return [x, y, z]
10043         #
10044         #  @ref tui_measurement_tools_page "Example"
10045         def VectorCoordinates(self,Vector):
10046             """
10047             Get vector coordinates
10048
10049             Returns:
10050                 [x, y, z]
10051             """
10052
10053             p1=self.GetFirstVertex(Vector)
10054             p2=self.GetLastVertex(Vector)
10055
10056             X1=self.PointCoordinates(p1)
10057             X2=self.PointCoordinates(p2)
10058
10059             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10060
10061
10062         ## Compute cross product
10063         #  @return vector w=u^v
10064         #
10065         #  @ref tui_measurement_tools_page "Example"
10066         def CrossProduct(self, Vector1, Vector2):
10067             """
10068             Compute cross product
10069
10070             Returns: vector w=u^v
10071             """
10072             u=self.VectorCoordinates(Vector1)
10073             v=self.VectorCoordinates(Vector2)
10074             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])
10075
10076             return w
10077
10078         ## Compute cross product
10079         #  @return dot product  p=u.v
10080         #
10081         #  @ref tui_measurement_tools_page "Example"
10082         def DotProduct(self, Vector1, Vector2):
10083             """
10084             Compute cross product
10085
10086             Returns: dot product  p=u.v
10087             """
10088             u=self.VectorCoordinates(Vector1)
10089             v=self.VectorCoordinates(Vector2)
10090             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10091
10092             return p
10093
10094
10095         ## Get summarized length of all wires,
10096         #  area of surface and volume of the given shape.
10097         #  @param theShape Shape to define properties of.
10098         #  @return [theLength, theSurfArea, theVolume]\n
10099         #  theLength:   Summarized length of all wires of the given shape.\n
10100         #  theSurfArea: Area of surface of the given shape.\n
10101         #  theVolume:   Volume of the given shape.
10102         #
10103         #  @ref tui_basic_properties_page "Example"
10104         @ManageTransactions("MeasuOp")
10105         def BasicProperties(self,theShape):
10106             """
10107             Get summarized length of all wires,
10108             area of surface and volume of the given shape.
10109
10110             Parameters:
10111                 theShape Shape to define properties of.
10112
10113             Returns:
10114                 [theLength, theSurfArea, theVolume]
10115                  theLength:   Summarized length of all wires of the given shape.
10116                  theSurfArea: Area of surface of the given shape.
10117                  theVolume:   Volume of the given shape.
10118             """
10119             # Example: see GEOM_TestMeasures.py
10120             aTuple = self.MeasuOp.GetBasicProperties(theShape)
10121             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10122             return aTuple
10123
10124         ## Get parameters of bounding box of the given shape
10125         #  @param theShape Shape to obtain bounding box of.
10126         #  @param precise TRUE for precise computation; FALSE for fast one.
10127         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10128         #  Xmin,Xmax: Limits of shape along OX axis.
10129         #  Ymin,Ymax: Limits of shape along OY axis.
10130         #  Zmin,Zmax: Limits of shape along OZ axis.
10131         #
10132         #  @ref tui_bounding_box_page "Example"
10133         @ManageTransactions("MeasuOp")
10134         def BoundingBox (self, theShape, precise=False):
10135             """
10136             Get parameters of bounding box of the given shape
10137
10138             Parameters:
10139                 theShape Shape to obtain bounding box of.
10140                 precise TRUE for precise computation; FALSE for fast one.
10141
10142             Returns:
10143                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10144                  Xmin,Xmax: Limits of shape along OX axis.
10145                  Ymin,Ymax: Limits of shape along OY axis.
10146                  Zmin,Zmax: Limits of shape along OZ axis.
10147             """
10148             # Example: see GEOM_TestMeasures.py
10149             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10150             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10151             return aTuple
10152
10153         ## Get bounding box of the given shape
10154         #  @param theShape Shape to obtain bounding box of.
10155         #  @param precise TRUE for precise computation; FALSE for fast one.
10156         #  @param theName Object name; when specified, this parameter is used
10157         #         for result publication in the study. Otherwise, if automatic
10158         #         publication is switched on, default value is used for result name.
10159         #
10160         #  @return New GEOM.GEOM_Object, containing the created box.
10161         #
10162         #  @ref tui_bounding_box_page "Example"
10163         @ManageTransactions("MeasuOp")
10164         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10165             """
10166             Get bounding box of the given shape
10167
10168             Parameters:
10169                 theShape Shape to obtain bounding box of.
10170                 precise TRUE for precise computation; FALSE for fast one.
10171                 theName Object name; when specified, this parameter is used
10172                         for result publication in the study. Otherwise, if automatic
10173                         publication is switched on, default value is used for result name.
10174
10175             Returns:
10176                 New GEOM.GEOM_Object, containing the created box.
10177             """
10178             # Example: see GEOM_TestMeasures.py
10179             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10180             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10181             self._autoPublish(anObj, theName, "bndbox")
10182             return anObj
10183
10184         ## Get inertia matrix and moments of inertia of theShape.
10185         #  @param theShape Shape to calculate inertia of.
10186         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10187         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10188         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10189         #
10190         #  @ref tui_inertia_page "Example"
10191         @ManageTransactions("MeasuOp")
10192         def Inertia(self,theShape):
10193             """
10194             Get inertia matrix and moments of inertia of theShape.
10195
10196             Parameters:
10197                 theShape Shape to calculate inertia of.
10198
10199             Returns:
10200                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10201                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10202                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10203             """
10204             # Example: see GEOM_TestMeasures.py
10205             aTuple = self.MeasuOp.GetInertia(theShape)
10206             RaiseIfFailed("GetInertia", self.MeasuOp)
10207             return aTuple
10208
10209         ## Get if coords are included in the shape (ST_IN or ST_ON)
10210         #  @param theShape Shape
10211         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10212         #  @param tolerance to be used (default is 1.0e-7)
10213         #  @return list_of_boolean = [res1, res2, ...]
10214         @ManageTransactions("MeasuOp")
10215         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10216             """
10217             Get if coords are included in the shape (ST_IN or ST_ON)
10218
10219             Parameters:
10220                 theShape Shape
10221                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10222                 tolerance to be used (default is 1.0e-7)
10223
10224             Returns:
10225                 list_of_boolean = [res1, res2, ...]
10226             """
10227             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10228
10229         ## Get minimal distance between the given shapes.
10230         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10231         #  @return Value of the minimal distance between the given shapes.
10232         #
10233         #  @ref tui_min_distance_page "Example"
10234         @ManageTransactions("MeasuOp")
10235         def MinDistance(self, theShape1, theShape2):
10236             """
10237             Get minimal distance between the given shapes.
10238
10239             Parameters:
10240                 theShape1,theShape2 Shapes to find minimal distance between.
10241
10242             Returns:
10243                 Value of the minimal distance between the given shapes.
10244             """
10245             # Example: see GEOM_TestMeasures.py
10246             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10247             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10248             return aTuple[0]
10249
10250         ## Get minimal distance between the given shapes.
10251         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10252         #  @return Value of the minimal distance between the given shapes, in form of list
10253         #          [Distance, DX, DY, DZ].
10254         #
10255         #  @ref tui_min_distance_page "Example"
10256         @ManageTransactions("MeasuOp")
10257         def MinDistanceComponents(self, theShape1, theShape2):
10258             """
10259             Get minimal distance between the given shapes.
10260
10261             Parameters:
10262                 theShape1,theShape2 Shapes to find minimal distance between.
10263
10264             Returns:
10265                 Value of the minimal distance between the given shapes, in form of list
10266                 [Distance, DX, DY, DZ]
10267             """
10268             # Example: see GEOM_TestMeasures.py
10269             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10270             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10271             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10272             return aRes
10273
10274         ## Get closest points of the given shapes.
10275         #  @param theShape1,theShape2 Shapes to find closest points of.
10276         #  @return The number of found solutions (-1 in case of infinite number of
10277         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10278         #
10279         #  @ref tui_min_distance_page "Example"
10280         @ManageTransactions("MeasuOp")
10281         def ClosestPoints (self, theShape1, theShape2):
10282             """
10283             Get closest points of the given shapes.
10284
10285             Parameters:
10286                 theShape1,theShape2 Shapes to find closest points of.
10287
10288             Returns:
10289                 The number of found solutions (-1 in case of infinite number of
10290                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10291             """
10292             # Example: see GEOM_TestMeasures.py
10293             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10294             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10295             return aTuple
10296
10297         ## Get angle between the given shapes in degrees.
10298         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10299         #  @note If both arguments are vectors, the angle is computed in accordance
10300         #        with their orientations, otherwise the minimum angle is computed.
10301         #  @return Value of the angle between the given shapes in degrees.
10302         #
10303         #  @ref tui_angle_page "Example"
10304         @ManageTransactions("MeasuOp")
10305         def GetAngle(self, theShape1, theShape2):
10306             """
10307             Get angle between the given shapes in degrees.
10308
10309             Parameters:
10310                 theShape1,theShape2 Lines or linear edges to find angle between.
10311
10312             Note:
10313                 If both arguments are vectors, the angle is computed in accordance
10314                 with their orientations, otherwise the minimum angle is computed.
10315
10316             Returns:
10317                 Value of the angle between the given shapes in degrees.
10318             """
10319             # Example: see GEOM_TestMeasures.py
10320             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10321             RaiseIfFailed("GetAngle", self.MeasuOp)
10322             return anAngle
10323
10324         ## Get angle between the given shapes in radians.
10325         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10326         #  @note If both arguments are vectors, the angle is computed in accordance
10327         #        with their orientations, otherwise the minimum angle is computed.
10328         #  @return Value of the angle between the given shapes in radians.
10329         #
10330         #  @ref tui_angle_page "Example"
10331         @ManageTransactions("MeasuOp")
10332         def GetAngleRadians(self, theShape1, theShape2):
10333             """
10334             Get angle between the given shapes in radians.
10335
10336             Parameters:
10337                 theShape1,theShape2 Lines or linear edges to find angle between.
10338
10339
10340             Note:
10341                 If both arguments are vectors, the angle is computed in accordance
10342                 with their orientations, otherwise the minimum angle is computed.
10343
10344             Returns:
10345                 Value of the angle between the given shapes in radians.
10346             """
10347             # Example: see GEOM_TestMeasures.py
10348             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10349             RaiseIfFailed("GetAngle", self.MeasuOp)
10350             return anAngle
10351
10352         ## Get angle between the given vectors in degrees.
10353         #  @param theShape1,theShape2 Vectors to find angle between.
10354         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10355         #                 if False, the opposite vector to the normal vector is used.
10356         #  @return Value of the angle between the given vectors in degrees.
10357         #
10358         #  @ref tui_angle_page "Example"
10359         @ManageTransactions("MeasuOp")
10360         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10361             """
10362             Get angle between the given vectors in degrees.
10363
10364             Parameters:
10365                 theShape1,theShape2 Vectors to find angle between.
10366                 theFlag If True, the normal vector is defined by the two vectors cross,
10367                         if False, the opposite vector to the normal vector is used.
10368
10369             Returns:
10370                 Value of the angle between the given vectors in degrees.
10371             """
10372             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
10373             if not theFlag:
10374                 anAngle = 360. - anAngle
10375             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
10376             return anAngle
10377
10378         ## The same as GetAngleVectors, but the result is in radians.
10379         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
10380             """
10381             Get angle between the given vectors in radians.
10382
10383             Parameters:
10384                 theShape1,theShape2 Vectors to find angle between.
10385                 theFlag If True, the normal vector is defined by the two vectors cross,
10386                         if False, the opposite vector to the normal vector is used.
10387
10388             Returns:
10389                 Value of the angle between the given vectors in radians.
10390             """
10391             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
10392             return anAngle
10393
10394         ## @name Curve Curvature Measurement
10395         #  Methods for receiving radius of curvature of curves
10396         #  in the given point
10397         ## @{
10398
10399         ## Measure curvature of a curve at a point, set by parameter.
10400         #  @param theCurve a curve.
10401         #  @param theParam parameter.
10402         #  @return radius of curvature of \a theCurve.
10403         #
10404         #  @ref swig_todo "Example"
10405         @ManageTransactions("MeasuOp")
10406         def CurveCurvatureByParam(self, theCurve, theParam):
10407             """
10408             Measure curvature of a curve at a point, set by parameter.
10409
10410             Parameters:
10411                 theCurve a curve.
10412                 theParam parameter.
10413
10414             Returns:
10415                 radius of curvature of theCurve.
10416             """
10417             # Example: see GEOM_TestMeasures.py
10418             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
10419             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
10420             return aCurv
10421
10422         ## Measure curvature of a curve at a point.
10423         #  @param theCurve a curve.
10424         #  @param thePoint given point.
10425         #  @return radius of curvature of \a theCurve.
10426         #
10427         #  @ref swig_todo "Example"
10428         @ManageTransactions("MeasuOp")
10429         def CurveCurvatureByPoint(self, theCurve, thePoint):
10430             """
10431             Measure curvature of a curve at a point.
10432
10433             Parameters:
10434                 theCurve a curve.
10435                 thePoint given point.
10436
10437             Returns:
10438                 radius of curvature of theCurve.
10439             """
10440             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
10441             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
10442             return aCurv
10443         ## @}
10444
10445         ## @name Surface Curvature Measurement
10446         #  Methods for receiving max and min radius of curvature of surfaces
10447         #  in the given point
10448         ## @{
10449
10450         ## Measure max radius of curvature of surface.
10451         #  @param theSurf the given surface.
10452         #  @param theUParam Value of U-parameter on the referenced surface.
10453         #  @param theVParam Value of V-parameter on the referenced surface.
10454         #  @return max radius of curvature of theSurf.
10455         #
10456         ## @ref swig_todo "Example"
10457         @ManageTransactions("MeasuOp")
10458         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10459             """
10460             Measure max radius of curvature of surface.
10461
10462             Parameters:
10463                 theSurf the given surface.
10464                 theUParam Value of U-parameter on the referenced surface.
10465                 theVParam Value of V-parameter on the referenced surface.
10466
10467             Returns:
10468                 max radius of curvature of theSurf.
10469             """
10470             # Example: see GEOM_TestMeasures.py
10471             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10472             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
10473             return aSurf
10474
10475         ## Measure max radius of curvature of surface in the given point
10476         #  @param theSurf the given surface.
10477         #  @param thePoint given point.
10478         #  @return max radius of curvature of theSurf.
10479         #
10480         ## @ref swig_todo "Example"
10481         @ManageTransactions("MeasuOp")
10482         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
10483             """
10484             Measure max radius of curvature of surface in the given point.
10485
10486             Parameters:
10487                 theSurf the given surface.
10488                 thePoint given point.
10489
10490             Returns:
10491                 max radius of curvature of theSurf.
10492             """
10493             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
10494             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
10495             return aSurf
10496
10497         ## Measure min radius of curvature of surface.
10498         #  @param theSurf the given surface.
10499         #  @param theUParam Value of U-parameter on the referenced surface.
10500         #  @param theVParam Value of V-parameter on the referenced surface.
10501         #  @return min radius of curvature of theSurf.
10502         #
10503         ## @ref swig_todo "Example"
10504         @ManageTransactions("MeasuOp")
10505         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10506             """
10507             Measure min radius of curvature of surface.
10508
10509             Parameters:
10510                 theSurf the given surface.
10511                 theUParam Value of U-parameter on the referenced surface.
10512                 theVParam Value of V-parameter on the referenced surface.
10513
10514             Returns:
10515                 Min radius of curvature of theSurf.
10516             """
10517             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10518             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
10519             return aSurf
10520
10521         ## Measure min radius of curvature of surface in the given point
10522         #  @param theSurf the given surface.
10523         #  @param thePoint given point.
10524         #  @return min radius of curvature of theSurf.
10525         #
10526         ## @ref swig_todo "Example"
10527         @ManageTransactions("MeasuOp")
10528         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
10529             """
10530             Measure min radius of curvature of surface in the given point.
10531
10532             Parameters:
10533                 theSurf the given surface.
10534                 thePoint given point.
10535
10536             Returns:
10537                 Min radius of curvature of theSurf.
10538             """
10539             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
10540             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
10541             return aSurf
10542         ## @}
10543
10544         ## Get min and max tolerances of sub-shapes of theShape
10545         #  @param theShape Shape, to get tolerances of.
10546         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
10547         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
10548         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
10549         #  VertMin,VertMax: Min and max tolerances of the vertices.
10550         #
10551         #  @ref tui_tolerance_page "Example"
10552         @ManageTransactions("MeasuOp")
10553         def Tolerance(self,theShape):
10554             """
10555             Get min and max tolerances of sub-shapes of theShape
10556
10557             Parameters:
10558                 theShape Shape, to get tolerances of.
10559
10560             Returns:
10561                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
10562                  FaceMin,FaceMax: Min and max tolerances of the faces.
10563                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
10564                  VertMin,VertMax: Min and max tolerances of the vertices.
10565             """
10566             # Example: see GEOM_TestMeasures.py
10567             aTuple = self.MeasuOp.GetTolerance(theShape)
10568             RaiseIfFailed("GetTolerance", self.MeasuOp)
10569             return aTuple
10570
10571         ## Obtain description of the given shape (number of sub-shapes of each type)
10572         #  @param theShape Shape to be described.
10573         #  @return Description of the given shape.
10574         #
10575         #  @ref tui_whatis_page "Example"
10576         @ManageTransactions("MeasuOp")
10577         def WhatIs(self,theShape):
10578             """
10579             Obtain description of the given shape (number of sub-shapes of each type)
10580
10581             Parameters:
10582                 theShape Shape to be described.
10583
10584             Returns:
10585                 Description of the given shape.
10586             """
10587             # Example: see GEOM_TestMeasures.py
10588             aDescr = self.MeasuOp.WhatIs(theShape)
10589             RaiseIfFailed("WhatIs", self.MeasuOp)
10590             return aDescr
10591
10592         ## Obtain quantity of shapes of the given type in \a theShape.
10593         #  If \a theShape is of type \a theType, it is also counted.
10594         #  @param theShape Shape to be described.
10595         #  @param theType the given ShapeType().
10596         #  @return Quantity of shapes of type \a theType in \a theShape.
10597         #
10598         #  @ref tui_measurement_tools_page "Example"
10599         def NbShapes (self, theShape, theType):
10600             """
10601             Obtain quantity of shapes of the given type in theShape.
10602             If theShape is of type theType, it is also counted.
10603
10604             Parameters:
10605                 theShape Shape to be described.
10606                 theType the given geompy.ShapeType
10607
10608             Returns:
10609                 Quantity of shapes of type theType in theShape.
10610             """
10611             # Example: see GEOM_TestMeasures.py
10612             listSh = self.SubShapeAllIDs(theShape, theType)
10613             Nb = len(listSh)
10614             return Nb
10615
10616         ## Obtain quantity of shapes of each type in \a theShape.
10617         #  The \a theShape is also counted.
10618         #  @param theShape Shape to be described.
10619         #  @return Dictionary of ShapeType() with bound quantities of shapes.
10620         #
10621         #  @ref tui_measurement_tools_page "Example"
10622         def ShapeInfo (self, theShape):
10623             """
10624             Obtain quantity of shapes of each type in theShape.
10625             The theShape is also counted.
10626
10627             Parameters:
10628                 theShape Shape to be described.
10629
10630             Returns:
10631                 Dictionary of geompy.ShapeType with bound quantities of shapes.
10632             """
10633             # Example: see GEOM_TestMeasures.py
10634             aDict = {}
10635             for typeSh in self.ShapeType:
10636                 if typeSh in ( "AUTO", "SHAPE" ): continue
10637                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
10638                 Nb = len(listSh)
10639                 aDict[typeSh] = Nb
10640                 pass
10641             return aDict
10642
10643         def GetCreationInformation(self, theShape):
10644             info = theShape.GetCreationInformation()
10645             # operationName
10646             opName = info.operationName
10647             if not opName: opName = "no info available"
10648             res = "Operation: " + opName
10649             # parameters
10650             for parVal in info.params:
10651                 res += " \n %s = %s" % ( parVal.name, parVal.value )
10652             return res
10653
10654         ## Get a point, situated at the centre of mass of theShape.
10655         #  @param theShape Shape to define centre of mass of.
10656         #  @param theName Object name; when specified, this parameter is used
10657         #         for result publication in the study. Otherwise, if automatic
10658         #         publication is switched on, default value is used for result name.
10659         #
10660         #  @return New GEOM.GEOM_Object, containing the created point.
10661         #
10662         #  @ref tui_center_of_mass_page "Example"
10663         @ManageTransactions("MeasuOp")
10664         def MakeCDG(self, theShape, theName=None):
10665             """
10666             Get a point, situated at the centre of mass of theShape.
10667
10668             Parameters:
10669                 theShape Shape to define centre of mass of.
10670                 theName Object name; when specified, this parameter is used
10671                         for result publication in the study. Otherwise, if automatic
10672                         publication is switched on, default value is used for result name.
10673
10674             Returns:
10675                 New GEOM.GEOM_Object, containing the created point.
10676             """
10677             # Example: see GEOM_TestMeasures.py
10678             anObj = self.MeasuOp.GetCentreOfMass(theShape)
10679             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
10680             self._autoPublish(anObj, theName, "centerOfMass")
10681             return anObj
10682
10683         ## Get a vertex sub-shape by index depended with orientation.
10684         #  @param theShape Shape to find sub-shape.
10685         #  @param theIndex Index to find vertex by this index (starting from zero)
10686         #  @param theName Object name; when specified, this parameter is used
10687         #         for result publication in the study. Otherwise, if automatic
10688         #         publication is switched on, default value is used for result name.
10689         #
10690         #  @return New GEOM.GEOM_Object, containing the created vertex.
10691         #
10692         #  @ref tui_measurement_tools_page "Example"
10693         @ManageTransactions("MeasuOp")
10694         def GetVertexByIndex(self, theShape, theIndex, theName=None):
10695             """
10696             Get a vertex sub-shape by index depended with orientation.
10697
10698             Parameters:
10699                 theShape Shape to find sub-shape.
10700                 theIndex Index to find vertex by this index (starting from zero)
10701                 theName Object name; when specified, this parameter is used
10702                         for result publication in the study. Otherwise, if automatic
10703                         publication is switched on, default value is used for result name.
10704
10705             Returns:
10706                 New GEOM.GEOM_Object, containing the created vertex.
10707             """
10708             # Example: see GEOM_TestMeasures.py
10709             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
10710             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
10711             self._autoPublish(anObj, theName, "vertex")
10712             return anObj
10713
10714         ## Get the first vertex of wire/edge depended orientation.
10715         #  @param theShape Shape to find first vertex.
10716         #  @param theName Object name; when specified, this parameter is used
10717         #         for result publication in the study. Otherwise, if automatic
10718         #         publication is switched on, default value is used for result name.
10719         #
10720         #  @return New GEOM.GEOM_Object, containing the created vertex.
10721         #
10722         #  @ref tui_measurement_tools_page "Example"
10723         def GetFirstVertex(self, theShape, theName=None):
10724             """
10725             Get the first vertex of wire/edge depended orientation.
10726
10727             Parameters:
10728                 theShape Shape to find first vertex.
10729                 theName Object name; when specified, this parameter is used
10730                         for result publication in the study. Otherwise, if automatic
10731                         publication is switched on, default value is used for result name.
10732
10733             Returns:
10734                 New GEOM.GEOM_Object, containing the created vertex.
10735             """
10736             # Example: see GEOM_TestMeasures.py
10737             # note: auto-publishing is done in self.GetVertexByIndex()
10738             return self.GetVertexByIndex(theShape, 0, theName)
10739
10740         ## Get the last vertex of wire/edge depended orientation.
10741         #  @param theShape Shape to find last vertex.
10742         #  @param theName Object name; when specified, this parameter is used
10743         #         for result publication in the study. Otherwise, if automatic
10744         #         publication is switched on, default value is used for result name.
10745         #
10746         #  @return New GEOM.GEOM_Object, containing the created vertex.
10747         #
10748         #  @ref tui_measurement_tools_page "Example"
10749         def GetLastVertex(self, theShape, theName=None):
10750             """
10751             Get the last vertex of wire/edge depended orientation.
10752
10753             Parameters:
10754                 theShape Shape to find last vertex.
10755                 theName Object name; when specified, this parameter is used
10756                         for result publication in the study. Otherwise, if automatic
10757                         publication is switched on, default value is used for result name.
10758
10759             Returns:
10760                 New GEOM.GEOM_Object, containing the created vertex.
10761             """
10762             # Example: see GEOM_TestMeasures.py
10763             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
10764             # note: auto-publishing is done in self.GetVertexByIndex()
10765             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
10766
10767         ## Get a normale to the given face. If the point is not given,
10768         #  the normale is calculated at the center of mass.
10769         #  @param theFace Face to define normale of.
10770         #  @param theOptionalPoint Point to compute the normale at.
10771         #  @param theName Object name; when specified, this parameter is used
10772         #         for result publication in the study. Otherwise, if automatic
10773         #         publication is switched on, default value is used for result name.
10774         #
10775         #  @return New GEOM.GEOM_Object, containing the created vector.
10776         #
10777         #  @ref swig_todo "Example"
10778         @ManageTransactions("MeasuOp")
10779         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
10780             """
10781             Get a normale to the given face. If the point is not given,
10782             the normale is calculated at the center of mass.
10783
10784             Parameters:
10785                 theFace Face to define normale of.
10786                 theOptionalPoint Point to compute the normale at.
10787                 theName Object name; when specified, this parameter is used
10788                         for result publication in the study. Otherwise, if automatic
10789                         publication is switched on, default value is used for result name.
10790
10791             Returns:
10792                 New GEOM.GEOM_Object, containing the created vector.
10793             """
10794             # Example: see GEOM_TestMeasures.py
10795             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
10796             RaiseIfFailed("GetNormal", self.MeasuOp)
10797             self._autoPublish(anObj, theName, "normal")
10798             return anObj
10799
10800         ## Print shape errors obtained from CheckShape.
10801         #  @param theShape Shape that was checked.
10802         #  @param theShapeErrors the shape errors obtained by CheckShape.
10803         #  @param theReturnStatus If 0 the description of problem is printed.
10804         #                         If 1 the description of problem is returned.
10805         #  @return If theReturnStatus is equal to 1 the description is returned.
10806         #          Otherwise doesn't return anything.
10807         #
10808         #  @ref tui_check_shape_page "Example"
10809         @ManageTransactions("MeasuOp")
10810         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
10811             """
10812             Print shape errors obtained from CheckShape.
10813
10814             Parameters:
10815                 theShape Shape that was checked.
10816                 theShapeErrors the shape errors obtained by CheckShape.
10817                 theReturnStatus If 0 the description of problem is printed.
10818                                 If 1 the description of problem is returned.
10819
10820             Returns:
10821                 If theReturnStatus is equal to 1 the description is returned.
10822                   Otherwise doesn't return anything.
10823             """
10824             # Example: see GEOM_TestMeasures.py
10825             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
10826             if theReturnStatus == 1:
10827                 return Descr
10828             print Descr
10829             pass
10830
10831         ## Check a topology of the given shape.
10832         #  @param theShape Shape to check validity of.
10833         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
10834         #                        if TRUE, the shape's geometry will be checked also.
10835         #  @param theReturnStatus If 0 and if theShape is invalid, a description
10836         #                         of problem is printed.
10837         #                         If 1 isValid flag and the description of
10838         #                         problem is returned.
10839         #                         If 2 isValid flag and the list of error data
10840         #                         is returned.
10841         #  @return TRUE, if the shape "seems to be valid".
10842         #          If theShape is invalid, prints a description of problem.
10843         #          If theReturnStatus is equal to 1 the description is returned
10844         #          along with IsValid flag.
10845         #          If theReturnStatus is equal to 2 the list of error data is
10846         #          returned along with IsValid flag.
10847         #
10848         #  @ref tui_check_shape_page "Example"
10849         @ManageTransactions("MeasuOp")
10850         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
10851             """
10852             Check a topology of the given shape.
10853
10854             Parameters:
10855                 theShape Shape to check validity of.
10856                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
10857                                if TRUE, the shape's geometry will be checked also.
10858                 theReturnStatus If 0 and if theShape is invalid, a description
10859                                 of problem is printed.
10860                                 If 1 IsValid flag and the description of
10861                                 problem is returned.
10862                                 If 2 IsValid flag and the list of error data
10863                                 is returned.
10864
10865             Returns:
10866                 TRUE, if the shape "seems to be valid".
10867                 If theShape is invalid, prints a description of problem.
10868                 If theReturnStatus is equal to 1 the description is returned
10869                 along with IsValid flag.
10870                 If theReturnStatus is equal to 2 the list of error data is
10871                 returned along with IsValid flag.
10872             """
10873             # Example: see GEOM_TestMeasures.py
10874             if theIsCheckGeom:
10875                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
10876                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
10877             else:
10878                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
10879                 RaiseIfFailed("CheckShape", self.MeasuOp)
10880             if IsValid == 0:
10881                 if theReturnStatus == 0:
10882                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10883                     print Descr
10884             if theReturnStatus == 1:
10885               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10886               return (IsValid, Descr)
10887             elif theReturnStatus == 2:
10888               return (IsValid, ShapeErrors)
10889             return IsValid
10890
10891         ## Detect self-intersections in the given shape.
10892         #  @param theShape Shape to check.
10893         #  @param theCheckLevel is the level of self-intersection check.
10894         #         Possible input values are:
10895         #         - GEOM.SI_V_V(0) - only V/V interferences
10896         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
10897         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
10898         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
10899         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
10900         #         - GEOM.SI_ALL(5) - all interferences.
10901         #  @return TRUE, if the shape contains no self-intersections.
10902         #
10903         #  @ref tui_check_self_intersections_page "Example"
10904         @ManageTransactions("MeasuOp")
10905         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
10906             """
10907             Detect self-intersections in the given shape.
10908
10909             Parameters:
10910                 theShape Shape to check.
10911                 theCheckLevel is the level of self-intersection check.
10912                   Possible input values are:
10913                    - GEOM.SI_V_V(0) - only V/V interferences
10914                    - GEOM.SI_V_E(1) - V/V and V/E interferences
10915                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
10916                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
10917                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
10918                    - GEOM.SI_ALL(5) - all interferences.
10919  
10920             Returns:
10921                 TRUE, if the shape contains no self-intersections.
10922             """
10923             # Example: see GEOM_TestMeasures.py
10924             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
10925             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
10926             return IsValid
10927
10928         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
10929         #  @param theShape1 First source object
10930         #  @param theShape2 Second source object
10931         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
10932         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
10933         #         - if \a theTolerance > 0, algorithm detects gaps
10934         #  @param theDeflection Linear deflection coefficient that specifies quality of tesselation:
10935         #         - if \a theDeflection <= 0, default deflection 0.001 is used
10936         #  @return TRUE, if there are intersections (gaps) between source shapes
10937         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
10938         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
10939         #
10940         #  @ref tui_fast_intersection_page "Example"
10941         @ManageTransactions("MeasuOp")
10942         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
10943             """
10944             Detect intersections of the given shapes with algorithm based on mesh intersections.
10945
10946             Parameters:
10947                 theShape1 First source object
10948                 theShape2 Second source object
10949                 theTolerance Specifies a distance between shapes used for detecting gaps:
10950                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
10951                     - if theTolerance > 0, algorithm detects gaps
10952                 theDeflection Linear deflection coefficient that specifies quality of tesselation:
10953                     - if theDeflection <= 0, default deflection 0.001 is used
10954  
10955             Returns:
10956                 TRUE, if there are intersections (gaps) between source shapes
10957                 List of sub-shapes IDs from 1st shape that localize intersection.
10958                 List of sub-shapes IDs from 2nd shape that localize intersection.
10959             """
10960             # Example: see GEOM_TestMeasures.py
10961             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
10962             RaiseIfFailed("FastIntersect", self.MeasuOp)
10963             return IsOk, Res1, Res2
10964
10965         ## Get position (LCS) of theShape.
10966         #
10967         #  Origin of the LCS is situated at the shape's center of mass.
10968         #  Axes of the LCS are obtained from shape's location or,
10969         #  if the shape is a planar face, from position of its plane.
10970         #
10971         #  @param theShape Shape to calculate position of.
10972         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10973         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
10974         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10975         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10976         #
10977         #  @ref swig_todo "Example"
10978         @ManageTransactions("MeasuOp")
10979         def GetPosition(self,theShape):
10980             """
10981             Get position (LCS) of theShape.
10982             Origin of the LCS is situated at the shape's center of mass.
10983             Axes of the LCS are obtained from shape's location or,
10984             if the shape is a planar face, from position of its plane.
10985
10986             Parameters:
10987                 theShape Shape to calculate position of.
10988
10989             Returns:
10990                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10991                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
10992                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10993                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10994             """
10995             # Example: see GEOM_TestMeasures.py
10996             aTuple = self.MeasuOp.GetPosition(theShape)
10997             RaiseIfFailed("GetPosition", self.MeasuOp)
10998             return aTuple
10999
11000         ## Get kind of theShape.
11001         #
11002         #  @param theShape Shape to get a kind of.
11003         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11004         #          and a list of parameters, describing the shape.
11005         #  @note  Concrete meaning of each value, returned via \a theIntegers
11006         #         or \a theDoubles list depends on the kind() of the shape.
11007         #
11008         #  @ref swig_todo "Example"
11009         @ManageTransactions("MeasuOp")
11010         def KindOfShape(self,theShape):
11011             """
11012             Get kind of theShape.
11013
11014             Parameters:
11015                 theShape Shape to get a kind of.
11016
11017             Returns:
11018                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11019                     and a list of parameters, describing the shape.
11020             Note:
11021                 Concrete meaning of each value, returned via theIntegers
11022                 or theDoubles list depends on the geompy.kind of the shape
11023             """
11024             # Example: see GEOM_TestMeasures.py
11025             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11026             RaiseIfFailed("KindOfShape", self.MeasuOp)
11027
11028             aKind  = aRoughTuple[0]
11029             anInts = aRoughTuple[1]
11030             aDbls  = aRoughTuple[2]
11031
11032             # Now there is no exception from this rule:
11033             aKindTuple = [aKind] + aDbls + anInts
11034
11035             # If they are we will regroup parameters for such kind of shape.
11036             # For example:
11037             #if aKind == kind.SOME_KIND:
11038             #    #  SOME_KIND     int int double int double double
11039             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11040
11041             return aKindTuple
11042
11043         ## Returns the string that describes if the shell is good for solid.
11044         #  This is a support method for MakeSolid.
11045         #
11046         #  @param theShell the shell to be checked.
11047         #  @return Returns a string that describes the shell validity for
11048         #          solid construction.
11049         @ManageTransactions("MeasuOp")
11050         def _IsGoodForSolid(self, theShell):
11051             """
11052             Returns the string that describes if the shell is good for solid.
11053             This is a support method for MakeSolid.
11054
11055             Parameter:
11056                 theShell the shell to be checked.
11057
11058             Returns:
11059                 Returns a string that describes the shell validity for
11060                 solid construction.
11061             """
11062             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11063             return aDescr
11064
11065         # end of l2_measure
11066         ## @}
11067
11068         ## @addtogroup l2_import_export
11069         ## @{
11070
11071         ## Import a shape from the BREP, IGES, STEP or other file
11072         #  (depends on given format) with given name.
11073         #
11074         #  Note: this function is deprecated, it is kept for backward compatibility only
11075         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11076         #
11077         #  @param theFileName The file, containing the shape.
11078         #  @param theFormatName Specify format for the file reading.
11079         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
11080         #         If format 'IGES_SCALE' is used instead of 'IGES' or
11081         #            format 'STEP_SCALE' is used instead of 'STEP',
11082         #            length unit will be set to 'meter' and result model will be scaled.
11083         #  @param theName Object name; when specified, this parameter is used
11084         #         for result publication in the study. Otherwise, if automatic
11085         #         publication is switched on, default value is used for result name.
11086         #
11087         #  @return New GEOM.GEOM_Object, containing the imported shape.
11088         #          If material names are imported it returns the list of
11089         #          objects. The first one is the imported object followed by
11090         #          material groups.
11091         #  @note Auto publishing is allowed for the shape itself. Imported
11092         #        material groups are not automatically published.
11093         #
11094         #  @ref swig_Import_Export "Example"
11095         @ManageTransactions("InsertOp")
11096         def ImportFile(self, theFileName, theFormatName, theName=None):
11097             """
11098             Import a shape from the BREP, IGES, STEP or other file
11099             (depends on given format) with given name.
11100
11101             Note: this function is deprecated, it is kept for backward compatibility only
11102             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11103
11104             Parameters: 
11105                 theFileName The file, containing the shape.
11106                 theFormatName Specify format for the file reading.
11107                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
11108                     If format 'IGES_SCALE' is used instead of 'IGES' or
11109                        format 'STEP_SCALE' is used instead of 'STEP',
11110                        length unit will be set to 'meter' and result model will be scaled.
11111                 theName Object name; when specified, this parameter is used
11112                         for result publication in the study. Otherwise, if automatic
11113                         publication is switched on, default value is used for result name.
11114
11115             Returns:
11116                 New GEOM.GEOM_Object, containing the imported shape.
11117                 If material names are imported it returns the list of
11118                 objects. The first one is the imported object followed by
11119                 material groups.
11120             Note:
11121                 Auto publishing is allowed for the shape itself. Imported
11122                 material groups are not automatically published.
11123             """
11124             # Example: see GEOM_TestOthers.py
11125             print """
11126             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
11127             where <FormatName> is a name of desirable format for importing.
11128             """
11129             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
11130             RaiseIfFailed("ImportFile", self.InsertOp)
11131             aNbObj = len(aListObj)
11132             if aNbObj > 0:
11133                 self._autoPublish(aListObj[0], theName, "imported")
11134             if aNbObj == 1:
11135                 return aListObj[0]
11136             return aListObj
11137
11138         ## Deprecated analog of ImportFile()
11139         def Import(self, theFileName, theFormatName, theName=None):
11140             """
11141             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11142             """
11143             # note: auto-publishing is done in self.ImportFile()
11144             return self.ImportFile(theFileName, theFormatName, theName)
11145
11146         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11147         #  @note This method will not be dumped to the python script by DumpStudy functionality.
11148         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
11149         #  @param theStream The BRep binary stream.
11150         #  @param theName Object name; when specified, this parameter is used
11151         #         for result publication in the study. Otherwise, if automatic
11152         #         publication is switched on, default value is used for result name.
11153         #
11154         #  @return New GEOM_Object, containing the shape, read from theStream.
11155         #
11156         #  @ref swig_Import_Export "Example"
11157         @ManageTransactions("InsertOp")
11158         def RestoreShape (self, theStream, theName=None):
11159             """
11160             Read a shape from the binary stream, containing its bounding representation (BRep).
11161
11162             Note:
11163                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11164
11165             Parameters:
11166                 theStream The BRep binary stream.
11167                 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             Returns:
11172                 New GEOM_Object, containing the shape, read from theStream.
11173             """
11174             # Example: see GEOM_TestOthers.py
11175             anObj = self.InsertOp.RestoreShape(theStream)
11176             RaiseIfFailed("RestoreShape", self.InsertOp)
11177             self._autoPublish(anObj, theName, "restored")
11178             return anObj
11179
11180         ## Export the given shape into a file with given name.
11181         #
11182         #  Note: this function is deprecated, it is kept for backward compatibility only
11183         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11184         #
11185         #  @param theObject Shape to be stored in the file.
11186         #  @param theFileName Name of the file to store the given shape in.
11187         #  @param theFormatName Specify format for the shape storage.
11188         #         Available formats can be obtained with
11189         #         geompy.InsertOp.ExportTranslators()[0] method.
11190         #
11191         #  @ref swig_Import_Export "Example"
11192         @ManageTransactions("InsertOp")
11193         def Export(self, theObject, theFileName, theFormatName):
11194             """
11195             Export the given shape into a file with given name.
11196
11197             Note: this function is deprecated, it is kept for backward compatibility only
11198             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11199             
11200             Parameters: 
11201                 theObject Shape to be stored in the file.
11202                 theFileName Name of the file to store the given shape in.
11203                 theFormatName Specify format for the shape storage.
11204                               Available formats can be obtained with
11205                               geompy.InsertOp.ExportTranslators()[0] method.
11206             """
11207             # Example: see GEOM_TestOthers.py
11208             print """
11209             WARNING: Function Export is deprecated, use Export<FormatName> instead,
11210             where <FormatName> is a name of desirable format for exporting.
11211             """
11212             self.InsertOp.Export(theObject, theFileName, theFormatName)
11213             if self.InsertOp.IsDone() == 0:
11214                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
11215                 pass
11216             pass
11217
11218         # end of l2_import_export
11219         ## @}
11220
11221         ## @addtogroup l3_blocks
11222         ## @{
11223
11224         ## Create a quadrangle face from four edges. Order of Edges is not
11225         #  important. It is  not necessary that edges share the same vertex.
11226         #  @param E1,E2,E3,E4 Edges for the face bound.
11227         #  @param theName Object name; when specified, this parameter is used
11228         #         for result publication in the study. Otherwise, if automatic
11229         #         publication is switched on, default value is used for result name.
11230         #
11231         #  @return New GEOM.GEOM_Object, containing the created face.
11232         #
11233         #  @ref tui_building_by_blocks_page "Example"
11234         @ManageTransactions("BlocksOp")
11235         def MakeQuad(self, E1, E2, E3, E4, theName=None):
11236             """
11237             Create a quadrangle face from four edges. Order of Edges is not
11238             important. It is  not necessary that edges share the same vertex.
11239
11240             Parameters:
11241                 E1,E2,E3,E4 Edges for the face bound.
11242                 theName Object name; when specified, this parameter is used
11243                         for result publication in the study. Otherwise, if automatic
11244                         publication is switched on, default value is used for result name.
11245
11246             Returns:
11247                 New GEOM.GEOM_Object, containing the created face.
11248
11249             Example of usage:
11250                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
11251             """
11252             # Example: see GEOM_Spanner.py
11253             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
11254             RaiseIfFailed("MakeQuad", self.BlocksOp)
11255             self._autoPublish(anObj, theName, "quad")
11256             return anObj
11257
11258         ## Create a quadrangle face on two edges.
11259         #  The missing edges will be built by creating the shortest ones.
11260         #  @param E1,E2 Two opposite edges for the face.
11261         #  @param theName Object name; when specified, this parameter is used
11262         #         for result publication in the study. Otherwise, if automatic
11263         #         publication is switched on, default value is used for result name.
11264         #
11265         #  @return New GEOM.GEOM_Object, containing the created face.
11266         #
11267         #  @ref tui_building_by_blocks_page "Example"
11268         @ManageTransactions("BlocksOp")
11269         def MakeQuad2Edges(self, E1, E2, theName=None):
11270             """
11271             Create a quadrangle face on two edges.
11272             The missing edges will be built by creating the shortest ones.
11273
11274             Parameters:
11275                 E1,E2 Two opposite edges for the face.
11276                 theName Object name; when specified, this parameter is used
11277                         for result publication in the study. Otherwise, if automatic
11278                         publication is switched on, default value is used for result name.
11279
11280             Returns:
11281                 New GEOM.GEOM_Object, containing the created face.
11282
11283             Example of usage:
11284                 # create vertices
11285                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11286                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11287                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11288                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11289                 # create edges
11290                 edge1 = geompy.MakeEdge(p1, p2)
11291                 edge2 = geompy.MakeEdge(p3, p4)
11292                 # create a quadrangle face from two edges
11293                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
11294             """
11295             # Example: see GEOM_Spanner.py
11296             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
11297             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
11298             self._autoPublish(anObj, theName, "quad")
11299             return anObj
11300
11301         ## Create a quadrangle face with specified corners.
11302         #  The missing edges will be built by creating the shortest ones.
11303         #  @param V1,V2,V3,V4 Corner vertices for the face.
11304         #  @param theName Object name; when specified, this parameter is used
11305         #         for result publication in the study. Otherwise, if automatic
11306         #         publication is switched on, default value is used for result name.
11307         #
11308         #  @return New GEOM.GEOM_Object, containing the created face.
11309         #
11310         #  @ref tui_building_by_blocks_page "Example 1"
11311         #  \n @ref swig_MakeQuad4Vertices "Example 2"
11312         @ManageTransactions("BlocksOp")
11313         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
11314             """
11315             Create a quadrangle face with specified corners.
11316             The missing edges will be built by creating the shortest ones.
11317
11318             Parameters:
11319                 V1,V2,V3,V4 Corner vertices for the face.
11320                 theName Object name; when specified, this parameter is used
11321                         for result publication in the study. Otherwise, if automatic
11322                         publication is switched on, default value is used for result name.
11323
11324             Returns:
11325                 New GEOM.GEOM_Object, containing the created face.
11326
11327             Example of usage:
11328                 # create vertices
11329                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11330                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11331                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11332                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11333                 # create a quadrangle from four points in its corners
11334                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
11335             """
11336             # Example: see GEOM_Spanner.py
11337             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
11338             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
11339             self._autoPublish(anObj, theName, "quad")
11340             return anObj
11341
11342         ## Create a hexahedral solid, bounded by the six given faces. Order of
11343         #  faces is not important. It is  not necessary that Faces share the same edge.
11344         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11345         #  @param theName Object name; when specified, this parameter is used
11346         #         for result publication in the study. Otherwise, if automatic
11347         #         publication is switched on, default value is used for result name.
11348         #
11349         #  @return New GEOM.GEOM_Object, containing the created solid.
11350         #
11351         #  @ref tui_building_by_blocks_page "Example 1"
11352         #  \n @ref swig_MakeHexa "Example 2"
11353         @ManageTransactions("BlocksOp")
11354         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
11355             """
11356             Create a hexahedral solid, bounded by the six given faces. Order of
11357             faces is not important. It is  not necessary that Faces share the same edge.
11358
11359             Parameters:
11360                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11361                 theName Object name; when specified, this parameter is used
11362                         for result publication in the study. Otherwise, if automatic
11363                         publication is switched on, default value is used for result name.
11364
11365             Returns:
11366                 New GEOM.GEOM_Object, containing the created solid.
11367
11368             Example of usage:
11369                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
11370             """
11371             # Example: see GEOM_Spanner.py
11372             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
11373             RaiseIfFailed("MakeHexa", self.BlocksOp)
11374             self._autoPublish(anObj, theName, "hexa")
11375             return anObj
11376
11377         ## Create a hexahedral solid between two given faces.
11378         #  The missing faces will be built by creating the smallest ones.
11379         #  @param F1,F2 Two opposite faces for the hexahedral solid.
11380         #  @param theName Object name; when specified, this parameter is used
11381         #         for result publication in the study. Otherwise, if automatic
11382         #         publication is switched on, default value is used for result name.
11383         #
11384         #  @return New GEOM.GEOM_Object, containing the created solid.
11385         #
11386         #  @ref tui_building_by_blocks_page "Example 1"
11387         #  \n @ref swig_MakeHexa2Faces "Example 2"
11388         @ManageTransactions("BlocksOp")
11389         def MakeHexa2Faces(self, F1, F2, theName=None):
11390             """
11391             Create a hexahedral solid between two given faces.
11392             The missing faces will be built by creating the smallest ones.
11393
11394             Parameters:
11395                 F1,F2 Two opposite faces for the hexahedral solid.
11396                 theName Object name; when specified, this parameter is used
11397                         for result publication in the study. Otherwise, if automatic
11398                         publication is switched on, default value is used for result name.
11399
11400             Returns:
11401                 New GEOM.GEOM_Object, containing the created solid.
11402
11403             Example of usage:
11404                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
11405             """
11406             # Example: see GEOM_Spanner.py
11407             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
11408             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
11409             self._autoPublish(anObj, theName, "hexa")
11410             return anObj
11411
11412         # end of l3_blocks
11413         ## @}
11414
11415         ## @addtogroup l3_blocks_op
11416         ## @{
11417
11418         ## Get a vertex, found in the given shape by its coordinates.
11419         #  @param theShape Block or a compound of blocks.
11420         #  @param theX,theY,theZ Coordinates of the sought vertex.
11421         #  @param theEpsilon Maximum allowed distance between the resulting
11422         #                    vertex and point with the given coordinates.
11423         #  @param theName Object name; when specified, this parameter is used
11424         #         for result publication in the study. Otherwise, if automatic
11425         #         publication is switched on, default value is used for result name.
11426         #
11427         #  @return New GEOM.GEOM_Object, containing the found vertex.
11428         #
11429         #  @ref swig_GetPoint "Example"
11430         @ManageTransactions("BlocksOp")
11431         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
11432             """
11433             Get a vertex, found in the given shape by its coordinates.
11434
11435             Parameters:
11436                 theShape Block or a compound of blocks.
11437                 theX,theY,theZ Coordinates of the sought vertex.
11438                 theEpsilon Maximum allowed distance between the resulting
11439                            vertex and point with the given coordinates.
11440                 theName Object name; when specified, this parameter is used
11441                         for result publication in the study. Otherwise, if automatic
11442                         publication is switched on, default value is used for result name.
11443
11444             Returns:
11445                 New GEOM.GEOM_Object, containing the found vertex.
11446
11447             Example of usage:
11448                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
11449             """
11450             # Example: see GEOM_TestOthers.py
11451             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
11452             RaiseIfFailed("GetPoint", self.BlocksOp)
11453             self._autoPublish(anObj, theName, "vertex")
11454             return anObj
11455
11456         ## Find a vertex of the given shape, which has minimal distance to the given point.
11457         #  @param theShape Any shape.
11458         #  @param thePoint Point, close to the desired vertex.
11459         #  @param theName Object name; when specified, this parameter is used
11460         #         for result publication in the study. Otherwise, if automatic
11461         #         publication is switched on, default value is used for result name.
11462         #
11463         #  @return New GEOM.GEOM_Object, containing the found vertex.
11464         #
11465         #  @ref swig_GetVertexNearPoint "Example"
11466         @ManageTransactions("BlocksOp")
11467         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
11468             """
11469             Find a vertex of the given shape, which has minimal distance to the given point.
11470
11471             Parameters:
11472                 theShape Any shape.
11473                 thePoint Point, close to the desired vertex.
11474                 theName Object name; when specified, this parameter is used
11475                         for result publication in the study. Otherwise, if automatic
11476                         publication is switched on, default value is used for result name.
11477
11478             Returns:
11479                 New GEOM.GEOM_Object, containing the found vertex.
11480
11481             Example of usage:
11482                 pmidle = geompy.MakeVertex(50, 0, 50)
11483                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
11484             """
11485             # Example: see GEOM_TestOthers.py
11486             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
11487             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
11488             self._autoPublish(anObj, theName, "vertex")
11489             return anObj
11490
11491         ## Get an edge, found in the given shape by two given vertices.
11492         #  @param theShape Block or a compound of blocks.
11493         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
11494         #  @param theName Object name; when specified, this parameter is used
11495         #         for result publication in the study. Otherwise, if automatic
11496         #         publication is switched on, default value is used for result name.
11497         #
11498         #  @return New GEOM.GEOM_Object, containing the found edge.
11499         #
11500         #  @ref swig_GetEdge "Example"
11501         @ManageTransactions("BlocksOp")
11502         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
11503             """
11504             Get an edge, found in the given shape by two given vertices.
11505
11506             Parameters:
11507                 theShape Block or a compound of blocks.
11508                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
11509                 theName Object name; when specified, this parameter is used
11510                         for result publication in the study. Otherwise, if automatic
11511                         publication is switched on, default value is used for result name.
11512
11513             Returns:
11514                 New GEOM.GEOM_Object, containing the found edge.
11515             """
11516             # Example: see GEOM_Spanner.py
11517             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
11518             RaiseIfFailed("GetEdge", self.BlocksOp)
11519             self._autoPublish(anObj, theName, "edge")
11520             return anObj
11521
11522         ## Find an edge of the given shape, which has minimal distance to the given point.
11523         #  @param theShape Block or a compound of blocks.
11524         #  @param thePoint Point, close to the desired edge.
11525         #  @param theName Object name; when specified, this parameter is used
11526         #         for result publication in the study. Otherwise, if automatic
11527         #         publication is switched on, default value is used for result name.
11528         #
11529         #  @return New GEOM.GEOM_Object, containing the found edge.
11530         #
11531         #  @ref swig_GetEdgeNearPoint "Example"
11532         @ManageTransactions("BlocksOp")
11533         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
11534             """
11535             Find an edge of the given shape, which has minimal distance to the given point.
11536
11537             Parameters:
11538                 theShape Block or a compound of blocks.
11539                 thePoint Point, close to the desired edge.
11540                 theName Object name; when specified, this parameter is used
11541                         for result publication in the study. Otherwise, if automatic
11542                         publication is switched on, default value is used for result name.
11543
11544             Returns:
11545                 New GEOM.GEOM_Object, containing the found edge.
11546             """
11547             # Example: see GEOM_TestOthers.py
11548             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
11549             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
11550             self._autoPublish(anObj, theName, "edge")
11551             return anObj
11552
11553         ## Returns a face, found in the given shape by four given corner vertices.
11554         #  @param theShape Block or a compound of blocks.
11555         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11556         #  @param theName Object name; when specified, this parameter is used
11557         #         for result publication in the study. Otherwise, if automatic
11558         #         publication is switched on, default value is used for result name.
11559         #
11560         #  @return New GEOM.GEOM_Object, containing the found face.
11561         #
11562         #  @ref swig_todo "Example"
11563         @ManageTransactions("BlocksOp")
11564         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
11565             """
11566             Returns a face, found in the given shape by four given corner vertices.
11567
11568             Parameters:
11569                 theShape Block or a compound of blocks.
11570                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11571                 theName Object name; when specified, this parameter is used
11572                         for result publication in the study. Otherwise, if automatic
11573                         publication is switched on, default value is used for result name.
11574
11575             Returns:
11576                 New GEOM.GEOM_Object, containing the found face.
11577             """
11578             # Example: see GEOM_Spanner.py
11579             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
11580             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
11581             self._autoPublish(anObj, theName, "face")
11582             return anObj
11583
11584         ## Get a face of block, found in the given shape by two given edges.
11585         #  @param theShape Block or a compound of blocks.
11586         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
11587         #  @param theName Object name; when specified, this parameter is used
11588         #         for result publication in the study. Otherwise, if automatic
11589         #         publication is switched on, default value is used for result name.
11590         #
11591         #  @return New GEOM.GEOM_Object, containing the found face.
11592         #
11593         #  @ref swig_todo "Example"
11594         @ManageTransactions("BlocksOp")
11595         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
11596             """
11597             Get a face of block, found in the given shape by two given edges.
11598
11599             Parameters:
11600                 theShape Block or a compound of blocks.
11601                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
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                 New GEOM.GEOM_Object, containing the found face.
11608             """
11609             # Example: see GEOM_Spanner.py
11610             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
11611             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
11612             self._autoPublish(anObj, theName, "face")
11613             return anObj
11614
11615         ## Find a face, opposite to the given one in the given block.
11616         #  @param theBlock Must be a hexahedral solid.
11617         #  @param theFace Face of \a theBlock, opposite to the desired face.
11618         #  @param theName Object name; when specified, this parameter is used
11619         #         for result publication in the study. Otherwise, if automatic
11620         #         publication is switched on, default value is used for result name.
11621         #
11622         #  @return New GEOM.GEOM_Object, containing the found face.
11623         #
11624         #  @ref swig_GetOppositeFace "Example"
11625         @ManageTransactions("BlocksOp")
11626         def GetOppositeFace(self, theBlock, theFace, theName=None):
11627             """
11628             Find a face, opposite to the given one in the given block.
11629
11630             Parameters:
11631                 theBlock Must be a hexahedral solid.
11632                 theFace Face of theBlock, opposite to the desired face.
11633                 theName Object name; when specified, this parameter is used
11634                         for result publication in the study. Otherwise, if automatic
11635                         publication is switched on, default value is used for result name.
11636
11637             Returns:
11638                 New GEOM.GEOM_Object, containing the found face.
11639             """
11640             # Example: see GEOM_Spanner.py
11641             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
11642             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
11643             self._autoPublish(anObj, theName, "face")
11644             return anObj
11645
11646         ## Find a face of the given shape, which has minimal distance to the given point.
11647         #  @param theShape Block or a compound of blocks.
11648         #  @param thePoint Point, close to the desired face.
11649         #  @param theName Object name; when specified, this parameter is used
11650         #         for result publication in the study. Otherwise, if automatic
11651         #         publication is switched on, default value is used for result name.
11652         #
11653         #  @return New GEOM.GEOM_Object, containing the found face.
11654         #
11655         #  @ref swig_GetFaceNearPoint "Example"
11656         @ManageTransactions("BlocksOp")
11657         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
11658             """
11659             Find a face of the given shape, which has minimal distance to the given point.
11660
11661             Parameters:
11662                 theShape Block or a compound of blocks.
11663                 thePoint Point, close to the desired face.
11664                 theName Object name; when specified, this parameter is used
11665                         for result publication in the study. Otherwise, if automatic
11666                         publication is switched on, default value is used for result name.
11667
11668             Returns:
11669                 New GEOM.GEOM_Object, containing the found face.
11670             """
11671             # Example: see GEOM_Spanner.py
11672             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
11673             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
11674             self._autoPublish(anObj, theName, "face")
11675             return anObj
11676
11677         ## Find a face of block, whose outside normale has minimal angle with the given vector.
11678         #  @param theBlock Block or a compound of blocks.
11679         #  @param theVector Vector, close to the normale of the desired face.
11680         #  @param theName Object name; when specified, this parameter is used
11681         #         for result publication in the study. Otherwise, if automatic
11682         #         publication is switched on, default value is used for result name.
11683         #
11684         #  @return New GEOM.GEOM_Object, containing the found face.
11685         #
11686         #  @ref swig_todo "Example"
11687         @ManageTransactions("BlocksOp")
11688         def GetFaceByNormale(self, theBlock, theVector, theName=None):
11689             """
11690             Find a face of block, whose outside normale has minimal angle with the given vector.
11691
11692             Parameters:
11693                 theBlock Block or a compound of blocks.
11694                 theVector Vector, close to the normale of the desired face.
11695                 theName Object name; when specified, this parameter is used
11696                         for result publication in the study. Otherwise, if automatic
11697                         publication is switched on, default value is used for result name.
11698
11699             Returns:
11700                 New GEOM.GEOM_Object, containing the found face.
11701             """
11702             # Example: see GEOM_Spanner.py
11703             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
11704             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
11705             self._autoPublish(anObj, theName, "face")
11706             return anObj
11707
11708         ## Find all sub-shapes of type \a theShapeType of the given shape,
11709         #  which have minimal distance to the given point.
11710         #  @param theShape Any shape.
11711         #  @param thePoint Point, close to the desired shape.
11712         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
11713         #  @param theTolerance The tolerance for distances comparison. All shapes
11714         #                      with distances to the given point in interval
11715         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
11716         #  @param theName Object name; when specified, this parameter is used
11717         #         for result publication in the study. Otherwise, if automatic
11718         #         publication is switched on, default value is used for result name.
11719         #
11720         #  @return New GEOM_Object, containing a group of all found shapes.
11721         #
11722         #  @ref swig_GetShapesNearPoint "Example"
11723         @ManageTransactions("BlocksOp")
11724         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
11725             """
11726             Find all sub-shapes of type theShapeType of the given shape,
11727             which have minimal distance to the given point.
11728
11729             Parameters:
11730                 theShape Any shape.
11731                 thePoint Point, close to the desired shape.
11732                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
11733                 theTolerance The tolerance for distances comparison. All shapes
11734                                 with distances to the given point in interval
11735                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
11736                 theName Object name; when specified, this parameter is used
11737                         for result publication in the study. Otherwise, if automatic
11738                         publication is switched on, default value is used for result name.
11739
11740             Returns:
11741                 New GEOM_Object, containing a group of all found shapes.
11742             """
11743             # Example: see GEOM_TestOthers.py
11744             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
11745             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
11746             self._autoPublish(anObj, theName, "group")
11747             return anObj
11748
11749         # end of l3_blocks_op
11750         ## @}
11751
11752         ## @addtogroup l4_blocks_measure
11753         ## @{
11754
11755         ## Check, if the compound of blocks is given.
11756         #  To be considered as a compound of blocks, the
11757         #  given shape must satisfy the following conditions:
11758         #  - Each element of the compound should be a Block (6 faces and 12 edges).
11759         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11760         #  - The compound should be connexe.
11761         #  - The glue between two quadrangle faces should be applied.
11762         #  @param theCompound The compound to check.
11763         #  @return TRUE, if the given shape is a compound of blocks.
11764         #  If theCompound is not valid, prints all discovered errors.
11765         #
11766         #  @ref tui_check_compound_of_blocks_page "Example 1"
11767         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
11768         @ManageTransactions("BlocksOp")
11769         def CheckCompoundOfBlocks(self,theCompound):
11770             """
11771             Check, if the compound of blocks is given.
11772             To be considered as a compound of blocks, the
11773             given shape must satisfy the following conditions:
11774             - Each element of the compound should be a Block (6 faces and 12 edges).
11775             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11776             - The compound should be connexe.
11777             - The glue between two quadrangle faces should be applied.
11778
11779             Parameters:
11780                 theCompound The compound to check.
11781
11782             Returns:
11783                 TRUE, if the given shape is a compound of blocks.
11784                 If theCompound is not valid, prints all discovered errors.
11785             """
11786             # Example: see GEOM_Spanner.py
11787             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
11788             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
11789             if IsValid == 0:
11790                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
11791                 print Descr
11792             return IsValid
11793
11794         ## Retrieve all non blocks solids and faces from \a theShape.
11795         #  @param theShape The shape to explore.
11796         #  @param theName Object name; when specified, this parameter is used
11797         #         for result publication in the study. Otherwise, if automatic
11798         #         publication is switched on, default value is used for result name.
11799         #
11800         #  @return A tuple of two GEOM_Objects. The first object is a group of all
11801         #          non block solids (= not 6 faces, or with 6 faces, but with the
11802         #          presence of non-quadrangular faces). The second object is a
11803         #          group of all non quadrangular faces.
11804         #
11805         #  @ref tui_get_non_blocks_page "Example 1"
11806         #  \n @ref swig_GetNonBlocks "Example 2"
11807         @ManageTransactions("BlocksOp")
11808         def GetNonBlocks (self, theShape, theName=None):
11809             """
11810             Retrieve all non blocks solids and faces from theShape.
11811
11812             Parameters:
11813                 theShape The shape to explore.
11814                 theName Object name; when specified, this parameter is used
11815                         for result publication in the study. Otherwise, if automatic
11816                         publication is switched on, default value is used for result name.
11817
11818             Returns:
11819                 A tuple of two GEOM_Objects. The first object is a group of all
11820                 non block solids (= not 6 faces, or with 6 faces, but with the
11821                 presence of non-quadrangular faces). The second object is a
11822                 group of all non quadrangular faces.
11823
11824             Usage:
11825                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
11826             """
11827             # Example: see GEOM_Spanner.py
11828             aTuple = self.BlocksOp.GetNonBlocks(theShape)
11829             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
11830             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
11831             return aTuple
11832
11833         ## Remove all seam and degenerated edges from \a theShape.
11834         #  Unite faces and edges, sharing one surface. It means that
11835         #  this faces must have references to one C++ surface object (handle).
11836         #  @param theShape The compound or single solid to remove irregular edges from.
11837         #  @param doUnionFaces If True, then unite faces. If False (the default value),
11838         #         do not unite faces.
11839         #  @param theName Object name; when specified, this parameter is used
11840         #         for result publication in the study. Otherwise, if automatic
11841         #         publication is switched on, default value is used for result name.
11842         #
11843         #  @return Improved shape.
11844         #
11845         #  @ref swig_RemoveExtraEdges "Example"
11846         @ManageTransactions("BlocksOp")
11847         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
11848             """
11849             Remove all seam and degenerated edges from theShape.
11850             Unite faces and edges, sharing one surface. It means that
11851             this faces must have references to one C++ surface object (handle).
11852
11853             Parameters:
11854                 theShape The compound or single solid to remove irregular edges from.
11855                 doUnionFaces If True, then unite faces. If False (the default value),
11856                              do not unite faces.
11857                 theName Object name; when specified, this parameter is used
11858                         for result publication in the study. Otherwise, if automatic
11859                         publication is switched on, default value is used for result name.
11860
11861             Returns:
11862                 Improved shape.
11863             """
11864             # Example: see GEOM_TestOthers.py
11865             nbFacesOptimum = -1 # -1 means do not unite faces
11866             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
11867             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
11868             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
11869             self._autoPublish(anObj, theName, "removeExtraEdges")
11870             return anObj
11871
11872         ## Performs union faces of \a theShape
11873         #  Unite faces sharing one surface. It means that
11874         #  these faces must have references to one C++ surface object (handle).
11875         #  @param theShape The compound or single solid that contains faces
11876         #         to perform union.
11877         #  @param theName Object name; when specified, this parameter is used
11878         #         for result publication in the study. Otherwise, if automatic
11879         #         publication is switched on, default value is used for result name.
11880         #
11881         #  @return Improved shape.
11882         #
11883         #  @ref swig_UnionFaces "Example"
11884         @ManageTransactions("BlocksOp")
11885         def UnionFaces(self, theShape, theName=None):
11886             """
11887             Performs union faces of theShape.
11888             Unite faces sharing one surface. It means that
11889             these faces must have references to one C++ surface object (handle).
11890
11891             Parameters:
11892                 theShape The compound or single solid that contains faces
11893                          to perform union.
11894                 theName Object name; when specified, this parameter is used
11895                         for result publication in the study. Otherwise, if automatic
11896                         publication is switched on, default value is used for result name.
11897
11898             Returns:
11899                 Improved shape.
11900             """
11901             # Example: see GEOM_TestOthers.py
11902             anObj = self.BlocksOp.UnionFaces(theShape)
11903             RaiseIfFailed("UnionFaces", self.BlocksOp)
11904             self._autoPublish(anObj, theName, "unionFaces")
11905             return anObj
11906
11907         ## Check, if the given shape is a blocks compound.
11908         #  Fix all detected errors.
11909         #    \note Single block can be also fixed by this method.
11910         #  @param theShape The compound to check and improve.
11911         #  @param theName Object name; when specified, this parameter is used
11912         #         for result publication in the study. Otherwise, if automatic
11913         #         publication is switched on, default value is used for result name.
11914         #
11915         #  @return Improved compound.
11916         #
11917         #  @ref swig_CheckAndImprove "Example"
11918         @ManageTransactions("BlocksOp")
11919         def CheckAndImprove(self, theShape, theName=None):
11920             """
11921             Check, if the given shape is a blocks compound.
11922             Fix all detected errors.
11923
11924             Note:
11925                 Single block can be also fixed by this method.
11926
11927             Parameters:
11928                 theShape The compound to check and improve.
11929                 theName Object name; when specified, this parameter is used
11930                         for result publication in the study. Otherwise, if automatic
11931                         publication is switched on, default value is used for result name.
11932
11933             Returns:
11934                 Improved compound.
11935             """
11936             # Example: see GEOM_TestOthers.py
11937             anObj = self.BlocksOp.CheckAndImprove(theShape)
11938             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
11939             self._autoPublish(anObj, theName, "improved")
11940             return anObj
11941
11942         # end of l4_blocks_measure
11943         ## @}
11944
11945         ## @addtogroup l3_blocks_op
11946         ## @{
11947
11948         ## Get all the blocks, contained in the given compound.
11949         #  @param theCompound The compound to explode.
11950         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
11951         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
11952         #  @param theName Object name; when specified, this parameter is used
11953         #         for result publication in the study. Otherwise, if automatic
11954         #         publication is switched on, default value is used for result name.
11955         #
11956         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11957         #
11958         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
11959         #
11960         #  @ref tui_explode_on_blocks "Example 1"
11961         #  \n @ref swig_MakeBlockExplode "Example 2"
11962         @ManageTransactions("BlocksOp")
11963         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
11964             """
11965             Get all the blocks, contained in the given compound.
11966
11967             Parameters:
11968                 theCompound The compound to explode.
11969                 theMinNbFaces If solid has lower number of faces, it is not a block.
11970                 theMaxNbFaces If solid has higher number of faces, it is not a block.
11971                 theName Object name; when specified, this parameter is used
11972                         for result publication in the study. Otherwise, if automatic
11973                         publication is switched on, default value is used for result name.
11974
11975             Note:
11976                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11977
11978             Returns:
11979                 List of GEOM.GEOM_Object, containing the retrieved blocks.
11980             """
11981             # Example: see GEOM_TestOthers.py
11982             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
11983             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
11984             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
11985             for anObj in aList:
11986                 anObj.SetParameters(Parameters)
11987                 pass
11988             self._autoPublish(aList, theName, "block")
11989             return aList
11990
11991         ## Find block, containing the given point inside its volume or on boundary.
11992         #  @param theCompound Compound, to find block in.
11993         #  @param thePoint Point, close to the desired block. If the point lays on
11994         #         boundary between some blocks, we return block with nearest center.
11995         #  @param theName Object name; when specified, this parameter is used
11996         #         for result publication in the study. Otherwise, if automatic
11997         #         publication is switched on, default value is used for result name.
11998         #
11999         #  @return New GEOM.GEOM_Object, containing the found block.
12000         #
12001         #  @ref swig_todo "Example"
12002         @ManageTransactions("BlocksOp")
12003         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
12004             """
12005             Find block, containing the given point inside its volume or on boundary.
12006
12007             Parameters:
12008                 theCompound Compound, to find block in.
12009                 thePoint Point, close to the desired block. If the point lays on
12010                          boundary between some blocks, we return block with nearest center.
12011                 theName Object name; when specified, this parameter is used
12012                         for result publication in the study. Otherwise, if automatic
12013                         publication is switched on, default value is used for result name.
12014
12015             Returns:
12016                 New GEOM.GEOM_Object, containing the found block.
12017             """
12018             # Example: see GEOM_Spanner.py
12019             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
12020             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
12021             self._autoPublish(anObj, theName, "block")
12022             return anObj
12023
12024         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12025         #  @param theCompound Compound, to find block in.
12026         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
12027         #  @param theName Object name; when specified, this parameter is used
12028         #         for result publication in the study. Otherwise, if automatic
12029         #         publication is switched on, default value is used for result name.
12030         #
12031         #  @return New GEOM.GEOM_Object, containing the found block.
12032         #
12033         #  @ref swig_GetBlockByParts "Example"
12034         @ManageTransactions("BlocksOp")
12035         def GetBlockByParts(self, theCompound, theParts, theName=None):
12036             """
12037              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12038
12039              Parameters:
12040                 theCompound Compound, to find block in.
12041                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
12042                 theName Object name; when specified, this parameter is used
12043                         for result publication in the study. Otherwise, if automatic
12044                         publication is switched on, default value is used for result name.
12045
12046             Returns:
12047                 New GEOM_Object, containing the found block.
12048             """
12049             # Example: see GEOM_TestOthers.py
12050             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
12051             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
12052             self._autoPublish(anObj, theName, "block")
12053             return anObj
12054
12055         ## Return all blocks, containing all the elements, passed as the parts.
12056         #  @param theCompound Compound, to find blocks in.
12057         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12058         #  @param theName Object name; when specified, this parameter is used
12059         #         for result publication in the study. Otherwise, if automatic
12060         #         publication is switched on, default value is used for result name.
12061         #
12062         #  @return List of GEOM.GEOM_Object, containing the found blocks.
12063         #
12064         #  @ref swig_todo "Example"
12065         @ManageTransactions("BlocksOp")
12066         def GetBlocksByParts(self, theCompound, theParts, theName=None):
12067             """
12068             Return all blocks, containing all the elements, passed as the parts.
12069
12070             Parameters:
12071                 theCompound Compound, to find blocks in.
12072                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12073                 theName Object name; when specified, this parameter is used
12074                         for result publication in the study. Otherwise, if automatic
12075                         publication is switched on, default value is used for result name.
12076
12077             Returns:
12078                 List of GEOM.GEOM_Object, containing the found blocks.
12079             """
12080             # Example: see GEOM_Spanner.py
12081             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
12082             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
12083             self._autoPublish(aList, theName, "block")
12084             return aList
12085
12086         ## Multi-transformate block and glue the result.
12087         #  Transformation is defined so, as to superpose direction faces.
12088         #  @param Block Hexahedral solid to be multi-transformed.
12089         #  @param DirFace1 ID of First direction face.
12090         #  @param DirFace2 ID of Second direction face.
12091         #  @param NbTimes Quantity of transformations to be done.
12092         #  @param theName Object name; when specified, this parameter is used
12093         #         for result publication in the study. Otherwise, if automatic
12094         #         publication is switched on, default value is used for result name.
12095         #
12096         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12097         #
12098         #  @return New GEOM.GEOM_Object, containing the result shape.
12099         #
12100         #  @ref tui_multi_transformation "Example"
12101         @ManageTransactions("BlocksOp")
12102         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
12103             """
12104             Multi-transformate block and glue the result.
12105             Transformation is defined so, as to superpose direction faces.
12106
12107             Parameters:
12108                 Block Hexahedral solid to be multi-transformed.
12109                 DirFace1 ID of First direction face.
12110                 DirFace2 ID of Second direction face.
12111                 NbTimes Quantity of transformations to be done.
12112                 theName Object name; when specified, this parameter is used
12113                         for result publication in the study. Otherwise, if automatic
12114                         publication is switched on, default value is used for result name.
12115
12116             Note:
12117                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12118
12119             Returns:
12120                 New GEOM.GEOM_Object, containing the result shape.
12121             """
12122             # Example: see GEOM_Spanner.py
12123             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
12124             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
12125             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
12126             anObj.SetParameters(Parameters)
12127             self._autoPublish(anObj, theName, "transformed")
12128             return anObj
12129
12130         ## Multi-transformate block and glue the result.
12131         #  @param Block Hexahedral solid to be multi-transformed.
12132         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12133         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12134         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12135         #  @param 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         #  @return New GEOM.GEOM_Object, containing the result shape.
12140         #
12141         #  @ref tui_multi_transformation "Example"
12142         @ManageTransactions("BlocksOp")
12143         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12144                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12145             """
12146             Multi-transformate block and glue the result.
12147
12148             Parameters:
12149                 Block Hexahedral solid to be multi-transformed.
12150                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12151                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12152                 NbTimesU,NbTimesV Quantity of transformations to be done.
12153                 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             Returns:
12158                 New GEOM.GEOM_Object, containing the result shape.
12159             """
12160             # Example: see GEOM_Spanner.py
12161             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
12162               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
12163             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
12164                                                             DirFace1V, DirFace2V, NbTimesV)
12165             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
12166             anObj.SetParameters(Parameters)
12167             self._autoPublish(anObj, theName, "transformed")
12168             return anObj
12169
12170         ## Build all possible propagation groups.
12171         #  Propagation group is a set of all edges, opposite to one (main)
12172         #  edge of this group directly or through other opposite edges.
12173         #  Notion of Opposite Edge make sence only on quadrangle face.
12174         #  @param theShape Shape to build propagation groups on.
12175         #  @param theName Object name; when specified, this parameter is used
12176         #         for result publication in the study. Otherwise, if automatic
12177         #         publication is switched on, default value is used for result name.
12178         #
12179         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
12180         #
12181         #  @ref swig_Propagate "Example"
12182         @ManageTransactions("BlocksOp")
12183         def Propagate(self, theShape, theName=None):
12184             """
12185             Build all possible propagation groups.
12186             Propagation group is a set of all edges, opposite to one (main)
12187             edge of this group directly or through other opposite edges.
12188             Notion of Opposite Edge make sence only on quadrangle face.
12189
12190             Parameters:
12191                 theShape Shape to build propagation groups on.
12192                 theName Object name; when specified, this parameter is used
12193                         for result publication in the study. Otherwise, if automatic
12194                         publication is switched on, default value is used for result name.
12195
12196             Returns:
12197                 List of GEOM.GEOM_Object, each of them is a propagation group.
12198             """
12199             # Example: see GEOM_TestOthers.py
12200             listChains = self.BlocksOp.Propagate(theShape)
12201             RaiseIfFailed("Propagate", self.BlocksOp)
12202             self._autoPublish(listChains, theName, "propagate")
12203             return listChains
12204
12205         # end of l3_blocks_op
12206         ## @}
12207
12208         ## @addtogroup l3_groups
12209         ## @{
12210
12211         ## Creates a new group which will store sub-shapes of theMainShape
12212         #  @param theMainShape is a GEOM object on which the group is selected
12213         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
12214         #  @param theName Object name; when specified, this parameter is used
12215         #         for result publication in the study. Otherwise, if automatic
12216         #         publication is switched on, default value is used for result name.
12217         #
12218         #  @return a newly created GEOM group (GEOM.GEOM_Object)
12219         #
12220         #  @ref tui_working_with_groups_page "Example 1"
12221         #  \n @ref swig_CreateGroup "Example 2"
12222         @ManageTransactions("GroupOp")
12223         def CreateGroup(self, theMainShape, theShapeType, theName=None):
12224             """
12225             Creates a new group which will store sub-shapes of theMainShape
12226
12227             Parameters:
12228                theMainShape is a GEOM object on which the group is selected
12229                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
12230                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
12231                 theName Object name; when specified, this parameter is used
12232                         for result publication in the study. Otherwise, if automatic
12233                         publication is switched on, default value is used for result name.
12234
12235             Returns:
12236                a newly created GEOM group
12237
12238             Example of usage:
12239                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
12240
12241             """
12242             # Example: see GEOM_TestOthers.py
12243             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
12244             RaiseIfFailed("CreateGroup", self.GroupOp)
12245             self._autoPublish(anObj, theName, "group")
12246             return anObj
12247
12248         ## Adds a sub-object with ID theSubShapeId to the group
12249         #  @param theGroup is a GEOM group to which the new sub-shape is added
12250         #  @param theSubShapeID is a sub-shape ID in the main object.
12251         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12252         #
12253         #  @ref tui_working_with_groups_page "Example"
12254         @ManageTransactions("GroupOp")
12255         def AddObject(self,theGroup, theSubShapeID):
12256             """
12257             Adds a sub-object with ID theSubShapeId to the group
12258
12259             Parameters:
12260                 theGroup       is a GEOM group to which the new sub-shape is added
12261                 theSubShapeID  is a sub-shape ID in the main object.
12262
12263             Note:
12264                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12265             """
12266             # Example: see GEOM_TestOthers.py
12267             self.GroupOp.AddObject(theGroup, theSubShapeID)
12268             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
12269                 RaiseIfFailed("AddObject", self.GroupOp)
12270                 pass
12271             pass
12272
12273         ## Removes a sub-object with ID \a theSubShapeId from the group
12274         #  @param theGroup is a GEOM group from which the new sub-shape is removed
12275         #  @param theSubShapeID is a sub-shape ID in the main object.
12276         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12277         #
12278         #  @ref tui_working_with_groups_page "Example"
12279         @ManageTransactions("GroupOp")
12280         def RemoveObject(self,theGroup, theSubShapeID):
12281             """
12282             Removes a sub-object with ID theSubShapeId from the group
12283
12284             Parameters:
12285                 theGroup is a GEOM group from which the new sub-shape is removed
12286                 theSubShapeID is a sub-shape ID in the main object.
12287
12288             Note:
12289                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12290             """
12291             # Example: see GEOM_TestOthers.py
12292             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
12293             RaiseIfFailed("RemoveObject", self.GroupOp)
12294             pass
12295
12296         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12297         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12298         #  @param theSubShapes is a list of sub-shapes to be added.
12299         #
12300         #  @ref tui_working_with_groups_page "Example"
12301         @ManageTransactions("GroupOp")
12302         def UnionList (self,theGroup, theSubShapes):
12303             """
12304             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12305
12306             Parameters:
12307                 theGroup is a GEOM group to which the new sub-shapes are added.
12308                 theSubShapes is a list of sub-shapes to be added.
12309             """
12310             # Example: see GEOM_TestOthers.py
12311             self.GroupOp.UnionList(theGroup, theSubShapes)
12312             RaiseIfFailed("UnionList", self.GroupOp)
12313             pass
12314
12315         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12316         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12317         #  @param theSubShapes is a list of indices of sub-shapes to be added.
12318         #
12319         #  @ref swig_UnionIDs "Example"
12320         @ManageTransactions("GroupOp")
12321         def UnionIDs(self,theGroup, theSubShapes):
12322             """
12323             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12324
12325             Parameters:
12326                 theGroup is a GEOM group to which the new sub-shapes are added.
12327                 theSubShapes is a list of indices of sub-shapes to be added.
12328             """
12329             # Example: see GEOM_TestOthers.py
12330             self.GroupOp.UnionIDs(theGroup, theSubShapes)
12331             RaiseIfFailed("UnionIDs", self.GroupOp)
12332             pass
12333
12334         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12335         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12336         #  @param theSubShapes is a list of sub-shapes to be removed.
12337         #
12338         #  @ref tui_working_with_groups_page "Example"
12339         @ManageTransactions("GroupOp")
12340         def DifferenceList (self,theGroup, theSubShapes):
12341             """
12342             Removes from the group all the given shapes. No errors, if some shapes are not included.
12343
12344             Parameters:
12345                 theGroup is a GEOM group from which the sub-shapes are removed.
12346                 theSubShapes is a list of sub-shapes to be removed.
12347             """
12348             # Example: see GEOM_TestOthers.py
12349             self.GroupOp.DifferenceList(theGroup, theSubShapes)
12350             RaiseIfFailed("DifferenceList", self.GroupOp)
12351             pass
12352
12353         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12354         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12355         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
12356         #
12357         #  @ref swig_DifferenceIDs "Example"
12358         @ManageTransactions("GroupOp")
12359         def DifferenceIDs(self,theGroup, theSubShapes):
12360             """
12361             Removes from the group all the given shapes. No errors, if some shapes are not included.
12362
12363             Parameters:
12364                 theGroup is a GEOM group from which the sub-shapes are removed.
12365                 theSubShapes is a list of indices of sub-shapes to be removed.
12366             """
12367             # Example: see GEOM_TestOthers.py
12368             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
12369             RaiseIfFailed("DifferenceIDs", self.GroupOp)
12370             pass
12371
12372         ## Union of two groups.
12373         #  New group is created. It will contain all entities
12374         #  which are present in groups theGroup1 and theGroup2.
12375         #  @param theGroup1, theGroup2 are the initial GEOM groups
12376         #                              to create the united group from.
12377         #  @param theName Object name; when specified, this parameter is used
12378         #         for result publication in the study. Otherwise, if automatic
12379         #         publication is switched on, default value is used for result name.
12380         #
12381         #  @return a newly created GEOM group.
12382         #
12383         #  @ref tui_union_groups_anchor "Example"
12384         @ManageTransactions("GroupOp")
12385         def UnionGroups (self, theGroup1, theGroup2, theName=None):
12386             """
12387             Union of two groups.
12388             New group is created. It will contain all entities
12389             which are present in groups theGroup1 and theGroup2.
12390
12391             Parameters:
12392                 theGroup1, theGroup2 are the initial GEOM groups
12393                                      to create the united group from.
12394                 theName Object name; when specified, this parameter is used
12395                         for result publication in the study. Otherwise, if automatic
12396                         publication is switched on, default value is used for result name.
12397
12398             Returns:
12399                 a newly created GEOM group.
12400             """
12401             # Example: see GEOM_TestOthers.py
12402             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
12403             RaiseIfFailed("UnionGroups", self.GroupOp)
12404             self._autoPublish(aGroup, theName, "group")
12405             return aGroup
12406
12407         ## Intersection of two groups.
12408         #  New group is created. It will contain only those entities
12409         #  which are present in both groups theGroup1 and theGroup2.
12410         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12411         #  @param theName Object name; when specified, this parameter is used
12412         #         for result publication in the study. Otherwise, if automatic
12413         #         publication is switched on, default value is used for result name.
12414         #
12415         #  @return a newly created GEOM group.
12416         #
12417         #  @ref tui_intersect_groups_anchor "Example"
12418         @ManageTransactions("GroupOp")
12419         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
12420             """
12421             Intersection of two groups.
12422             New group is created. It will contain only those entities
12423             which are present in both groups theGroup1 and theGroup2.
12424
12425             Parameters:
12426                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12427                 theName Object name; when specified, this parameter is used
12428                         for result publication in the study. Otherwise, if automatic
12429                         publication is switched on, default value is used for result name.
12430
12431             Returns:
12432                 a newly created GEOM group.
12433             """
12434             # Example: see GEOM_TestOthers.py
12435             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
12436             RaiseIfFailed("IntersectGroups", self.GroupOp)
12437             self._autoPublish(aGroup, theName, "group")
12438             return aGroup
12439
12440         ## Cut of two groups.
12441         #  New group is created. It will contain entities which are
12442         #  present in group theGroup1 but are not present in group theGroup2.
12443         #  @param theGroup1 is a GEOM group to include elements of.
12444         #  @param theGroup2 is a GEOM group to exclude elements of.
12445         #  @param theName Object name; when specified, this parameter is used
12446         #         for result publication in the study. Otherwise, if automatic
12447         #         publication is switched on, default value is used for result name.
12448         #
12449         #  @return a newly created GEOM group.
12450         #
12451         #  @ref tui_cut_groups_anchor "Example"
12452         @ManageTransactions("GroupOp")
12453         def CutGroups (self, theGroup1, theGroup2, theName=None):
12454             """
12455             Cut of two groups.
12456             New group is created. It will contain entities which are
12457             present in group theGroup1 but are not present in group theGroup2.
12458
12459             Parameters:
12460                 theGroup1 is a GEOM group to include elements of.
12461                 theGroup2 is a GEOM group to exclude elements of.
12462                 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             Returns:
12467                 a newly created GEOM group.
12468             """
12469             # Example: see GEOM_TestOthers.py
12470             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
12471             RaiseIfFailed("CutGroups", self.GroupOp)
12472             self._autoPublish(aGroup, theName, "group")
12473             return aGroup
12474
12475         ## Union of list of groups.
12476         #  New group is created. It will contain all entities that are
12477         #  present in groups listed in theGList.
12478         #  @param theGList is a list of GEOM groups to create the united group from.
12479         #  @param theName Object name; when specified, this parameter is used
12480         #         for result publication in the study. Otherwise, if automatic
12481         #         publication is switched on, default value is used for result name.
12482         #
12483         #  @return a newly created GEOM group.
12484         #
12485         #  @ref tui_union_groups_anchor "Example"
12486         @ManageTransactions("GroupOp")
12487         def UnionListOfGroups (self, theGList, theName=None):
12488             """
12489             Union of list of groups.
12490             New group is created. It will contain all entities that are
12491             present in groups listed in theGList.
12492
12493             Parameters:
12494                 theGList is a list of GEOM groups to create the united group from.
12495                 theName Object name; when specified, this parameter is used
12496                         for result publication in the study. Otherwise, if automatic
12497                         publication is switched on, default value is used for result name.
12498
12499             Returns:
12500                 a newly created GEOM group.
12501             """
12502             # Example: see GEOM_TestOthers.py
12503             aGroup = self.GroupOp.UnionListOfGroups(theGList)
12504             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
12505             self._autoPublish(aGroup, theName, "group")
12506             return aGroup
12507
12508         ## Cut of lists of groups.
12509         #  New group is created. It will contain only entities
12510         #  which are present in groups listed in theGList.
12511         #  @param theGList is a list of GEOM groups to include elements of.
12512         #  @param theName Object name; when specified, this parameter is used
12513         #         for result publication in the study. Otherwise, if automatic
12514         #         publication is switched on, default value is used for result name.
12515         #
12516         #  @return a newly created GEOM group.
12517         #
12518         #  @ref tui_intersect_groups_anchor "Example"
12519         @ManageTransactions("GroupOp")
12520         def IntersectListOfGroups (self, theGList, theName=None):
12521             """
12522             Cut of lists of groups.
12523             New group is created. It will contain only entities
12524             which are present in groups listed in theGList.
12525
12526             Parameters:
12527                 theGList is a list of GEOM groups to include elements of.
12528                 theName Object name; when specified, this parameter is used
12529                         for result publication in the study. Otherwise, if automatic
12530                         publication is switched on, default value is used for result name.
12531
12532             Returns:
12533                 a newly created GEOM group.
12534             """
12535             # Example: see GEOM_TestOthers.py
12536             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
12537             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
12538             self._autoPublish(aGroup, theName, "group")
12539             return aGroup
12540
12541         ## Cut of lists of groups.
12542         #  New group is created. It will contain only entities
12543         #  which are present in groups listed in theGList1 but
12544         #  are not present in groups from theGList2.
12545         #  @param theGList1 is a list of GEOM groups to include elements of.
12546         #  @param theGList2 is a list of GEOM groups to exclude elements of.
12547         #  @param theName Object name; when specified, this parameter is used
12548         #         for result publication in the study. Otherwise, if automatic
12549         #         publication is switched on, default value is used for result name.
12550         #
12551         #  @return a newly created GEOM group.
12552         #
12553         #  @ref tui_cut_groups_anchor "Example"
12554         @ManageTransactions("GroupOp")
12555         def CutListOfGroups (self, theGList1, theGList2, theName=None):
12556             """
12557             Cut of lists of groups.
12558             New group is created. It will contain only entities
12559             which are present in groups listed in theGList1 but
12560             are not present in groups from theGList2.
12561
12562             Parameters:
12563                 theGList1 is a list of GEOM groups to include elements of.
12564                 theGList2 is a list of GEOM groups to exclude elements of.
12565                 theName Object name; when specified, this parameter is used
12566                         for result publication in the study. Otherwise, if automatic
12567                         publication is switched on, default value is used for result name.
12568
12569             Returns:
12570                 a newly created GEOM group.
12571             """
12572             # Example: see GEOM_TestOthers.py
12573             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
12574             RaiseIfFailed("CutListOfGroups", self.GroupOp)
12575             self._autoPublish(aGroup, theName, "group")
12576             return aGroup
12577
12578         ## Returns a list of sub-objects ID stored in the group
12579         #  @param theGroup is a GEOM group for which a list of IDs is requested
12580         #
12581         #  @ref swig_GetObjectIDs "Example"
12582         @ManageTransactions("GroupOp")
12583         def GetObjectIDs(self,theGroup):
12584             """
12585             Returns a list of sub-objects ID stored in the group
12586
12587             Parameters:
12588                 theGroup is a GEOM group for which a list of IDs is requested
12589             """
12590             # Example: see GEOM_TestOthers.py
12591             ListIDs = self.GroupOp.GetObjects(theGroup)
12592             RaiseIfFailed("GetObjects", self.GroupOp)
12593             return ListIDs
12594
12595         ## Returns a type of sub-objects stored in the group
12596         #  @param theGroup is a GEOM group which type is returned.
12597         #
12598         #  @ref swig_GetType "Example"
12599         @ManageTransactions("GroupOp")
12600         def GetType(self,theGroup):
12601             """
12602             Returns a type of sub-objects stored in the group
12603
12604             Parameters:
12605                 theGroup is a GEOM group which type is returned.
12606             """
12607             # Example: see GEOM_TestOthers.py
12608             aType = self.GroupOp.GetType(theGroup)
12609             RaiseIfFailed("GetType", self.GroupOp)
12610             return aType
12611
12612         ## Convert a type of geom object from id to string value
12613         #  @param theId is a GEOM obect type id.
12614         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12615         #  @ref swig_GetType "Example"
12616         def ShapeIdToType(self, theId):
12617             """
12618             Convert a type of geom object from id to string value
12619
12620             Parameters:
12621                 theId is a GEOM obect type id.
12622
12623             Returns:
12624                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12625             """
12626             if theId == 0:
12627                 return "COPY"
12628             if theId == 1:
12629                 return "IMPORT"
12630             if theId == 2:
12631                 return "POINT"
12632             if theId == 3:
12633                 return "VECTOR"
12634             if theId == 4:
12635                 return "PLANE"
12636             if theId == 5:
12637                 return "LINE"
12638             if theId == 6:
12639                 return "TORUS"
12640             if theId == 7:
12641                 return "BOX"
12642             if theId == 8:
12643                 return "CYLINDER"
12644             if theId == 9:
12645                 return "CONE"
12646             if theId == 10:
12647                 return "SPHERE"
12648             if theId == 11:
12649                 return "PRISM"
12650             if theId == 12:
12651                 return "REVOLUTION"
12652             if theId == 13:
12653                 return "BOOLEAN"
12654             if theId == 14:
12655                 return "PARTITION"
12656             if theId == 15:
12657                 return "POLYLINE"
12658             if theId == 16:
12659                 return "CIRCLE"
12660             if theId == 17:
12661                 return "SPLINE"
12662             if theId == 18:
12663                 return "ELLIPSE"
12664             if theId == 19:
12665                 return "CIRC_ARC"
12666             if theId == 20:
12667                 return "FILLET"
12668             if theId == 21:
12669                 return "CHAMFER"
12670             if theId == 22:
12671                 return "EDGE"
12672             if theId == 23:
12673                 return "WIRE"
12674             if theId == 24:
12675                 return "FACE"
12676             if theId == 25:
12677                 return "SHELL"
12678             if theId == 26:
12679                 return "SOLID"
12680             if theId == 27:
12681                 return "COMPOUND"
12682             if theId == 28:
12683                 return "SUBSHAPE"
12684             if theId == 29:
12685                 return "PIPE"
12686             if theId == 30:
12687                 return "ARCHIMEDE"
12688             if theId == 31:
12689                 return "FILLING"
12690             if theId == 32:
12691                 return "EXPLODE"
12692             if theId == 33:
12693                 return "GLUED"
12694             if theId == 34:
12695                 return "SKETCHER"
12696             if theId == 35:
12697                 return "CDG"
12698             if theId == 36:
12699                 return "FREE_BOUNDS"
12700             if theId == 37:
12701                 return "GROUP"
12702             if theId == 38:
12703                 return "BLOCK"
12704             if theId == 39:
12705                 return "MARKER"
12706             if theId == 40:
12707                 return "THRUSECTIONS"
12708             if theId == 41:
12709                 return "COMPOUNDFILTER"
12710             if theId == 42:
12711                 return "SHAPES_ON_SHAPE"
12712             if theId == 43:
12713                 return "ELLIPSE_ARC"
12714             if theId == 44:
12715                 return "3DSKETCHER"
12716             if theId == 45:
12717                 return "FILLET_2D"
12718             if theId == 46:
12719                 return "FILLET_1D"
12720             if theId == 201:
12721                 return "PIPETSHAPE"
12722             return "Shape Id not exist."
12723
12724         ## Returns a main shape associated with the group
12725         #  @param theGroup is a GEOM group for which a main shape object is requested
12726         #  @return a GEOM object which is a main shape for theGroup
12727         #
12728         #  @ref swig_GetMainShape "Example"
12729         @ManageTransactions("GroupOp")
12730         def GetMainShape(self,theGroup):
12731             """
12732             Returns a main shape associated with the group
12733
12734             Parameters:
12735                 theGroup is a GEOM group for which a main shape object is requested
12736
12737             Returns:
12738                 a GEOM object which is a main shape for theGroup
12739
12740             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
12741             """
12742             # Example: see GEOM_TestOthers.py
12743             anObj = self.GroupOp.GetMainShape(theGroup)
12744             RaiseIfFailed("GetMainShape", self.GroupOp)
12745             return anObj
12746
12747         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
12748         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12749         #  @param theShape given shape (see GEOM.GEOM_Object)
12750         #  @param min_length minimum length of edges of theShape
12751         #  @param max_length maximum length of edges of theShape
12752         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12753         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12754         #  @param theName Object name; when specified, this parameter is used
12755         #         for result publication in the study. Otherwise, if automatic
12756         #         publication is switched on, default value is used for result name.
12757         #
12758         #  @return a newly created GEOM group of edges
12759         #
12760         #  @@ref swig_todo "Example"
12761         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
12762             """
12763             Create group of edges of theShape, whose length is in range [min_length, max_length].
12764             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12765
12766             Parameters:
12767                 theShape given shape
12768                 min_length minimum length of edges of theShape
12769                 max_length maximum length of edges of theShape
12770                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12771                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12772                 theName Object name; when specified, this parameter is used
12773                         for result publication in the study. Otherwise, if automatic
12774                         publication is switched on, default value is used for result name.
12775
12776              Returns:
12777                 a newly created GEOM group of edges.
12778             """
12779             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
12780             edges_in_range = []
12781             for edge in edges:
12782                 Props = self.BasicProperties(edge)
12783                 if min_length <= Props[0] and Props[0] <= max_length:
12784                     if (not include_min) and (min_length == Props[0]):
12785                         skip = 1
12786                     else:
12787                         if (not include_max) and (Props[0] == max_length):
12788                             skip = 1
12789                         else:
12790                             edges_in_range.append(edge)
12791
12792             if len(edges_in_range) <= 0:
12793                 print "No edges found by given criteria"
12794                 return None
12795
12796             # note: auto-publishing is done in self.CreateGroup()
12797             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
12798             self.UnionList(group_edges, edges_in_range)
12799
12800             return group_edges
12801
12802         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
12803         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12804         #  @param min_length minimum length of edges of selected shape
12805         #  @param max_length maximum length of edges of selected shape
12806         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12807         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12808         #  @return a newly created GEOM group of edges
12809         #  @ref swig_todo "Example"
12810         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
12811             """
12812             Create group of edges of selected shape, whose length is in range [min_length, max_length].
12813             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12814
12815             Parameters:
12816                 min_length minimum length of edges of selected shape
12817                 max_length maximum length of edges of selected shape
12818                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12819                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12820
12821              Returns:
12822                 a newly created GEOM group of edges.
12823             """
12824             nb_selected = sg.SelectedCount()
12825             if nb_selected < 1:
12826                 print "Select a shape before calling this function, please."
12827                 return 0
12828             if nb_selected > 1:
12829                 print "Only one shape must be selected"
12830                 return 0
12831
12832             id_shape = sg.getSelected(0)
12833             shape = IDToObject( id_shape )
12834
12835             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
12836
12837             left_str  = " < "
12838             right_str = " < "
12839             if include_min: left_str  = " <= "
12840             if include_max: right_str  = " <= "
12841
12842             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
12843                                     + left_str + "length" + right_str + `max_length`)
12844
12845             sg.updateObjBrowser(1)
12846
12847             return group_edges
12848
12849         # end of l3_groups
12850         ## @}
12851
12852         #@@ insert new functions before this line @@ do not remove this line @@#
12853
12854         ## Create a copy of the given object
12855         #
12856         #  @param theOriginal geometry object for copy
12857         #  @param theName Object name; when specified, this parameter is used
12858         #         for result publication in the study. Otherwise, if automatic
12859         #         publication is switched on, default value is used for result name.
12860         #
12861         #  @return New GEOM_Object, containing the copied shape.
12862         #
12863         #  @ingroup l1_geomBuilder_auxiliary
12864         #  @ref swig_MakeCopy "Example"
12865         @ManageTransactions("InsertOp")
12866         def MakeCopy(self, theOriginal, theName=None):
12867             """
12868             Create a copy of the given object
12869
12870             Parameters:
12871                 theOriginal geometry object for copy
12872                 theName Object name; when specified, this parameter is used
12873                         for result publication in the study. Otherwise, if automatic
12874                         publication is switched on, default value is used for result name.
12875
12876             Returns:
12877                 New GEOM_Object, containing the copied shape.
12878
12879             Example of usage: Copy = geompy.MakeCopy(Box)
12880             """
12881             # Example: see GEOM_TestAll.py
12882             anObj = self.InsertOp.MakeCopy(theOriginal)
12883             RaiseIfFailed("MakeCopy", self.InsertOp)
12884             self._autoPublish(anObj, theName, "copy")
12885             return anObj
12886
12887         ## Add Path to load python scripts from
12888         #  @param Path a path to load python scripts from
12889         #  @ingroup l1_geomBuilder_auxiliary
12890         def addPath(self,Path):
12891             """
12892             Add Path to load python scripts from
12893
12894             Parameters:
12895                 Path a path to load python scripts from
12896             """
12897             if (sys.path.count(Path) < 1):
12898                 sys.path.append(Path)
12899                 pass
12900             pass
12901
12902         ## Load marker texture from the file
12903         #  @param Path a path to the texture file
12904         #  @return unique texture identifier
12905         #  @ingroup l1_geomBuilder_auxiliary
12906         @ManageTransactions("InsertOp")
12907         def LoadTexture(self, Path):
12908             """
12909             Load marker texture from the file
12910
12911             Parameters:
12912                 Path a path to the texture file
12913
12914             Returns:
12915                 unique texture identifier
12916             """
12917             # Example: see GEOM_TestAll.py
12918             ID = self.InsertOp.LoadTexture(Path)
12919             RaiseIfFailed("LoadTexture", self.InsertOp)
12920             return ID
12921
12922         ## Get internal name of the object based on its study entry
12923         #  @note This method does not provide an unique identifier of the geometry object.
12924         #  @note This is internal function of GEOM component, though it can be used outside it for
12925         #  appropriate reason (e.g. for identification of geometry object).
12926         #  @param obj geometry object
12927         #  @return unique object identifier
12928         #  @ingroup l1_geomBuilder_auxiliary
12929         def getObjectID(self, obj):
12930             """
12931             Get internal name of the object based on its study entry.
12932             Note: this method does not provide an unique identifier of the geometry object.
12933             It is an internal function of GEOM component, though it can be used outside GEOM for
12934             appropriate reason (e.g. for identification of geometry object).
12935
12936             Parameters:
12937                 obj geometry object
12938
12939             Returns:
12940                 unique object identifier
12941             """
12942             ID = ""
12943             entry = salome.ObjectToID(obj)
12944             if entry is not None:
12945                 lst = entry.split(":")
12946                 if len(lst) > 0:
12947                     ID = lst[-1] # -1 means last item in the list
12948                     return "GEOM_" + ID
12949             return ID
12950
12951
12952
12953         ## Add marker texture. @a Width and @a Height parameters
12954         #  specify width and height of the texture in pixels.
12955         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12956         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12957         #  parameter should be unpacked string, in which '1' symbols represent opaque
12958         #  pixels and '0' represent transparent pixels of the texture bitmap.
12959         #
12960         #  @param Width texture width in pixels
12961         #  @param Height texture height in pixels
12962         #  @param Texture texture data
12963         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12964         #  @return unique texture identifier
12965         #  @ingroup l1_geomBuilder_auxiliary
12966         @ManageTransactions("InsertOp")
12967         def AddTexture(self, Width, Height, Texture, RowData=False):
12968             """
12969             Add marker texture. Width and Height parameters
12970             specify width and height of the texture in pixels.
12971             If RowData is True, Texture parameter should represent texture data
12972             packed into the byte array. If RowData is False (default), Texture
12973             parameter should be unpacked string, in which '1' symbols represent opaque
12974             pixels and '0' represent transparent pixels of the texture bitmap.
12975
12976             Parameters:
12977                 Width texture width in pixels
12978                 Height texture height in pixels
12979                 Texture texture data
12980                 RowData if True, Texture data are packed in the byte stream
12981
12982             Returns:
12983                 return unique texture identifier
12984             """
12985             if not RowData: Texture = PackData(Texture)
12986             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12987             RaiseIfFailed("AddTexture", self.InsertOp)
12988             return ID
12989
12990         ## Transfer not topological data from one GEOM object to another.
12991         #
12992         #  @param theObjectFrom the source object of non-topological data
12993         #  @param theObjectTo the destination object of non-topological data
12994         #  @param theFindMethod method to search sub-shapes of theObjectFrom
12995         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
12996         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
12997         #         Other values of GEOM.find_shape_method are not supported.
12998         #
12999         #  @return True in case of success; False otherwise.
13000         #
13001         #  @ingroup l1_geomBuilder_auxiliary
13002         #
13003         #  @ref swig_TransferData "Example"
13004         @ManageTransactions("InsertOp")
13005         def TransferData(self, theObjectFrom, theObjectTo,
13006                          theFindMethod=GEOM.FSM_GetInPlace):
13007             """
13008             Transfer not topological data from one GEOM object to another.
13009
13010             Parameters:
13011                 theObjectFrom the source object of non-topological data
13012                 theObjectTo the destination object of non-topological data
13013                 theFindMethod method to search sub-shapes of theObjectFrom
13014                               in shape theObjectTo. Possible values are:
13015                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
13016                               and GEOM.FSM_GetInPlace_Old. Other values of
13017                               GEOM.find_shape_method are not supported.
13018
13019             Returns:
13020                 True in case of success; False otherwise.
13021
13022             # Example: see GEOM_TestOthers.py
13023             """
13024             # Example: see GEOM_TestAll.py
13025             isOk = self.InsertOp.TransferData(theObjectFrom,
13026                                                theObjectTo, theFindMethod)
13027             RaiseIfFailed("TransferData", self.InsertOp)
13028             return isOk
13029
13030         ## Creates a new folder object. It is a container for any GEOM objects.
13031         #  @param Name name of the container
13032         #  @param Father parent object. If None,
13033         #         folder under 'Geometry' root object will be created.
13034         #  @return a new created folder
13035         #  @ingroup l1_publish_data
13036         def NewFolder(self, Name, Father=None):
13037             """
13038             Create a new folder object. It is an auxiliary container for any GEOM objects.
13039
13040             Parameters:
13041                 Name name of the container
13042                 Father parent object. If None,
13043                 folder under 'Geometry' root object will be created.
13044
13045             Returns:
13046                 a new created folder
13047             """
13048             if not Father: Father = self.father
13049             return self.CreateFolder(Name, Father)
13050
13051         ## Move object to the specified folder
13052         #  @param Object object to move
13053         #  @param Folder target folder
13054         #  @ingroup l1_publish_data
13055         def PutToFolder(self, Object, Folder):
13056             """
13057             Move object to the specified folder
13058
13059             Parameters:
13060                 Object object to move
13061                 Folder target folder
13062             """
13063             self.MoveToFolder(Object, Folder)
13064             pass
13065
13066         ## Move list of objects to the specified folder
13067         #  @param ListOfSO list of objects to move
13068         #  @param Folder target folder
13069         #  @ingroup l1_publish_data
13070         def PutListToFolder(self, ListOfSO, Folder):
13071             """
13072             Move list of objects to the specified folder
13073
13074             Parameters:
13075                 ListOfSO list of objects to move
13076                 Folder target folder
13077             """
13078             self.MoveListToFolder(ListOfSO, Folder)
13079             pass
13080
13081         ## @addtogroup l2_field
13082         ## @{
13083
13084         ## Creates a field
13085         #  @param shape the shape the field lies on
13086         #  @param name the field name
13087         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13088         #  @param dimension dimension of the shape the field lies on
13089         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13090         #  @param componentNames names of components
13091         #  @return a created field
13092         @ManageTransactions("FieldOp")
13093         def CreateField(self, shape, name, type, dimension, componentNames):
13094             """
13095             Creates a field
13096
13097             Parameters:
13098                 shape the shape the field lies on
13099                 name  the field name
13100                 type  type of field data
13101                 dimension dimension of the shape the field lies on
13102                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13103                 componentNames names of components
13104
13105             Returns:
13106                 a created field
13107             """
13108             if isinstance( type, int ):
13109                 if type < 0 or type > 3:
13110                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
13111                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13112
13113             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13114             RaiseIfFailed("CreateField", self.FieldOp)
13115             global geom
13116             geom._autoPublish( f, "", name)
13117             return f
13118
13119         ## Removes a field from the GEOM component
13120         #  @param field the field to remove
13121         def RemoveField(self, field):
13122             "Removes a field from the GEOM component"
13123             global geom
13124             if isinstance( field, GEOM._objref_GEOM_Field ):
13125                 geom.RemoveObject( field )
13126             elif isinstance( field, geomField ):
13127                 geom.RemoveObject( field.field )
13128             else:
13129                 raise RuntimeError, "RemoveField() : the object is not a field"
13130             return
13131
13132         ## Returns number of fields on a shape
13133         @ManageTransactions("FieldOp")
13134         def CountFields(self, shape):
13135             "Returns number of fields on a shape"
13136             nb = self.FieldOp.CountFields( shape )
13137             RaiseIfFailed("CountFields", self.FieldOp)
13138             return nb
13139
13140         ## Returns all fields on a shape
13141         @ManageTransactions("FieldOp")
13142         def GetFields(self, shape):
13143             "Returns all fields on a shape"
13144             ff = self.FieldOp.GetFields( shape )
13145             RaiseIfFailed("GetFields", self.FieldOp)
13146             return ff
13147
13148         ## Returns a field on a shape by its name
13149         @ManageTransactions("FieldOp")
13150         def GetField(self, shape, name):
13151             "Returns a field on a shape by its name"
13152             f = self.FieldOp.GetField( shape, name )
13153             RaiseIfFailed("GetField", self.FieldOp)
13154             return f
13155
13156         # end of l2_field
13157         ## @}
13158
13159
13160 import omniORB
13161 # Register the new proxy for GEOM_Gen
13162 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13163
13164
13165 ## Field on Geometry
13166 #  @ingroup l2_field
13167 class geomField( GEOM._objref_GEOM_Field ):
13168
13169     def __init__(self):
13170         GEOM._objref_GEOM_Field.__init__(self)
13171         self.field = GEOM._objref_GEOM_Field
13172         return
13173
13174     ## Returns the shape the field lies on
13175     def getShape(self):
13176         "Returns the shape the field lies on"
13177         return self.field.GetShape(self)
13178
13179     ## Returns the field name
13180     def getName(self):
13181         "Returns the field name"
13182         return self.field.GetName(self)
13183
13184     ## Returns type of field data as integer [0-3]
13185     def getType(self):
13186         "Returns type of field data"
13187         return self.field.GetDataType(self)._v
13188
13189     ## Returns type of field data:
13190     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13191     def getTypeEnum(self):
13192         "Returns type of field data"
13193         return self.field.GetDataType(self)
13194
13195     ## Returns dimension of the shape the field lies on:
13196     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13197     def getDimension(self):
13198         """Returns dimension of the shape the field lies on:
13199         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13200         return self.field.GetDimension(self)
13201
13202     ## Returns names of components
13203     def getComponents(self):
13204         "Returns names of components"
13205         return self.field.GetComponents(self)
13206
13207     ## Adds a time step to the field
13208     #  @param step the time step number further used as the step identifier
13209     #  @param stamp the time step time
13210     #  @param values the values of the time step
13211     def addStep(self, step, stamp, values):
13212         "Adds a time step to the field"
13213         stp = self.field.AddStep( self, step, stamp )
13214         if not stp:
13215             raise RuntimeError, \
13216                   "Field.addStep() : Error: step %s already exists in this field"%step
13217         global geom
13218         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13219         self.setValues( step, values )
13220         return stp
13221
13222     ## Remove a time step from the field
13223     def removeStep(self,step):
13224         "Remove a time step from the field"
13225         stepSO = None
13226         try:
13227             stepObj = self.field.GetStep( self, step )
13228             if stepObj:
13229                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13230         except:
13231             #import traceback
13232             #traceback.print_exc()
13233             pass
13234         self.field.RemoveStep( self, step )
13235         if stepSO:
13236             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13237         return
13238
13239     ## Returns number of time steps in the field
13240     def countSteps(self):
13241         "Returns number of time steps in the field"
13242         return self.field.CountSteps(self)
13243
13244     ## Returns a list of time step IDs in the field
13245     def getSteps(self):
13246         "Returns a list of time step IDs in the field"
13247         return self.field.GetSteps(self)
13248
13249     ## Returns a time step by its ID
13250     def getStep(self,step):
13251         "Returns a time step by its ID"
13252         stp = self.field.GetStep(self, step)
13253         if not stp:
13254             raise RuntimeError, "Step %s is missing from this field"%step
13255         return stp
13256
13257     ## Returns the time of the field step
13258     def getStamp(self,step):
13259         "Returns the time of the field step"
13260         return self.getStep(step).GetStamp()
13261
13262     ## Changes the time of the field step
13263     def setStamp(self, step, stamp):
13264         "Changes the time of the field step"
13265         return self.getStep(step).SetStamp(stamp)
13266
13267     ## Returns values of the field step
13268     def getValues(self, step):
13269         "Returns values of the field step"
13270         return self.getStep(step).GetValues()
13271
13272     ## Changes values of the field step
13273     def setValues(self, step, values):
13274         "Changes values of the field step"
13275         stp = self.getStep(step)
13276         errBeg = "Field.setValues(values) : Error: "
13277         try:
13278             ok = stp.SetValues( values )
13279         except Exception, e:
13280             excStr = str(e)
13281             if excStr.find("WrongPythonType") > 0:
13282                 raise RuntimeError, errBeg +\
13283                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
13284             raise RuntimeError, errBeg + str(e)
13285         if not ok:
13286             nbOK = self.field.GetArraySize(self)
13287             nbKO = len(values)
13288             if nbOK != nbKO:
13289                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
13290             else:
13291                 raise RuntimeError, errBeg + "failed"
13292         return
13293
13294     pass # end of class geomField
13295
13296 # Register the new proxy for GEOM_Field
13297 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
13298
13299
13300 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
13301 #  interface to GEOM operations.
13302 #
13303 #  Typical use is:
13304 #  \code
13305 #    import salome
13306 #    salome.salome_init()
13307 #    from salome.geom import geomBuilder
13308 #    geompy = geomBuilder.New(salome.myStudy)
13309 #  \endcode
13310 #  @param  study     SALOME study, generally obtained by salome.myStudy.
13311 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13312 #  @return geomBuilder instance
13313 def New( study, instance=None):
13314     """
13315     Create a new geomBuilder instance.The geomBuilder class provides the Python
13316     interface to GEOM operations.
13317
13318     Typical use is:
13319         import salome
13320         salome.salome_init()
13321         from salome.geom import geomBuilder
13322         geompy = geomBuilder.New(salome.myStudy)
13323
13324     Parameters:
13325         study     SALOME study, generally obtained by salome.myStudy.
13326         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13327     Returns:
13328         geomBuilder instance
13329     """
13330     #print "New geomBuilder ", study, instance
13331     global engine
13332     global geom
13333     global doLcc
13334     engine = instance
13335     if engine is None:
13336       doLcc = True
13337     geom = geomBuilder()
13338     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13339     geom.init_geom(study)
13340     return geom
13341
13342
13343 # Register methods from the plug-ins in the geomBuilder class 
13344 plugins_var = os.environ.get( "GEOM_PluginsList" )
13345
13346 plugins = None
13347 if plugins_var is not None:
13348     plugins = plugins_var.split( ":" )
13349     plugins=filter(lambda x: len(x)>0, plugins)
13350 if plugins is not None:
13351     for pluginName in plugins:
13352         pluginBuilderName = pluginName + "Builder"
13353         try:
13354             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
13355         except Exception, e:
13356             from salome_utils import verbose
13357             print "Exception while loading %s: %s" % ( pluginBuilderName, e )
13358             continue
13359         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
13360         plugin = eval( pluginBuilderName )
13361         
13362         # add methods from plugin module to the geomBuilder class
13363         for k in dir( plugin ):
13364             if k[0] == '_': continue
13365             method = getattr( plugin, k )
13366             if type( method ).__name__ == 'function':
13367                 if not hasattr( geomBuilder, k ):
13368                     setattr( geomBuilder, k, method )
13369                 pass
13370             pass
13371         del pluginName
13372         pass
13373     pass