Salome HOME
22756: [EDF] Intersection 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 shell from the set of faces and shells.
4560         #  @param theFacesAndShells List of faces and/or shells.
4561         #  @param theName Object name; when specified, this parameter is used
4562         #         for result publication in the study. Otherwise, if automatic
4563         #         publication is switched on, default value is used for result name.
4564         #
4565         #  @return New GEOM.GEOM_Object, containing the created shell.
4566         #
4567         #  @ref tui_creation_shell "Example"
4568         @ManageTransactions("ShapesOp")
4569         def MakeShell(self, theFacesAndShells, theName=None):
4570             """
4571             Create a shell from the set of faces and shells.
4572
4573             Parameters:
4574                 theFacesAndShells List of faces and/or shells.
4575                 theName Object name; when specified, this parameter is used
4576                         for result publication in the study. Otherwise, if automatic
4577                         publication is switched on, default value is used for result name.
4578
4579             Returns:
4580                 New GEOM.GEOM_Object, containing the created shell.
4581             """
4582             # Example: see GEOM_TestAll.py
4583             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4584             RaiseIfFailed("MakeShell", self.ShapesOp)
4585             self._autoPublish(anObj, theName, "shell")
4586             return anObj
4587
4588         ## Create a solid, bounded by the given shells.
4589         #  @param theShells Sequence of bounding shells.
4590         #  @param theName Object name; when specified, this parameter is used
4591         #         for result publication in the study. Otherwise, if automatic
4592         #         publication is switched on, default value is used for result name.
4593         #
4594         #  @return New GEOM.GEOM_Object, containing the created solid.
4595         #
4596         #  @ref tui_creation_solid "Example"
4597         @ManageTransactions("ShapesOp")
4598         def MakeSolid(self, theShells, theName=None):
4599             """
4600             Create a solid, bounded by the given shells.
4601
4602             Parameters:
4603                 theShells Sequence of bounding shells.
4604                 theName Object name; when specified, this parameter is used
4605                         for result publication in the study. Otherwise, if automatic
4606                         publication is switched on, default value is used for result name.
4607
4608             Returns:
4609                 New GEOM.GEOM_Object, containing the created solid.
4610             """
4611             # Example: see GEOM_TestAll.py
4612             theShells = ToList(theShells)
4613             if len(theShells) == 1:
4614                 descr = self._IsGoodForSolid(theShells[0])
4615                 #if len(descr) > 0:
4616                 #    raise RuntimeError, "MakeSolidShells : " + descr
4617                 if descr == "WRN_SHAPE_UNCLOSED":
4618                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4619             anObj = self.ShapesOp.MakeSolidShells(theShells)
4620             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4621             self._autoPublish(anObj, theName, "solid")
4622             return anObj
4623
4624         ## Create a compound of the given shapes.
4625         #  @param theShapes List of shapes to put in compound.
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 compound.
4631         #
4632         #  @ref tui_creation_compound "Example"
4633         @ManageTransactions("ShapesOp")
4634         def MakeCompound(self, theShapes, theName=None):
4635             """
4636             Create a compound of the given shapes.
4637
4638             Parameters:
4639                 theShapes List of shapes to put in compound.
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 compound.
4646             """
4647             # Example: see GEOM_TestAll.py
4648             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
4649             RaiseIfFailed("MakeCompound", self.ShapesOp)
4650             self._autoPublish(anObj, theName, "compound")
4651             return anObj
4652         
4653         ## Create a solid (or solids) from the set of faces and/or shells.
4654         #  @param theFacesOrShells List of faces and/or shells.
4655         #  @param isIntersect If TRUE, forces performing intersections
4656         #         between arguments; otherwise (default) intersection is not performed.
4657         #  @param theName Object name; when specified, this parameter is used
4658         #         for result publication in the study. Otherwise, if automatic
4659         #         publication is switched on, default value is used for result name.
4660         #
4661         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
4662         #
4663         #  @ref tui_creation_solid_from_faces "Example"
4664         @ManageTransactions("ShapesOp")
4665         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
4666             """
4667             Create a solid (or solids) from the set of connected faces and/or shells.
4668
4669             Parameters:
4670                 theFacesOrShells List of faces and/or shells.
4671                 isIntersect If TRUE, forces performing intersections
4672                         between arguments; otherwise (default) intersection is not performed
4673                 theName Object name; when specified, this parameter is used.
4674                         for result publication in the study. Otherwise, if automatic
4675                         publication is switched on, default value is used for result name.
4676
4677             Returns:
4678                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
4679             """
4680             # Example: see GEOM_TestAll.py
4681             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
4682             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
4683             self._autoPublish(anObj, theName, "solid")
4684             return anObj
4685
4686         # end of l3_advanced
4687         ## @}
4688
4689         ## @addtogroup l2_measure
4690         ## @{
4691
4692         ## Gives quantity of faces in the given shape.
4693         #  @param theShape Shape to count faces of.
4694         #  @return Quantity of faces.
4695         #
4696         #  @ref swig_NumberOf "Example"
4697         @ManageTransactions("ShapesOp")
4698         def NumberOfFaces(self, theShape):
4699             """
4700             Gives quantity of faces in the given shape.
4701
4702             Parameters:
4703                 theShape Shape to count faces of.
4704
4705             Returns:
4706                 Quantity of faces.
4707             """
4708             # Example: see GEOM_TestOthers.py
4709             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4710             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4711             return nb_faces
4712
4713         ## Gives quantity of edges in the given shape.
4714         #  @param theShape Shape to count edges of.
4715         #  @return Quantity of edges.
4716         #
4717         #  @ref swig_NumberOf "Example"
4718         @ManageTransactions("ShapesOp")
4719         def NumberOfEdges(self, theShape):
4720             """
4721             Gives quantity of edges in the given shape.
4722
4723             Parameters:
4724                 theShape Shape to count edges of.
4725
4726             Returns:
4727                 Quantity of edges.
4728             """
4729             # Example: see GEOM_TestOthers.py
4730             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4731             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4732             return nb_edges
4733
4734         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4735         #  @param theShape Shape to count sub-shapes of.
4736         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4737         #  @return Quantity of sub-shapes of given type.
4738         #
4739         #  @ref swig_NumberOf "Example"
4740         @ManageTransactions("ShapesOp")
4741         def NumberOfSubShapes(self, theShape, theShapeType):
4742             """
4743             Gives quantity of sub-shapes of type theShapeType in the given shape.
4744
4745             Parameters:
4746                 theShape Shape to count sub-shapes of.
4747                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4748
4749             Returns:
4750                 Quantity of sub-shapes of given type.
4751             """
4752             # Example: see GEOM_TestOthers.py
4753             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4754             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4755             return nb_ss
4756
4757         ## Gives quantity of solids in the given shape.
4758         #  @param theShape Shape to count solids in.
4759         #  @return Quantity of solids.
4760         #
4761         #  @ref swig_NumberOf "Example"
4762         @ManageTransactions("ShapesOp")
4763         def NumberOfSolids(self, theShape):
4764             """
4765             Gives quantity of solids in the given shape.
4766
4767             Parameters:
4768                 theShape Shape to count solids in.
4769
4770             Returns:
4771                 Quantity of solids.
4772             """
4773             # Example: see GEOM_TestOthers.py
4774             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4775             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4776             return nb_solids
4777
4778         # end of l2_measure
4779         ## @}
4780
4781         ## @addtogroup l3_healing
4782         ## @{
4783
4784         ## Reverses an orientation the given shape.
4785         #  @param theShape Shape to be reversed.
4786         #  @param theName Object name; when specified, this parameter is used
4787         #         for result publication in the study. Otherwise, if automatic
4788         #         publication is switched on, default value is used for result name.
4789         #
4790         #  @return The reversed copy of theShape.
4791         #
4792         #  @ref swig_ChangeOrientation "Example"
4793         @ManageTransactions("ShapesOp")
4794         def ChangeOrientation(self, theShape, theName=None):
4795             """
4796             Reverses an orientation the given shape.
4797
4798             Parameters:
4799                 theShape Shape to be reversed.
4800                 theName Object name; when specified, this parameter is used
4801                         for result publication in the study. Otherwise, if automatic
4802                         publication is switched on, default value is used for result name.
4803
4804             Returns:
4805                 The reversed copy of theShape.
4806             """
4807             # Example: see GEOM_TestAll.py
4808             anObj = self.ShapesOp.ChangeOrientation(theShape)
4809             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4810             self._autoPublish(anObj, theName, "reversed")
4811             return anObj
4812
4813         ## See ChangeOrientation() method for details.
4814         #
4815         #  @ref swig_OrientationChange "Example"
4816         def OrientationChange(self, theShape, theName=None):
4817             """
4818             See geompy.ChangeOrientation method for details.
4819             """
4820             # Example: see GEOM_TestOthers.py
4821             # note: auto-publishing is done in self.ChangeOrientation()
4822             anObj = self.ChangeOrientation(theShape, theName)
4823             return anObj
4824
4825         # end of l3_healing
4826         ## @}
4827
4828         ## @addtogroup l4_obtain
4829         ## @{
4830
4831         ## Retrieve all free faces from the given shape.
4832         #  Free face is a face, which is not shared between two shells of the shape.
4833         #  @param theShape Shape to find free faces in.
4834         #  @return List of IDs of all free faces, contained in theShape.
4835         #
4836         #  @ref tui_measurement_tools_page "Example"
4837         @ManageTransactions("ShapesOp")
4838         def GetFreeFacesIDs(self,theShape):
4839             """
4840             Retrieve all free faces from the given shape.
4841             Free face is a face, which is not shared between two shells of the shape.
4842
4843             Parameters:
4844                 theShape Shape to find free faces in.
4845
4846             Returns:
4847                 List of IDs of all free faces, contained in theShape.
4848             """
4849             # Example: see GEOM_TestOthers.py
4850             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4851             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4852             return anIDs
4853
4854         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4855         #  @param theShape1 Shape to find sub-shapes in.
4856         #  @param theShape2 Shape to find shared sub-shapes with.
4857         #  @param theShapeType Type of sub-shapes to be retrieved.
4858         #  @param theName Object name; when specified, this parameter is used
4859         #         for result publication in the study. Otherwise, if automatic
4860         #         publication is switched on, default value is used for result name.
4861         #
4862         #  @return List of sub-shapes of theShape1, shared with theShape2.
4863         #
4864         #  @ref swig_GetSharedShapes "Example"
4865         @ManageTransactions("ShapesOp")
4866         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4867             """
4868             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4869
4870             Parameters:
4871                 theShape1 Shape to find sub-shapes in.
4872                 theShape2 Shape to find shared sub-shapes with.
4873                 theShapeType Type of sub-shapes to be retrieved.
4874                 theName Object name; when specified, this parameter is used
4875                         for result publication in the study. Otherwise, if automatic
4876                         publication is switched on, default value is used for result name.
4877
4878             Returns:
4879                 List of sub-shapes of theShape1, shared with theShape2.
4880             """
4881             # Example: see GEOM_TestOthers.py
4882             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4883             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4884             self._autoPublish(aList, theName, "shared")
4885             return aList
4886
4887         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4888         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
4889         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4890         #  @param theName Object name; when specified, this parameter is used
4891         #         for result publication in the study. Otherwise, if automatic
4892         #         publication is switched on, default value is used for result name.
4893         #
4894         #  @return List of objects, that are sub-shapes of all given shapes.
4895         #
4896         #  @ref swig_GetSharedShapes "Example"
4897         @ManageTransactions("ShapesOp")
4898         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4899             """
4900             Get all sub-shapes, shared by all shapes in the list theShapes.
4901
4902             Parameters:
4903                 theShapes Either a list or compound of shapes to find common sub-shapes of.
4904                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4905                 theName Object name; when specified, this parameter is used
4906                         for result publication in the study. Otherwise, if automatic
4907                         publication is switched on, default value is used for result name.
4908
4909             Returns:
4910                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4911             """
4912             # Example: see GEOM_TestOthers.py
4913             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType)
4914             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4915             self._autoPublish(aList, theName, "shared")
4916             return aList
4917
4918         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4919         #  situated relatively the specified plane by the certain way,
4920         #  defined through <VAR>theState</VAR> parameter.
4921         #  @param theShape Shape to find sub-shapes of.
4922         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4923         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4924         #                direction and location of the plane to find shapes on.
4925         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4926         #  @param theName Object name; when specified, this parameter is used
4927         #         for result publication in the study. Otherwise, if automatic
4928         #         publication is switched on, default value is used for result name.
4929         #
4930         #  @return List of all found sub-shapes.
4931         #
4932         #  @ref swig_GetShapesOnPlane "Example"
4933         @ManageTransactions("ShapesOp")
4934         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4935             """
4936             Find in theShape all sub-shapes of type theShapeType,
4937             situated relatively the specified plane by the certain way,
4938             defined through theState parameter.
4939
4940             Parameters:
4941                 theShape Shape to find sub-shapes of.
4942                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4943                 theAx1 Vector (or line, or linear edge), specifying normal
4944                        direction and location of the plane to find shapes on.
4945                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4946                 theName Object name; when specified, this parameter is used
4947                         for result publication in the study. Otherwise, if automatic
4948                         publication is switched on, default value is used for result name.
4949
4950             Returns:
4951                 List of all found sub-shapes.
4952             """
4953             # Example: see GEOM_TestOthers.py
4954             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4955             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4956             self._autoPublish(aList, theName, "shapeOnPlane")
4957             return aList
4958
4959         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4960         #  situated relatively the specified plane by the certain way,
4961         #  defined through <VAR>theState</VAR> parameter.
4962         #  @param theShape Shape to find sub-shapes of.
4963         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4964         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4965         #                direction and location of the plane to find shapes on.
4966         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4967         #
4968         #  @return List of all found sub-shapes indices.
4969         #
4970         #  @ref swig_GetShapesOnPlaneIDs "Example"
4971         @ManageTransactions("ShapesOp")
4972         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4973             """
4974             Find in theShape all sub-shapes of type theShapeType,
4975             situated relatively the specified plane by the certain way,
4976             defined through theState parameter.
4977
4978             Parameters:
4979                 theShape Shape to find sub-shapes of.
4980                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4981                 theAx1 Vector (or line, or linear edge), specifying normal
4982                        direction and location of the plane to find shapes on.
4983                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4984
4985             Returns:
4986                 List of all found sub-shapes indices.
4987             """
4988             # Example: see GEOM_TestOthers.py
4989             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4990             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4991             return aList
4992
4993         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4994         #  situated relatively the specified plane by the certain way,
4995         #  defined through <VAR>theState</VAR> parameter.
4996         #  @param theShape Shape to find sub-shapes of.
4997         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4998         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4999         #                direction of the plane to find shapes on.
5000         #  @param thePnt Point specifying location of the plane to find shapes on.
5001         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5002         #  @param theName Object name; when specified, this parameter is used
5003         #         for result publication in the study. Otherwise, if automatic
5004         #         publication is switched on, default value is used for result name.
5005         #
5006         #  @return List of all found sub-shapes.
5007         #
5008         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5009         @ManageTransactions("ShapesOp")
5010         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
5011             """
5012             Find in theShape all sub-shapes of type theShapeType,
5013             situated relatively the specified plane by the certain way,
5014             defined through theState parameter.
5015
5016             Parameters:
5017                 theShape Shape to find sub-shapes of.
5018                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5019                 theAx1 Vector (or line, or linear edge), specifying normal
5020                        direction and location of the plane to find shapes on.
5021                 thePnt Point specifying location of the plane to find shapes on.
5022                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5023                 theName Object name; when specified, this parameter is used
5024                         for result publication in the study. Otherwise, if automatic
5025                         publication is switched on, default value is used for result name.
5026
5027             Returns:
5028                 List of all found sub-shapes.
5029             """
5030             # Example: see GEOM_TestOthers.py
5031             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5032                                                                theAx1, thePnt, theState)
5033             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5034             self._autoPublish(aList, theName, "shapeOnPlane")
5035             return aList
5036
5037         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5038         #  situated relatively the specified plane by the certain way,
5039         #  defined through <VAR>theState</VAR> parameter.
5040         #  @param theShape Shape to find sub-shapes of.
5041         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5042         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5043         #                direction of the plane to find shapes on.
5044         #  @param thePnt Point specifying location of the plane to find shapes on.
5045         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5046         #
5047         #  @return List of all found sub-shapes indices.
5048         #
5049         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5050         @ManageTransactions("ShapesOp")
5051         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5052             """
5053             Find in theShape all sub-shapes of type theShapeType,
5054             situated relatively the specified plane by the certain way,
5055             defined through theState parameter.
5056
5057             Parameters:
5058                 theShape Shape to find sub-shapes of.
5059                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5060                 theAx1 Vector (or line, or linear edge), specifying normal
5061                        direction and location of the plane to find shapes on.
5062                 thePnt Point specifying location of the plane to find shapes on.
5063                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5064
5065             Returns:
5066                 List of all found sub-shapes indices.
5067             """
5068             # Example: see GEOM_TestOthers.py
5069             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5070                                                                   theAx1, thePnt, theState)
5071             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5072             return aList
5073
5074         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5075         #  the specified cylinder by the certain way, defined through \a theState parameter.
5076         #  @param theShape Shape to find sub-shapes of.
5077         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5078         #  @param theAxis Vector (or line, or linear edge), specifying
5079         #                 axis of the cylinder to find shapes on.
5080         #  @param theRadius Radius of the cylinder to find shapes on.
5081         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5082         #  @param theName Object name; when specified, this parameter is used
5083         #         for result publication in the study. Otherwise, if automatic
5084         #         publication is switched on, default value is used for result name.
5085         #
5086         #  @return List of all found sub-shapes.
5087         #
5088         #  @ref swig_GetShapesOnCylinder "Example"
5089         @ManageTransactions("ShapesOp")
5090         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5091             """
5092             Find in theShape all sub-shapes of type theShapeType, situated relatively
5093             the specified cylinder by the certain way, defined through theState parameter.
5094
5095             Parameters:
5096                 theShape Shape to find sub-shapes of.
5097                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5098                 theAxis Vector (or line, or linear edge), specifying
5099                         axis of the cylinder to find shapes on.
5100                 theRadius Radius of the cylinder to find shapes on.
5101                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5102                 theName Object name; when specified, this parameter is used
5103                         for result publication in the study. Otherwise, if automatic
5104                         publication is switched on, default value is used for result name.
5105
5106             Returns:
5107                 List of all found sub-shapes.
5108             """
5109             # Example: see GEOM_TestOthers.py
5110             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5111             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5112             self._autoPublish(aList, theName, "shapeOnCylinder")
5113             return aList
5114
5115         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5116         #  the specified cylinder by the certain way, defined through \a theState parameter.
5117         #  @param theShape Shape to find sub-shapes of.
5118         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5119         #  @param theAxis Vector (or line, or linear edge), specifying
5120         #                 axis of the cylinder to find shapes on.
5121         #  @param theRadius Radius of the cylinder to find shapes on.
5122         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5123         #
5124         #  @return List of all found sub-shapes indices.
5125         #
5126         #  @ref swig_GetShapesOnCylinderIDs "Example"
5127         @ManageTransactions("ShapesOp")
5128         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5129             """
5130             Find in theShape all sub-shapes of type theShapeType, situated relatively
5131             the specified cylinder by the certain way, defined through theState parameter.
5132
5133             Parameters:
5134                 theShape Shape to find sub-shapes of.
5135                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5136                 theAxis Vector (or line, or linear edge), specifying
5137                         axis of the cylinder to find shapes on.
5138                 theRadius Radius of the cylinder to find shapes on.
5139                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5140
5141             Returns:
5142                 List of all found sub-shapes indices.
5143             """
5144             # Example: see GEOM_TestOthers.py
5145             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5146             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5147             return aList
5148
5149         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5150         #  the specified cylinder by the certain way, defined through \a theState parameter.
5151         #  @param theShape Shape to find sub-shapes of.
5152         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5153         #  @param theAxis Vector (or line, or linear edge), specifying
5154         #                 axis of the cylinder to find shapes on.
5155         #  @param thePnt Point specifying location of the bottom of the cylinder.
5156         #  @param theRadius Radius of the cylinder to find shapes on.
5157         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5158         #  @param theName Object name; when specified, this parameter is used
5159         #         for result publication in the study. Otherwise, if automatic
5160         #         publication is switched on, default value is used for result name.
5161         #
5162         #  @return List of all found sub-shapes.
5163         #
5164         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5165         @ManageTransactions("ShapesOp")
5166         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5167             """
5168             Find in theShape all sub-shapes of type theShapeType, situated relatively
5169             the specified cylinder by the certain way, defined through theState parameter.
5170
5171             Parameters:
5172                 theShape Shape to find sub-shapes of.
5173                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5174                 theAxis Vector (or line, or linear edge), specifying
5175                         axis of the cylinder to find shapes on.
5176                 theRadius Radius of the cylinder to find shapes on.
5177                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5178                 theName Object name; when specified, this parameter is used
5179                         for result publication in the study. Otherwise, if automatic
5180                         publication is switched on, default value is used for result name.
5181
5182             Returns:
5183                 List of all found sub-shapes.
5184             """
5185             # Example: see GEOM_TestOthers.py
5186             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5187             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5188             self._autoPublish(aList, theName, "shapeOnCylinder")
5189             return aList
5190
5191         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5192         #  the specified cylinder by the certain way, defined through \a theState parameter.
5193         #  @param theShape Shape to find sub-shapes of.
5194         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5195         #  @param theAxis Vector (or line, or linear edge), specifying
5196         #                 axis of the cylinder to find shapes on.
5197         #  @param thePnt Point specifying location of the bottom of the cylinder.
5198         #  @param theRadius Radius of the cylinder to find shapes on.
5199         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5200         #
5201         #  @return List of all found sub-shapes indices
5202         #
5203         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5204         @ManageTransactions("ShapesOp")
5205         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5206             """
5207             Find in theShape all sub-shapes of type theShapeType, situated relatively
5208             the specified cylinder by the certain way, defined through theState parameter.
5209
5210             Parameters:
5211                 theShape Shape to find sub-shapes of.
5212                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5213                 theAxis Vector (or line, or linear edge), specifying
5214                         axis of the cylinder to find shapes on.
5215                 theRadius Radius of the cylinder to find shapes on.
5216                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5217
5218             Returns:
5219                 List of all found sub-shapes indices.
5220             """
5221             # Example: see GEOM_TestOthers.py
5222             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5223             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5224             return aList
5225
5226         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5227         #  the specified sphere by the certain way, defined through \a theState parameter.
5228         #  @param theShape Shape to find sub-shapes of.
5229         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5230         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5231         #  @param theRadius Radius of the sphere to find shapes on.
5232         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5233         #  @param theName Object name; when specified, this parameter is used
5234         #         for result publication in the study. Otherwise, if automatic
5235         #         publication is switched on, default value is used for result name.
5236         #
5237         #  @return List of all found sub-shapes.
5238         #
5239         #  @ref swig_GetShapesOnSphere "Example"
5240         @ManageTransactions("ShapesOp")
5241         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5242             """
5243             Find in theShape all sub-shapes of type theShapeType, situated relatively
5244             the specified sphere by the certain way, defined through theState parameter.
5245
5246             Parameters:
5247                 theShape Shape to find sub-shapes of.
5248                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5249                 theCenter Point, specifying center of the sphere to find shapes on.
5250                 theRadius Radius of the sphere to find shapes on.
5251                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5252                 theName Object name; when specified, this parameter is used
5253                         for result publication in the study. Otherwise, if automatic
5254                         publication is switched on, default value is used for result name.
5255
5256             Returns:
5257                 List of all found sub-shapes.
5258             """
5259             # Example: see GEOM_TestOthers.py
5260             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5261             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5262             self._autoPublish(aList, theName, "shapeOnSphere")
5263             return aList
5264
5265         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5266         #  the specified sphere by the certain way, defined through \a theState parameter.
5267         #  @param theShape Shape to find sub-shapes of.
5268         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5269         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5270         #  @param theRadius Radius of the sphere to find shapes on.
5271         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5272         #
5273         #  @return List of all found sub-shapes indices.
5274         #
5275         #  @ref swig_GetShapesOnSphereIDs "Example"
5276         @ManageTransactions("ShapesOp")
5277         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5278             """
5279             Find in theShape all sub-shapes of type theShapeType, situated relatively
5280             the specified sphere by the certain way, defined through theState parameter.
5281
5282             Parameters:
5283                 theShape Shape to find sub-shapes of.
5284                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5285                 theCenter Point, specifying center of the sphere to find shapes on.
5286                 theRadius Radius of the sphere to find shapes on.
5287                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5288
5289             Returns:
5290                 List of all found sub-shapes indices.
5291             """
5292             # Example: see GEOM_TestOthers.py
5293             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5294             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5295             return aList
5296
5297         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5298         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5299         #  @param theShape Shape to find sub-shapes of.
5300         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5301         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5302         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5303         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5304         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5305         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5306         #  @param theName Object name; when specified, this parameter is used
5307         #         for result publication in the study. Otherwise, if automatic
5308         #         publication is switched on, default value is used for result name.
5309         #
5310         #  @return List of all found sub-shapes.
5311         #
5312         #  @ref swig_GetShapesOnQuadrangle "Example"
5313         @ManageTransactions("ShapesOp")
5314         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5315                                   theTopLeftPoint, theTopRigthPoint,
5316                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5317             """
5318             Find in theShape all sub-shapes of type theShapeType, situated relatively
5319             the specified quadrangle by the certain way, defined through theState parameter.
5320
5321             Parameters:
5322                 theShape Shape to find sub-shapes of.
5323                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5324                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5325                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5326                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5327                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5328                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5329                 theName Object name; when specified, this parameter is used
5330                         for result publication in the study. Otherwise, if automatic
5331                         publication is switched on, default value is used for result name.
5332
5333             Returns:
5334                 List of all found sub-shapes.
5335             """
5336             # Example: see GEOM_TestOthers.py
5337             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5338                                                         theTopLeftPoint, theTopRigthPoint,
5339                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5340             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5341             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5342             return aList
5343
5344         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5345         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5346         #  @param theShape Shape to find sub-shapes of.
5347         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5348         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5349         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5350         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5351         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5352         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5353         #
5354         #  @return List of all found sub-shapes indices.
5355         #
5356         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5357         @ManageTransactions("ShapesOp")
5358         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5359                                      theTopLeftPoint, theTopRigthPoint,
5360                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5361             """
5362             Find in theShape all sub-shapes of type theShapeType, situated relatively
5363             the specified quadrangle by the certain way, defined through theState parameter.
5364
5365             Parameters:
5366                 theShape Shape to find sub-shapes of.
5367                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5368                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5369                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5370                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5371                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5372                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5373
5374             Returns:
5375                 List of all found sub-shapes indices.
5376             """
5377
5378             # Example: see GEOM_TestOthers.py
5379             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5380                                                            theTopLeftPoint, theTopRigthPoint,
5381                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5382             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5383             return aList
5384
5385         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5386         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5387         #  @param theBox Shape for relative comparing.
5388         #  @param theShape Shape to find sub-shapes of.
5389         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5390         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5391         #  @param theName Object name; when specified, this parameter is used
5392         #         for result publication in the study. Otherwise, if automatic
5393         #         publication is switched on, default value is used for result name.
5394         #
5395         #  @return List of all found sub-shapes.
5396         #
5397         #  @ref swig_GetShapesOnBox "Example"
5398         @ManageTransactions("ShapesOp")
5399         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5400             """
5401             Find in theShape all sub-shapes of type theShapeType, situated relatively
5402             the specified theBox by the certain way, defined through theState parameter.
5403
5404             Parameters:
5405                 theBox Shape for relative comparing.
5406                 theShape Shape to find sub-shapes of.
5407                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5408                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5409                 theName Object name; when specified, this parameter is used
5410                         for result publication in the study. Otherwise, if automatic
5411                         publication is switched on, default value is used for result name.
5412
5413             Returns:
5414                 List of all found sub-shapes.
5415             """
5416             # Example: see GEOM_TestOthers.py
5417             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5418             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5419             self._autoPublish(aList, theName, "shapeOnBox")
5420             return aList
5421
5422         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5423         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5424         #  @param theBox Shape for relative comparing.
5425         #  @param theShape Shape to find sub-shapes of.
5426         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5427         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5428         #
5429         #  @return List of all found sub-shapes indices.
5430         #
5431         #  @ref swig_GetShapesOnBoxIDs "Example"
5432         @ManageTransactions("ShapesOp")
5433         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5434             """
5435             Find in theShape all sub-shapes of type theShapeType, situated relatively
5436             the specified theBox by the certain way, defined through theState parameter.
5437
5438             Parameters:
5439                 theBox Shape for relative comparing.
5440                 theShape Shape to find sub-shapes of.
5441                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5442                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5443
5444             Returns:
5445                 List of all found sub-shapes indices.
5446             """
5447             # Example: see GEOM_TestOthers.py
5448             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5449             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5450             return aList
5451
5452         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5453         #  situated relatively the specified \a theCheckShape by the
5454         #  certain way, defined through \a theState parameter.
5455         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5456         #  @param theShape Shape to find sub-shapes of.
5457         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5458         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5459         #  @param theName Object name; when specified, this parameter is used
5460         #         for result publication in the study. Otherwise, if automatic
5461         #         publication is switched on, default value is used for result name.
5462         #
5463         #  @return List of all found sub-shapes.
5464         #
5465         #  @ref swig_GetShapesOnShape "Example"
5466         @ManageTransactions("ShapesOp")
5467         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5468             """
5469             Find in theShape all sub-shapes of type theShapeType,
5470             situated relatively the specified theCheckShape by the
5471             certain way, defined through theState parameter.
5472
5473             Parameters:
5474                 theCheckShape Shape for relative comparing. It must be a solid.
5475                 theShape Shape to find sub-shapes of.
5476                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5477                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5478                 theName Object name; when specified, this parameter is used
5479                         for result publication in the study. Otherwise, if automatic
5480                         publication is switched on, default value is used for result name.
5481
5482             Returns:
5483                 List of all found sub-shapes.
5484             """
5485             # Example: see GEOM_TestOthers.py
5486             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5487                                                    theShapeType, theState)
5488             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5489             self._autoPublish(aList, theName, "shapeOnShape")
5490             return aList
5491
5492         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5493         #  situated relatively the specified \a theCheckShape by the
5494         #  certain way, defined through \a theState parameter.
5495         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5496         #  @param theShape Shape to find sub-shapes of.
5497         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5498         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5499         #  @param theName Object name; when specified, this parameter is used
5500         #         for result publication in the study. Otherwise, if automatic
5501         #         publication is switched on, default value is used for result name.
5502         #
5503         #  @return All found sub-shapes as compound.
5504         #
5505         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5506         @ManageTransactions("ShapesOp")
5507         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5508             """
5509             Find in theShape all sub-shapes of type theShapeType,
5510             situated relatively the specified theCheckShape by the
5511             certain way, defined through theState parameter.
5512
5513             Parameters:
5514                 theCheckShape Shape for relative comparing. It must be a solid.
5515                 theShape Shape to find sub-shapes of.
5516                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5517                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5518                 theName Object name; when specified, this parameter is used
5519                         for result publication in the study. Otherwise, if automatic
5520                         publication is switched on, default value is used for result name.
5521
5522             Returns:
5523                 All found sub-shapes as compound.
5524             """
5525             # Example: see GEOM_TestOthers.py
5526             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5527                                                              theShapeType, theState)
5528             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5529             self._autoPublish(anObj, theName, "shapeOnShape")
5530             return anObj
5531
5532         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5533         #  situated relatively the specified \a theCheckShape by the
5534         #  certain way, defined through \a theState parameter.
5535         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5536         #  @param theShape Shape to find sub-shapes of.
5537         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5538         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5539         #
5540         #  @return List of all found sub-shapes indices.
5541         #
5542         #  @ref swig_GetShapesOnShapeIDs "Example"
5543         @ManageTransactions("ShapesOp")
5544         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5545             """
5546             Find in theShape all sub-shapes of type theShapeType,
5547             situated relatively the specified theCheckShape by the
5548             certain way, defined through theState parameter.
5549
5550             Parameters:
5551                 theCheckShape Shape for relative comparing. It must be a solid.
5552                 theShape Shape to find sub-shapes of.
5553                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5554                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5555
5556             Returns:
5557                 List of all found sub-shapes indices.
5558             """
5559             # Example: see GEOM_TestOthers.py
5560             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5561                                                       theShapeType, theState)
5562             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5563             return aList
5564
5565         ## Get sub-shape(s) of theShapeWhere, which are
5566         #  coincident with \a theShapeWhat or could be a part of it.
5567         #  @param theShapeWhere Shape to find sub-shapes of.
5568         #  @param theShapeWhat Shape, specifying what to find.
5569         #  @param isNewImplementation implementation of GetInPlace functionality
5570         #             (default = False, old alghorithm based on shape properties)
5571         #  @param theName Object name; when specified, this parameter is used
5572         #         for result publication in the study. Otherwise, if automatic
5573         #         publication is switched on, default value is used for result name.
5574         #
5575         #  @return Group of all found sub-shapes or a single found sub-shape.
5576         #
5577         #  @note This function has a restriction on argument shapes.
5578         #        If \a theShapeWhere has curved parts with significantly
5579         #        outstanding centres (i.e. the mass centre of a part is closer to
5580         #        \a theShapeWhat than to the part), such parts will not be found.
5581         #        @image html get_in_place_lost_part.png
5582         #
5583         #  @ref swig_GetInPlace "Example"
5584         @ManageTransactions("ShapesOp")
5585         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5586             """
5587             Get sub-shape(s) of theShapeWhere, which are
5588             coincident with  theShapeWhat or could be a part of it.
5589
5590             Parameters:
5591                 theShapeWhere Shape to find sub-shapes of.
5592                 theShapeWhat Shape, specifying what to find.
5593                 isNewImplementation Implementation of GetInPlace functionality
5594                                     (default = False, old alghorithm based on shape properties)
5595                 theName Object name; when specified, this parameter is used
5596                         for result publication in the study. Otherwise, if automatic
5597                         publication is switched on, default value is used for result name.
5598
5599             Returns:
5600                 Group of all found sub-shapes or a single found sub-shape.
5601
5602
5603             Note:
5604                 This function has a restriction on argument shapes.
5605                 If theShapeWhere has curved parts with significantly
5606                 outstanding centres (i.e. the mass centre of a part is closer to
5607                 theShapeWhat than to the part), such parts will not be found.
5608             """
5609             # Example: see GEOM_TestOthers.py
5610             anObj = None
5611             if isNewImplementation:
5612                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5613             else:
5614                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5615                 pass
5616             RaiseIfFailed("GetInPlace", self.ShapesOp)
5617             self._autoPublish(anObj, theName, "inplace")
5618             return anObj
5619
5620         ## Get sub-shape(s) of \a theShapeWhere, which are
5621         #  coincident with \a theShapeWhat or could be a part of it.
5622         #
5623         #  Implementation of this method is based on a saved history of an operation,
5624         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5625         #  arguments (an argument shape or a sub-shape of an argument shape).
5626         #  The operation could be the Partition or one of boolean operations,
5627         #  performed on simple shapes (not on compounds).
5628         #
5629         #  @param theShapeWhere Shape to find sub-shapes of.
5630         #  @param theShapeWhat Shape, specifying what to find (must be in the
5631         #                      building history of the ShapeWhere).
5632         #  @param theName Object name; when specified, this parameter is used
5633         #         for result publication in the study. Otherwise, if automatic
5634         #         publication is switched on, default value is used for result name.
5635         #
5636         #  @return Group of all found sub-shapes or a single found sub-shape.
5637         #
5638         #  @ref swig_GetInPlace "Example"
5639         @ManageTransactions("ShapesOp")
5640         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5641             """
5642             Implementation of this method is based on a saved history of an operation,
5643             produced theShapeWhere. The theShapeWhat must be among this operation's
5644             arguments (an argument shape or a sub-shape of an argument shape).
5645             The operation could be the Partition or one of boolean operations,
5646             performed on simple shapes (not on compounds).
5647
5648             Parameters:
5649                 theShapeWhere Shape to find sub-shapes of.
5650                 theShapeWhat Shape, specifying what to find (must be in the
5651                                 building history of the ShapeWhere).
5652                 theName Object name; when specified, this parameter is used
5653                         for result publication in the study. Otherwise, if automatic
5654                         publication is switched on, default value is used for result name.
5655
5656             Returns:
5657                 Group of all found sub-shapes or a single found sub-shape.
5658             """
5659             # Example: see GEOM_TestOthers.py
5660             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5661             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5662             self._autoPublish(anObj, theName, "inplace")
5663             return anObj
5664
5665         ## Get sub-shape of theShapeWhere, which is
5666         #  equal to \a theShapeWhat.
5667         #  @param theShapeWhere Shape to find sub-shape of.
5668         #  @param theShapeWhat Shape, specifying what to find.
5669         #  @param theName Object name; when specified, this parameter is used
5670         #         for result publication in the study. Otherwise, if automatic
5671         #         publication is switched on, default value is used for result name.
5672         #
5673         #  @return New GEOM.GEOM_Object for found sub-shape.
5674         #
5675         #  @ref swig_GetSame "Example"
5676         @ManageTransactions("ShapesOp")
5677         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5678             """
5679             Get sub-shape of theShapeWhere, which is
5680             equal to theShapeWhat.
5681
5682             Parameters:
5683                 theShapeWhere Shape to find sub-shape of.
5684                 theShapeWhat Shape, specifying what to find.
5685                 theName Object name; when specified, this parameter is used
5686                         for result publication in the study. Otherwise, if automatic
5687                         publication is switched on, default value is used for result name.
5688
5689             Returns:
5690                 New GEOM.GEOM_Object for found sub-shape.
5691             """
5692             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5693             RaiseIfFailed("GetSame", self.ShapesOp)
5694             self._autoPublish(anObj, theName, "sameShape")
5695             return anObj
5696
5697
5698         ## Get sub-shape indices of theShapeWhere, which is
5699         #  equal to \a theShapeWhat.
5700         #  @param theShapeWhere Shape to find sub-shape of.
5701         #  @param theShapeWhat Shape, specifying what to find.
5702         #  @return List of all found sub-shapes indices.
5703         #
5704         #  @ref swig_GetSame "Example"
5705         @ManageTransactions("ShapesOp")
5706         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5707             """
5708             Get sub-shape indices of theShapeWhere, which is
5709             equal to theShapeWhat.
5710
5711             Parameters:
5712                 theShapeWhere Shape to find sub-shape of.
5713                 theShapeWhat Shape, specifying what to find.
5714
5715             Returns:
5716                 List of all found sub-shapes indices.
5717             """
5718             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5719             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5720             return anObj
5721
5722         ## Resize the input edge with the new Min and Max parameters.
5723         #  The input edge parameters range is [0, 1]. If theMin parameter is
5724         #  negative, the input edge is extended, otherwise it is shrinked by
5725         #  theMin parameter. If theMax is greater than 1, the edge is extended,
5726         #  otherwise it is shrinked by theMax parameter.
5727         #  @param theEdge the input edge to be resized.
5728         #  @param theMin the minimal parameter value.
5729         #  @param theMax the maximal parameter value.
5730         #  @param theName Object name; when specified, this parameter is used
5731         #         for result publication in the study. Otherwise, if automatic
5732         #         publication is switched on, default value is used for result name.
5733         #  @return New GEOM.GEOM_Object, containing the created edge.
5734         #
5735         #  @ref tui_extend "Example"
5736         @ManageTransactions("ShapesOp")
5737         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
5738             """
5739             Resize the input edge with the new Min and Max parameters.
5740             The input edge parameters range is [0, 1]. If theMin parameter is
5741             negative, the input edge is extended, otherwise it is shrinked by
5742             theMin parameter. If theMax is greater than 1, the edge is extended,
5743             otherwise it is shrinked by theMax parameter.
5744
5745             Parameters:
5746                 theEdge the input edge to be resized.
5747                 theMin the minimal parameter value.
5748                 theMax the maximal parameter value.
5749                 theName Object name; when specified, this parameter is used
5750                         for result publication in the study. Otherwise, if automatic
5751                         publication is switched on, default value is used for result name.
5752
5753             Returns:
5754                 New GEOM.GEOM_Object, containing the created edge.
5755             """
5756             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
5757             RaiseIfFailed("ExtendEdge", self.ShapesOp)
5758             self._autoPublish(anObj, theName, "edge")
5759             return anObj
5760
5761         ## Resize the input face with the new UMin, UMax, VMin and VMax
5762         #  parameters. The input face U and V parameters range is [0, 1]. If
5763         #  theUMin parameter is negative, the input face is extended, otherwise
5764         #  it is shrinked along U direction by theUMin parameter. If theUMax is
5765         #  greater than 1, the face is extended, otherwise it is shrinked along
5766         #  U direction by theUMax parameter. So as for theVMin, theVMax and
5767         #  V direction of the input face.
5768         #  @param theFace the input face to be resized.
5769         #  @param theUMin the minimal U parameter value.
5770         #  @param theUMax the maximal U parameter value.
5771         #  @param theVMin the minimal V parameter value.
5772         #  @param theVMax the maximal V parameter value.
5773         #  @param theName Object name; when specified, this parameter is used
5774         #         for result publication in the study. Otherwise, if automatic
5775         #         publication is switched on, default value is used for result name.
5776         #  @return New GEOM.GEOM_Object, containing the created face.
5777         #
5778         #  @ref tui_extend "Example"
5779         @ManageTransactions("ShapesOp")
5780         def ExtendFace(self, theFace, theUMin, theUMax,
5781                        theVMin, theVMax, theName=None):
5782             """
5783             Resize the input face with the new UMin, UMax, VMin and VMax
5784             parameters. The input face U and V parameters range is [0, 1]. If
5785             theUMin parameter is negative, the input face is extended, otherwise
5786             it is shrinked along U direction by theUMin parameter. If theUMax is
5787             greater than 1, the face is extended, otherwise it is shrinked along
5788             U direction by theUMax parameter. So as for theVMin, theVMax and
5789             V direction of the input face.
5790
5791             Parameters:
5792                 theFace the input face to be resized.
5793                 theUMin the minimal U parameter value.
5794                 theUMax the maximal U parameter value.
5795                 theVMin the minimal V parameter value.
5796                 theVMax the maximal V parameter value.
5797                 theName Object name; when specified, this parameter is used
5798                         for result publication in the study. Otherwise, if automatic
5799                         publication is switched on, default value is used for result name.
5800
5801             Returns:
5802                 New GEOM.GEOM_Object, containing the created face.
5803             """
5804             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
5805                                              theVMin, theVMax)
5806             RaiseIfFailed("ExtendFace", self.ShapesOp)
5807             self._autoPublish(anObj, theName, "face")
5808             return anObj
5809
5810         ## This function takes some face as input parameter and creates new
5811         #  GEOM_Object, i.e. topological shape by extracting underlying surface
5812         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
5813         #  parameters of the source face (in the parametrical space).
5814         #  @param theFace the input face.
5815         #  @param theName Object name; when specified, this parameter is used
5816         #         for result publication in the study. Otherwise, if automatic
5817         #         publication is switched on, default value is used for result name.
5818         #  @return New GEOM.GEOM_Object, containing the created face.
5819         #
5820         #  @ref tui_creation_surface "Example"
5821         @ManageTransactions("ShapesOp")
5822         def MakeSurfaceFromFace(self, theFace, theName=None):
5823             """
5824             This function takes some face as input parameter and creates new
5825             GEOM_Object, i.e. topological shape by extracting underlying surface
5826             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
5827             parameters of the source face (in the parametrical space).
5828
5829             Parameters:
5830                 theFace the input face.
5831                 theName Object name; when specified, this parameter is used
5832                         for result publication in the study. Otherwise, if automatic
5833                         publication is switched on, default value is used for result name.
5834
5835             Returns:
5836                 New GEOM.GEOM_Object, containing the created face.
5837             """
5838             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
5839             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
5840             self._autoPublish(anObj, theName, "surface")
5841             return anObj
5842
5843         # end of l4_obtain
5844         ## @}
5845
5846         ## @addtogroup l4_access
5847         ## @{
5848
5849         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5850         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5851         #  @param aShape Shape to get sub-shape of.
5852         #  @param ListOfID List of sub-shapes indices.
5853         #  @param theName Object name; when specified, this parameter is used
5854         #         for result publication in the study. Otherwise, if automatic
5855         #         publication is switched on, default value is used for result name.
5856         #
5857         #  @return Found sub-shape.
5858         #
5859         #  @ref swig_all_decompose "Example"
5860         def GetSubShape(self, aShape, ListOfID, theName=None):
5861             """
5862             Obtain a composite sub-shape of aShape, composed from sub-shapes
5863             of aShape, selected by their unique IDs inside aShape
5864
5865             Parameters:
5866                 aShape Shape to get sub-shape of.
5867                 ListOfID List of sub-shapes indices.
5868                 theName Object name; when specified, this parameter is used
5869                         for result publication in the study. Otherwise, if automatic
5870                         publication is switched on, default value is used for result name.
5871
5872             Returns:
5873                 Found sub-shape.
5874             """
5875             # Example: see GEOM_TestAll.py
5876             anObj = self.AddSubShape(aShape,ListOfID)
5877             self._autoPublish(anObj, theName, "subshape")
5878             return anObj
5879
5880         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5881         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5882         #  @param aShape Shape to get sub-shape of.
5883         #  @param aSubShape Sub-shapes of aShape.
5884         #  @return ID of found sub-shape.
5885         #
5886         #  @ref swig_all_decompose "Example"
5887         @ManageTransactions("LocalOp")
5888         def GetSubShapeID(self, aShape, aSubShape):
5889             """
5890             Obtain unique ID of sub-shape aSubShape inside aShape
5891             of aShape, selected by their unique IDs inside aShape
5892
5893             Parameters:
5894                aShape Shape to get sub-shape of.
5895                aSubShape Sub-shapes of aShape.
5896
5897             Returns:
5898                ID of found sub-shape.
5899             """
5900             # Example: see GEOM_TestAll.py
5901             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5902             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5903             return anID
5904
5905         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5906         #  This function is provided for performance purpose. The complexity is O(n) with n
5907         #  the number of subobjects of aShape
5908         #  @param aShape Shape to get sub-shape of.
5909         #  @param aSubShapes Sub-shapes of aShape.
5910         #  @return list of IDs of found sub-shapes.
5911         #
5912         #  @ref swig_all_decompose "Example"
5913         @ManageTransactions("ShapesOp")
5914         def GetSubShapesIDs(self, aShape, aSubShapes):
5915             """
5916             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5917             This function is provided for performance purpose. The complexity is O(n) with n
5918             the number of subobjects of aShape
5919
5920             Parameters:
5921                aShape Shape to get sub-shape of.
5922                aSubShapes Sub-shapes of aShape.
5923
5924             Returns:
5925                List of IDs of found sub-shape.
5926             """
5927             # Example: see GEOM_TestAll.py
5928             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5929             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5930             return anIDs
5931
5932         # end of l4_access
5933         ## @}
5934
5935         ## @addtogroup l4_decompose
5936         ## @{
5937
5938         ## Get all sub-shapes and groups of \a theShape,
5939         #  that were created already by any other methods.
5940         #  @param theShape Any shape.
5941         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5942         #                       returned, else all found sub-shapes and groups.
5943         #  @return List of existing sub-objects of \a theShape.
5944         #
5945         #  @ref swig_all_decompose "Example"
5946         @ManageTransactions("ShapesOp")
5947         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5948             """
5949             Get all sub-shapes and groups of theShape,
5950             that were created already by any other methods.
5951
5952             Parameters:
5953                 theShape Any shape.
5954                 theGroupsOnly If this parameter is TRUE, only groups will be
5955                                  returned, else all found sub-shapes and groups.
5956
5957             Returns:
5958                 List of existing sub-objects of theShape.
5959             """
5960             # Example: see GEOM_TestAll.py
5961             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5962             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5963             return ListObj
5964
5965         ## Get all groups of \a theShape,
5966         #  that were created already by any other methods.
5967         #  @param theShape Any shape.
5968         #  @return List of existing groups of \a theShape.
5969         #
5970         #  @ref swig_all_decompose "Example"
5971         @ManageTransactions("ShapesOp")
5972         def GetGroups(self, theShape):
5973             """
5974             Get all groups of theShape,
5975             that were created already by any other methods.
5976
5977             Parameters:
5978                 theShape Any shape.
5979
5980             Returns:
5981                 List of existing groups of theShape.
5982             """
5983             # Example: see GEOM_TestAll.py
5984             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5985             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5986             return ListObj
5987
5988         ## Explode a shape on sub-shapes of a given type.
5989         #  If the shape itself matches the type, it is also returned.
5990         #  @param aShape Shape to be exploded.
5991         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5992         #  @param theName Object name; when specified, this parameter is used
5993         #         for result publication in the study. Otherwise, if automatic
5994         #         publication is switched on, default value is used for result name.
5995         #
5996         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5997         #
5998         #  @ref swig_all_decompose "Example"
5999         @ManageTransactions("ShapesOp")
6000         def SubShapeAll(self, aShape, aType, theName=None):
6001             """
6002             Explode a shape on sub-shapes of a given type.
6003             If the shape itself matches the type, it is also returned.
6004
6005             Parameters:
6006                 aShape Shape to be exploded.
6007                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6008                 theName Object name; when specified, this parameter is used
6009                         for result publication in the study. Otherwise, if automatic
6010                         publication is switched on, default value is used for result name.
6011
6012             Returns:
6013                 List of sub-shapes of type theShapeType, contained in theShape.
6014             """
6015             # Example: see GEOM_TestAll.py
6016             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6017             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6018             self._autoPublish(ListObj, theName, "subshape")
6019             return ListObj
6020
6021         ## Explode a shape on sub-shapes of a given type.
6022         #  @param aShape Shape to be exploded.
6023         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6024         #  @return List of IDs of sub-shapes.
6025         #
6026         #  @ref swig_all_decompose "Example"
6027         @ManageTransactions("ShapesOp")
6028         def SubShapeAllIDs(self, aShape, aType):
6029             """
6030             Explode a shape on sub-shapes of a given type.
6031
6032             Parameters:
6033                 aShape Shape to be exploded (see geompy.ShapeType)
6034                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6035
6036             Returns:
6037                 List of IDs of sub-shapes.
6038             """
6039             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6040             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6041             return ListObj
6042
6043         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6044         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6045         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6046         #  @param aShape Shape to get sub-shape of.
6047         #  @param ListOfInd List of sub-shapes indices.
6048         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6049         #  @param theName Object name; when specified, this parameter is used
6050         #         for result publication in the study. Otherwise, if automatic
6051         #         publication is switched on, default value is used for result name.
6052         #
6053         #  @return A compound of sub-shapes of aShape.
6054         #
6055         #  @ref swig_all_decompose "Example"
6056         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6057             """
6058             Obtain a compound of sub-shapes of aShape,
6059             selected by their indices in list of all sub-shapes of type aType.
6060             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6061
6062             Parameters:
6063                 aShape Shape to get sub-shape of.
6064                 ListOfID List of sub-shapes indices.
6065                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6066                 theName Object name; when specified, this parameter is used
6067                         for result publication in the study. Otherwise, if automatic
6068                         publication is switched on, default value is used for result name.
6069
6070             Returns:
6071                 A compound of sub-shapes of aShape.
6072             """
6073             # Example: see GEOM_TestAll.py
6074             ListOfIDs = []
6075             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6076             for ind in ListOfInd:
6077                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6078             # note: auto-publishing is done in self.GetSubShape()
6079             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6080             return anObj
6081
6082         ## Explode a shape on sub-shapes of a given type.
6083         #  Sub-shapes will be sorted taking into account their gravity centers,
6084         #  to provide stable order of sub-shapes.
6085         #  If the shape itself matches the type, it is also returned.
6086         #  @param aShape Shape to be exploded.
6087         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6088         #  @param theName Object name; when specified, this parameter is used
6089         #         for result publication in the study. Otherwise, if automatic
6090         #         publication is switched on, default value is used for result name.
6091         #
6092         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6093         #
6094         #  @ref swig_SubShapeAllSorted "Example"
6095         @ManageTransactions("ShapesOp")
6096         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6097             """
6098             Explode a shape on sub-shapes of a given type.
6099             Sub-shapes will be sorted taking into account their gravity centers,
6100             to provide stable order of sub-shapes.
6101             If the shape itself matches the type, it is also returned.
6102
6103             Parameters:
6104                 aShape Shape to be exploded.
6105                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6106                 theName Object name; when specified, this parameter is used
6107                         for result publication in the study. Otherwise, if automatic
6108                         publication is switched on, default value is used for result name.
6109
6110             Returns:
6111                 List of sub-shapes of type theShapeType, contained in theShape.
6112             """
6113             # Example: see GEOM_TestAll.py
6114             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6115             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6116             self._autoPublish(ListObj, theName, "subshape")
6117             return ListObj
6118
6119         ## Explode a shape on sub-shapes of a given type.
6120         #  Sub-shapes will be sorted taking into account their gravity centers,
6121         #  to provide stable order of sub-shapes.
6122         #  @param aShape Shape to be exploded.
6123         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6124         #  @return List of IDs of sub-shapes.
6125         #
6126         #  @ref swig_all_decompose "Example"
6127         @ManageTransactions("ShapesOp")
6128         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6129             """
6130             Explode a shape on sub-shapes of a given type.
6131             Sub-shapes will be sorted taking into account their gravity centers,
6132             to provide stable order of sub-shapes.
6133
6134             Parameters:
6135                 aShape Shape to be exploded.
6136                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6137
6138             Returns:
6139                 List of IDs of sub-shapes.
6140             """
6141             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6142             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6143             return ListIDs
6144
6145         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6146         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6147         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6148         #  @param aShape Shape to get sub-shape of.
6149         #  @param ListOfInd List of sub-shapes indices.
6150         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6151         #  @param theName Object name; when specified, this parameter is used
6152         #         for result publication in the study. Otherwise, if automatic
6153         #         publication is switched on, default value is used for result name.
6154         #
6155         #  @return A compound of sub-shapes of aShape.
6156         #
6157         #  @ref swig_all_decompose "Example"
6158         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6159             """
6160             Obtain a compound of sub-shapes of aShape,
6161             selected by they indices in sorted list of all sub-shapes of type aType.
6162             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6163
6164             Parameters:
6165                 aShape Shape to get sub-shape of.
6166                 ListOfID List of sub-shapes indices.
6167                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6168                 theName Object name; when specified, this parameter is used
6169                         for result publication in the study. Otherwise, if automatic
6170                         publication is switched on, default value is used for result name.
6171
6172             Returns:
6173                 A compound of sub-shapes of aShape.
6174             """
6175             # Example: see GEOM_TestAll.py
6176             ListOfIDs = []
6177             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6178             for ind in ListOfInd:
6179                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6180             # note: auto-publishing is done in self.GetSubShape()
6181             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6182             return anObj
6183
6184         ## Extract shapes (excluding the main shape) of given type.
6185         #  @param aShape The shape.
6186         #  @param aType  The shape type (see ShapeType())
6187         #  @param isSorted Boolean flag to switch sorting on/off.
6188         #  @param theName Object name; when specified, this parameter is used
6189         #         for result publication in the study. Otherwise, if automatic
6190         #         publication is switched on, default value is used for result name.
6191         #
6192         #  @return List of sub-shapes of type aType, contained in aShape.
6193         #
6194         #  @ref swig_FilletChamfer "Example"
6195         @ManageTransactions("ShapesOp")
6196         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6197             """
6198             Extract shapes (excluding the main shape) of given type.
6199
6200             Parameters:
6201                 aShape The shape.
6202                 aType  The shape type (see geompy.ShapeType)
6203                 isSorted Boolean flag to switch sorting on/off.
6204                 theName Object name; when specified, this parameter is used
6205                         for result publication in the study. Otherwise, if automatic
6206                         publication is switched on, default value is used for result name.
6207
6208             Returns:
6209                 List of sub-shapes of type aType, contained in aShape.
6210             """
6211             # Example: see GEOM_TestAll.py
6212             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6213             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6214             self._autoPublish(ListObj, theName, "subshape")
6215             return ListObj
6216
6217         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6218         #  @param aShape Main shape.
6219         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6220         #  @param 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         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6224         #
6225         #  @ref swig_all_decompose "Example"
6226         @ManageTransactions("ShapesOp")
6227         def SubShapes(self, aShape, anIDs, theName=None):
6228             """
6229             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6230
6231             Parameters:
6232                 aShape Main shape.
6233                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6234                 theName Object name; when specified, this parameter is used
6235                         for result publication in the study. Otherwise, if automatic
6236                         publication is switched on, default value is used for result name.
6237
6238             Returns:
6239                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6240             """
6241             # Example: see GEOM_TestAll.py
6242             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6243             RaiseIfFailed("SubShapes", self.ShapesOp)
6244             self._autoPublish(ListObj, theName, "subshape")
6245             return ListObj
6246
6247         # end of l4_decompose
6248         ## @}
6249
6250         ## @addtogroup l4_decompose_d
6251         ## @{
6252
6253         ## Deprecated method
6254         #  It works like SubShapeAllSortedCentres(), but wrongly
6255         #  defines centres of faces, shells and solids.
6256         @ManageTransactions("ShapesOp")
6257         def SubShapeAllSorted(self, aShape, aType, theName=None):
6258             """
6259             Deprecated method
6260             It works like geompy.SubShapeAllSortedCentres, but wrongly
6261             defines centres of faces, shells and solids.
6262             """
6263             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6264             RaiseIfFailed("MakeExplode", self.ShapesOp)
6265             self._autoPublish(ListObj, theName, "subshape")
6266             return ListObj
6267
6268         ## Deprecated method
6269         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6270         #  defines centres of faces, shells and solids.
6271         @ManageTransactions("ShapesOp")
6272         def SubShapeAllSortedIDs(self, aShape, aType):
6273             """
6274             Deprecated method
6275             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6276             defines centres of faces, shells and solids.
6277             """
6278             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6279             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6280             return ListIDs
6281
6282         ## Deprecated method
6283         #  It works like SubShapeSortedCentres(), but has a bug
6284         #  (wrongly defines centres of faces, shells and solids).
6285         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6286             """
6287             Deprecated method
6288             It works like geompy.SubShapeSortedCentres, but has a bug
6289             (wrongly defines centres of faces, shells and solids).
6290             """
6291             ListOfIDs = []
6292             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6293             for ind in ListOfInd:
6294                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6295             # note: auto-publishing is done in self.GetSubShape()
6296             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6297             return anObj
6298
6299         # end of l4_decompose_d
6300         ## @}
6301
6302         ## @addtogroup l3_healing
6303         ## @{
6304
6305         ## Apply a sequence of Shape Healing operators to the given object.
6306         #  @param theShape Shape to be processed.
6307         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6308         #  @param theParameters List of names of parameters
6309         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6310         #  @param theValues List of values of parameters, in the same order
6311         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6312         #  @param theName Object name; when specified, this parameter is used
6313         #         for result publication in the study. Otherwise, if automatic
6314         #         publication is switched on, default value is used for result name.
6315         #
6316         #  <b> Operators and Parameters: </b> \n
6317         #
6318         #  * \b FixShape - corrects invalid shapes. \n
6319         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6320         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6321         #
6322         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6323         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6324         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6325         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6326         #
6327         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6328         #    surfaces in segments using a certain angle. \n
6329         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6330         #    if Angle=180, four if Angle=90, etc). \n
6331         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6332         #
6333         #  * \b SplitClosedFaces - splits closed faces in segments.
6334         #    The number of segments depends on the number of splitting points.\n
6335         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6336         #
6337         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6338         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6339         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6340         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6341         #   This and the previous parameters can take the following values:\n
6342         #   \b Parametric \b Continuity \n
6343         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6344         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6345         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6346         #    ruling out sharp edges).\n
6347         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6348         #       are of the same magnitude).\n
6349         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6350         #    or surfaces (d/du C(u)) are the same at junction. \n
6351         #   \b Geometric \b Continuity \n
6352         #   \b G1: first derivatives are proportional at junction.\n
6353         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6354         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6355         #   \b G2: first and second derivatives are proportional at junction.
6356         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6357         #    continuity requires that the underlying parameterization was continuous as well.
6358         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6359         #
6360         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6361         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6362         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6363         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6364         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6365         #       with the specified parameters.\n
6366         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6367         #       with the specified parameters.\n
6368         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6369         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6370         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6371         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6372         #
6373         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6374         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6375         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6376         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6377         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6378         #
6379         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6380         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6381         #
6382         #
6383         #  @return New GEOM.GEOM_Object, containing processed shape.
6384         #
6385         #  \n @ref tui_shape_processing "Example"
6386         @ManageTransactions("HealOp")
6387         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6388             """
6389             Apply a sequence of Shape Healing operators to the given object.
6390
6391             Parameters:
6392                 theShape Shape to be processed.
6393                 theValues List of values of parameters, in the same order
6394                           as parameters are listed in theParameters list.
6395                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6396                 theParameters List of names of parameters
6397                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6398                 theName Object name; when specified, this parameter is used
6399                         for result publication in the study. Otherwise, if automatic
6400                         publication is switched on, default value is used for result name.
6401
6402                 Operators and Parameters:
6403
6404                  * FixShape - corrects invalid shapes.
6405                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6406                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6407                  * FixFaceSize - removes small faces, such as spots and strips.
6408                      * FixFaceSize.Tolerance - defines minimum possible face size.
6409                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
6410                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6411                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6412                                 in segments using a certain angle.
6413                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6414                                           if Angle=180, four if Angle=90, etc).
6415                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6416                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6417                                       splitting points.
6418                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6419                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6420                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6421                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6422                      * SplitContinuity.CurveContinuity - required continuity for curves.
6423                        This and the previous parameters can take the following values:
6424
6425                        Parametric Continuity:
6426                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6427                                                    coincidental. The curves or surfaces may still meet at an angle,
6428                                                    giving rise to a sharp corner or edge).
6429                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6430                                                    are parallel, ruling out sharp edges).
6431                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6432                                                   or surfaces are of the same magnitude).
6433                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6434                           curves or surfaces (d/du C(u)) are the same at junction.
6435
6436                        Geometric Continuity:
6437                        G1: first derivatives are proportional at junction.
6438                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6439                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6440                        G2: first and second derivatives are proportional at junction. As the names imply,
6441                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6442                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6443                            geometric continuity of order n, but not vice-versa.
6444                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6445                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6446                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6447                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6448                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6449                                                         the specified parameters.
6450                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6451                                                         the specified parameters.
6452                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6453                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6454                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6455                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6456                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6457                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6458                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6459                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6460                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6461                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6462                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6463
6464             Returns:
6465                 New GEOM.GEOM_Object, containing processed shape.
6466
6467             Note: For more information look through SALOME Geometry User's Guide->
6468                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6469             """
6470             # Example: see GEOM_TestHealing.py
6471             theValues,Parameters = ParseList(theValues)
6472             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6473             # To avoid script failure in case of good argument shape
6474             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6475                 return theShape
6476             RaiseIfFailed("ProcessShape", self.HealOp)
6477             for string in (theOperators + theParameters):
6478                 Parameters = ":" + Parameters
6479                 pass
6480             anObj.SetParameters(Parameters)
6481             self._autoPublish(anObj, theName, "healed")
6482             return anObj
6483
6484         ## Remove faces from the given object (shape).
6485         #  @param theObject Shape to be processed.
6486         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6487         #                  removes ALL faces of the given object.
6488         #  @param theName Object name; when specified, this parameter is used
6489         #         for result publication in the study. Otherwise, if automatic
6490         #         publication is switched on, default value is used for result name.
6491         #
6492         #  @return New GEOM.GEOM_Object, containing processed shape.
6493         #
6494         #  @ref tui_suppress_faces "Example"
6495         @ManageTransactions("HealOp")
6496         def SuppressFaces(self, theObject, theFaces, theName=None):
6497             """
6498             Remove faces from the given object (shape).
6499
6500             Parameters:
6501                 theObject Shape to be processed.
6502                 theFaces Indices of faces to be removed, if EMPTY then the method
6503                          removes ALL faces of the given object.
6504                 theName Object name; when specified, this parameter is used
6505                         for result publication in the study. Otherwise, if automatic
6506                         publication is switched on, default value is used for result name.
6507
6508             Returns:
6509                 New GEOM.GEOM_Object, containing processed shape.
6510             """
6511             # Example: see GEOM_TestHealing.py
6512             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6513             RaiseIfFailed("SuppressFaces", self.HealOp)
6514             self._autoPublish(anObj, theName, "suppressFaces")
6515             return anObj
6516
6517         ## Sewing of faces into a single shell.
6518         #  @param ListShape Shapes to be processed.
6519         #  @param theTolerance Required tolerance value.
6520         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6521         #  @param theName Object name; when specified, this parameter is used
6522         #         for result publication in the study. Otherwise, if automatic
6523         #         publication is switched on, default value is used for result name.
6524         #
6525         #  @return New GEOM.GEOM_Object, containing a result shell.
6526         #
6527         #  @ref tui_sewing "Example"
6528         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6529             """
6530             Sewing of faces into a single shell.
6531
6532             Parameters:
6533                 ListShape Shapes to be processed.
6534                 theTolerance Required tolerance value.
6535                 AllowNonManifold Flag that allows non-manifold sewing.
6536                 theName Object name; when specified, this parameter is used
6537                         for result publication in the study. Otherwise, if automatic
6538                         publication is switched on, default value is used for result name.
6539
6540             Returns:
6541                 New GEOM.GEOM_Object, containing containing a result shell.
6542             """
6543             # Example: see GEOM_TestHealing.py
6544             # note: auto-publishing is done in self.Sew()
6545             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
6546             return anObj
6547
6548         ## Sewing of faces into a single shell.
6549         #  @param ListShape Shapes to be processed.
6550         #  @param theTolerance Required tolerance value.
6551         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6552         #  @param theName Object name; when specified, this parameter is used
6553         #         for result publication in the study. Otherwise, if automatic
6554         #         publication is switched on, default value is used for result name.
6555         #
6556         #  @return New GEOM.GEOM_Object, containing a result shell.
6557         @ManageTransactions("HealOp")
6558         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6559             """
6560             Sewing of faces into a single shell.
6561
6562             Parameters:
6563                 ListShape Shapes to be processed.
6564                 theTolerance Required tolerance value.
6565                 AllowNonManifold Flag that allows non-manifold sewing.
6566                 theName Object name; when specified, this parameter is used
6567                         for result publication in the study. Otherwise, if automatic
6568                         publication is switched on, default value is used for result name.
6569
6570             Returns:
6571                 New GEOM.GEOM_Object, containing a result shell.
6572             """
6573             # Example: see MakeSewing() above
6574             theTolerance,Parameters = ParseParameters(theTolerance)
6575             if AllowNonManifold:
6576                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
6577             else:
6578                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
6579             # To avoid script failure in case of good argument shape
6580             # (Fix of test cases geom/bugs11/L7,L8)
6581             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6582                 return anObj
6583             RaiseIfFailed("Sew", self.HealOp)
6584             anObj.SetParameters(Parameters)
6585             self._autoPublish(anObj, theName, "sewed")
6586             return anObj
6587
6588         ## Rebuild the topology of theSolids by removing
6589         #  the faces that are shared by several solids.
6590         #  @param theSolids A compound or a list of solids to be processed.
6591         #  @param theName Object name; when specified, this parameter is used
6592         #         for result publication in the study. Otherwise, if automatic
6593         #         publication is switched on, default value is used for result name.
6594         #
6595         #  @return New GEOM.GEOM_Object, containing processed shape.
6596         #
6597         #  @ref tui_remove_webs "Example"
6598         @ManageTransactions("HealOp")
6599         def RemoveInternalFaces (self, theSolids, theName=None):
6600             """
6601             Rebuild the topology of theSolids by removing
6602             the faces that are shared by several solids.
6603
6604             Parameters:
6605                 theSolids A compound or a list of solids to be processed.
6606                 theName Object name; when specified, this parameter is used
6607                         for result publication in the study. Otherwise, if automatic
6608                         publication is switched on, default value is used for result name.
6609
6610             Returns:
6611                 New GEOM.GEOM_Object, containing processed shape.
6612             """
6613             # Example: see GEOM_TestHealing.py
6614             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
6615             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6616             self._autoPublish(anObj, theName, "removeWebs")
6617             return anObj
6618
6619         ## Remove internal wires and edges from the given object (face).
6620         #  @param theObject Shape to be processed.
6621         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6622         #                  removes ALL internal wires of the given object.
6623         #  @param theName Object name; when specified, this parameter is used
6624         #         for result publication in the study. Otherwise, if automatic
6625         #         publication is switched on, default value is used for result name.
6626         #
6627         #  @return New GEOM.GEOM_Object, containing processed shape.
6628         #
6629         #  @ref tui_suppress_internal_wires "Example"
6630         @ManageTransactions("HealOp")
6631         def SuppressInternalWires(self, theObject, theWires, theName=None):
6632             """
6633             Remove internal wires and edges from the given object (face).
6634
6635             Parameters:
6636                 theObject Shape to be processed.
6637                 theWires Indices of wires to be removed, if EMPTY then the method
6638                          removes ALL internal wires of the given object.
6639                 theName Object name; when specified, this parameter is used
6640                         for result publication in the study. Otherwise, if automatic
6641                         publication is switched on, default value is used for result name.
6642
6643             Returns:
6644                 New GEOM.GEOM_Object, containing processed shape.
6645             """
6646             # Example: see GEOM_TestHealing.py
6647             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6648             RaiseIfFailed("RemoveIntWires", self.HealOp)
6649             self._autoPublish(anObj, theName, "suppressWires")
6650             return anObj
6651
6652         ## Remove internal closed contours (holes) from the given object.
6653         #  @param theObject Shape to be processed.
6654         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6655         #                  removes ALL internal holes of the given object
6656         #  @param theName Object name; when specified, this parameter is used
6657         #         for result publication in the study. Otherwise, if automatic
6658         #         publication is switched on, default value is used for result name.
6659         #
6660         #  @return New GEOM.GEOM_Object, containing processed shape.
6661         #
6662         #  @ref tui_suppress_holes "Example"
6663         @ManageTransactions("HealOp")
6664         def SuppressHoles(self, theObject, theWires, theName=None):
6665             """
6666             Remove internal closed contours (holes) from the given object.
6667
6668             Parameters:
6669                 theObject Shape to be processed.
6670                 theWires Indices of wires to be removed, if EMPTY then the method
6671                          removes ALL internal holes of the given object
6672                 theName Object name; when specified, this parameter is used
6673                         for result publication in the study. Otherwise, if automatic
6674                         publication is switched on, default value is used for result name.
6675
6676             Returns:
6677                 New GEOM.GEOM_Object, containing processed shape.
6678             """
6679             # Example: see GEOM_TestHealing.py
6680             anObj = self.HealOp.FillHoles(theObject, theWires)
6681             RaiseIfFailed("FillHoles", self.HealOp)
6682             self._autoPublish(anObj, theName, "suppressHoles")
6683             return anObj
6684
6685         ## Close an open wire.
6686         #  @param theObject Shape to be processed.
6687         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6688         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6689         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6690         #                        If False : closure by creation of an edge between ends.
6691         #  @param theName Object name; when specified, this parameter is used
6692         #         for result publication in the study. Otherwise, if automatic
6693         #         publication is switched on, default value is used for result name.
6694         #
6695         #  @return New GEOM.GEOM_Object, containing processed shape.
6696         #
6697         #  @ref tui_close_contour "Example"
6698         @ManageTransactions("HealOp")
6699         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6700             """
6701             Close an open wire.
6702
6703             Parameters:
6704                 theObject Shape to be processed.
6705                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6706                          if [ ], then theObject itself is a wire.
6707                 isCommonVertex If True  : closure by creation of a common vertex,
6708                                If False : closure by creation of an edge between ends.
6709                 theName Object name; when specified, this parameter is used
6710                         for result publication in the study. Otherwise, if automatic
6711                         publication is switched on, default value is used for result name.
6712
6713             Returns:
6714                 New GEOM.GEOM_Object, containing processed shape.
6715             """
6716             # Example: see GEOM_TestHealing.py
6717             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6718             RaiseIfFailed("CloseContour", self.HealOp)
6719             self._autoPublish(anObj, theName, "closeContour")
6720             return anObj
6721
6722         ## Addition of a point to a given edge object.
6723         #  @param theObject Shape to be processed.
6724         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6725         #                      if -1, then theObject itself is the edge.
6726         #  @param theValue Value of parameter on edge or length parameter,
6727         #                  depending on \a isByParameter.
6728         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6729         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6730         #  @param theName Object name; when specified, this parameter is used
6731         #         for result publication in the study. Otherwise, if automatic
6732         #         publication is switched on, default value is used for result name.
6733         #
6734         #  @return New GEOM.GEOM_Object, containing processed shape.
6735         #
6736         #  @ref tui_add_point_on_edge "Example"
6737         @ManageTransactions("HealOp")
6738         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6739             """
6740             Addition of a point to a given edge object.
6741
6742             Parameters:
6743                 theObject Shape to be processed.
6744                 theEdgeIndex Index of edge to be divided within theObject's shape,
6745                              if -1, then theObject itself is the edge.
6746                 theValue Value of parameter on edge or length parameter,
6747                          depending on isByParameter.
6748                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6749                               if FALSE : theValue is treated as a length parameter [0..1]
6750                 theName Object name; when specified, this parameter is used
6751                         for result publication in the study. Otherwise, if automatic
6752                         publication is switched on, default value is used for result name.
6753
6754             Returns:
6755                 New GEOM.GEOM_Object, containing processed shape.
6756             """
6757             # Example: see GEOM_TestHealing.py
6758             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6759             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6760             RaiseIfFailed("DivideEdge", self.HealOp)
6761             anObj.SetParameters(Parameters)
6762             self._autoPublish(anObj, theName, "divideEdge")
6763             return anObj
6764
6765         ## Addition of a point to a given edge of \a theObject by projecting
6766         #  another point to the given edge.
6767         #  @param theObject Shape to be processed.
6768         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6769         #                      if -1, then theObject itself is the edge.
6770         #  @param thePoint Point to project to theEdgeIndex-th edge.
6771         #  @param theName Object name; when specified, this parameter is used
6772         #         for result publication in the study. Otherwise, if automatic
6773         #         publication is switched on, default value is used for result name.
6774         #
6775         #  @return New GEOM.GEOM_Object, containing processed shape.
6776         #
6777         #  @ref tui_add_point_on_edge "Example"
6778         @ManageTransactions("HealOp")
6779         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoint, theName=None):
6780             """
6781             Addition of a point to a given edge of \a theObject by projecting
6782             another point to the given edge.
6783
6784             Parameters:
6785                 theObject Shape to be processed.
6786                 theEdgeIndex The edge or its index to be divided within theObject's shape,
6787                              if -1, then theObject itself is the edge.
6788                 thePoint Point to project to theEdgeIndex-th edge.
6789                 theName Object name; when specified, this parameter is used
6790                         for result publication in the study. Otherwise, if automatic
6791                         publication is switched on, default value is used for result name.
6792
6793             Returns:
6794                 New GEOM.GEOM_Object, containing processed shape.
6795             """
6796             # Example: see GEOM_TestHealing.py
6797             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
6798                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
6799             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, thePoint)
6800             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
6801             self._autoPublish(anObj, theName, "divideEdge")
6802             return anObj
6803
6804         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6805         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6806         #  @param theVertices A list of vertices to suppress. If the list
6807         #                     is empty, all vertices in a wire will be assumed.
6808         #  @param theName Object name; when specified, this parameter is used
6809         #         for result publication in the study. Otherwise, if automatic
6810         #         publication is switched on, default value is used for result name.
6811         #
6812         #  @return New GEOM.GEOM_Object with modified wire.
6813         #
6814         #  @ref tui_fuse_collinear_edges "Example"
6815         @ManageTransactions("HealOp")
6816         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6817             """
6818             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6819
6820             Parameters:
6821                 theWire Wire to minimize the number of C1 continuous edges in.
6822                 theVertices A list of vertices to suppress. If the list
6823                             is empty, all vertices in a wire will be assumed.
6824                 theName Object name; when specified, this parameter is used
6825                         for result publication in the study. Otherwise, if automatic
6826                         publication is switched on, default value is used for result name.
6827
6828             Returns:
6829                 New GEOM.GEOM_Object with modified wire.
6830             """
6831             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6832             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6833             self._autoPublish(anObj, theName, "fuseEdges")
6834             return anObj
6835
6836         ## Change orientation of the given object. Updates given shape.
6837         #  @param theObject Shape to be processed.
6838         #  @return Updated <var>theObject</var>
6839         #
6840         #  @ref swig_todo "Example"
6841         @ManageTransactions("HealOp")
6842         def ChangeOrientationShell(self,theObject):
6843             """
6844             Change orientation of the given object. Updates given shape.
6845
6846             Parameters:
6847                 theObject Shape to be processed.
6848
6849             Returns:
6850                 Updated theObject
6851             """
6852             theObject = self.HealOp.ChangeOrientation(theObject)
6853             RaiseIfFailed("ChangeOrientation", self.HealOp)
6854             pass
6855
6856         ## Change orientation of the given object.
6857         #  @param theObject Shape to be processed.
6858         #  @param theName Object name; when specified, this parameter is used
6859         #         for result publication in the study. Otherwise, if automatic
6860         #         publication is switched on, default value is used for result name.
6861         #
6862         #  @return New GEOM.GEOM_Object, containing processed shape.
6863         #
6864         #  @ref swig_todo "Example"
6865         @ManageTransactions("HealOp")
6866         def ChangeOrientationShellCopy(self, theObject, theName=None):
6867             """
6868             Change orientation of the given object.
6869
6870             Parameters:
6871                 theObject Shape to be processed.
6872                 theName Object name; when specified, this parameter is used
6873                         for result publication in the study. Otherwise, if automatic
6874                         publication is switched on, default value is used for result name.
6875
6876             Returns:
6877                 New GEOM.GEOM_Object, containing processed shape.
6878             """
6879             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6880             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6881             self._autoPublish(anObj, theName, "reversed")
6882             return anObj
6883
6884         ## Try to limit tolerance of the given object by value \a theTolerance.
6885         #  @param theObject Shape to be processed.
6886         #  @param theTolerance Required tolerance value.
6887         #  @param theName Object name; when specified, this parameter is used
6888         #         for result publication in the study. Otherwise, if automatic
6889         #         publication is switched on, default value is used for result name.
6890         #
6891         #  @return New GEOM.GEOM_Object, containing processed shape.
6892         #
6893         #  @ref tui_limit_tolerance "Example"
6894         @ManageTransactions("HealOp")
6895         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6896             """
6897             Try to limit tolerance of the given object by value theTolerance.
6898
6899             Parameters:
6900                 theObject Shape to be processed.
6901                 theTolerance Required tolerance value.
6902                 theName Object name; when specified, this parameter is used
6903                         for result publication in the study. Otherwise, if automatic
6904                         publication is switched on, default value is used for result name.
6905
6906             Returns:
6907                 New GEOM.GEOM_Object, containing processed shape.
6908             """
6909             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6910             RaiseIfFailed("LimitTolerance", self.HealOp)
6911             self._autoPublish(anObj, theName, "limitTolerance")
6912             return anObj
6913
6914         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6915         #  that constitute a free boundary of the given shape.
6916         #  @param theObject Shape to get free boundary of.
6917         #  @param 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         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6922         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6923         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6924         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6925         #
6926         #  @ref tui_measurement_tools_page "Example"
6927         @ManageTransactions("HealOp")
6928         def GetFreeBoundary(self, theObject, theName=None):
6929             """
6930             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6931             that constitute a free boundary of the given shape.
6932
6933             Parameters:
6934                 theObject Shape to get free boundary of.
6935                 theName Object name; when specified, this parameter is used
6936                         for result publication in the study. Otherwise, if automatic
6937                         publication is switched on, default value is used for result name.
6938
6939             Returns:
6940                 [status, theClosedWires, theOpenWires]
6941                  status: FALSE, if an error(s) occured during the method execution.
6942                  theClosedWires: Closed wires on the free boundary of the given shape.
6943                  theOpenWires: Open wires on the free boundary of the given shape.
6944             """
6945             # Example: see GEOM_TestHealing.py
6946             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
6947             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6948             self._autoPublish(anObj[1], theName, "closedWire")
6949             self._autoPublish(anObj[2], theName, "openWire")
6950             return anObj
6951
6952         ## Replace coincident faces in \a theShapes by one face.
6953         #  @param theShapes Initial shapes, either a list or compound of shapes.
6954         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6955         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6956         #                         otherwise all initial shapes.
6957         #  @param theName Object name; when specified, this parameter is used
6958         #         for result publication in the study. Otherwise, if automatic
6959         #         publication is switched on, default value is used for result name.
6960         #
6961         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
6962         #
6963         #  @ref tui_glue_faces "Example"
6964         @ManageTransactions("ShapesOp")
6965         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
6966             """
6967             Replace coincident faces in theShapes by one face.
6968
6969             Parameters:
6970                 theShapes Initial shapes, either a list or compound of shapes.
6971                 theTolerance Maximum distance between faces, which can be considered as coincident.
6972                 doKeepNonSolids If FALSE, only solids will present in the result,
6973                                 otherwise all initial shapes.
6974                 theName Object name; when specified, this parameter is used
6975                         for result publication in the study. Otherwise, if automatic
6976                         publication is switched on, default value is used for result name.
6977
6978             Returns:
6979                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
6980             """
6981             # Example: see GEOM_Spanner.py
6982             theTolerance,Parameters = ParseParameters(theTolerance)
6983             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
6984             if anObj is None:
6985                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6986             anObj.SetParameters(Parameters)
6987             self._autoPublish(anObj, theName, "glueFaces")
6988             return anObj
6989
6990         ## Find coincident faces in \a theShapes for possible gluing.
6991         #  @param theShapes Initial shapes, either a list or compound of shapes.
6992         #  @param theTolerance Maximum distance between faces,
6993         #                      which can be considered as coincident.
6994         #  @param theName Object name; when specified, this parameter is used
6995         #         for result publication in the study. Otherwise, if automatic
6996         #         publication is switched on, default value is used for result name.
6997         #
6998         #  @return GEOM.ListOfGO
6999         #
7000         #  @ref tui_glue_faces "Example"
7001         @ManageTransactions("ShapesOp")
7002         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7003             """
7004             Find coincident faces in theShapes for possible gluing.
7005
7006             Parameters:
7007                 theShapes Initial shapes, either a list or compound of shapes.
7008                 theTolerance Maximum distance between faces,
7009                              which can be considered as coincident.
7010                 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             Returns:
7015                 GEOM.ListOfGO
7016             """
7017             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7018             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7019             self._autoPublish(anObj, theName, "facesToGlue")
7020             return anObj
7021
7022         ## Replace coincident faces in \a theShapes by one face
7023         #  in compliance with given list of faces
7024         #  @param theShapes Initial shapes, either a list or compound of shapes.
7025         #  @param theTolerance Maximum distance between faces,
7026         #                      which can be considered as coincident.
7027         #  @param theFaces List of faces for gluing.
7028         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7029         #                         otherwise all initial shapes.
7030         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7031         #                        will be glued, otherwise only the edges,
7032         #                        belonging to <VAR>theFaces</VAR>.
7033         #  @param theName Object name; when specified, this parameter is used
7034         #         for result publication in the study. Otherwise, if automatic
7035         #         publication is switched on, default value is used for result name.
7036         #
7037         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7038         #
7039         #  @ref tui_glue_faces "Example"
7040         @ManageTransactions("ShapesOp")
7041         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7042                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7043             """
7044             Replace coincident faces in theShapes by one face
7045             in compliance with given list of faces
7046
7047             Parameters:
7048                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7049                 theTolerance Maximum distance between faces,
7050                              which can be considered as coincident.
7051                 theFaces List of faces for gluing.
7052                 doKeepNonSolids If FALSE, only solids will present in the result,
7053                                 otherwise all initial shapes.
7054                 doGlueAllEdges If TRUE, all coincident edges of theShape
7055                                will be glued, otherwise only the edges,
7056                                belonging to theFaces.
7057                 theName Object name; when specified, this parameter is used
7058                         for result publication in the study. Otherwise, if automatic
7059                         publication is switched on, default value is used for result name.
7060
7061             Returns:
7062                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7063             """
7064             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, theFaces,
7065                                                       doKeepNonSolids, doGlueAllEdges)
7066             if anObj is None:
7067                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
7068             self._autoPublish(anObj, theName, "glueFaces")
7069             return anObj
7070
7071         ## Replace coincident edges in \a theShapes by one edge.
7072         #  @param theShapes Initial shapes, either a list or compound of shapes.
7073         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7074         #  @param theName Object name; when specified, this parameter is used
7075         #         for result publication in the study. Otherwise, if automatic
7076         #         publication is switched on, default value is used for result name.
7077         #
7078         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7079         #
7080         #  @ref tui_glue_edges "Example"
7081         @ManageTransactions("ShapesOp")
7082         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7083             """
7084             Replace coincident edges in theShapes by one edge.
7085
7086             Parameters:
7087                 theShapes Initial shapes, either a list or compound of shapes.
7088                 theTolerance Maximum distance between edges, which can be considered as coincident.
7089                 theName Object name; when specified, this parameter is used
7090                         for result publication in the study. Otherwise, if automatic
7091                         publication is switched on, default value is used for result name.
7092
7093             Returns:
7094                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7095             """
7096             theTolerance,Parameters = ParseParameters(theTolerance)
7097             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7098             if anObj is None:
7099                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
7100             anObj.SetParameters(Parameters)
7101             self._autoPublish(anObj, theName, "glueEdges")
7102             return anObj
7103
7104         ## Find coincident edges in \a theShapes for possible gluing.
7105         #  @param theShapes Initial shapes, either a list or compound of shapes.
7106         #  @param theTolerance Maximum distance between edges,
7107         #                      which can be considered as coincident.
7108         #  @param theName Object name; when specified, this parameter is used
7109         #         for result publication in the study. Otherwise, if automatic
7110         #         publication is switched on, default value is used for result name.
7111         #
7112         #  @return GEOM.ListOfGO
7113         #
7114         #  @ref tui_glue_edges "Example"
7115         @ManageTransactions("ShapesOp")
7116         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7117             """
7118             Find coincident edges in theShapes for possible gluing.
7119
7120             Parameters:
7121                 theShapes Initial shapes, either a list or compound of shapes.
7122                 theTolerance Maximum distance between edges,
7123                              which can be considered as coincident.
7124                 theName Object name; when specified, this parameter is used
7125                         for result publication in the study. Otherwise, if automatic
7126                         publication is switched on, default value is used for result name.
7127
7128             Returns:
7129                 GEOM.ListOfGO
7130             """
7131             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7132             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7133             self._autoPublish(anObj, theName, "edgesToGlue")
7134             return anObj
7135
7136         ## Replace coincident edges in theShapes by one edge
7137         #  in compliance with given list of edges.
7138         #  @param theShapes Initial shapes, either a list or compound of shapes.
7139         #  @param theTolerance Maximum distance between edges,
7140         #                      which can be considered as coincident.
7141         #  @param theEdges List of edges for gluing.
7142         #  @param theName Object name; when specified, this parameter is used
7143         #         for result publication in the study. Otherwise, if automatic
7144         #         publication is switched on, default value is used for result name.
7145         #
7146         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7147         #
7148         #  @ref tui_glue_edges "Example"
7149         @ManageTransactions("ShapesOp")
7150         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7151             """
7152             Replace coincident edges in theShapes by one edge
7153             in compliance with given list of edges.
7154
7155             Parameters:
7156                 theShapes Initial shapes, either a list or compound of shapes.
7157                 theTolerance Maximum distance between edges,
7158                              which can be considered as coincident.
7159                 theEdges List of edges for gluing.
7160                 theName Object name; when specified, this parameter is used
7161                         for result publication in the study. Otherwise, if automatic
7162                         publication is switched on, default value is used for result name.
7163
7164             Returns:
7165                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7166             """
7167             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7168             if anObj is None:
7169                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
7170             self._autoPublish(anObj, theName, "glueEdges")
7171             return anObj
7172
7173         # end of l3_healing
7174         ## @}
7175
7176         ## @addtogroup l3_boolean Boolean Operations
7177         ## @{
7178
7179         # -----------------------------------------------------------------------------
7180         # Boolean (Common, Cut, Fuse, Section)
7181         # -----------------------------------------------------------------------------
7182
7183         ## Perform one of boolean operations on two given shapes.
7184         #  @param theShape1 First argument for boolean operation.
7185         #  @param theShape2 Second argument for boolean operation.
7186         #  @param theOperation Indicates the operation to be done:\n
7187         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7188         #  @param checkSelfInte The flag that tells if the arguments should
7189         #         be checked for self-intersection prior to the operation.
7190         #  @param theName Object name; when specified, this parameter is used
7191         #         for result publication in the study. Otherwise, if automatic
7192         #         publication is switched on, default value is used for result name.
7193         #
7194         #  @note This algorithm doesn't find all types of self-intersections.
7195         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7196         #        vertex/face and edge/face intersections. Face/face
7197         #        intersections detection is switched off as it is a
7198         #        time-consuming operation that gives an impact on performance.
7199         #        To find all self-intersections please use
7200         #        CheckSelfIntersections() method.
7201         #
7202         #  @return New GEOM.GEOM_Object, containing the result shape.
7203         #
7204         #  @ref tui_fuse "Example"
7205         @ManageTransactions("BoolOp")
7206         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7207             """
7208             Perform one of boolean operations on two given shapes.
7209
7210             Parameters:
7211                 theShape1 First argument for boolean operation.
7212                 theShape2 Second argument for boolean operation.
7213                 theOperation Indicates the operation to be done:
7214                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7215                 checkSelfInte The flag that tells if the arguments should
7216                               be checked for self-intersection prior to
7217                               the operation.
7218                 theName Object name; when specified, this parameter is used
7219                         for result publication in the study. Otherwise, if automatic
7220                         publication is switched on, default value is used for result name.
7221
7222             Note:
7223                     This algorithm doesn't find all types of self-intersections.
7224                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7225                     vertex/face and edge/face intersections. Face/face
7226                     intersections detection is switched off as it is a
7227                     time-consuming operation that gives an impact on performance.
7228                     To find all self-intersections please use
7229                     CheckSelfIntersections() method.
7230
7231             Returns:
7232                 New GEOM.GEOM_Object, containing the result shape.
7233             """
7234             # Example: see GEOM_TestAll.py
7235             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7236             RaiseIfFailed("MakeBoolean", self.BoolOp)
7237             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7238             self._autoPublish(anObj, theName, def_names[theOperation])
7239             return anObj
7240
7241         ## Perform Common boolean operation on two given shapes.
7242         #  @param theShape1 First argument for boolean operation.
7243         #  @param theShape2 Second argument for boolean operation.
7244         #  @param checkSelfInte The flag that tells if the arguments should
7245         #         be checked for self-intersection prior to the operation.
7246         #  @param theName Object name; when specified, this parameter is used
7247         #         for result publication in the study. Otherwise, if automatic
7248         #         publication is switched on, default value is used for result name.
7249         #
7250         #  @note This algorithm doesn't find all types of self-intersections.
7251         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7252         #        vertex/face and edge/face intersections. Face/face
7253         #        intersections detection is switched off as it is a
7254         #        time-consuming operation that gives an impact on performance.
7255         #        To find all self-intersections please use
7256         #        CheckSelfIntersections() method.
7257         #
7258         #  @return New GEOM.GEOM_Object, containing the result shape.
7259         #
7260         #  @ref tui_common "Example 1"
7261         #  \n @ref swig_MakeCommon "Example 2"
7262         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7263             """
7264             Perform Common boolean operation on two given shapes.
7265
7266             Parameters:
7267                 theShape1 First argument for boolean operation.
7268                 theShape2 Second argument for boolean operation.
7269                 checkSelfInte The flag that tells if the arguments should
7270                               be checked for self-intersection prior to
7271                               the operation.
7272                 theName Object name; when specified, this parameter is used
7273                         for result publication in the study. Otherwise, if automatic
7274                         publication is switched on, default value is used for result name.
7275
7276             Note:
7277                     This algorithm doesn't find all types of self-intersections.
7278                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7279                     vertex/face and edge/face intersections. Face/face
7280                     intersections detection is switched off as it is a
7281                     time-consuming operation that gives an impact on performance.
7282                     To find all self-intersections please use
7283                     CheckSelfIntersections() method.
7284
7285             Returns:
7286                 New GEOM.GEOM_Object, containing the result shape.
7287             """
7288             # Example: see GEOM_TestOthers.py
7289             # note: auto-publishing is done in self.MakeBoolean()
7290             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7291
7292         ## Perform Cut boolean operation on two given shapes.
7293         #  @param theShape1 First argument for boolean operation.
7294         #  @param theShape2 Second argument for boolean operation.
7295         #  @param checkSelfInte The flag that tells if the arguments should
7296         #         be checked for self-intersection prior to the operation.
7297         #  @param theName Object name; when specified, this parameter is used
7298         #         for result publication in the study. Otherwise, if automatic
7299         #         publication is switched on, default value is used for result name.
7300         #
7301         #  @note This algorithm doesn't find all types of self-intersections.
7302         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7303         #        vertex/face and edge/face intersections. Face/face
7304         #        intersections detection is switched off as it is a
7305         #        time-consuming operation that gives an impact on performance.
7306         #        To find all self-intersections please use
7307         #        CheckSelfIntersections() method.
7308         #
7309         #  @return New GEOM.GEOM_Object, containing the result shape.
7310         #
7311         #  @ref tui_cut "Example 1"
7312         #  \n @ref swig_MakeCommon "Example 2"
7313         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7314             """
7315             Perform Cut boolean operation on two given shapes.
7316
7317             Parameters:
7318                 theShape1 First argument for boolean operation.
7319                 theShape2 Second argument for boolean operation.
7320                 checkSelfInte The flag that tells if the arguments should
7321                               be checked for self-intersection prior to
7322                               the operation.
7323                 theName Object name; when specified, this parameter is used
7324                         for result publication in the study. Otherwise, if automatic
7325                         publication is switched on, default value is used for result name.
7326
7327             Note:
7328                     This algorithm doesn't find all types of self-intersections.
7329                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7330                     vertex/face and edge/face intersections. Face/face
7331                     intersections detection is switched off as it is a
7332                     time-consuming operation that gives an impact on performance.
7333                     To find all self-intersections please use
7334                     CheckSelfIntersections() method.
7335
7336             Returns:
7337                 New GEOM.GEOM_Object, containing the result shape.
7338
7339             """
7340             # Example: see GEOM_TestOthers.py
7341             # note: auto-publishing is done in self.MakeBoolean()
7342             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7343
7344         ## Perform Fuse boolean operation on two given shapes.
7345         #  @param theShape1 First argument for boolean operation.
7346         #  @param theShape2 Second argument for boolean operation.
7347         #  @param checkSelfInte The flag that tells if the arguments should
7348         #         be checked for self-intersection prior to the operation.
7349         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7350         #         operation should be performed during the operation.
7351         #  @param theName Object name; when specified, this parameter is used
7352         #         for result publication in the study. Otherwise, if automatic
7353         #         publication is switched on, default value is used for result name.
7354         #
7355         #  @note This algorithm doesn't find all types of self-intersections.
7356         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7357         #        vertex/face and edge/face intersections. Face/face
7358         #        intersections detection is switched off as it is a
7359         #        time-consuming operation that gives an impact on performance.
7360         #        To find all self-intersections please use
7361         #        CheckSelfIntersections() method.
7362         #
7363         #  @return New GEOM.GEOM_Object, containing the result shape.
7364         #
7365         #  @ref tui_fuse "Example 1"
7366         #  \n @ref swig_MakeCommon "Example 2"
7367         @ManageTransactions("BoolOp")
7368         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7369                      rmExtraEdges=False, theName=None):
7370             """
7371             Perform Fuse boolean operation on two given shapes.
7372
7373             Parameters:
7374                 theShape1 First argument for boolean operation.
7375                 theShape2 Second argument for boolean operation.
7376                 checkSelfInte The flag that tells if the arguments should
7377                               be checked for self-intersection prior to
7378                               the operation.
7379                 rmExtraEdges The flag that tells if Remove Extra Edges
7380                              operation should be performed during the operation.
7381                 theName Object name; when specified, this parameter is used
7382                         for result publication in the study. Otherwise, if automatic
7383                         publication is switched on, default value is used for result name.
7384
7385             Note:
7386                     This algorithm doesn't find all types of self-intersections.
7387                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7388                     vertex/face and edge/face intersections. Face/face
7389                     intersections detection is switched off as it is a
7390                     time-consuming operation that gives an impact on performance.
7391                     To find all self-intersections please use
7392                     CheckSelfIntersections() method.
7393
7394             Returns:
7395                 New GEOM.GEOM_Object, containing the result shape.
7396
7397             """
7398             # Example: see GEOM_TestOthers.py
7399             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7400                                          checkSelfInte, rmExtraEdges)
7401             RaiseIfFailed("MakeFuse", self.BoolOp)
7402             self._autoPublish(anObj, theName, "fuse")
7403             return anObj
7404
7405         ## Perform Section boolean operation on two given shapes.
7406         #  @param theShape1 First argument for boolean operation.
7407         #  @param theShape2 Second argument for boolean operation.
7408         #  @param checkSelfInte The flag that tells if the arguments should
7409         #         be checked for self-intersection prior to the operation.
7410         #         If a self-intersection detected the operation fails.
7411         #  @param theName Object name; when specified, this parameter is used
7412         #         for result publication in the study. Otherwise, if automatic
7413         #         publication is switched on, default value is used for result name.
7414         #  @return New GEOM.GEOM_Object, containing the result shape.
7415         #
7416         #  @ref tui_section "Example 1"
7417         #  \n @ref swig_MakeCommon "Example 2"
7418         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7419             """
7420             Perform Section boolean operation on two given shapes.
7421
7422             Parameters:
7423                 theShape1 First argument for boolean operation.
7424                 theShape2 Second argument for boolean operation.
7425                 checkSelfInte The flag that tells if the arguments should
7426                               be checked for self-intersection prior to the operation.
7427                               If a self-intersection detected the operation fails.
7428                 theName Object name; when specified, this parameter is used
7429                         for result publication in the study. Otherwise, if automatic
7430                         publication is switched on, default value is used for result name.
7431             Returns:
7432                 New GEOM.GEOM_Object, containing the result shape.
7433
7434             """
7435             # Example: see GEOM_TestOthers.py
7436             # note: auto-publishing is done in self.MakeBoolean()
7437             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7438
7439         ## Perform Fuse boolean operation on the list of shapes.
7440         #  @param theShapesList Shapes to be fused.
7441         #  @param checkSelfInte The flag that tells if the arguments should
7442         #         be checked for self-intersection prior to the operation.
7443         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7444         #         operation should be performed during the operation.
7445         #  @param theName Object name; when specified, this parameter is used
7446         #         for result publication in the study. Otherwise, if automatic
7447         #         publication is switched on, default value is used for result name.
7448         #
7449         #  @note This algorithm doesn't find all types of self-intersections.
7450         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7451         #        vertex/face and edge/face intersections. Face/face
7452         #        intersections detection is switched off as it is a
7453         #        time-consuming operation that gives an impact on performance.
7454         #        To find all self-intersections please use
7455         #        CheckSelfIntersections() method.
7456         #
7457         #  @return New GEOM.GEOM_Object, containing the result shape.
7458         #
7459         #  @ref tui_fuse "Example 1"
7460         #  \n @ref swig_MakeCommon "Example 2"
7461         @ManageTransactions("BoolOp")
7462         def MakeFuseList(self, theShapesList, checkSelfInte=False,
7463                          rmExtraEdges=False, theName=None):
7464             """
7465             Perform Fuse boolean operation on the list of shapes.
7466
7467             Parameters:
7468                 theShapesList Shapes to be fused.
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.MakeFuseList(theShapesList, checkSelfInte,
7493                                              rmExtraEdges)
7494             RaiseIfFailed("MakeFuseList", self.BoolOp)
7495             self._autoPublish(anObj, theName, "fuse")
7496             return anObj
7497
7498         ## Perform Common boolean operation on the list of shapes.
7499         #  @param theShapesList Shapes for Common operation.
7500         #  @param checkSelfInte The flag that tells if the arguments should
7501         #         be checked for self-intersection prior to the operation.
7502         #  @param theName Object name; when specified, this parameter is used
7503         #         for result publication in the study. Otherwise, if automatic
7504         #         publication is switched on, default value is used for result name.
7505         #
7506         #  @note This algorithm doesn't find all types of self-intersections.
7507         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7508         #        vertex/face and edge/face intersections. Face/face
7509         #        intersections detection is switched off as it is a
7510         #        time-consuming operation that gives an impact on performance.
7511         #        To find all self-intersections please use
7512         #        CheckSelfIntersections() method.
7513         #
7514         #  @return New GEOM.GEOM_Object, containing the result shape.
7515         #
7516         #  @ref tui_common "Example 1"
7517         #  \n @ref swig_MakeCommon "Example 2"
7518         @ManageTransactions("BoolOp")
7519         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7520             """
7521             Perform Common boolean operation on the list of shapes.
7522
7523             Parameters:
7524                 theShapesList Shapes for Common operation.
7525                 checkSelfInte The flag that tells if the arguments should
7526                               be checked for self-intersection prior to
7527                               the operation.
7528                 theName Object name; when specified, this parameter is used
7529                         for result publication in the study. Otherwise, if automatic
7530                         publication is switched on, default value is used for result name.
7531
7532             Note:
7533                     This algorithm doesn't find all types of self-intersections.
7534                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7535                     vertex/face and edge/face intersections. Face/face
7536                     intersections detection is switched off as it is a
7537                     time-consuming operation that gives an impact on performance.
7538                     To find all self-intersections please use
7539                     CheckSelfIntersections() method.
7540
7541             Returns:
7542                 New GEOM.GEOM_Object, containing the result shape.
7543
7544             """
7545             # Example: see GEOM_TestOthers.py
7546             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7547             RaiseIfFailed("MakeCommonList", self.BoolOp)
7548             self._autoPublish(anObj, theName, "common")
7549             return anObj
7550
7551         ## Perform Cut boolean operation on one object and the list of tools.
7552         #  @param theMainShape The object of the operation.
7553         #  @param theShapesList The list of tools of the operation.
7554         #  @param checkSelfInte The flag that tells if the arguments should
7555         #         be checked for self-intersection prior to the operation.
7556         #  @param theName Object name; when specified, this parameter is used
7557         #         for result publication in the study. Otherwise, if automatic
7558         #         publication is switched on, default value is used for result name.
7559         #
7560         #  @note This algorithm doesn't find all types of self-intersections.
7561         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7562         #        vertex/face and edge/face intersections. Face/face
7563         #        intersections detection is switched off as it is a
7564         #        time-consuming operation that gives an impact on performance.
7565         #        To find all self-intersections please use
7566         #        CheckSelfIntersections() method.
7567         #
7568         #  @return New GEOM.GEOM_Object, containing the result shape.
7569         #
7570         #  @ref tui_cut "Example 1"
7571         #  \n @ref swig_MakeCommon "Example 2"
7572         @ManageTransactions("BoolOp")
7573         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7574             """
7575             Perform Cut boolean operation on one object and the list of tools.
7576
7577             Parameters:
7578                 theMainShape The object of the operation.
7579                 theShapesList The list of tools of the operation.
7580                 checkSelfInte The flag that tells if the arguments should
7581                               be checked for self-intersection prior to
7582                               the operation.
7583                 theName Object name; when specified, this parameter is used
7584                         for result publication in the study. Otherwise, if automatic
7585                         publication is switched on, default value is used for result name.
7586
7587             Note:
7588                     This algorithm doesn't find all types of self-intersections.
7589                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7590                     vertex/face and edge/face intersections. Face/face
7591                     intersections detection is switched off as it is a
7592                     time-consuming operation that gives an impact on performance.
7593                     To find all self-intersections please use
7594                     CheckSelfIntersections() method.
7595
7596             Returns:
7597                 New GEOM.GEOM_Object, containing the result shape.
7598
7599             """
7600             # Example: see GEOM_TestOthers.py
7601             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7602             RaiseIfFailed("MakeCutList", self.BoolOp)
7603             self._autoPublish(anObj, theName, "cut")
7604             return anObj
7605
7606         # end of l3_boolean
7607         ## @}
7608
7609         ## @addtogroup l3_basic_op
7610         ## @{
7611
7612         ## Perform partition operation.
7613         #  @param ListShapes Shapes to be intersected.
7614         #  @param ListTools Shapes to intersect theShapes.
7615         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7616         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7617         #         type will be detected automatically.
7618         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7619         #                             target type (equal to Limit) are kept in the result,
7620         #                             else standalone shapes of lower dimension
7621         #                             are kept also (if they exist).
7622         #
7623         #  @param theName Object name; when specified, this parameter is used
7624         #         for result publication in the study. Otherwise, if automatic
7625         #         publication is switched on, default value is used for result name.
7626         #
7627         #  @note Each compound from ListShapes and ListTools will be exploded
7628         #        in order to avoid possible intersection between shapes from this compound.
7629         #
7630         #  After implementation new version of PartitionAlgo (October 2006)
7631         #  other parameters are ignored by current functionality. They are kept
7632         #  in this function only for support old versions.
7633         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7634         #         Each shape from theKeepInside must belong to theShapes also.
7635         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7636         #         Each shape from theRemoveInside must belong to theShapes also.
7637         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7638         #      @param ListMaterials Material indices for each shape. Make sence,
7639         #         only if theRemoveWebs is TRUE.
7640         #
7641         #  @return New GEOM.GEOM_Object, containing the result shapes.
7642         #
7643         #  @ref tui_partition "Example"
7644         @ManageTransactions("BoolOp")
7645         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7646                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7647                           KeepNonlimitShapes=0, theName=None):
7648             """
7649             Perform partition operation.
7650
7651             Parameters:
7652                 ListShapes Shapes to be intersected.
7653                 ListTools Shapes to intersect theShapes.
7654                 Limit Type of resulting shapes (see geompy.ShapeType)
7655                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7656                       type will be detected automatically.
7657                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7658                                     target type (equal to Limit) are kept in the result,
7659                                     else standalone shapes of lower dimension
7660                                     are kept also (if they exist).
7661
7662                 theName Object name; when specified, this parameter is used
7663                         for result publication in the study. Otherwise, if automatic
7664                         publication is switched on, default value is used for result name.
7665             Note:
7666                     Each compound from ListShapes and ListTools will be exploded
7667                     in order to avoid possible intersection between shapes from
7668                     this compound.
7669
7670             After implementation new version of PartitionAlgo (October 2006) other
7671             parameters are ignored by current functionality. They are kept in this
7672             function only for support old versions.
7673
7674             Ignored parameters:
7675                 ListKeepInside Shapes, outside which the results will be deleted.
7676                                Each shape from theKeepInside must belong to theShapes also.
7677                 ListRemoveInside Shapes, inside which the results will be deleted.
7678                                  Each shape from theRemoveInside must belong to theShapes also.
7679                 RemoveWebs If TRUE, perform Glue 3D algorithm.
7680                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
7681
7682             Returns:
7683                 New GEOM.GEOM_Object, containing the result shapes.
7684             """
7685             # Example: see GEOM_TestAll.py
7686             if Limit == self.ShapeType["AUTO"]:
7687                 # automatic detection of the most appropriate shape limit type
7688                 lim = GEOM.SHAPE
7689                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7690                 Limit = EnumToLong(lim)
7691                 pass
7692             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
7693                                               ListKeepInside, ListRemoveInside,
7694                                               Limit, RemoveWebs, ListMaterials,
7695                                               KeepNonlimitShapes);
7696             RaiseIfFailed("MakePartition", self.BoolOp)
7697             self._autoPublish(anObj, theName, "partition")
7698             return anObj
7699
7700         ## Perform partition operation.
7701         #  This method may be useful if it is needed to make a partition for
7702         #  compound contains nonintersected shapes. Performance will be better
7703         #  since intersection between shapes from compound is not performed.
7704         #
7705         #  Description of all parameters as in previous method MakePartition().
7706         #  One additional parameter is provided:
7707         #  @param checkSelfInte The flag that tells if the arguments should
7708         #         be checked for self-intersection prior to the operation.
7709         #
7710         #  @note This algorithm doesn't find all types of self-intersections.
7711         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7712         #        vertex/face and edge/face intersections. Face/face
7713         #        intersections detection is switched off as it is a
7714         #        time-consuming operation that gives an impact on performance.
7715         #        To find all self-intersections please use
7716         #        CheckSelfIntersections() method.
7717         #
7718         #  @note Passed compounds (via ListShapes or via ListTools)
7719         #           have to consist of nonintersecting shapes.
7720         #
7721         #  @return New GEOM.GEOM_Object, containing the result shapes.
7722         #
7723         #  @ref swig_todo "Example"
7724         @ManageTransactions("BoolOp")
7725         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
7726                                                  ListKeepInside=[], ListRemoveInside=[],
7727                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
7728                                                  ListMaterials=[], KeepNonlimitShapes=0,
7729                                                  checkSelfInte=False, theName=None):
7730             """
7731             Perform partition operation.
7732             This method may be useful if it is needed to make a partition for
7733             compound contains nonintersected shapes. Performance will be better
7734             since intersection between shapes from compound is not performed.
7735
7736             Parameters:
7737                 Description of all parameters as in method geompy.MakePartition.
7738                 One additional parameter is provided:
7739                 checkSelfInte The flag that tells if the arguments should
7740                               be checked for self-intersection prior to
7741                               the operation.
7742
7743             Note:
7744                     This algorithm doesn't find all types of self-intersections.
7745                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7746                     vertex/face and edge/face intersections. Face/face
7747                     intersections detection is switched off as it is a
7748                     time-consuming operation that gives an impact on performance.
7749                     To find all self-intersections please use
7750                     CheckSelfIntersections() method.
7751
7752             NOTE:
7753                 Passed compounds (via ListShapes or via ListTools)
7754                 have to consist of nonintersecting shapes.
7755
7756             Returns:
7757                 New GEOM.GEOM_Object, containing the result shapes.
7758             """
7759             if Limit == self.ShapeType["AUTO"]:
7760                 # automatic detection of the most appropriate shape limit type
7761                 lim = GEOM.SHAPE
7762                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7763                 Limit = EnumToLong(lim)
7764                 pass
7765             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7766                                                                      ListKeepInside, ListRemoveInside,
7767                                                                      Limit, RemoveWebs, ListMaterials,
7768                                                                      KeepNonlimitShapes, checkSelfInte);
7769             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7770             self._autoPublish(anObj, theName, "partition")
7771             return anObj
7772
7773         ## See method MakePartition() for more information.
7774         #
7775         #  @ref tui_partition "Example 1"
7776         #  \n @ref swig_Partition "Example 2"
7777         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7778                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7779                       KeepNonlimitShapes=0, theName=None):
7780             """
7781             See method geompy.MakePartition for more information.
7782             """
7783             # Example: see GEOM_TestOthers.py
7784             # note: auto-publishing is done in self.MakePartition()
7785             anObj = self.MakePartition(ListShapes, ListTools,
7786                                        ListKeepInside, ListRemoveInside,
7787                                        Limit, RemoveWebs, ListMaterials,
7788                                        KeepNonlimitShapes, theName);
7789             return anObj
7790
7791         ## Perform partition of the Shape with the Plane
7792         #  @param theShape Shape to be intersected.
7793         #  @param thePlane Tool shape, to intersect theShape.
7794         #  @param theName Object name; when specified, this parameter is used
7795         #         for result publication in the study. Otherwise, if automatic
7796         #         publication is switched on, default value is used for result name.
7797         #
7798         #  @return New GEOM.GEOM_Object, containing the result shape.
7799         #
7800         #  @ref tui_partition "Example"
7801         @ManageTransactions("BoolOp")
7802         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7803             """
7804             Perform partition of the Shape with the Plane
7805
7806             Parameters:
7807                 theShape Shape to be intersected.
7808                 thePlane Tool shape, to intersect theShape.
7809                 theName Object name; when specified, this parameter is used
7810                         for result publication in the study. Otherwise, if automatic
7811                         publication is switched on, default value is used for result name.
7812
7813             Returns:
7814                 New GEOM.GEOM_Object, containing the result shape.
7815             """
7816             # Example: see GEOM_TestAll.py
7817             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7818             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7819             self._autoPublish(anObj, theName, "partition")
7820             return anObj
7821
7822         # end of l3_basic_op
7823         ## @}
7824
7825         ## @addtogroup l3_transform
7826         ## @{
7827
7828         ## Translate the given object along the vector, specified
7829         #  by its end points.
7830         #  @param theObject The object to be translated.
7831         #  @param thePoint1 Start point of translation vector.
7832         #  @param thePoint2 End point of translation vector.
7833         #  @param theCopy Flag used to translate object itself or create a copy.
7834         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7835         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7836         @ManageTransactions("TrsfOp")
7837         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7838             """
7839             Translate the given object along the vector, specified by its end points.
7840
7841             Parameters:
7842                 theObject The object to be translated.
7843                 thePoint1 Start point of translation vector.
7844                 thePoint2 End point of translation vector.
7845                 theCopy Flag used to translate object itself or create a copy.
7846
7847             Returns:
7848                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7849                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7850             """
7851             if theCopy:
7852                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7853             else:
7854                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7855             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7856             return anObj
7857
7858         ## Translate the given object along the vector, specified
7859         #  by its end points, creating its copy before the translation.
7860         #  @param theObject The object to be translated.
7861         #  @param thePoint1 Start point of translation vector.
7862         #  @param thePoint2 End point of translation vector.
7863         #  @param theName Object name; when specified, this parameter is used
7864         #         for result publication in the study. Otherwise, if automatic
7865         #         publication is switched on, default value is used for result name.
7866         #
7867         #  @return New GEOM.GEOM_Object, containing the translated object.
7868         #
7869         #  @ref tui_translation "Example 1"
7870         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7871         @ManageTransactions("TrsfOp")
7872         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7873             """
7874             Translate the given object along the vector, specified
7875             by its end points, creating its copy before the translation.
7876
7877             Parameters:
7878                 theObject The object to be translated.
7879                 thePoint1 Start point of translation vector.
7880                 thePoint2 End point of translation vector.
7881                 theName Object name; when specified, this parameter is used
7882                         for result publication in the study. Otherwise, if automatic
7883                         publication is switched on, default value is used for result name.
7884
7885             Returns:
7886                 New GEOM.GEOM_Object, containing the translated object.
7887             """
7888             # Example: see GEOM_TestAll.py
7889             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7890             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7891             self._autoPublish(anObj, theName, "translated")
7892             return anObj
7893
7894         ## Translate the given object along the vector, specified by its components.
7895         #  @param theObject The object to be translated.
7896         #  @param theDX,theDY,theDZ Components of translation vector.
7897         #  @param theCopy Flag used to translate object itself or create a copy.
7898         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7899         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7900         #
7901         #  @ref tui_translation "Example"
7902         @ManageTransactions("TrsfOp")
7903         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7904             """
7905             Translate the given object along the vector, specified by its components.
7906
7907             Parameters:
7908                 theObject The object to be translated.
7909                 theDX,theDY,theDZ Components of translation vector.
7910                 theCopy Flag used to translate object itself or create a copy.
7911
7912             Returns:
7913                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7914                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7915             """
7916             # Example: see GEOM_TestAll.py
7917             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7918             if theCopy:
7919                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7920             else:
7921                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7922             anObj.SetParameters(Parameters)
7923             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7924             return anObj
7925
7926         ## Translate the given object along the vector, specified
7927         #  by its components, creating its copy before the translation.
7928         #  @param theObject The object to be translated.
7929         #  @param theDX,theDY,theDZ Components of translation vector.
7930         #  @param theName Object name; when specified, this parameter is used
7931         #         for result publication in the study. Otherwise, if automatic
7932         #         publication is switched on, default value is used for result name.
7933         #
7934         #  @return New GEOM.GEOM_Object, containing the translated object.
7935         #
7936         #  @ref tui_translation "Example"
7937         @ManageTransactions("TrsfOp")
7938         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7939             """
7940             Translate the given object along the vector, specified
7941             by its components, creating its copy before the translation.
7942
7943             Parameters:
7944                 theObject The object to be translated.
7945                 theDX,theDY,theDZ Components of translation vector.
7946                 theName Object name; when specified, this parameter is used
7947                         for result publication in the study. Otherwise, if automatic
7948                         publication is switched on, default value is used for result name.
7949
7950             Returns:
7951                 New GEOM.GEOM_Object, containing the translated object.
7952             """
7953             # Example: see GEOM_TestAll.py
7954             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7955             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7956             anObj.SetParameters(Parameters)
7957             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7958             self._autoPublish(anObj, theName, "translated")
7959             return anObj
7960
7961         ## Translate the given object along the given vector.
7962         #  @param theObject The object to be translated.
7963         #  @param theVector The translation vector.
7964         #  @param theCopy Flag used to translate object itself or create a copy.
7965         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7966         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7967         @ManageTransactions("TrsfOp")
7968         def TranslateVector(self, theObject, theVector, theCopy=False):
7969             """
7970             Translate the given object along the given vector.
7971
7972             Parameters:
7973                 theObject The object to be translated.
7974                 theVector The translation vector.
7975                 theCopy Flag used to translate object itself or create a copy.
7976
7977             Returns:
7978                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7979                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7980             """
7981             if theCopy:
7982                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7983             else:
7984                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7985             RaiseIfFailed("TranslateVector", self.TrsfOp)
7986             return anObj
7987
7988         ## Translate the given object along the given vector,
7989         #  creating its copy before the translation.
7990         #  @param theObject The object to be translated.
7991         #  @param theVector The translation vector.
7992         #  @param theName Object name; when specified, this parameter is used
7993         #         for result publication in the study. Otherwise, if automatic
7994         #         publication is switched on, default value is used for result name.
7995         #
7996         #  @return New GEOM.GEOM_Object, containing the translated object.
7997         #
7998         #  @ref tui_translation "Example"
7999         @ManageTransactions("TrsfOp")
8000         def MakeTranslationVector(self, theObject, theVector, theName=None):
8001             """
8002             Translate the given object along the given vector,
8003             creating its copy before the translation.
8004
8005             Parameters:
8006                 theObject The object to be translated.
8007                 theVector The translation vector.
8008                 theName Object name; when specified, this parameter is used
8009                         for result publication in the study. Otherwise, if automatic
8010                         publication is switched on, default value is used for result name.
8011
8012             Returns:
8013                 New GEOM.GEOM_Object, containing the translated object.
8014             """
8015             # Example: see GEOM_TestAll.py
8016             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8017             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8018             self._autoPublish(anObj, theName, "translated")
8019             return anObj
8020
8021         ## Translate the given object along the given vector on given distance.
8022         #  @param theObject The object to be translated.
8023         #  @param theVector The translation vector.
8024         #  @param theDistance The translation distance.
8025         #  @param theCopy Flag used to translate object itself or create a copy.
8026         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8027         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8028         #
8029         #  @ref tui_translation "Example"
8030         @ManageTransactions("TrsfOp")
8031         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8032             """
8033             Translate the given object along the given vector on given distance.
8034
8035             Parameters:
8036                 theObject The object to be translated.
8037                 theVector The translation vector.
8038                 theDistance The translation distance.
8039                 theCopy Flag used to translate object itself or create a copy.
8040
8041             Returns:
8042                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8043                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8044             """
8045             # Example: see GEOM_TestAll.py
8046             theDistance,Parameters = ParseParameters(theDistance)
8047             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8048             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8049             anObj.SetParameters(Parameters)
8050             return anObj
8051
8052         ## Translate the given object along the given vector on given distance,
8053         #  creating its copy before the translation.
8054         #  @param theObject The object to be translated.
8055         #  @param theVector The translation vector.
8056         #  @param theDistance The translation distance.
8057         #  @param theName Object name; when specified, this parameter is used
8058         #         for result publication in the study. Otherwise, if automatic
8059         #         publication is switched on, default value is used for result name.
8060         #
8061         #  @return New GEOM.GEOM_Object, containing the translated object.
8062         #
8063         #  @ref tui_translation "Example"
8064         @ManageTransactions("TrsfOp")
8065         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8066             """
8067             Translate the given object along the given vector on given distance,
8068             creating its copy before the translation.
8069
8070             Parameters:
8071                 theObject The object to be translated.
8072                 theVector The translation vector.
8073                 theDistance The translation distance.
8074                 theName Object name; when specified, this parameter is used
8075                         for result publication in the study. Otherwise, if automatic
8076                         publication is switched on, default value is used for result name.
8077
8078             Returns:
8079                 New GEOM.GEOM_Object, containing the translated object.
8080             """
8081             # Example: see GEOM_TestAll.py
8082             theDistance,Parameters = ParseParameters(theDistance)
8083             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8084             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8085             anObj.SetParameters(Parameters)
8086             self._autoPublish(anObj, theName, "translated")
8087             return anObj
8088
8089         ## Rotate the given object around the given axis on the given angle.
8090         #  @param theObject The object to be rotated.
8091         #  @param theAxis Rotation axis.
8092         #  @param theAngle Rotation angle in radians.
8093         #  @param theCopy Flag used to rotate object itself or create a copy.
8094         #
8095         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8096         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8097         #
8098         #  @ref tui_rotation "Example"
8099         @ManageTransactions("TrsfOp")
8100         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8101             """
8102             Rotate the given object around the given axis on the given angle.
8103
8104             Parameters:
8105                 theObject The object to be rotated.
8106                 theAxis Rotation axis.
8107                 theAngle Rotation angle in radians.
8108                 theCopy Flag used to rotate object itself or create a copy.
8109
8110             Returns:
8111                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8112                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8113             """
8114             # Example: see GEOM_TestAll.py
8115             flag = False
8116             if isinstance(theAngle,str):
8117                 flag = True
8118             theAngle, Parameters = ParseParameters(theAngle)
8119             if flag:
8120                 theAngle = theAngle*math.pi/180.0
8121             if theCopy:
8122                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8123             else:
8124                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8125             RaiseIfFailed("Rotate", self.TrsfOp)
8126             anObj.SetParameters(Parameters)
8127             return anObj
8128
8129         ## Rotate the given object around the given axis
8130         #  on the given angle, creating its copy before the rotation.
8131         #  @param theObject The object to be rotated.
8132         #  @param theAxis Rotation axis.
8133         #  @param theAngle Rotation angle in radians.
8134         #  @param theName Object name; when specified, this parameter is used
8135         #         for result publication in the study. Otherwise, if automatic
8136         #         publication is switched on, default value is used for result name.
8137         #
8138         #  @return New GEOM.GEOM_Object, containing the rotated object.
8139         #
8140         #  @ref tui_rotation "Example"
8141         @ManageTransactions("TrsfOp")
8142         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8143             """
8144             Rotate the given object around the given axis
8145             on the given angle, creating its copy before the rotatation.
8146
8147             Parameters:
8148                 theObject The object to be rotated.
8149                 theAxis Rotation axis.
8150                 theAngle Rotation angle in radians.
8151                 theName Object name; when specified, this parameter is used
8152                         for result publication in the study. Otherwise, if automatic
8153                         publication is switched on, default value is used for result name.
8154
8155             Returns:
8156                 New GEOM.GEOM_Object, containing the rotated object.
8157             """
8158             # Example: see GEOM_TestAll.py
8159             flag = False
8160             if isinstance(theAngle,str):
8161                 flag = True
8162             theAngle, Parameters = ParseParameters(theAngle)
8163             if flag:
8164                 theAngle = theAngle*math.pi/180.0
8165             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8166             RaiseIfFailed("RotateCopy", self.TrsfOp)
8167             anObj.SetParameters(Parameters)
8168             self._autoPublish(anObj, theName, "rotated")
8169             return anObj
8170
8171         ## Rotate given object around vector perpendicular to plane
8172         #  containing three points.
8173         #  @param theObject The object to be rotated.
8174         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8175         #  containing the three points.
8176         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8177         #  @param theCopy Flag used to rotate object itself or create a copy.
8178         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8179         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8180         @ManageTransactions("TrsfOp")
8181         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8182             """
8183             Rotate given object around vector perpendicular to plane
8184             containing three points.
8185
8186             Parameters:
8187                 theObject The object to be rotated.
8188                 theCentPoint central point  the axis is the vector perpendicular to the plane
8189                              containing the three points.
8190                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8191                 theCopy Flag used to rotate object itself or create a copy.
8192
8193             Returns:
8194                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8195                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8196             """
8197             if theCopy:
8198                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8199             else:
8200                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8201             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8202             return anObj
8203
8204         ## Rotate given object around vector perpendicular to plane
8205         #  containing three points, creating its copy before the rotatation.
8206         #  @param theObject The object to be rotated.
8207         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8208         #  containing the three points.
8209         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8210         #  @param theName Object name; when specified, this parameter is used
8211         #         for result publication in the study. Otherwise, if automatic
8212         #         publication is switched on, default value is used for result name.
8213         #
8214         #  @return New GEOM.GEOM_Object, containing the rotated object.
8215         #
8216         #  @ref tui_rotation "Example"
8217         @ManageTransactions("TrsfOp")
8218         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8219             """
8220             Rotate given object around vector perpendicular to plane
8221             containing three points, creating its copy before the rotatation.
8222
8223             Parameters:
8224                 theObject The object to be rotated.
8225                 theCentPoint central point  the axis is the vector perpendicular to the plane
8226                              containing the three points.
8227                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8228                 theName Object name; when specified, this parameter is used
8229                         for result publication in the study. Otherwise, if automatic
8230                         publication is switched on, default value is used for result name.
8231
8232             Returns:
8233                 New GEOM.GEOM_Object, containing the rotated object.
8234             """
8235             # Example: see GEOM_TestAll.py
8236             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8237             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8238             self._autoPublish(anObj, theName, "rotated")
8239             return anObj
8240
8241         ## Scale the given object by the specified factor.
8242         #  @param theObject The object to be scaled.
8243         #  @param thePoint Center point for scaling.
8244         #                  Passing None for it means scaling relatively the origin of global CS.
8245         #  @param theFactor Scaling factor value.
8246         #  @param theCopy Flag used to scale object itself or create a copy.
8247         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8248         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8249         @ManageTransactions("TrsfOp")
8250         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8251             """
8252             Scale the given object by the specified factor.
8253
8254             Parameters:
8255                 theObject The object to be scaled.
8256                 thePoint Center point for scaling.
8257                          Passing None for it means scaling relatively the origin of global CS.
8258                 theFactor Scaling factor value.
8259                 theCopy Flag used to scale object itself or create a copy.
8260
8261             Returns:
8262                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8263                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8264             """
8265             # Example: see GEOM_TestAll.py
8266             theFactor, Parameters = ParseParameters(theFactor)
8267             if theCopy:
8268                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8269             else:
8270                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8271             RaiseIfFailed("Scale", self.TrsfOp)
8272             anObj.SetParameters(Parameters)
8273             return anObj
8274
8275         ## Scale the given object by the factor, creating its copy before the scaling.
8276         #  @param theObject The object to be scaled.
8277         #  @param thePoint Center point for scaling.
8278         #                  Passing None for it means scaling relatively the origin of global CS.
8279         #  @param theFactor Scaling factor value.
8280         #  @param theName Object name; when specified, this parameter is used
8281         #         for result publication in the study. Otherwise, if automatic
8282         #         publication is switched on, default value is used for result name.
8283         #
8284         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8285         #
8286         #  @ref tui_scale "Example"
8287         @ManageTransactions("TrsfOp")
8288         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8289             """
8290             Scale the given object by the factor, creating its copy before the scaling.
8291
8292             Parameters:
8293                 theObject The object to be scaled.
8294                 thePoint Center point for scaling.
8295                          Passing None for it means scaling relatively the origin of global CS.
8296                 theFactor Scaling factor value.
8297                 theName Object name; when specified, this parameter is used
8298                         for result publication in the study. Otherwise, if automatic
8299                         publication is switched on, default value is used for result name.
8300
8301             Returns:
8302                 New GEOM.GEOM_Object, containing the scaled shape.
8303             """
8304             # Example: see GEOM_TestAll.py
8305             theFactor, Parameters = ParseParameters(theFactor)
8306             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8307             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8308             anObj.SetParameters(Parameters)
8309             self._autoPublish(anObj, theName, "scaled")
8310             return anObj
8311
8312         ## Scale the given object by different factors along coordinate axes.
8313         #  @param theObject The object to be scaled.
8314         #  @param thePoint Center point for scaling.
8315         #                  Passing None for it means scaling relatively the origin of global CS.
8316         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8317         #  @param theCopy Flag used to scale object itself or create a copy.
8318         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8319         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8320         @ManageTransactions("TrsfOp")
8321         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8322             """
8323             Scale the given object by different factors along coordinate axes.
8324
8325             Parameters:
8326                 theObject The object to be scaled.
8327                 thePoint Center point for scaling.
8328                             Passing None for it means scaling relatively the origin of global CS.
8329                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8330                 theCopy Flag used to scale object itself or create a copy.
8331
8332             Returns:
8333                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8334                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8335             """
8336             # Example: see GEOM_TestAll.py
8337             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8338             if theCopy:
8339                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8340                                                             theFactorX, theFactorY, theFactorZ)
8341             else:
8342                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8343                                                         theFactorX, theFactorY, theFactorZ)
8344             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8345             anObj.SetParameters(Parameters)
8346             return anObj
8347
8348         ## Scale the given object by different factors along coordinate axes,
8349         #  creating its copy before the scaling.
8350         #  @param theObject The object to be scaled.
8351         #  @param thePoint Center point for scaling.
8352         #                  Passing None for it means scaling relatively the origin of global CS.
8353         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8354         #  @param theName Object name; when specified, this parameter is used
8355         #         for result publication in the study. Otherwise, if automatic
8356         #         publication is switched on, default value is used for result name.
8357         #
8358         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8359         #
8360         #  @ref swig_scale "Example"
8361         @ManageTransactions("TrsfOp")
8362         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8363             """
8364             Scale the given object by different factors along coordinate axes,
8365             creating its copy before the scaling.
8366
8367             Parameters:
8368                 theObject The object to be scaled.
8369                 thePoint Center point for scaling.
8370                             Passing None for it means scaling relatively the origin of global CS.
8371                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8372                 theName Object name; when specified, this parameter is used
8373                         for result publication in the study. Otherwise, if automatic
8374                         publication is switched on, default value is used for result name.
8375
8376             Returns:
8377                 New GEOM.GEOM_Object, containing the scaled shape.
8378             """
8379             # Example: see GEOM_TestAll.py
8380             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8381             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8382                                                         theFactorX, theFactorY, theFactorZ)
8383             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8384             anObj.SetParameters(Parameters)
8385             self._autoPublish(anObj, theName, "scaled")
8386             return anObj
8387
8388         ## Mirror an object relatively the given plane.
8389         #  @param theObject The object to be mirrored.
8390         #  @param thePlane Plane of symmetry.
8391         #  @param theCopy Flag used to mirror object itself or create a copy.
8392         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8393         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8394         @ManageTransactions("TrsfOp")
8395         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8396             """
8397             Mirror an object relatively the given plane.
8398
8399             Parameters:
8400                 theObject The object to be mirrored.
8401                 thePlane Plane of symmetry.
8402                 theCopy Flag used to mirror object itself or create a copy.
8403
8404             Returns:
8405                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8406                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8407             """
8408             if theCopy:
8409                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8410             else:
8411                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8412             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8413             return anObj
8414
8415         ## Create an object, symmetrical
8416         #  to the given one relatively the given plane.
8417         #  @param theObject The object to be mirrored.
8418         #  @param thePlane Plane of symmetry.
8419         #  @param theName Object name; when specified, this parameter is used
8420         #         for result publication in the study. Otherwise, if automatic
8421         #         publication is switched on, default value is used for result name.
8422         #
8423         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8424         #
8425         #  @ref tui_mirror "Example"
8426         @ManageTransactions("TrsfOp")
8427         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8428             """
8429             Create an object, symmetrical to the given one relatively the given plane.
8430
8431             Parameters:
8432                 theObject The object to be mirrored.
8433                 thePlane Plane of symmetry.
8434                 theName Object name; when specified, this parameter is used
8435                         for result publication in the study. Otherwise, if automatic
8436                         publication is switched on, default value is used for result name.
8437
8438             Returns:
8439                 New GEOM.GEOM_Object, containing the mirrored shape.
8440             """
8441             # Example: see GEOM_TestAll.py
8442             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8443             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
8444             self._autoPublish(anObj, theName, "mirrored")
8445             return anObj
8446
8447         ## Mirror an object relatively the given axis.
8448         #  @param theObject The object to be mirrored.
8449         #  @param theAxis Axis of symmetry.
8450         #  @param theCopy Flag used to mirror object itself or create a copy.
8451         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8452         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8453         @ManageTransactions("TrsfOp")
8454         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
8455             """
8456             Mirror an object relatively the given axis.
8457
8458             Parameters:
8459                 theObject The object to be mirrored.
8460                 theAxis Axis of symmetry.
8461                 theCopy Flag used to mirror object itself or create a copy.
8462
8463             Returns:
8464                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8465                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8466             """
8467             if theCopy:
8468                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8469             else:
8470                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
8471             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
8472             return anObj
8473
8474         ## Create an object, symmetrical
8475         #  to the given one relatively the given axis.
8476         #  @param theObject The object to be mirrored.
8477         #  @param theAxis Axis of symmetry.
8478         #  @param theName Object name; when specified, this parameter is used
8479         #         for result publication in the study. Otherwise, if automatic
8480         #         publication is switched on, default value is used for result name.
8481         #
8482         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8483         #
8484         #  @ref tui_mirror "Example"
8485         @ManageTransactions("TrsfOp")
8486         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
8487             """
8488             Create an object, symmetrical to the given one relatively the given axis.
8489
8490             Parameters:
8491                 theObject The object to be mirrored.
8492                 theAxis Axis of symmetry.
8493                 theName Object name; when specified, this parameter is used
8494                         for result publication in the study. Otherwise, if automatic
8495                         publication is switched on, default value is used for result name.
8496
8497             Returns:
8498                 New GEOM.GEOM_Object, containing the mirrored shape.
8499             """
8500             # Example: see GEOM_TestAll.py
8501             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8502             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
8503             self._autoPublish(anObj, theName, "mirrored")
8504             return anObj
8505
8506         ## Mirror an object relatively the given point.
8507         #  @param theObject The object to be mirrored.
8508         #  @param thePoint Point of symmetry.
8509         #  @param theCopy Flag used to mirror object itself or create a copy.
8510         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8511         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8512         @ManageTransactions("TrsfOp")
8513         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8514             """
8515             Mirror an object relatively the given point.
8516
8517             Parameters:
8518                 theObject The object to be mirrored.
8519                 thePoint Point of symmetry.
8520                 theCopy Flag used to mirror object itself or create a copy.
8521
8522             Returns:
8523                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8524                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8525             """
8526             # Example: see GEOM_TestAll.py
8527             if theCopy:
8528                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8529             else:
8530                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8531             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8532             return anObj
8533
8534         ## Create an object, symmetrical
8535         #  to the given one relatively the given point.
8536         #  @param theObject The object to be mirrored.
8537         #  @param thePoint Point of symmetry.
8538         #  @param theName Object name; when specified, this parameter is used
8539         #         for result publication in the study. Otherwise, if automatic
8540         #         publication is switched on, default value is used for result name.
8541         #
8542         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8543         #
8544         #  @ref tui_mirror "Example"
8545         @ManageTransactions("TrsfOp")
8546         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8547             """
8548             Create an object, symmetrical
8549             to the given one relatively the given point.
8550
8551             Parameters:
8552                 theObject The object to be mirrored.
8553                 thePoint Point of symmetry.
8554                 theName Object name; when specified, this parameter is used
8555                         for result publication in the study. Otherwise, if automatic
8556                         publication is switched on, default value is used for result name.
8557
8558             Returns:
8559                 New GEOM.GEOM_Object, containing the mirrored shape.
8560             """
8561             # Example: see GEOM_TestAll.py
8562             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8563             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8564             self._autoPublish(anObj, theName, "mirrored")
8565             return anObj
8566
8567         ## Modify the location of the given object.
8568         #  @param theObject The object to be displaced.
8569         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8570         #                     If \a theStartLCS is NULL, displacement
8571         #                     will be performed from global CS.\n
8572         #                     If \a theObject itself is used as \a theStartLCS,
8573         #                     its location will be changed to \a theEndLCS.
8574         #  @param theEndLCS Coordinate system to perform displacement to it.
8575         #  @param theCopy Flag used to displace object itself or create a copy.
8576         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8577         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8578         @ManageTransactions("TrsfOp")
8579         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8580             """
8581             Modify the Location of the given object by LCS, creating its copy before the setting.
8582
8583             Parameters:
8584                 theObject The object to be displaced.
8585                 theStartLCS Coordinate system to perform displacement from it.
8586                             If theStartLCS is NULL, displacement
8587                             will be performed from global CS.
8588                             If theObject itself is used as theStartLCS,
8589                             its location will be changed to theEndLCS.
8590                 theEndLCS Coordinate system to perform displacement to it.
8591                 theCopy Flag used to displace object itself or create a copy.
8592
8593             Returns:
8594                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8595                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8596             """
8597             # Example: see GEOM_TestAll.py
8598             if theCopy:
8599                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8600             else:
8601                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8602             RaiseIfFailed("Displace", self.TrsfOp)
8603             return anObj
8604
8605         ## Modify the Location of the given object by LCS,
8606         #  creating its copy before the setting.
8607         #  @param theObject The object to be displaced.
8608         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8609         #                     If \a theStartLCS is NULL, displacement
8610         #                     will be performed from global CS.\n
8611         #                     If \a theObject itself is used as \a theStartLCS,
8612         #                     its location will be changed to \a theEndLCS.
8613         #  @param theEndLCS Coordinate system to perform displacement to it.
8614         #  @param theName Object name; when specified, this parameter is used
8615         #         for result publication in the study. Otherwise, if automatic
8616         #         publication is switched on, default value is used for result name.
8617         #
8618         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8619         #
8620         #  @ref tui_modify_location "Example"
8621         @ManageTransactions("TrsfOp")
8622         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8623             """
8624             Modify the Location of the given object by LCS, creating its copy before the setting.
8625
8626             Parameters:
8627                 theObject The object to be displaced.
8628                 theStartLCS Coordinate system to perform displacement from it.
8629                             If theStartLCS is NULL, displacement
8630                             will be performed from global CS.
8631                             If theObject itself is used as theStartLCS,
8632                             its location will be changed to theEndLCS.
8633                 theEndLCS Coordinate system to perform displacement to it.
8634                 theName Object name; when specified, this parameter is used
8635                         for result publication in the study. Otherwise, if automatic
8636                         publication is switched on, default value is used for result name.
8637
8638             Returns:
8639                 New GEOM.GEOM_Object, containing the displaced shape.
8640
8641             Example of usage:
8642                 # create local coordinate systems
8643                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8644                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8645                 # modify the location of the given object
8646                 position = geompy.MakePosition(cylinder, cs1, cs2)
8647             """
8648             # Example: see GEOM_TestAll.py
8649             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8650             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8651             self._autoPublish(anObj, theName, "displaced")
8652             return anObj
8653
8654         ## Modify the Location of the given object by Path.
8655         #  @param  theObject The object to be displaced.
8656         #  @param  thePath Wire or Edge along that the object will be translated.
8657         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
8658         #  @param  theCopy is to create a copy objects if true.
8659         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
8660         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
8661         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
8662         #
8663         #  @ref tui_modify_location "Example"
8664         @ManageTransactions("TrsfOp")
8665         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
8666             """
8667             Modify the Location of the given object by Path.
8668
8669             Parameters:
8670                  theObject The object to be displaced.
8671                  thePath Wire or Edge along that the object will be translated.
8672                  theDistance progress of Path (0 = start location, 1 = end of path location).
8673                  theCopy is to create a copy objects if true.
8674                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8675
8676             Returns:
8677                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
8678                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
8679
8680             Example of usage:
8681                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
8682             """
8683             # Example: see GEOM_TestAll.py
8684             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
8685             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8686             return anObj
8687
8688         ## Modify the Location of the given object by Path, creating its copy before the operation.
8689         #  @param theObject The object to be displaced.
8690         #  @param thePath Wire or Edge along that the object will be translated.
8691         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
8692         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
8693         #  @param theName Object name; when specified, this parameter is used
8694         #         for result publication in the study. Otherwise, if automatic
8695         #         publication is switched on, default value is used for result name.
8696         #
8697         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8698         @ManageTransactions("TrsfOp")
8699         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
8700             """
8701             Modify the Location of the given object by Path, creating its copy before the operation.
8702
8703             Parameters:
8704                  theObject The object to be displaced.
8705                  thePath Wire or Edge along that the object will be translated.
8706                  theDistance progress of Path (0 = start location, 1 = end of path location).
8707                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8708                  theName Object name; when specified, this parameter is used
8709                          for result publication in the study. Otherwise, if automatic
8710                          publication is switched on, default value is used for result name.
8711
8712             Returns:
8713                 New GEOM.GEOM_Object, containing the displaced shape.
8714             """
8715             # Example: see GEOM_TestAll.py
8716             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
8717             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8718             self._autoPublish(anObj, theName, "displaced")
8719             return anObj
8720
8721         ## Offset given shape.
8722         #  @param theObject The base object for the offset.
8723         #  @param theOffset Offset value.
8724         #  @param theCopy Flag used to offset object itself or create a copy.
8725         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8726         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
8727         @ManageTransactions("TrsfOp")
8728         def Offset(self, theObject, theOffset, theCopy=False):
8729             """
8730             Offset given shape.
8731
8732             Parameters:
8733                 theObject The base object for the offset.
8734                 theOffset Offset value.
8735                 theCopy Flag used to offset object itself or create a copy.
8736
8737             Returns:
8738                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8739                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8740             """
8741             theOffset, Parameters = ParseParameters(theOffset)
8742             if theCopy:
8743                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8744             else:
8745                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8746             RaiseIfFailed("Offset", self.TrsfOp)
8747             anObj.SetParameters(Parameters)
8748             return anObj
8749
8750         ## Create new object as offset of the given one.
8751         #  @param theObject The base object for the offset.
8752         #  @param theOffset Offset value.
8753         #  @param theName Object name; when specified, this parameter is used
8754         #         for result publication in the study. Otherwise, if automatic
8755         #         publication is switched on, default value is used for result name.
8756         #
8757         #  @return New GEOM.GEOM_Object, containing the offset object.
8758         #
8759         #  @ref tui_offset "Example"
8760         @ManageTransactions("TrsfOp")
8761         def MakeOffset(self, theObject, theOffset, theName=None):
8762             """
8763             Create new object as offset of the given one.
8764
8765             Parameters:
8766                 theObject The base object for the offset.
8767                 theOffset Offset value.
8768                 theName Object name; when specified, this parameter is used
8769                         for result publication in the study. Otherwise, if automatic
8770                         publication is switched on, default value is used for result name.
8771
8772             Returns:
8773                 New GEOM.GEOM_Object, containing the offset object.
8774
8775             Example of usage:
8776                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8777                  # create a new object as offset of the given object
8778                  offset = geompy.MakeOffset(box, 70.)
8779             """
8780             # Example: see GEOM_TestAll.py
8781             theOffset, Parameters = ParseParameters(theOffset)
8782             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8783             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8784             anObj.SetParameters(Parameters)
8785             self._autoPublish(anObj, theName, "offset")
8786             return anObj
8787
8788         ## Create new object as projection of the given one on a 2D surface.
8789         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8790         #  @param theTarget The target object. It can be planar or cylindrical face.
8791         #  @param theName Object name; when specified, this parameter is used
8792         #         for result publication in the study. Otherwise, if automatic
8793         #         publication is switched on, default value is used for result name.
8794         #
8795         #  @return New GEOM.GEOM_Object, containing the projection.
8796         #
8797         #  @ref tui_projection "Example"
8798         @ManageTransactions("TrsfOp")
8799         def MakeProjection(self, theSource, theTarget, theName=None):
8800             """
8801             Create new object as projection of the given one on a 2D surface.
8802
8803             Parameters:
8804                 theSource The source object for the projection. It can be a point, edge or wire.
8805                 theTarget The target object. It can be planar or cylindrical face.
8806                 theName Object name; when specified, this parameter is used
8807                         for result publication in the study. Otherwise, if automatic
8808                         publication is switched on, default value is used for result name.
8809
8810             Returns:
8811                 New GEOM.GEOM_Object, containing the projection.
8812             """
8813             # Example: see GEOM_TestAll.py
8814             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8815             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8816             self._autoPublish(anObj, theName, "projection")
8817             return anObj
8818
8819         ## Create a projection projection of the given point on a wire or an edge.
8820         #  If there are no solutions or there are 2 or more solutions It throws an
8821         #  exception.
8822         #  @param thePoint the point to be projected.
8823         #  @param theWire the wire. The edge is accepted as well.
8824         #  @param theName Object name; when specified, this parameter is used
8825         #         for result publication in the study. Otherwise, if automatic
8826         #         publication is switched on, default value is used for result name.
8827         #
8828         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8829         #  \n \a u: The parameter of projection point on edge.
8830         #  \n \a PointOnEdge: The projection point.
8831         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8832         #
8833         #  @ref tui_projection "Example"
8834         @ManageTransactions("TrsfOp")
8835         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8836             """
8837             Create a projection projection of the given point on a wire or an edge.
8838             If there are no solutions or there are 2 or more solutions It throws an
8839             exception.
8840
8841             Parameters:
8842                 thePoint the point to be projected.
8843                 theWire the wire. The edge is accepted as well.
8844                 theName Object name; when specified, this parameter is used
8845                         for result publication in the study. Otherwise, if automatic
8846                         publication is switched on, default value is used for result name.
8847
8848             Returns:
8849                 [u, PointOnEdge, EdgeInWireIndex]
8850                  u: The parameter of projection point on edge.
8851                  PointOnEdge: The projection point.
8852                  EdgeInWireIndex: The index of an edge in a wire.
8853             """
8854             # Example: see GEOM_TestAll.py
8855             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
8856             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
8857             self._autoPublish(anObj[1], theName, "projection")
8858             return anObj
8859
8860         # -----------------------------------------------------------------------------
8861         # Patterns
8862         # -----------------------------------------------------------------------------
8863
8864         ## Translate the given object along the given vector a given number times
8865         #  @param theObject The object to be translated.
8866         #  @param theVector Direction of the translation. DX if None.
8867         #  @param theStep Distance to translate on.
8868         #  @param theNbTimes Quantity of translations to be done.
8869         #  @param theName Object name; when specified, this parameter is used
8870         #         for result publication in the study. Otherwise, if automatic
8871         #         publication is switched on, default value is used for result name.
8872         #
8873         #  @return New GEOM.GEOM_Object, containing compound of all
8874         #          the shapes, obtained after each translation.
8875         #
8876         #  @ref tui_multi_translation "Example"
8877         @ManageTransactions("TrsfOp")
8878         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8879             """
8880             Translate the given object along the given vector a given number times
8881
8882             Parameters:
8883                 theObject The object to be translated.
8884                 theVector Direction of the translation. DX if None.
8885                 theStep Distance to translate on.
8886                 theNbTimes Quantity of translations to be done.
8887                 theName Object name; when specified, this parameter is used
8888                         for result publication in the study. Otherwise, if automatic
8889                         publication is switched on, default value is used for result name.
8890
8891             Returns:
8892                 New GEOM.GEOM_Object, containing compound of all
8893                 the shapes, obtained after each translation.
8894
8895             Example of usage:
8896                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8897             """
8898             # Example: see GEOM_TestAll.py
8899             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8900             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8901             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8902             anObj.SetParameters(Parameters)
8903             self._autoPublish(anObj, theName, "multitranslation")
8904             return anObj
8905
8906         ## Conseqently apply two specified translations to theObject specified number of times.
8907         #  @param theObject The object to be translated.
8908         #  @param theVector1 Direction of the first translation. DX if None.
8909         #  @param theStep1 Step of the first translation.
8910         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8911         #  @param theVector2 Direction of the second translation. DY if None.
8912         #  @param theStep2 Step of the second translation.
8913         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8914         #  @param theName Object name; when specified, this parameter is used
8915         #         for result publication in the study. Otherwise, if automatic
8916         #         publication is switched on, default value is used for result name.
8917         #
8918         #  @return New GEOM.GEOM_Object, containing compound of all
8919         #          the shapes, obtained after each translation.
8920         #
8921         #  @ref tui_multi_translation "Example"
8922         @ManageTransactions("TrsfOp")
8923         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8924                                    theVector2, theStep2, theNbTimes2, theName=None):
8925             """
8926             Conseqently apply two specified translations to theObject specified number of times.
8927
8928             Parameters:
8929                 theObject The object to be translated.
8930                 theVector1 Direction of the first translation. DX if None.
8931                 theStep1 Step of the first translation.
8932                 theNbTimes1 Quantity of translations to be done along theVector1.
8933                 theVector2 Direction of the second translation. DY if None.
8934                 theStep2 Step of the second translation.
8935                 theNbTimes2 Quantity of translations to be done along theVector2.
8936                 theName Object name; when specified, this parameter is used
8937                         for result publication in the study. Otherwise, if automatic
8938                         publication is switched on, default value is used for result name.
8939
8940             Returns:
8941                 New GEOM.GEOM_Object, containing compound of all
8942                 the shapes, obtained after each translation.
8943
8944             Example of usage:
8945                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8946             """
8947             # Example: see GEOM_TestAll.py
8948             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8949             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8950                                                  theVector2, theStep2, theNbTimes2)
8951             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8952             anObj.SetParameters(Parameters)
8953             self._autoPublish(anObj, theName, "multitranslation")
8954             return anObj
8955
8956         ## Rotate the given object around the given axis a given number times.
8957         #  Rotation angle will be 2*PI/theNbTimes.
8958         #  @param theObject The object to be rotated.
8959         #  @param theAxis The rotation axis. DZ if None.
8960         #  @param theNbTimes Quantity of rotations to be done.
8961         #  @param theName Object name; when specified, this parameter is used
8962         #         for result publication in the study. Otherwise, if automatic
8963         #         publication is switched on, default value is used for result name.
8964         #
8965         #  @return New GEOM.GEOM_Object, containing compound of all the
8966         #          shapes, obtained after each rotation.
8967         #
8968         #  @ref tui_multi_rotation "Example"
8969         @ManageTransactions("TrsfOp")
8970         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8971             """
8972             Rotate the given object around the given axis a given number times.
8973             Rotation angle will be 2*PI/theNbTimes.
8974
8975             Parameters:
8976                 theObject The object to be rotated.
8977                 theAxis The rotation axis. DZ if None.
8978                 theNbTimes Quantity of rotations to be done.
8979                 theName Object name; when specified, this parameter is used
8980                         for result publication in the study. Otherwise, if automatic
8981                         publication is switched on, default value is used for result name.
8982
8983             Returns:
8984                 New GEOM.GEOM_Object, containing compound of all the
8985                 shapes, obtained after each rotation.
8986
8987             Example of usage:
8988                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8989             """
8990             # Example: see GEOM_TestAll.py
8991             theNbTimes, Parameters = ParseParameters(theNbTimes)
8992             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8993             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8994             anObj.SetParameters(Parameters)
8995             self._autoPublish(anObj, theName, "multirotation")
8996             return anObj
8997
8998         ## Rotate the given object around the given axis
8999         #  a given number times on the given angle.
9000         #  @param theObject The object to be rotated.
9001         #  @param theAxis The rotation axis. DZ if None.
9002         #  @param theAngleStep Rotation angle in radians.
9003         #  @param theNbTimes Quantity of rotations to be done.
9004         #  @param theName Object name; when specified, this parameter is used
9005         #         for result publication in the study. Otherwise, if automatic
9006         #         publication is switched on, default value is used for result name.
9007         #
9008         #  @return New GEOM.GEOM_Object, containing compound of all the
9009         #          shapes, obtained after each rotation.
9010         #
9011         #  @ref tui_multi_rotation "Example"
9012         @ManageTransactions("TrsfOp")
9013         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9014             """
9015             Rotate the given object around the given axis
9016             a given number times on the given angle.
9017
9018             Parameters:
9019                 theObject The object to be rotated.
9020                 theAxis The rotation axis. DZ if None.
9021                 theAngleStep Rotation angle in radians.
9022                 theNbTimes Quantity of rotations to be done.
9023                 theName Object name; when specified, this parameter is used
9024                         for result publication in the study. Otherwise, if automatic
9025                         publication is switched on, default value is used for result name.
9026
9027             Returns:
9028                 New GEOM.GEOM_Object, containing compound of all the
9029                 shapes, obtained after each rotation.
9030
9031             Example of usage:
9032                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9033             """
9034             # Example: see GEOM_TestAll.py
9035             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9036             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9037             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9038             anObj.SetParameters(Parameters)
9039             self._autoPublish(anObj, theName, "multirotation")
9040             return anObj
9041
9042         ## Rotate the given object around the given axis a given
9043         #  number times and multi-translate each rotation result.
9044         #  Rotation angle will be 2*PI/theNbTimes1.
9045         #  Translation direction passes through center of gravity
9046         #  of rotated shape and its projection on the rotation axis.
9047         #  @param theObject The object to be rotated.
9048         #  @param theAxis Rotation axis. DZ if None.
9049         #  @param theNbTimes1 Quantity of rotations to be done.
9050         #  @param theRadialStep Translation distance.
9051         #  @param theNbTimes2 Quantity of translations to be done.
9052         #  @param theName Object name; when specified, this parameter is used
9053         #         for result publication in the study. Otherwise, if automatic
9054         #         publication is switched on, default value is used for result name.
9055         #
9056         #  @return New GEOM.GEOM_Object, containing compound of all the
9057         #          shapes, obtained after each transformation.
9058         #
9059         #  @ref tui_multi_rotation "Example"
9060         @ManageTransactions("TrsfOp")
9061         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9062             """
9063             Rotate the given object around the
9064             given axis on the given angle a given number
9065             times and multi-translate each rotation result.
9066             Translation direction passes through center of gravity
9067             of rotated shape and its projection on the rotation axis.
9068
9069             Parameters:
9070                 theObject The object to be rotated.
9071                 theAxis Rotation axis. DZ if None.
9072                 theNbTimes1 Quantity of rotations to be done.
9073                 theRadialStep Translation distance.
9074                 theNbTimes2 Quantity of translations to be done.
9075                 theName Object name; when specified, this parameter is used
9076                         for result publication in the study. Otherwise, if automatic
9077                         publication is switched on, default value is used for result name.
9078
9079             Returns:
9080                 New GEOM.GEOM_Object, containing compound of all the
9081                 shapes, obtained after each transformation.
9082
9083             Example of usage:
9084                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9085             """
9086             # Example: see GEOM_TestAll.py
9087             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9088             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9089             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9090             anObj.SetParameters(Parameters)
9091             self._autoPublish(anObj, theName, "multirotation")
9092             return anObj
9093
9094         ## Rotate the given object around the
9095         #  given axis on the given angle a given number
9096         #  times and multi-translate each rotation result.
9097         #  Translation direction passes through center of gravity
9098         #  of rotated shape and its projection on the rotation axis.
9099         #  @param theObject The object to be rotated.
9100         #  @param theAxis Rotation axis. DZ if None.
9101         #  @param theAngleStep Rotation angle in radians.
9102         #  @param theNbTimes1 Quantity of rotations to be done.
9103         #  @param theRadialStep Translation distance.
9104         #  @param theNbTimes2 Quantity of translations to be done.
9105         #  @param theName Object name; when specified, this parameter is used
9106         #         for result publication in the study. Otherwise, if automatic
9107         #         publication is switched on, default value is used for result name.
9108         #
9109         #  @return New GEOM.GEOM_Object, containing compound of all the
9110         #          shapes, obtained after each transformation.
9111         #
9112         #  @ref tui_multi_rotation "Example"
9113         @ManageTransactions("TrsfOp")
9114         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9115             """
9116             Rotate the given object around the
9117             given axis on the given angle a given number
9118             times and multi-translate each rotation result.
9119             Translation direction passes through center of gravity
9120             of rotated shape and its projection on the rotation axis.
9121
9122             Parameters:
9123                 theObject The object to be rotated.
9124                 theAxis Rotation axis. DZ if None.
9125                 theAngleStep Rotation angle in radians.
9126                 theNbTimes1 Quantity of rotations to be done.
9127                 theRadialStep Translation distance.
9128                 theNbTimes2 Quantity of translations to be done.
9129                 theName Object name; when specified, this parameter is used
9130                         for result publication in the study. Otherwise, if automatic
9131                         publication is switched on, default value is used for result name.
9132
9133             Returns:
9134                 New GEOM.GEOM_Object, containing compound of all the
9135                 shapes, obtained after each transformation.
9136
9137             Example of usage:
9138                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9139             """
9140             # Example: see GEOM_TestAll.py
9141             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9142             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9143             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9144             anObj.SetParameters(Parameters)
9145             self._autoPublish(anObj, theName, "multirotation")
9146             return anObj
9147
9148         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9149         #
9150         #  @ref swig_MakeMultiRotation "Example"
9151         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9152             """
9153             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9154
9155             Example of usage:
9156                 pz = geompy.MakeVertex(0, 0, 100)
9157                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9158                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9159             """
9160             # Example: see GEOM_TestOthers.py
9161             aVec = self.MakeLine(aPoint,aDir)
9162             # note: auto-publishing is done in self.MultiRotate1D()
9163             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9164             return anObj
9165
9166         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9167         #
9168         #  @ref swig_MakeMultiRotation "Example"
9169         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9170             """
9171             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9172
9173             Example of usage:
9174                 pz = geompy.MakeVertex(0, 0, 100)
9175                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9176                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9177             """
9178             # Example: see GEOM_TestOthers.py
9179             aVec = self.MakeLine(aPoint,aDir)
9180             # note: auto-publishing is done in self.MultiRotate1D()
9181             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9182             return anObj
9183
9184         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9185         #
9186         #  @ref swig_MakeMultiRotation "Example"
9187         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9188             """
9189             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9190
9191             Example of usage:
9192                 pz = geompy.MakeVertex(0, 0, 100)
9193                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9194                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9195             """
9196             # Example: see GEOM_TestOthers.py
9197             aVec = self.MakeLine(aPoint,aDir)
9198             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9199             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9200             return anObj
9201
9202         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9203         #
9204         #  @ref swig_MakeMultiRotation "Example"
9205         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9206             """
9207             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9208
9209             Example of usage:
9210                 pz = geompy.MakeVertex(0, 0, 100)
9211                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9212                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9213             """
9214             # Example: see GEOM_TestOthers.py
9215             aVec = self.MakeLine(aPoint,aDir)
9216             # note: auto-publishing is done in self.MultiRotate2D()
9217             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9218             return anObj
9219
9220         # end of l3_transform
9221         ## @}
9222
9223         ## @addtogroup l3_transform_d
9224         ## @{
9225
9226         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9227         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9228             """
9229             Deprecated method. Use MultiRotate1DNbTimes instead.
9230             """
9231             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
9232             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9233
9234         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9235         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9236         @ManageTransactions("TrsfOp")
9237         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9238             """
9239             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9240             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9241
9242             Example of usage:
9243                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9244             """
9245             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
9246             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9247             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9248             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9249             anObj.SetParameters(Parameters)
9250             self._autoPublish(anObj, theName, "multirotation")
9251             return anObj
9252
9253         ## The same, as MultiRotate1D(), but axis is given by direction and point
9254         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9255         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9256             """
9257             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9258             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9259
9260             Example of usage:
9261                 pz = geompy.MakeVertex(0, 0, 100)
9262                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9263                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9264             """
9265             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
9266             aVec = self.MakeLine(aPoint,aDir)
9267             # note: auto-publishing is done in self.MultiRotate1D()
9268             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9269             return anObj
9270
9271         ## The same, as MultiRotate2D(), but axis is given by direction and point
9272         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9273         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9274             """
9275             The same, as MultiRotate2D(), but axis is given by direction and point
9276             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9277
9278             Example of usage:
9279                 pz = geompy.MakeVertex(0, 0, 100)
9280                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9281                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
9282             """
9283             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
9284             aVec = self.MakeLine(aPoint,aDir)
9285             # note: auto-publishing is done in self.MultiRotate2D()
9286             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9287             return anObj
9288
9289         # end of l3_transform_d
9290         ## @}
9291
9292         ## @addtogroup l3_local
9293         ## @{
9294
9295         ## Perform a fillet on all edges of the given shape.
9296         #  @param theShape Shape, to perform fillet on.
9297         #  @param theR Fillet radius.
9298         #  @param theName Object name; when specified, this parameter is used
9299         #         for result publication in the study. Otherwise, if automatic
9300         #         publication is switched on, default value is used for result name.
9301         #
9302         #  @return New GEOM.GEOM_Object, containing the result shape.
9303         #
9304         #  @ref tui_fillet "Example 1"
9305         #  \n @ref swig_MakeFilletAll "Example 2"
9306         @ManageTransactions("LocalOp")
9307         def MakeFilletAll(self, theShape, theR, theName=None):
9308             """
9309             Perform a fillet on all edges of the given shape.
9310
9311             Parameters:
9312                 theShape Shape, to perform fillet on.
9313                 theR Fillet radius.
9314                 theName Object name; when specified, this parameter is used
9315                         for result publication in the study. Otherwise, if automatic
9316                         publication is switched on, default value is used for result name.
9317
9318             Returns:
9319                 New GEOM.GEOM_Object, containing the result shape.
9320
9321             Example of usage:
9322                filletall = geompy.MakeFilletAll(prism, 10.)
9323             """
9324             # Example: see GEOM_TestOthers.py
9325             theR,Parameters = ParseParameters(theR)
9326             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
9327             RaiseIfFailed("MakeFilletAll", self.LocalOp)
9328             anObj.SetParameters(Parameters)
9329             self._autoPublish(anObj, theName, "fillet")
9330             return anObj
9331
9332         ## Perform a fillet on the specified edges/faces of the given shape
9333         #  @param theShape Shape, to perform fillet on.
9334         #  @param theR Fillet radius.
9335         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
9336         #  @param theListShapes Global indices of edges/faces to perform fillet on.
9337         #  @param theName Object name; when specified, this parameter is used
9338         #         for result publication in the study. Otherwise, if automatic
9339         #         publication is switched on, default value is used for result name.
9340         #
9341         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9342         #
9343         #  @return New GEOM.GEOM_Object, containing the result shape.
9344         #
9345         #  @ref tui_fillet "Example"
9346         @ManageTransactions("LocalOp")
9347         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
9348             """
9349             Perform a fillet on the specified edges/faces of the given shape
9350
9351             Parameters:
9352                 theShape Shape, to perform fillet on.
9353                 theR Fillet radius.
9354                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
9355                 theListShapes Global indices of edges/faces to perform fillet on.
9356                 theName Object name; when specified, this parameter is used
9357                         for result publication in the study. Otherwise, if automatic
9358                         publication is switched on, default value is used for result name.
9359
9360             Note:
9361                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9362
9363             Returns:
9364                 New GEOM.GEOM_Object, containing the result shape.
9365
9366             Example of usage:
9367                 # get the list of IDs (IDList) for the fillet
9368                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9369                 IDlist_e = []
9370                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9371                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9372                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9373                 # make a fillet on the specified edges of the given shape
9374                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
9375             """
9376             # Example: see GEOM_TestAll.py
9377             theR,Parameters = ParseParameters(theR)
9378             anObj = None
9379             if theShapeType == self.ShapeType["EDGE"]:
9380                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
9381                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
9382             else:
9383                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
9384                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
9385             anObj.SetParameters(Parameters)
9386             self._autoPublish(anObj, theName, "fillet")
9387             return anObj
9388
9389         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
9390         @ManageTransactions("LocalOp")
9391         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
9392             """
9393             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
9394
9395             Example of usage:
9396                 # get the list of IDs (IDList) for the fillet
9397                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9398                 IDlist_e = []
9399                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9400                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9401                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9402                 # make a fillet on the specified edges of the given shape
9403                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
9404             """
9405             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
9406             anObj = None
9407             if theShapeType == self.ShapeType["EDGE"]:
9408                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
9409                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
9410             else:
9411                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
9412                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
9413             anObj.SetParameters(Parameters)
9414             self._autoPublish(anObj, theName, "fillet")
9415             return anObj
9416
9417         ## Perform a fillet on the specified edges of the given shape
9418         #  @param theShape  Wire Shape to perform fillet on.
9419         #  @param theR  Fillet radius.
9420         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9421         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
9422         #    \note The list of vertices could be empty,
9423         #          in this case fillet will done done at all vertices in wire
9424         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
9425         #         by the length of the edges, nearest to the fillet vertex.
9426         #         But sometimes the next edge is C1 continuous with the one, nearest to
9427         #         the fillet point, and such two (or more) edges can be united to allow
9428         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
9429         #         thus ignoring the secant vertex (vertices).
9430         #  @param theName Object name; when specified, this parameter is used
9431         #         for result publication in the study. Otherwise, if automatic
9432         #         publication is switched on, default value is used for result name.
9433         #
9434         #  @return New GEOM.GEOM_Object, containing the result shape.
9435         #
9436         #  @ref tui_fillet2d "Example"
9437         @ManageTransactions("LocalOp")
9438         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
9439             """
9440             Perform a fillet on the specified edges of the given shape
9441
9442             Parameters:
9443                 theShape  Wire Shape to perform fillet on.
9444                 theR  Fillet radius.
9445                 theListOfVertexes Global indices of vertexes to perform fillet on.
9446                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
9447                     by the length of the edges, nearest to the fillet vertex.
9448                     But sometimes the next edge is C1 continuous with the one, nearest to
9449                     the fillet point, and such two (or more) edges can be united to allow
9450                     bigger radius. Set this flag to TRUE to allow collinear edges union,
9451                     thus ignoring the secant vertex (vertices).
9452                 theName Object name; when specified, this parameter is used
9453                         for result publication in the study. Otherwise, if automatic
9454                         publication is switched on, default value is used for result name.
9455             Note:
9456                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9457
9458                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
9459
9460             Returns:
9461                 New GEOM.GEOM_Object, containing the result shape.
9462
9463             Example of usage:
9464                 # create wire
9465                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
9466                 # make fillet at given wire vertices with giver radius
9467                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
9468             """
9469             # Example: see GEOM_TestAll.py
9470             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
9471             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
9472             RaiseIfFailed("MakeFillet1D", self.LocalOp)
9473             anObj.SetParameters(Parameters)
9474             self._autoPublish(anObj, theName, "fillet")
9475             return anObj
9476
9477         ## Perform a fillet at the specified vertices of the given face/shell.
9478         #  @param theShape Face or Shell shape to perform fillet on.
9479         #  @param theR Fillet radius.
9480         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9481         #  @param theName Object name; when specified, this parameter is used
9482         #         for result publication in the study. Otherwise, if automatic
9483         #         publication is switched on, default value is used for result name.
9484         #
9485         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9486         #
9487         #  @return New GEOM.GEOM_Object, containing the result shape.
9488         #
9489         #  @ref tui_fillet2d "Example"
9490         @ManageTransactions("LocalOp")
9491         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
9492             """
9493             Perform a fillet at the specified vertices of the given face/shell.
9494
9495             Parameters:
9496                 theShape  Face or Shell shape to perform fillet on.
9497                 theR  Fillet radius.
9498                 theListOfVertexes Global indices of vertexes to perform fillet on.
9499                 theName Object name; when specified, this parameter is used
9500                         for result publication in the study. Otherwise, if automatic
9501                         publication is switched on, default value is used for result name.
9502             Note:
9503                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9504
9505             Returns:
9506                 New GEOM.GEOM_Object, containing the result shape.
9507
9508             Example of usage:
9509                 face = geompy.MakeFaceHW(100, 100, 1)
9510                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
9511             """
9512             # Example: see GEOM_TestAll.py
9513             theR,Parameters = ParseParameters(theR)
9514             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
9515             RaiseIfFailed("MakeFillet2D", self.LocalOp)
9516             anObj.SetParameters(Parameters)
9517             self._autoPublish(anObj, theName, "fillet")
9518             return anObj
9519
9520         ## Perform a symmetric chamfer on all edges of the given shape.
9521         #  @param theShape Shape, to perform chamfer on.
9522         #  @param theD Chamfer size along each face.
9523         #  @param theName Object name; when specified, this parameter is used
9524         #         for result publication in the study. Otherwise, if automatic
9525         #         publication is switched on, default value is used for result name.
9526         #
9527         #  @return New GEOM.GEOM_Object, containing the result shape.
9528         #
9529         #  @ref tui_chamfer "Example 1"
9530         #  \n @ref swig_MakeChamferAll "Example 2"
9531         @ManageTransactions("LocalOp")
9532         def MakeChamferAll(self, theShape, theD, theName=None):
9533             """
9534             Perform a symmetric chamfer on all edges of the given shape.
9535
9536             Parameters:
9537                 theShape Shape, to perform chamfer on.
9538                 theD Chamfer size along each face.
9539                 theName Object name; when specified, this parameter is used
9540                         for result publication in the study. Otherwise, if automatic
9541                         publication is switched on, default value is used for result name.
9542
9543             Returns:
9544                 New GEOM.GEOM_Object, containing the result shape.
9545
9546             Example of usage:
9547                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9548             """
9549             # Example: see GEOM_TestOthers.py
9550             theD,Parameters = ParseParameters(theD)
9551             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9552             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9553             anObj.SetParameters(Parameters)
9554             self._autoPublish(anObj, theName, "chamfer")
9555             return anObj
9556
9557         ## Perform a chamfer on edges, common to the specified faces,
9558         #  with distance D1 on the Face1
9559         #  @param theShape Shape, to perform chamfer on.
9560         #  @param theD1 Chamfer size along \a theFace1.
9561         #  @param theD2 Chamfer size along \a theFace2.
9562         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9563         #  @param theName Object name; when specified, this parameter is used
9564         #         for result publication in the study. Otherwise, if automatic
9565         #         publication is switched on, default value is used for result name.
9566         #
9567         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9568         #
9569         #  @return New GEOM.GEOM_Object, containing the result shape.
9570         #
9571         #  @ref tui_chamfer "Example"
9572         @ManageTransactions("LocalOp")
9573         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9574             """
9575             Perform a chamfer on edges, common to the specified faces,
9576             with distance D1 on the Face1
9577
9578             Parameters:
9579                 theShape Shape, to perform chamfer on.
9580                 theD1 Chamfer size along theFace1.
9581                 theD2 Chamfer size along theFace2.
9582                 theFace1,theFace2 Global indices of two faces of theShape.
9583                 theName Object name; when specified, this parameter is used
9584                         for result publication in the study. Otherwise, if automatic
9585                         publication is switched on, default value is used for result name.
9586
9587             Note:
9588                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9589
9590             Returns:
9591                 New GEOM.GEOM_Object, containing the result shape.
9592
9593             Example of usage:
9594                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9595                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9596                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9597                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
9598             """
9599             # Example: see GEOM_TestAll.py
9600             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9601             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
9602             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
9603             anObj.SetParameters(Parameters)
9604             self._autoPublish(anObj, theName, "chamfer")
9605             return anObj
9606
9607         ## Perform a chamfer on edges
9608         #  @param theShape Shape, to perform chamfer on.
9609         #  @param theD Chamfer length
9610         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9611         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9612         #  @param theName Object name; when specified, this parameter is used
9613         #         for result publication in the study. Otherwise, if automatic
9614         #         publication is switched on, default value is used for result name.
9615         #
9616         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9617         #
9618         #  @return New GEOM.GEOM_Object, containing the result shape.
9619         @ManageTransactions("LocalOp")
9620         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
9621             """
9622             Perform a chamfer on edges
9623
9624             Parameters:
9625                 theShape Shape, to perform chamfer on.
9626                 theD1 Chamfer size along theFace1.
9627                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
9628                 theFace1,theFace2 Global indices of two faces of theShape.
9629                 theName Object name; when specified, this parameter is used
9630                         for result publication in the study. Otherwise, if automatic
9631                         publication is switched on, default value is used for result name.
9632
9633             Note:
9634                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9635
9636             Returns:
9637                 New GEOM.GEOM_Object, containing the result shape.
9638
9639             Example of usage:
9640                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9641                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9642                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9643                 ang = 30
9644                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
9645             """
9646             flag = False
9647             if isinstance(theAngle,str):
9648                 flag = True
9649             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9650             if flag:
9651                 theAngle = theAngle*math.pi/180.0
9652             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
9653             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
9654             anObj.SetParameters(Parameters)
9655             self._autoPublish(anObj, theName, "chamfer")
9656             return anObj
9657
9658         ## Perform a chamfer on all edges of the specified faces,
9659         #  with distance D1 on the first specified face (if several for one edge)
9660         #  @param theShape Shape, to perform chamfer on.
9661         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
9662         #               connected to the edge, are in \a theFaces, \a theD1
9663         #               will be get along face, which is nearer to \a theFaces beginning.
9664         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
9665         #  @param theFaces Sequence of global indices of faces of \a theShape.
9666         #  @param theName Object name; when specified, this parameter is used
9667         #         for result publication in the study. Otherwise, if automatic
9668         #         publication is switched on, default value is used for result name.
9669         #
9670         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9671         #
9672         #  @return New GEOM.GEOM_Object, containing the result shape.
9673         #
9674         #  @ref tui_chamfer "Example"
9675         @ManageTransactions("LocalOp")
9676         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
9677             """
9678             Perform a chamfer on all edges of the specified faces,
9679             with distance D1 on the first specified face (if several for one edge)
9680
9681             Parameters:
9682                 theShape Shape, to perform chamfer on.
9683                 theD1 Chamfer size along face from  theFaces. If both faces,
9684                       connected to the edge, are in theFaces, theD1
9685                       will be get along face, which is nearer to theFaces beginning.
9686                 theD2 Chamfer size along another of two faces, connected to the edge.
9687                 theFaces Sequence of global indices of faces of theShape.
9688                 theName Object name; when specified, this parameter is used
9689                         for result publication in the study. Otherwise, if automatic
9690                         publication is switched on, default value is used for result name.
9691
9692             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
9693
9694             Returns:
9695                 New GEOM.GEOM_Object, containing the result shape.
9696             """
9697             # Example: see GEOM_TestAll.py
9698             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9699             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
9700             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
9701             anObj.SetParameters(Parameters)
9702             self._autoPublish(anObj, theName, "chamfer")
9703             return anObj
9704
9705         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
9706         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9707         #
9708         #  @ref swig_FilletChamfer "Example"
9709         @ManageTransactions("LocalOp")
9710         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
9711             """
9712             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
9713             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9714             """
9715             flag = False
9716             if isinstance(theAngle,str):
9717                 flag = True
9718             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9719             if flag:
9720                 theAngle = theAngle*math.pi/180.0
9721             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
9722             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
9723             anObj.SetParameters(Parameters)
9724             self._autoPublish(anObj, theName, "chamfer")
9725             return anObj
9726
9727         ## Perform a chamfer on edges,
9728         #  with distance D1 on the first specified face (if several for one edge)
9729         #  @param theShape Shape, to perform chamfer on.
9730         #  @param theD1,theD2 Chamfer size
9731         #  @param theEdges Sequence of edges of \a theShape.
9732         #  @param theName Object name; when specified, this parameter is used
9733         #         for result publication in the study. Otherwise, if automatic
9734         #         publication is switched on, default value is used for result name.
9735         #
9736         #  @return New GEOM.GEOM_Object, containing the result shape.
9737         #
9738         #  @ref swig_FilletChamfer "Example"
9739         @ManageTransactions("LocalOp")
9740         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
9741             """
9742             Perform a chamfer on edges,
9743             with distance D1 on the first specified face (if several for one edge)
9744
9745             Parameters:
9746                 theShape Shape, to perform chamfer on.
9747                 theD1,theD2 Chamfer size
9748                 theEdges Sequence of edges of theShape.
9749                 theName Object name; when specified, this parameter is used
9750                         for result publication in the study. Otherwise, if automatic
9751                         publication is switched on, default value is used for result name.
9752
9753             Returns:
9754                 New GEOM.GEOM_Object, containing the result shape.
9755             """
9756             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9757             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
9758             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
9759             anObj.SetParameters(Parameters)
9760             self._autoPublish(anObj, theName, "chamfer")
9761             return anObj
9762
9763         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
9764         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9765         @ManageTransactions("LocalOp")
9766         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
9767             """
9768             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
9769             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9770             """
9771             flag = False
9772             if isinstance(theAngle,str):
9773                 flag = True
9774             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9775             if flag:
9776                 theAngle = theAngle*math.pi/180.0
9777             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
9778             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
9779             anObj.SetParameters(Parameters)
9780             self._autoPublish(anObj, theName, "chamfer")
9781             return anObj
9782
9783         ## @sa MakeChamferEdge(), MakeChamferFaces()
9784         #
9785         #  @ref swig_MakeChamfer "Example"
9786         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
9787             """
9788             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
9789             """
9790             # Example: see GEOM_TestOthers.py
9791             anObj = None
9792             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
9793             if aShapeType == self.ShapeType["EDGE"]:
9794                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
9795             else:
9796                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
9797             return anObj
9798
9799         ## Remove material from a solid by extrusion of the base shape on the given distance.
9800         #  @param theInit Shape to remove material from. It must be a solid or
9801         #  a compound made of a single solid.
9802         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9803         #  @param theH Prism dimension along the normal to theBase
9804         #  @param theAngle Draft angle in degrees.
9805         #  @param theName Object name; when specified, this parameter is used
9806         #         for result publication in the study. Otherwise, if automatic
9807         #         publication is switched on, default value is used for result name.
9808         #
9809         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
9810         #
9811         #  @ref tui_creation_prism "Example"
9812         @ManageTransactions("PrimOp")
9813         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9814             """
9815             Add material to a solid by extrusion of the base shape on the given distance.
9816
9817             Parameters:
9818                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9819                 theBase Closed edge or wire defining the base shape to be extruded.
9820                 theH Prism dimension along the normal  to theBase
9821                 theAngle Draft angle in degrees.
9822                 theName Object name; when specified, this parameter is used
9823                         for result publication in the study. Otherwise, if automatic
9824                         publication is switched on, default value is used for result name.
9825
9826             Returns:
9827                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9828             """
9829             # Example: see GEOM_TestAll.py
9830             #theH,Parameters = ParseParameters(theH)
9831             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9832             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9833             #anObj.SetParameters(Parameters)
9834             self._autoPublish(anObj, theName, "extrudedCut")
9835             return anObj
9836
9837         ## Add material to a solid by extrusion of the base shape on the given distance.
9838         #  @param theInit Shape to add material to. It must be a solid or
9839         #  a compound made of a single solid.
9840         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9841         #  @param theH Prism dimension along the normal to theBase
9842         #  @param theAngle Draft angle in degrees.
9843         #  @param theName Object name; when specified, this parameter is used
9844         #         for result publication in the study. Otherwise, if automatic
9845         #         publication is switched on, default value is used for result name.
9846         #
9847         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
9848         #
9849         #  @ref tui_creation_prism "Example"
9850         @ManageTransactions("PrimOp")
9851         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
9852             """
9853             Add material to a solid by extrusion of the base shape on the given distance.
9854
9855             Parameters:
9856                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
9857                 theBase Closed edge or wire defining the base shape to be extruded.
9858                 theH Prism dimension along the normal  to theBase
9859                 theAngle Draft angle in degrees.
9860                 theName Object name; when specified, this parameter is used
9861                         for result publication in the study. Otherwise, if automatic
9862                         publication is switched on, default value is used for result name.
9863
9864             Returns:
9865                 New GEOM.GEOM_Object,  containing the initial shape with added material.
9866             """
9867             # Example: see GEOM_TestAll.py
9868             #theH,Parameters = ParseParameters(theH)
9869             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
9870             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9871             #anObj.SetParameters(Parameters)
9872             self._autoPublish(anObj, theName, "extrudedBoss")
9873             return anObj
9874
9875         # end of l3_local
9876         ## @}
9877
9878         ## @addtogroup l3_basic_op
9879         ## @{
9880
9881         ## Perform an Archimde operation on the given shape with given parameters.
9882         #  The object presenting the resulting face is returned.
9883         #  @param theShape Shape to be put in water.
9884         #  @param theWeight Weight of the shape.
9885         #  @param theWaterDensity Density of the water.
9886         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
9887         #  @param theName Object name; when specified, this parameter is used
9888         #         for result publication in the study. Otherwise, if automatic
9889         #         publication is switched on, default value is used for result name.
9890         #
9891         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
9892         #          by a plane, corresponding to water level.
9893         #
9894         #  @ref tui_archimede "Example"
9895         @ManageTransactions("LocalOp")
9896         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9897             """
9898             Perform an Archimde operation on the given shape with given parameters.
9899             The object presenting the resulting face is returned.
9900
9901             Parameters:
9902                 theShape Shape to be put in water.
9903                 theWeight Weight of the shape.
9904                 theWaterDensity Density of the water.
9905                 theMeshDeflection Deflection of the mesh, using to compute the section.
9906                 theName Object name; when specified, this parameter is used
9907                         for result publication in the study. Otherwise, if automatic
9908                         publication is switched on, default value is used for result name.
9909
9910             Returns:
9911                 New GEOM.GEOM_Object, containing a section of theShape
9912                 by a plane, corresponding to water level.
9913             """
9914             # Example: see GEOM_TestAll.py
9915             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9916               theWeight,theWaterDensity,theMeshDeflection)
9917             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9918             RaiseIfFailed("MakeArchimede", self.LocalOp)
9919             anObj.SetParameters(Parameters)
9920             self._autoPublish(anObj, theName, "archimede")
9921             return anObj
9922
9923         # end of l3_basic_op
9924         ## @}
9925
9926         ## @addtogroup l2_measure
9927         ## @{
9928
9929         ## Get point coordinates
9930         #  @return [x, y, z]
9931         #
9932         #  @ref tui_measurement_tools_page "Example"
9933         @ManageTransactions("MeasuOp")
9934         def PointCoordinates(self,Point):
9935             """
9936             Get point coordinates
9937
9938             Returns:
9939                 [x, y, z]
9940             """
9941             # Example: see GEOM_TestMeasures.py
9942             aTuple = self.MeasuOp.PointCoordinates(Point)
9943             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9944             return aTuple
9945
9946         ## Get vector coordinates
9947         #  @return [x, y, z]
9948         #
9949         #  @ref tui_measurement_tools_page "Example"
9950         def VectorCoordinates(self,Vector):
9951             """
9952             Get vector coordinates
9953
9954             Returns:
9955                 [x, y, z]
9956             """
9957
9958             p1=self.GetFirstVertex(Vector)
9959             p2=self.GetLastVertex(Vector)
9960
9961             X1=self.PointCoordinates(p1)
9962             X2=self.PointCoordinates(p2)
9963
9964             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9965
9966
9967         ## Compute cross product
9968         #  @return vector w=u^v
9969         #
9970         #  @ref tui_measurement_tools_page "Example"
9971         def CrossProduct(self, Vector1, Vector2):
9972             """
9973             Compute cross product
9974
9975             Returns: vector w=u^v
9976             """
9977             u=self.VectorCoordinates(Vector1)
9978             v=self.VectorCoordinates(Vector2)
9979             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])
9980
9981             return w
9982
9983         ## Compute cross product
9984         #  @return dot product  p=u.v
9985         #
9986         #  @ref tui_measurement_tools_page "Example"
9987         def DotProduct(self, Vector1, Vector2):
9988             """
9989             Compute cross product
9990
9991             Returns: dot product  p=u.v
9992             """
9993             u=self.VectorCoordinates(Vector1)
9994             v=self.VectorCoordinates(Vector2)
9995             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9996
9997             return p
9998
9999
10000         ## Get summarized length of all wires,
10001         #  area of surface and volume of the given shape.
10002         #  @param theShape Shape to define properties of.
10003         #  @return [theLength, theSurfArea, theVolume]\n
10004         #  theLength:   Summarized length of all wires of the given shape.\n
10005         #  theSurfArea: Area of surface of the given shape.\n
10006         #  theVolume:   Volume of the given shape.
10007         #
10008         #  @ref tui_measurement_tools_page "Example"
10009         @ManageTransactions("MeasuOp")
10010         def BasicProperties(self,theShape):
10011             """
10012             Get summarized length of all wires,
10013             area of surface and volume of the given shape.
10014
10015             Parameters:
10016                 theShape Shape to define properties of.
10017
10018             Returns:
10019                 [theLength, theSurfArea, theVolume]
10020                  theLength:   Summarized length of all wires of the given shape.
10021                  theSurfArea: Area of surface of the given shape.
10022                  theVolume:   Volume of the given shape.
10023             """
10024             # Example: see GEOM_TestMeasures.py
10025             aTuple = self.MeasuOp.GetBasicProperties(theShape)
10026             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10027             return aTuple
10028
10029         ## Get parameters of bounding box of the given shape
10030         #  @param theShape Shape to obtain bounding box of.
10031         #  @param precise TRUE for precise computation; FALSE for fast one.
10032         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10033         #  Xmin,Xmax: Limits of shape along OX axis.
10034         #  Ymin,Ymax: Limits of shape along OY axis.
10035         #  Zmin,Zmax: Limits of shape along OZ axis.
10036         #
10037         #  @ref tui_measurement_tools_page "Example"
10038         @ManageTransactions("MeasuOp")
10039         def BoundingBox (self, theShape, precise=False):
10040             """
10041             Get parameters of bounding box of the given shape
10042
10043             Parameters:
10044                 theShape Shape to obtain bounding box of.
10045                 precise TRUE for precise computation; FALSE for fast one.
10046
10047             Returns:
10048                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10049                  Xmin,Xmax: Limits of shape along OX axis.
10050                  Ymin,Ymax: Limits of shape along OY axis.
10051                  Zmin,Zmax: Limits of shape along OZ axis.
10052             """
10053             # Example: see GEOM_TestMeasures.py
10054             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10055             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10056             return aTuple
10057
10058         ## Get bounding box of the given shape
10059         #  @param theShape Shape to obtain bounding box of.
10060         #  @param precise TRUE for precise computation; FALSE for fast one.
10061         #  @param theName Object name; when specified, this parameter is used
10062         #         for result publication in the study. Otherwise, if automatic
10063         #         publication is switched on, default value is used for result name.
10064         #
10065         #  @return New GEOM.GEOM_Object, containing the created box.
10066         #
10067         #  @ref tui_measurement_tools_page "Example"
10068         @ManageTransactions("MeasuOp")
10069         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10070             """
10071             Get bounding box of the given shape
10072
10073             Parameters:
10074                 theShape Shape to obtain bounding box of.
10075                 precise TRUE for precise computation; FALSE for fast one.
10076                 theName Object name; when specified, this parameter is used
10077                         for result publication in the study. Otherwise, if automatic
10078                         publication is switched on, default value is used for result name.
10079
10080             Returns:
10081                 New GEOM.GEOM_Object, containing the created box.
10082             """
10083             # Example: see GEOM_TestMeasures.py
10084             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10085             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10086             self._autoPublish(anObj, theName, "bndbox")
10087             return anObj
10088
10089         ## Get inertia matrix and moments of inertia of theShape.
10090         #  @param theShape Shape to calculate inertia of.
10091         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10092         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10093         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10094         #
10095         #  @ref tui_measurement_tools_page "Example"
10096         @ManageTransactions("MeasuOp")
10097         def Inertia(self,theShape):
10098             """
10099             Get inertia matrix and moments of inertia of theShape.
10100
10101             Parameters:
10102                 theShape Shape to calculate inertia of.
10103
10104             Returns:
10105                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10106                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10107                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10108             """
10109             # Example: see GEOM_TestMeasures.py
10110             aTuple = self.MeasuOp.GetInertia(theShape)
10111             RaiseIfFailed("GetInertia", self.MeasuOp)
10112             return aTuple
10113
10114         ## Get if coords are included in the shape (ST_IN or ST_ON)
10115         #  @param theShape Shape
10116         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10117         #  @param tolerance to be used (default is 1.0e-7)
10118         #  @return list_of_boolean = [res1, res2, ...]
10119         @ManageTransactions("MeasuOp")
10120         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10121             """
10122             Get if coords are included in the shape (ST_IN or ST_ON)
10123
10124             Parameters:
10125                 theShape Shape
10126                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10127                 tolerance to be used (default is 1.0e-7)
10128
10129             Returns:
10130                 list_of_boolean = [res1, res2, ...]
10131             """
10132             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10133
10134         ## Get minimal distance between the given shapes.
10135         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10136         #  @return Value of the minimal distance between the given shapes.
10137         #
10138         #  @ref tui_measurement_tools_page "Example"
10139         @ManageTransactions("MeasuOp")
10140         def MinDistance(self, theShape1, theShape2):
10141             """
10142             Get minimal distance between the given shapes.
10143
10144             Parameters:
10145                 theShape1,theShape2 Shapes to find minimal distance between.
10146
10147             Returns:
10148                 Value of the minimal distance between the given shapes.
10149             """
10150             # Example: see GEOM_TestMeasures.py
10151             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10152             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10153             return aTuple[0]
10154
10155         ## Get minimal distance between the given shapes.
10156         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10157         #  @return Value of the minimal distance between the given shapes, in form of list
10158         #          [Distance, DX, DY, DZ].
10159         #
10160         #  @ref swig_all_measure "Example"
10161         @ManageTransactions("MeasuOp")
10162         def MinDistanceComponents(self, theShape1, theShape2):
10163             """
10164             Get minimal distance between the given shapes.
10165
10166             Parameters:
10167                 theShape1,theShape2 Shapes to find minimal distance between.
10168
10169             Returns:
10170                 Value of the minimal distance between the given shapes, in form of list
10171                 [Distance, DX, DY, DZ]
10172             """
10173             # Example: see GEOM_TestMeasures.py
10174             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10175             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10176             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10177             return aRes
10178
10179         ## Get closest points of the given shapes.
10180         #  @param theShape1,theShape2 Shapes to find closest points of.
10181         #  @return The number of found solutions (-1 in case of infinite number of
10182         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10183         #
10184         #  @ref tui_measurement_tools_page "Example"
10185         @ManageTransactions("MeasuOp")
10186         def ClosestPoints (self, theShape1, theShape2):
10187             """
10188             Get closest points of the given shapes.
10189
10190             Parameters:
10191                 theShape1,theShape2 Shapes to find closest points of.
10192
10193             Returns:
10194                 The number of found solutions (-1 in case of infinite number of
10195                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10196             """
10197             # Example: see GEOM_TestMeasures.py
10198             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10199             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10200             return aTuple
10201
10202         ## Get angle between the given shapes in degrees.
10203         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10204         #  @note If both arguments are vectors, the angle is computed in accordance
10205         #        with their orientations, otherwise the minimum angle is computed.
10206         #  @return Value of the angle between the given shapes in degrees.
10207         #
10208         #  @ref tui_measurement_tools_page "Example"
10209         @ManageTransactions("MeasuOp")
10210         def GetAngle(self, theShape1, theShape2):
10211             """
10212             Get angle between the given shapes in degrees.
10213
10214             Parameters:
10215                 theShape1,theShape2 Lines or linear edges to find angle between.
10216
10217             Note:
10218                 If both arguments are vectors, the angle is computed in accordance
10219                 with their orientations, otherwise the minimum angle is computed.
10220
10221             Returns:
10222                 Value of the angle between the given shapes in degrees.
10223             """
10224             # Example: see GEOM_TestMeasures.py
10225             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10226             RaiseIfFailed("GetAngle", self.MeasuOp)
10227             return anAngle
10228
10229         ## Get angle between the given shapes in radians.
10230         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10231         #  @note If both arguments are vectors, the angle is computed in accordance
10232         #        with their orientations, otherwise the minimum angle is computed.
10233         #  @return Value of the angle between the given shapes in radians.
10234         #
10235         #  @ref tui_measurement_tools_page "Example"
10236         @ManageTransactions("MeasuOp")
10237         def GetAngleRadians(self, theShape1, theShape2):
10238             """
10239             Get angle between the given shapes in radians.
10240
10241             Parameters:
10242                 theShape1,theShape2 Lines or linear edges to find angle between.
10243
10244
10245             Note:
10246                 If both arguments are vectors, the angle is computed in accordance
10247                 with their orientations, otherwise the minimum angle is computed.
10248
10249             Returns:
10250                 Value of the angle between the given shapes in radians.
10251             """
10252             # Example: see GEOM_TestMeasures.py
10253             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10254             RaiseIfFailed("GetAngle", self.MeasuOp)
10255             return anAngle
10256
10257         ## Get angle between the given vectors in degrees.
10258         #  @param theShape1,theShape2 Vectors to find angle between.
10259         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10260         #                 if False, the opposite vector to the normal vector is used.
10261         #  @return Value of the angle between the given vectors in degrees.
10262         #
10263         #  @ref tui_measurement_tools_page "Example"
10264         @ManageTransactions("MeasuOp")
10265         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10266             """
10267             Get angle between the given vectors in degrees.
10268
10269             Parameters:
10270                 theShape1,theShape2 Vectors to find angle between.
10271                 theFlag If True, the normal vector is defined by the two vectors cross,
10272                         if False, the opposite vector to the normal vector is used.
10273
10274             Returns:
10275                 Value of the angle between the given vectors in degrees.
10276             """
10277             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
10278             if not theFlag:
10279                 anAngle = 360. - anAngle
10280             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
10281             return anAngle
10282
10283         ## The same as GetAngleVectors, but the result is in radians.
10284         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
10285             """
10286             Get angle between the given vectors in radians.
10287
10288             Parameters:
10289                 theShape1,theShape2 Vectors to find angle between.
10290                 theFlag If True, the normal vector is defined by the two vectors cross,
10291                         if False, the opposite vector to the normal vector is used.
10292
10293             Returns:
10294                 Value of the angle between the given vectors in radians.
10295             """
10296             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
10297             return anAngle
10298
10299         ## @name Curve Curvature Measurement
10300         #  Methods for receiving radius of curvature of curves
10301         #  in the given point
10302         ## @{
10303
10304         ## Measure curvature of a curve at a point, set by parameter.
10305         #  @param theCurve a curve.
10306         #  @param theParam parameter.
10307         #  @return radius of curvature of \a theCurve.
10308         #
10309         #  @ref swig_todo "Example"
10310         @ManageTransactions("MeasuOp")
10311         def CurveCurvatureByParam(self, theCurve, theParam):
10312             """
10313             Measure curvature of a curve at a point, set by parameter.
10314
10315             Parameters:
10316                 theCurve a curve.
10317                 theParam parameter.
10318
10319             Returns:
10320                 radius of curvature of theCurve.
10321             """
10322             # Example: see GEOM_TestMeasures.py
10323             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
10324             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
10325             return aCurv
10326
10327         ## Measure curvature of a curve at a point.
10328         #  @param theCurve a curve.
10329         #  @param thePoint given point.
10330         #  @return radius of curvature of \a theCurve.
10331         #
10332         #  @ref swig_todo "Example"
10333         @ManageTransactions("MeasuOp")
10334         def CurveCurvatureByPoint(self, theCurve, thePoint):
10335             """
10336             Measure curvature of a curve at a point.
10337
10338             Parameters:
10339                 theCurve a curve.
10340                 thePoint given point.
10341
10342             Returns:
10343                 radius of curvature of theCurve.
10344             """
10345             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
10346             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
10347             return aCurv
10348         ## @}
10349
10350         ## @name Surface Curvature Measurement
10351         #  Methods for receiving max and min radius of curvature of surfaces
10352         #  in the given point
10353         ## @{
10354
10355         ## Measure max radius of curvature of surface.
10356         #  @param theSurf the given surface.
10357         #  @param theUParam Value of U-parameter on the referenced surface.
10358         #  @param theVParam Value of V-parameter on the referenced surface.
10359         #  @return max radius of curvature of theSurf.
10360         #
10361         ## @ref swig_todo "Example"
10362         @ManageTransactions("MeasuOp")
10363         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10364             """
10365             Measure max radius of curvature of surface.
10366
10367             Parameters:
10368                 theSurf the given surface.
10369                 theUParam Value of U-parameter on the referenced surface.
10370                 theVParam Value of V-parameter on the referenced surface.
10371
10372             Returns:
10373                 max radius of curvature of theSurf.
10374             """
10375             # Example: see GEOM_TestMeasures.py
10376             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10377             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
10378             return aSurf
10379
10380         ## Measure max radius of curvature of surface in the given point
10381         #  @param theSurf the given surface.
10382         #  @param thePoint given point.
10383         #  @return max radius of curvature of theSurf.
10384         #
10385         ## @ref swig_todo "Example"
10386         @ManageTransactions("MeasuOp")
10387         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
10388             """
10389             Measure max radius of curvature of surface in the given point.
10390
10391             Parameters:
10392                 theSurf the given surface.
10393                 thePoint given point.
10394
10395             Returns:
10396                 max radius of curvature of theSurf.
10397             """
10398             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
10399             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
10400             return aSurf
10401
10402         ## Measure min radius of curvature of surface.
10403         #  @param theSurf the given surface.
10404         #  @param theUParam Value of U-parameter on the referenced surface.
10405         #  @param theVParam Value of V-parameter on the referenced surface.
10406         #  @return min radius of curvature of theSurf.
10407         #
10408         ## @ref swig_todo "Example"
10409         @ManageTransactions("MeasuOp")
10410         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10411             """
10412             Measure min radius of curvature of surface.
10413
10414             Parameters:
10415                 theSurf the given surface.
10416                 theUParam Value of U-parameter on the referenced surface.
10417                 theVParam Value of V-parameter on the referenced surface.
10418
10419             Returns:
10420                 Min radius of curvature of theSurf.
10421             """
10422             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10423             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
10424             return aSurf
10425
10426         ## Measure min radius of curvature of surface in the given point
10427         #  @param theSurf the given surface.
10428         #  @param thePoint given point.
10429         #  @return min radius of curvature of theSurf.
10430         #
10431         ## @ref swig_todo "Example"
10432         @ManageTransactions("MeasuOp")
10433         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
10434             """
10435             Measure min radius of curvature of surface in the given point.
10436
10437             Parameters:
10438                 theSurf the given surface.
10439                 thePoint given point.
10440
10441             Returns:
10442                 Min radius of curvature of theSurf.
10443             """
10444             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
10445             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
10446             return aSurf
10447         ## @}
10448
10449         ## Get min and max tolerances of sub-shapes of theShape
10450         #  @param theShape Shape, to get tolerances of.
10451         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
10452         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
10453         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
10454         #  VertMin,VertMax: Min and max tolerances of the vertices.
10455         #
10456         #  @ref tui_measurement_tools_page "Example"
10457         @ManageTransactions("MeasuOp")
10458         def Tolerance(self,theShape):
10459             """
10460             Get min and max tolerances of sub-shapes of theShape
10461
10462             Parameters:
10463                 theShape Shape, to get tolerances of.
10464
10465             Returns:
10466                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
10467                  FaceMin,FaceMax: Min and max tolerances of the faces.
10468                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
10469                  VertMin,VertMax: Min and max tolerances of the vertices.
10470             """
10471             # Example: see GEOM_TestMeasures.py
10472             aTuple = self.MeasuOp.GetTolerance(theShape)
10473             RaiseIfFailed("GetTolerance", self.MeasuOp)
10474             return aTuple
10475
10476         ## Obtain description of the given shape (number of sub-shapes of each type)
10477         #  @param theShape Shape to be described.
10478         #  @return Description of the given shape.
10479         #
10480         #  @ref tui_measurement_tools_page "Example"
10481         @ManageTransactions("MeasuOp")
10482         def WhatIs(self,theShape):
10483             """
10484             Obtain description of the given shape (number of sub-shapes of each type)
10485
10486             Parameters:
10487                 theShape Shape to be described.
10488
10489             Returns:
10490                 Description of the given shape.
10491             """
10492             # Example: see GEOM_TestMeasures.py
10493             aDescr = self.MeasuOp.WhatIs(theShape)
10494             RaiseIfFailed("WhatIs", self.MeasuOp)
10495             return aDescr
10496
10497         ## Obtain quantity of shapes of the given type in \a theShape.
10498         #  If \a theShape is of type \a theType, it is also counted.
10499         #  @param theShape Shape to be described.
10500         #  @param theType the given ShapeType().
10501         #  @return Quantity of shapes of type \a theType in \a theShape.
10502         #
10503         #  @ref tui_measurement_tools_page "Example"
10504         def NbShapes (self, theShape, theType):
10505             """
10506             Obtain quantity of shapes of the given type in theShape.
10507             If theShape is of type theType, it is also counted.
10508
10509             Parameters:
10510                 theShape Shape to be described.
10511                 theType the given geompy.ShapeType
10512
10513             Returns:
10514                 Quantity of shapes of type theType in theShape.
10515             """
10516             # Example: see GEOM_TestMeasures.py
10517             listSh = self.SubShapeAllIDs(theShape, theType)
10518             Nb = len(listSh)
10519             return Nb
10520
10521         ## Obtain quantity of shapes of each type in \a theShape.
10522         #  The \a theShape is also counted.
10523         #  @param theShape Shape to be described.
10524         #  @return Dictionary of ShapeType() with bound quantities of shapes.
10525         #
10526         #  @ref tui_measurement_tools_page "Example"
10527         def ShapeInfo (self, theShape):
10528             """
10529             Obtain quantity of shapes of each type in theShape.
10530             The theShape is also counted.
10531
10532             Parameters:
10533                 theShape Shape to be described.
10534
10535             Returns:
10536                 Dictionary of geompy.ShapeType with bound quantities of shapes.
10537             """
10538             # Example: see GEOM_TestMeasures.py
10539             aDict = {}
10540             for typeSh in self.ShapeType:
10541                 if typeSh in ( "AUTO", "SHAPE" ): continue
10542                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
10543                 Nb = len(listSh)
10544                 aDict[typeSh] = Nb
10545                 pass
10546             return aDict
10547
10548         def GetCreationInformation(self, theShape):
10549             info = theShape.GetCreationInformation()
10550             # operationName
10551             opName = info.operationName
10552             if not opName: opName = "no info available"
10553             res = "Operation: " + opName
10554             # parameters
10555             for parVal in info.params:
10556                 res += " \n %s = %s" % ( parVal.name, parVal.value )
10557             return res
10558
10559         ## Get a point, situated at the centre of mass of theShape.
10560         #  @param theShape Shape to define centre of mass of.
10561         #  @param theName Object name; when specified, this parameter is used
10562         #         for result publication in the study. Otherwise, if automatic
10563         #         publication is switched on, default value is used for result name.
10564         #
10565         #  @return New GEOM.GEOM_Object, containing the created point.
10566         #
10567         #  @ref tui_measurement_tools_page "Example"
10568         @ManageTransactions("MeasuOp")
10569         def MakeCDG(self, theShape, theName=None):
10570             """
10571             Get a point, situated at the centre of mass of theShape.
10572
10573             Parameters:
10574                 theShape Shape to define centre of mass of.
10575                 theName Object name; when specified, this parameter is used
10576                         for result publication in the study. Otherwise, if automatic
10577                         publication is switched on, default value is used for result name.
10578
10579             Returns:
10580                 New GEOM.GEOM_Object, containing the created point.
10581             """
10582             # Example: see GEOM_TestMeasures.py
10583             anObj = self.MeasuOp.GetCentreOfMass(theShape)
10584             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
10585             self._autoPublish(anObj, theName, "centerOfMass")
10586             return anObj
10587
10588         ## Get a vertex sub-shape by index depended with orientation.
10589         #  @param theShape Shape to find sub-shape.
10590         #  @param theIndex Index to find vertex by this index (starting from zero)
10591         #  @param theName Object name; when specified, this parameter is used
10592         #         for result publication in the study. Otherwise, if automatic
10593         #         publication is switched on, default value is used for result name.
10594         #
10595         #  @return New GEOM.GEOM_Object, containing the created vertex.
10596         #
10597         #  @ref tui_measurement_tools_page "Example"
10598         @ManageTransactions("MeasuOp")
10599         def GetVertexByIndex(self, theShape, theIndex, theName=None):
10600             """
10601             Get a vertex sub-shape by index depended with orientation.
10602
10603             Parameters:
10604                 theShape Shape to find sub-shape.
10605                 theIndex Index to find vertex by this index (starting from zero)
10606                 theName Object name; when specified, this parameter is used
10607                         for result publication in the study. Otherwise, if automatic
10608                         publication is switched on, default value is used for result name.
10609
10610             Returns:
10611                 New GEOM.GEOM_Object, containing the created vertex.
10612             """
10613             # Example: see GEOM_TestMeasures.py
10614             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
10615             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
10616             self._autoPublish(anObj, theName, "vertex")
10617             return anObj
10618
10619         ## Get the first vertex of wire/edge depended orientation.
10620         #  @param theShape Shape to find first vertex.
10621         #  @param theName Object name; when specified, this parameter is used
10622         #         for result publication in the study. Otherwise, if automatic
10623         #         publication is switched on, default value is used for result name.
10624         #
10625         #  @return New GEOM.GEOM_Object, containing the created vertex.
10626         #
10627         #  @ref tui_measurement_tools_page "Example"
10628         def GetFirstVertex(self, theShape, theName=None):
10629             """
10630             Get the first vertex of wire/edge depended orientation.
10631
10632             Parameters:
10633                 theShape Shape to find first vertex.
10634                 theName Object name; when specified, this parameter is used
10635                         for result publication in the study. Otherwise, if automatic
10636                         publication is switched on, default value is used for result name.
10637
10638             Returns:
10639                 New GEOM.GEOM_Object, containing the created vertex.
10640             """
10641             # Example: see GEOM_TestMeasures.py
10642             # note: auto-publishing is done in self.GetVertexByIndex()
10643             return self.GetVertexByIndex(theShape, 0, theName)
10644
10645         ## Get the last vertex of wire/edge depended orientation.
10646         #  @param theShape Shape to find last vertex.
10647         #  @param theName Object name; when specified, this parameter is used
10648         #         for result publication in the study. Otherwise, if automatic
10649         #         publication is switched on, default value is used for result name.
10650         #
10651         #  @return New GEOM.GEOM_Object, containing the created vertex.
10652         #
10653         #  @ref tui_measurement_tools_page "Example"
10654         def GetLastVertex(self, theShape, theName=None):
10655             """
10656             Get the last vertex of wire/edge depended orientation.
10657
10658             Parameters:
10659                 theShape Shape to find last vertex.
10660                 theName Object name; when specified, this parameter is used
10661                         for result publication in the study. Otherwise, if automatic
10662                         publication is switched on, default value is used for result name.
10663
10664             Returns:
10665                 New GEOM.GEOM_Object, containing the created vertex.
10666             """
10667             # Example: see GEOM_TestMeasures.py
10668             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
10669             # note: auto-publishing is done in self.GetVertexByIndex()
10670             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
10671
10672         ## Get a normale to the given face. If the point is not given,
10673         #  the normale is calculated at the center of mass.
10674         #  @param theFace Face to define normale of.
10675         #  @param theOptionalPoint Point to compute the normale at.
10676         #  @param theName Object name; when specified, this parameter is used
10677         #         for result publication in the study. Otherwise, if automatic
10678         #         publication is switched on, default value is used for result name.
10679         #
10680         #  @return New GEOM.GEOM_Object, containing the created vector.
10681         #
10682         #  @ref swig_todo "Example"
10683         @ManageTransactions("MeasuOp")
10684         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
10685             """
10686             Get a normale to the given face. If the point is not given,
10687             the normale is calculated at the center of mass.
10688
10689             Parameters:
10690                 theFace Face to define normale of.
10691                 theOptionalPoint Point to compute the normale at.
10692                 theName Object name; when specified, this parameter is used
10693                         for result publication in the study. Otherwise, if automatic
10694                         publication is switched on, default value is used for result name.
10695
10696             Returns:
10697                 New GEOM.GEOM_Object, containing the created vector.
10698             """
10699             # Example: see GEOM_TestMeasures.py
10700             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
10701             RaiseIfFailed("GetNormal", self.MeasuOp)
10702             self._autoPublish(anObj, theName, "normal")
10703             return anObj
10704
10705         ## Print shape errors obtained from CheckShape.
10706         #  @param theShape Shape that was checked.
10707         #  @param theShapeErrors the shape errors obtained by CheckShape.
10708         #  @param theReturnStatus If 0 the description of problem is printed.
10709         #                         If 1 the description of problem is returned.
10710         #  @return If theReturnStatus is equal to 1 the description is returned.
10711         #          Otherwise doesn't return anything.
10712         #
10713         #  @ref tui_measurement_tools_page "Example"
10714         @ManageTransactions("MeasuOp")
10715         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
10716             """
10717             Print shape errors obtained from CheckShape.
10718
10719             Parameters:
10720                 theShape Shape that was checked.
10721                 theShapeErrors the shape errors obtained by CheckShape.
10722                 theReturnStatus If 0 the description of problem is printed.
10723                                 If 1 the description of problem is returned.
10724
10725             Returns:
10726                 If theReturnStatus is equal to 1 the description is returned.
10727                   Otherwise doesn't return anything.
10728             """
10729             # Example: see GEOM_TestMeasures.py
10730             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
10731             if theReturnStatus == 1:
10732                 return Descr
10733             print Descr
10734             pass
10735
10736         ## Check a topology of the given shape.
10737         #  @param theShape Shape to check validity of.
10738         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
10739         #                        if TRUE, the shape's geometry will be checked also.
10740         #  @param theReturnStatus If 0 and if theShape is invalid, a description
10741         #                         of problem is printed.
10742         #                         If 1 isValid flag and the description of
10743         #                         problem is returned.
10744         #                         If 2 isValid flag and the list of error data
10745         #                         is returned.
10746         #  @return TRUE, if the shape "seems to be valid".
10747         #          If theShape is invalid, prints a description of problem.
10748         #          If theReturnStatus is equal to 1 the description is returned
10749         #          along with IsValid flag.
10750         #          If theReturnStatus is equal to 2 the list of error data is
10751         #          returned along with IsValid flag.
10752         #
10753         #  @ref tui_measurement_tools_page "Example"
10754         @ManageTransactions("MeasuOp")
10755         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
10756             """
10757             Check a topology of the given shape.
10758
10759             Parameters:
10760                 theShape Shape to check validity of.
10761                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
10762                                if TRUE, the shape's geometry will be checked also.
10763                 theReturnStatus If 0 and if theShape is invalid, a description
10764                                 of problem is printed.
10765                                 If 1 IsValid flag and the description of
10766                                 problem is returned.
10767                                 If 2 IsValid flag and the list of error data
10768                                 is returned.
10769
10770             Returns:
10771                 TRUE, if the shape "seems to be valid".
10772                 If theShape is invalid, prints a description of problem.
10773                 If theReturnStatus is equal to 1 the description is returned
10774                 along with IsValid flag.
10775                 If theReturnStatus is equal to 2 the list of error data is
10776                 returned along with IsValid flag.
10777             """
10778             # Example: see GEOM_TestMeasures.py
10779             if theIsCheckGeom:
10780                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
10781                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
10782             else:
10783                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
10784                 RaiseIfFailed("CheckShape", self.MeasuOp)
10785             if IsValid == 0:
10786                 if theReturnStatus == 0:
10787                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10788                     print Descr
10789             if theReturnStatus == 1:
10790               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10791               return (IsValid, Descr)
10792             elif theReturnStatus == 2:
10793               return (IsValid, ShapeErrors)
10794             return IsValid
10795
10796         ## Detect self-intersections in the given shape.
10797         #  @param theShape Shape to check.
10798         #  @param theCheckLevel is the level of self-intersection check.
10799         #         Possible input values are:
10800         #         - GEOM.SI_V_V(0) - only V/V interferences
10801         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
10802         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
10803         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
10804         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
10805         #         - GEOM.SI_ALL(5) - all interferences.
10806         #  @return TRUE, if the shape contains no self-intersections.
10807         #
10808         #  @ref tui_measurement_tools_page "Example"
10809         @ManageTransactions("MeasuOp")
10810         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
10811             """
10812             Detect self-intersections in the given shape.
10813
10814             Parameters:
10815                 theShape Shape to check.
10816                 theCheckLevel is the level of self-intersection check.
10817                   Possible input values are:
10818                    - GEOM.SI_V_V(0) - only V/V interferences
10819                    - GEOM.SI_V_E(1) - V/V and V/E interferences
10820                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
10821                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
10822                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
10823                    - GEOM.SI_ALL(5) - all interferences.
10824  
10825             Returns:
10826                 TRUE, if the shape contains no self-intersections.
10827             """
10828             # Example: see GEOM_TestMeasures.py
10829             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
10830             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
10831             return IsValid
10832
10833         ## Get position (LCS) of theShape.
10834         #
10835         #  Origin of the LCS is situated at the shape's center of mass.
10836         #  Axes of the LCS are obtained from shape's location or,
10837         #  if the shape is a planar face, from position of its plane.
10838         #
10839         #  @param theShape Shape to calculate position of.
10840         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10841         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
10842         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10843         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10844         #
10845         #  @ref swig_todo "Example"
10846         @ManageTransactions("MeasuOp")
10847         def GetPosition(self,theShape):
10848             """
10849             Get position (LCS) of theShape.
10850             Origin of the LCS is situated at the shape's center of mass.
10851             Axes of the LCS are obtained from shape's location or,
10852             if the shape is a planar face, from position of its plane.
10853
10854             Parameters:
10855                 theShape Shape to calculate position of.
10856
10857             Returns:
10858                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10859                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
10860                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10861                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10862             """
10863             # Example: see GEOM_TestMeasures.py
10864             aTuple = self.MeasuOp.GetPosition(theShape)
10865             RaiseIfFailed("GetPosition", self.MeasuOp)
10866             return aTuple
10867
10868         ## Get kind of theShape.
10869         #
10870         #  @param theShape Shape to get a kind of.
10871         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
10872         #          and a list of parameters, describing the shape.
10873         #  @note  Concrete meaning of each value, returned via \a theIntegers
10874         #         or \a theDoubles list depends on the kind() of the shape.
10875         #
10876         #  @ref swig_todo "Example"
10877         @ManageTransactions("MeasuOp")
10878         def KindOfShape(self,theShape):
10879             """
10880             Get kind of theShape.
10881
10882             Parameters:
10883                 theShape Shape to get a kind of.
10884
10885             Returns:
10886                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
10887                     and a list of parameters, describing the shape.
10888             Note:
10889                 Concrete meaning of each value, returned via theIntegers
10890                 or theDoubles list depends on the geompy.kind of the shape
10891             """
10892             # Example: see GEOM_TestMeasures.py
10893             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
10894             RaiseIfFailed("KindOfShape", self.MeasuOp)
10895
10896             aKind  = aRoughTuple[0]
10897             anInts = aRoughTuple[1]
10898             aDbls  = aRoughTuple[2]
10899
10900             # Now there is no exception from this rule:
10901             aKindTuple = [aKind] + aDbls + anInts
10902
10903             # If they are we will regroup parameters for such kind of shape.
10904             # For example:
10905             #if aKind == kind.SOME_KIND:
10906             #    #  SOME_KIND     int int double int double double
10907             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
10908
10909             return aKindTuple
10910
10911         ## Returns the string that describes if the shell is good for solid.
10912         #  This is a support method for MakeSolid.
10913         #
10914         #  @param theShell the shell to be checked.
10915         #  @return Returns a string that describes the shell validity for
10916         #          solid construction.
10917         @ManageTransactions("MeasuOp")
10918         def _IsGoodForSolid(self, theShell):
10919             """
10920             Returns the string that describes if the shell is good for solid.
10921             This is a support method for MakeSolid.
10922
10923             Parameter:
10924                 theShell the shell to be checked.
10925
10926             Returns:
10927                 Returns a string that describes the shell validity for
10928                 solid construction.
10929             """
10930             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
10931             return aDescr
10932
10933         # end of l2_measure
10934         ## @}
10935
10936         ## @addtogroup l2_import_export
10937         ## @{
10938
10939         ## Import a shape from the BREP, IGES, STEP or other file
10940         #  (depends on given format) with given name.
10941         #
10942         #  Note: this function is deprecated, it is kept for backward compatibility only
10943         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
10944         #
10945         #  @param theFileName The file, containing the shape.
10946         #  @param theFormatName Specify format for the file reading.
10947         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
10948         #         If format 'IGES_SCALE' is used instead of 'IGES' or
10949         #            format 'STEP_SCALE' is used instead of 'STEP',
10950         #            length unit will be set to 'meter' and result model will be scaled.
10951         #  @param theName Object name; when specified, this parameter is used
10952         #         for result publication in the study. Otherwise, if automatic
10953         #         publication is switched on, default value is used for result name.
10954         #
10955         #  @return New GEOM.GEOM_Object, containing the imported shape.
10956         #          If material names are imported it returns the list of
10957         #          objects. The first one is the imported object followed by
10958         #          material groups.
10959         #  @note Auto publishing is allowed for the shape itself. Imported
10960         #        material groups are not automatically published.
10961         #
10962         #  @ref swig_Import_Export "Example"
10963         @ManageTransactions("InsertOp")
10964         def ImportFile(self, theFileName, theFormatName, theName=None):
10965             """
10966             Import a shape from the BREP, IGES, STEP or other file
10967             (depends on given format) with given name.
10968
10969             Note: this function is deprecated, it is kept for backward compatibility only
10970             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
10971
10972             Parameters: 
10973                 theFileName The file, containing the shape.
10974                 theFormatName Specify format for the file reading.
10975                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
10976                     If format 'IGES_SCALE' is used instead of 'IGES' or
10977                        format 'STEP_SCALE' is used instead of 'STEP',
10978                        length unit will be set to 'meter' and result model will be scaled.
10979                 theName Object name; when specified, this parameter is used
10980                         for result publication in the study. Otherwise, if automatic
10981                         publication is switched on, default value is used for result name.
10982
10983             Returns:
10984                 New GEOM.GEOM_Object, containing the imported shape.
10985                 If material names are imported it returns the list of
10986                 objects. The first one is the imported object followed by
10987                 material groups.
10988             Note:
10989                 Auto publishing is allowed for the shape itself. Imported
10990                 material groups are not automatically published.
10991             """
10992             # Example: see GEOM_TestOthers.py
10993             print """
10994             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
10995             where <FormatName> is a name of desirable format for importing.
10996             """
10997             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
10998             RaiseIfFailed("ImportFile", self.InsertOp)
10999             aNbObj = len(aListObj)
11000             if aNbObj > 0:
11001                 self._autoPublish(aListObj[0], theName, "imported")
11002             if aNbObj == 1:
11003                 return aListObj[0]
11004             return aListObj
11005
11006         ## Deprecated analog of ImportFile()
11007         def Import(self, theFileName, theFormatName, theName=None):
11008             """
11009             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11010             """
11011             # note: auto-publishing is done in self.ImportFile()
11012             return self.ImportFile(theFileName, theFormatName, theName)
11013
11014         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11015         #  @note This method will not be dumped to the python script by DumpStudy functionality.
11016         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
11017         #  @param theStream The BRep binary stream.
11018         #  @param theName Object name; when specified, this parameter is used
11019         #         for result publication in the study. Otherwise, if automatic
11020         #         publication is switched on, default value is used for result name.
11021         #
11022         #  @return New GEOM_Object, containing the shape, read from theStream.
11023         #
11024         #  @ref swig_Import_Export "Example"
11025         @ManageTransactions("InsertOp")
11026         def RestoreShape (self, theStream, theName=None):
11027             """
11028             Read a shape from the binary stream, containing its bounding representation (BRep).
11029
11030             Note:
11031                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11032
11033             Parameters:
11034                 theStream The BRep binary stream.
11035                 theName Object name; when specified, this parameter is used
11036                         for result publication in the study. Otherwise, if automatic
11037                         publication is switched on, default value is used for result name.
11038
11039             Returns:
11040                 New GEOM_Object, containing the shape, read from theStream.
11041             """
11042             # Example: see GEOM_TestOthers.py
11043             anObj = self.InsertOp.RestoreShape(theStream)
11044             RaiseIfFailed("RestoreShape", self.InsertOp)
11045             self._autoPublish(anObj, theName, "restored")
11046             return anObj
11047
11048         ## Export the given shape into a file with given name.
11049         #
11050         #  Note: this function is deprecated, it is kept for backward compatibility only
11051         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11052         #
11053         #  @param theObject Shape to be stored in the file.
11054         #  @param theFileName Name of the file to store the given shape in.
11055         #  @param theFormatName Specify format for the shape storage.
11056         #         Available formats can be obtained with
11057         #         geompy.InsertOp.ExportTranslators()[0] method.
11058         #
11059         #  @ref swig_Import_Export "Example"
11060         @ManageTransactions("InsertOp")
11061         def Export(self, theObject, theFileName, theFormatName):
11062             """
11063             Export the given shape into a file with given name.
11064
11065             Note: this function is deprecated, it is kept for backward compatibility only
11066             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11067             
11068             Parameters: 
11069                 theObject Shape to be stored in the file.
11070                 theFileName Name of the file to store the given shape in.
11071                 theFormatName Specify format for the shape storage.
11072                               Available formats can be obtained with
11073                               geompy.InsertOp.ExportTranslators()[0] method.
11074             """
11075             # Example: see GEOM_TestOthers.py
11076             print """
11077             WARNING: Function Export is deprecated, use Export<FormatName> instead,
11078             where <FormatName> is a name of desirable format for exporting.
11079             """
11080             self.InsertOp.Export(theObject, theFileName, theFormatName)
11081             if self.InsertOp.IsDone() == 0:
11082                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
11083                 pass
11084             pass
11085
11086         # end of l2_import_export
11087         ## @}
11088
11089         ## @addtogroup l3_blocks
11090         ## @{
11091
11092         ## Create a quadrangle face from four edges. Order of Edges is not
11093         #  important. It is  not necessary that edges share the same vertex.
11094         #  @param E1,E2,E3,E4 Edges for the face bound.
11095         #  @param theName Object name; when specified, this parameter is used
11096         #         for result publication in the study. Otherwise, if automatic
11097         #         publication is switched on, default value is used for result name.
11098         #
11099         #  @return New GEOM.GEOM_Object, containing the created face.
11100         #
11101         #  @ref tui_building_by_blocks_page "Example"
11102         @ManageTransactions("BlocksOp")
11103         def MakeQuad(self, E1, E2, E3, E4, theName=None):
11104             """
11105             Create a quadrangle face from four edges. Order of Edges is not
11106             important. It is  not necessary that edges share the same vertex.
11107
11108             Parameters:
11109                 E1,E2,E3,E4 Edges for the face bound.
11110                 theName Object name; when specified, this parameter is used
11111                         for result publication in the study. Otherwise, if automatic
11112                         publication is switched on, default value is used for result name.
11113
11114             Returns:
11115                 New GEOM.GEOM_Object, containing the created face.
11116
11117             Example of usage:
11118                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
11119             """
11120             # Example: see GEOM_Spanner.py
11121             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
11122             RaiseIfFailed("MakeQuad", self.BlocksOp)
11123             self._autoPublish(anObj, theName, "quad")
11124             return anObj
11125
11126         ## Create a quadrangle face on two edges.
11127         #  The missing edges will be built by creating the shortest ones.
11128         #  @param E1,E2 Two opposite edges for the face.
11129         #  @param theName Object name; when specified, this parameter is used
11130         #         for result publication in the study. Otherwise, if automatic
11131         #         publication is switched on, default value is used for result name.
11132         #
11133         #  @return New GEOM.GEOM_Object, containing the created face.
11134         #
11135         #  @ref tui_building_by_blocks_page "Example"
11136         @ManageTransactions("BlocksOp")
11137         def MakeQuad2Edges(self, E1, E2, theName=None):
11138             """
11139             Create a quadrangle face on two edges.
11140             The missing edges will be built by creating the shortest ones.
11141
11142             Parameters:
11143                 E1,E2 Two opposite edges for the face.
11144                 theName Object name; when specified, this parameter is used
11145                         for result publication in the study. Otherwise, if automatic
11146                         publication is switched on, default value is used for result name.
11147
11148             Returns:
11149                 New GEOM.GEOM_Object, containing the created face.
11150
11151             Example of usage:
11152                 # create vertices
11153                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11154                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11155                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11156                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11157                 # create edges
11158                 edge1 = geompy.MakeEdge(p1, p2)
11159                 edge2 = geompy.MakeEdge(p3, p4)
11160                 # create a quadrangle face from two edges
11161                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
11162             """
11163             # Example: see GEOM_Spanner.py
11164             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
11165             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
11166             self._autoPublish(anObj, theName, "quad")
11167             return anObj
11168
11169         ## Create a quadrangle face with specified corners.
11170         #  The missing edges will be built by creating the shortest ones.
11171         #  @param V1,V2,V3,V4 Corner vertices for the face.
11172         #  @param theName Object name; when specified, this parameter is used
11173         #         for result publication in the study. Otherwise, if automatic
11174         #         publication is switched on, default value is used for result name.
11175         #
11176         #  @return New GEOM.GEOM_Object, containing the created face.
11177         #
11178         #  @ref tui_building_by_blocks_page "Example 1"
11179         #  \n @ref swig_MakeQuad4Vertices "Example 2"
11180         @ManageTransactions("BlocksOp")
11181         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
11182             """
11183             Create a quadrangle face with specified corners.
11184             The missing edges will be built by creating the shortest ones.
11185
11186             Parameters:
11187                 V1,V2,V3,V4 Corner vertices for the face.
11188                 theName Object name; when specified, this parameter is used
11189                         for result publication in the study. Otherwise, if automatic
11190                         publication is switched on, default value is used for result name.
11191
11192             Returns:
11193                 New GEOM.GEOM_Object, containing the created face.
11194
11195             Example of usage:
11196                 # create vertices
11197                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11198                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11199                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11200                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11201                 # create a quadrangle from four points in its corners
11202                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
11203             """
11204             # Example: see GEOM_Spanner.py
11205             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
11206             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
11207             self._autoPublish(anObj, theName, "quad")
11208             return anObj
11209
11210         ## Create a hexahedral solid, bounded by the six given faces. Order of
11211         #  faces is not important. It is  not necessary that Faces share the same edge.
11212         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11213         #  @param theName Object name; when specified, this parameter is used
11214         #         for result publication in the study. Otherwise, if automatic
11215         #         publication is switched on, default value is used for result name.
11216         #
11217         #  @return New GEOM.GEOM_Object, containing the created solid.
11218         #
11219         #  @ref tui_building_by_blocks_page "Example 1"
11220         #  \n @ref swig_MakeHexa "Example 2"
11221         @ManageTransactions("BlocksOp")
11222         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
11223             """
11224             Create a hexahedral solid, bounded by the six given faces. Order of
11225             faces is not important. It is  not necessary that Faces share the same edge.
11226
11227             Parameters:
11228                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11229                 theName Object name; when specified, this parameter is used
11230                         for result publication in the study. Otherwise, if automatic
11231                         publication is switched on, default value is used for result name.
11232
11233             Returns:
11234                 New GEOM.GEOM_Object, containing the created solid.
11235
11236             Example of usage:
11237                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
11238             """
11239             # Example: see GEOM_Spanner.py
11240             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
11241             RaiseIfFailed("MakeHexa", self.BlocksOp)
11242             self._autoPublish(anObj, theName, "hexa")
11243             return anObj
11244
11245         ## Create a hexahedral solid between two given faces.
11246         #  The missing faces will be built by creating the smallest ones.
11247         #  @param F1,F2 Two opposite faces for the hexahedral solid.
11248         #  @param theName Object name; when specified, this parameter is used
11249         #         for result publication in the study. Otherwise, if automatic
11250         #         publication is switched on, default value is used for result name.
11251         #
11252         #  @return New GEOM.GEOM_Object, containing the created solid.
11253         #
11254         #  @ref tui_building_by_blocks_page "Example 1"
11255         #  \n @ref swig_MakeHexa2Faces "Example 2"
11256         @ManageTransactions("BlocksOp")
11257         def MakeHexa2Faces(self, F1, F2, theName=None):
11258             """
11259             Create a hexahedral solid between two given faces.
11260             The missing faces will be built by creating the smallest ones.
11261
11262             Parameters:
11263                 F1,F2 Two opposite faces for the hexahedral solid.
11264                 theName Object name; when specified, this parameter is used
11265                         for result publication in the study. Otherwise, if automatic
11266                         publication is switched on, default value is used for result name.
11267
11268             Returns:
11269                 New GEOM.GEOM_Object, containing the created solid.
11270
11271             Example of usage:
11272                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
11273             """
11274             # Example: see GEOM_Spanner.py
11275             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
11276             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
11277             self._autoPublish(anObj, theName, "hexa")
11278             return anObj
11279
11280         # end of l3_blocks
11281         ## @}
11282
11283         ## @addtogroup l3_blocks_op
11284         ## @{
11285
11286         ## Get a vertex, found in the given shape by its coordinates.
11287         #  @param theShape Block or a compound of blocks.
11288         #  @param theX,theY,theZ Coordinates of the sought vertex.
11289         #  @param theEpsilon Maximum allowed distance between the resulting
11290         #                    vertex and point with the given coordinates.
11291         #  @param theName Object name; when specified, this parameter is used
11292         #         for result publication in the study. Otherwise, if automatic
11293         #         publication is switched on, default value is used for result name.
11294         #
11295         #  @return New GEOM.GEOM_Object, containing the found vertex.
11296         #
11297         #  @ref swig_GetPoint "Example"
11298         @ManageTransactions("BlocksOp")
11299         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
11300             """
11301             Get a vertex, found in the given shape by its coordinates.
11302
11303             Parameters:
11304                 theShape Block or a compound of blocks.
11305                 theX,theY,theZ Coordinates of the sought vertex.
11306                 theEpsilon Maximum allowed distance between the resulting
11307                            vertex and point with the given coordinates.
11308                 theName Object name; when specified, this parameter is used
11309                         for result publication in the study. Otherwise, if automatic
11310                         publication is switched on, default value is used for result name.
11311
11312             Returns:
11313                 New GEOM.GEOM_Object, containing the found vertex.
11314
11315             Example of usage:
11316                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
11317             """
11318             # Example: see GEOM_TestOthers.py
11319             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
11320             RaiseIfFailed("GetPoint", self.BlocksOp)
11321             self._autoPublish(anObj, theName, "vertex")
11322             return anObj
11323
11324         ## Find a vertex of the given shape, which has minimal distance to the given point.
11325         #  @param theShape Any shape.
11326         #  @param thePoint Point, close to the desired vertex.
11327         #  @param theName Object name; when specified, this parameter is used
11328         #         for result publication in the study. Otherwise, if automatic
11329         #         publication is switched on, default value is used for result name.
11330         #
11331         #  @return New GEOM.GEOM_Object, containing the found vertex.
11332         #
11333         #  @ref swig_GetVertexNearPoint "Example"
11334         @ManageTransactions("BlocksOp")
11335         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
11336             """
11337             Find a vertex of the given shape, which has minimal distance to the given point.
11338
11339             Parameters:
11340                 theShape Any shape.
11341                 thePoint Point, close to the desired vertex.
11342                 theName Object name; when specified, this parameter is used
11343                         for result publication in the study. Otherwise, if automatic
11344                         publication is switched on, default value is used for result name.
11345
11346             Returns:
11347                 New GEOM.GEOM_Object, containing the found vertex.
11348
11349             Example of usage:
11350                 pmidle = geompy.MakeVertex(50, 0, 50)
11351                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
11352             """
11353             # Example: see GEOM_TestOthers.py
11354             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
11355             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
11356             self._autoPublish(anObj, theName, "vertex")
11357             return anObj
11358
11359         ## Get an edge, found in the given shape by two given vertices.
11360         #  @param theShape Block or a compound of blocks.
11361         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
11362         #  @param theName Object name; when specified, this parameter is used
11363         #         for result publication in the study. Otherwise, if automatic
11364         #         publication is switched on, default value is used for result name.
11365         #
11366         #  @return New GEOM.GEOM_Object, containing the found edge.
11367         #
11368         #  @ref swig_GetEdge "Example"
11369         @ManageTransactions("BlocksOp")
11370         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
11371             """
11372             Get an edge, found in the given shape by two given vertices.
11373
11374             Parameters:
11375                 theShape Block or a compound of blocks.
11376                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
11377                 theName Object name; when specified, this parameter is used
11378                         for result publication in the study. Otherwise, if automatic
11379                         publication is switched on, default value is used for result name.
11380
11381             Returns:
11382                 New GEOM.GEOM_Object, containing the found edge.
11383             """
11384             # Example: see GEOM_Spanner.py
11385             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
11386             RaiseIfFailed("GetEdge", self.BlocksOp)
11387             self._autoPublish(anObj, theName, "edge")
11388             return anObj
11389
11390         ## Find an edge of the given shape, which has minimal distance to the given point.
11391         #  @param theShape Block or a compound of blocks.
11392         #  @param thePoint Point, close to the desired edge.
11393         #  @param theName Object name; when specified, this parameter is used
11394         #         for result publication in the study. Otherwise, if automatic
11395         #         publication is switched on, default value is used for result name.
11396         #
11397         #  @return New GEOM.GEOM_Object, containing the found edge.
11398         #
11399         #  @ref swig_GetEdgeNearPoint "Example"
11400         @ManageTransactions("BlocksOp")
11401         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
11402             """
11403             Find an edge of the given shape, which has minimal distance to the given point.
11404
11405             Parameters:
11406                 theShape Block or a compound of blocks.
11407                 thePoint Point, close to the desired edge.
11408                 theName Object name; when specified, this parameter is used
11409                         for result publication in the study. Otherwise, if automatic
11410                         publication is switched on, default value is used for result name.
11411
11412             Returns:
11413                 New GEOM.GEOM_Object, containing the found edge.
11414             """
11415             # Example: see GEOM_TestOthers.py
11416             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
11417             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
11418             self._autoPublish(anObj, theName, "edge")
11419             return anObj
11420
11421         ## Returns a face, found in the given shape by four given corner vertices.
11422         #  @param theShape Block or a compound of blocks.
11423         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11424         #  @param theName Object name; when specified, this parameter is used
11425         #         for result publication in the study. Otherwise, if automatic
11426         #         publication is switched on, default value is used for result name.
11427         #
11428         #  @return New GEOM.GEOM_Object, containing the found face.
11429         #
11430         #  @ref swig_todo "Example"
11431         @ManageTransactions("BlocksOp")
11432         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
11433             """
11434             Returns a face, found in the given shape by four given corner vertices.
11435
11436             Parameters:
11437                 theShape Block or a compound of blocks.
11438                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11439                 theName Object name; when specified, this parameter is used
11440                         for result publication in the study. Otherwise, if automatic
11441                         publication is switched on, default value is used for result name.
11442
11443             Returns:
11444                 New GEOM.GEOM_Object, containing the found face.
11445             """
11446             # Example: see GEOM_Spanner.py
11447             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
11448             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
11449             self._autoPublish(anObj, theName, "face")
11450             return anObj
11451
11452         ## Get a face of block, found in the given shape by two given edges.
11453         #  @param theShape Block or a compound of blocks.
11454         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
11455         #  @param theName Object name; when specified, this parameter is used
11456         #         for result publication in the study. Otherwise, if automatic
11457         #         publication is switched on, default value is used for result name.
11458         #
11459         #  @return New GEOM.GEOM_Object, containing the found face.
11460         #
11461         #  @ref swig_todo "Example"
11462         @ManageTransactions("BlocksOp")
11463         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
11464             """
11465             Get a face of block, found in the given shape by two given edges.
11466
11467             Parameters:
11468                 theShape Block or a compound of blocks.
11469                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
11470                 theName Object name; when specified, this parameter is used
11471                         for result publication in the study. Otherwise, if automatic
11472                         publication is switched on, default value is used for result name.
11473
11474             Returns:
11475                 New GEOM.GEOM_Object, containing the found face.
11476             """
11477             # Example: see GEOM_Spanner.py
11478             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
11479             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
11480             self._autoPublish(anObj, theName, "face")
11481             return anObj
11482
11483         ## Find a face, opposite to the given one in the given block.
11484         #  @param theBlock Must be a hexahedral solid.
11485         #  @param theFace Face of \a theBlock, opposite to the desired face.
11486         #  @param theName Object name; when specified, this parameter is used
11487         #         for result publication in the study. Otherwise, if automatic
11488         #         publication is switched on, default value is used for result name.
11489         #
11490         #  @return New GEOM.GEOM_Object, containing the found face.
11491         #
11492         #  @ref swig_GetOppositeFace "Example"
11493         @ManageTransactions("BlocksOp")
11494         def GetOppositeFace(self, theBlock, theFace, theName=None):
11495             """
11496             Find a face, opposite to the given one in the given block.
11497
11498             Parameters:
11499                 theBlock Must be a hexahedral solid.
11500                 theFace Face of theBlock, opposite to the desired face.
11501                 theName Object name; when specified, this parameter is used
11502                         for result publication in the study. Otherwise, if automatic
11503                         publication is switched on, default value is used for result name.
11504
11505             Returns:
11506                 New GEOM.GEOM_Object, containing the found face.
11507             """
11508             # Example: see GEOM_Spanner.py
11509             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
11510             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
11511             self._autoPublish(anObj, theName, "face")
11512             return anObj
11513
11514         ## Find a face of the given shape, which has minimal distance to the given point.
11515         #  @param theShape Block or a compound of blocks.
11516         #  @param thePoint Point, close to the desired face.
11517         #  @param theName Object name; when specified, this parameter is used
11518         #         for result publication in the study. Otherwise, if automatic
11519         #         publication is switched on, default value is used for result name.
11520         #
11521         #  @return New GEOM.GEOM_Object, containing the found face.
11522         #
11523         #  @ref swig_GetFaceNearPoint "Example"
11524         @ManageTransactions("BlocksOp")
11525         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
11526             """
11527             Find a face of the given shape, which has minimal distance to the given point.
11528
11529             Parameters:
11530                 theShape Block or a compound of blocks.
11531                 thePoint Point, close to the desired face.
11532                 theName Object name; when specified, this parameter is used
11533                         for result publication in the study. Otherwise, if automatic
11534                         publication is switched on, default value is used for result name.
11535
11536             Returns:
11537                 New GEOM.GEOM_Object, containing the found face.
11538             """
11539             # Example: see GEOM_Spanner.py
11540             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
11541             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
11542             self._autoPublish(anObj, theName, "face")
11543             return anObj
11544
11545         ## Find a face of block, whose outside normale has minimal angle with the given vector.
11546         #  @param theBlock Block or a compound of blocks.
11547         #  @param theVector Vector, close to the normale of the desired face.
11548         #  @param theName Object name; when specified, this parameter is used
11549         #         for result publication in the study. Otherwise, if automatic
11550         #         publication is switched on, default value is used for result name.
11551         #
11552         #  @return New GEOM.GEOM_Object, containing the found face.
11553         #
11554         #  @ref swig_todo "Example"
11555         @ManageTransactions("BlocksOp")
11556         def GetFaceByNormale(self, theBlock, theVector, theName=None):
11557             """
11558             Find a face of block, whose outside normale has minimal angle with the given vector.
11559
11560             Parameters:
11561                 theBlock Block or a compound of blocks.
11562                 theVector Vector, close to the normale of the desired face.
11563                 theName Object name; when specified, this parameter is used
11564                         for result publication in the study. Otherwise, if automatic
11565                         publication is switched on, default value is used for result name.
11566
11567             Returns:
11568                 New GEOM.GEOM_Object, containing the found face.
11569             """
11570             # Example: see GEOM_Spanner.py
11571             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
11572             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
11573             self._autoPublish(anObj, theName, "face")
11574             return anObj
11575
11576         ## Find all sub-shapes of type \a theShapeType of the given shape,
11577         #  which have minimal distance to the given point.
11578         #  @param theShape Any shape.
11579         #  @param thePoint Point, close to the desired shape.
11580         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
11581         #  @param theTolerance The tolerance for distances comparison. All shapes
11582         #                      with distances to the given point in interval
11583         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
11584         #  @param theName Object name; when specified, this parameter is used
11585         #         for result publication in the study. Otherwise, if automatic
11586         #         publication is switched on, default value is used for result name.
11587         #
11588         #  @return New GEOM_Object, containing a group of all found shapes.
11589         #
11590         #  @ref swig_GetShapesNearPoint "Example"
11591         @ManageTransactions("BlocksOp")
11592         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
11593             """
11594             Find all sub-shapes of type theShapeType of the given shape,
11595             which have minimal distance to the given point.
11596
11597             Parameters:
11598                 theShape Any shape.
11599                 thePoint Point, close to the desired shape.
11600                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
11601                 theTolerance The tolerance for distances comparison. All shapes
11602                                 with distances to the given point in interval
11603                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
11604                 theName Object name; when specified, this parameter is used
11605                         for result publication in the study. Otherwise, if automatic
11606                         publication is switched on, default value is used for result name.
11607
11608             Returns:
11609                 New GEOM_Object, containing a group of all found shapes.
11610             """
11611             # Example: see GEOM_TestOthers.py
11612             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
11613             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
11614             self._autoPublish(anObj, theName, "group")
11615             return anObj
11616
11617         # end of l3_blocks_op
11618         ## @}
11619
11620         ## @addtogroup l4_blocks_measure
11621         ## @{
11622
11623         ## Check, if the compound of blocks is given.
11624         #  To be considered as a compound of blocks, the
11625         #  given shape must satisfy the following conditions:
11626         #  - Each element of the compound should be a Block (6 faces and 12 edges).
11627         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11628         #  - The compound should be connexe.
11629         #  - The glue between two quadrangle faces should be applied.
11630         #  @param theCompound The compound to check.
11631         #  @return TRUE, if the given shape is a compound of blocks.
11632         #  If theCompound is not valid, prints all discovered errors.
11633         #
11634         #  @ref tui_measurement_tools_page "Example 1"
11635         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
11636         @ManageTransactions("BlocksOp")
11637         def CheckCompoundOfBlocks(self,theCompound):
11638             """
11639             Check, if the compound of blocks is given.
11640             To be considered as a compound of blocks, the
11641             given shape must satisfy the following conditions:
11642             - Each element of the compound should be a Block (6 faces and 12 edges).
11643             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11644             - The compound should be connexe.
11645             - The glue between two quadrangle faces should be applied.
11646
11647             Parameters:
11648                 theCompound The compound to check.
11649
11650             Returns:
11651                 TRUE, if the given shape is a compound of blocks.
11652                 If theCompound is not valid, prints all discovered errors.
11653             """
11654             # Example: see GEOM_Spanner.py
11655             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
11656             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
11657             if IsValid == 0:
11658                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
11659                 print Descr
11660             return IsValid
11661
11662         ## Retrieve all non blocks solids and faces from \a theShape.
11663         #  @param theShape The shape to explore.
11664         #  @param 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         #  @return A tuple of two GEOM_Objects. The first object is a group of all
11669         #          non block solids (= not 6 faces, or with 6 faces, but with the
11670         #          presence of non-quadrangular faces). The second object is a
11671         #          group of all non quadrangular faces.
11672         #
11673         #  @ref tui_measurement_tools_page "Example 1"
11674         #  \n @ref swig_GetNonBlocks "Example 2"
11675         @ManageTransactions("BlocksOp")
11676         def GetNonBlocks (self, theShape, theName=None):
11677             """
11678             Retrieve all non blocks solids and faces from theShape.
11679
11680             Parameters:
11681                 theShape The shape to explore.
11682                 theName Object name; when specified, this parameter is used
11683                         for result publication in the study. Otherwise, if automatic
11684                         publication is switched on, default value is used for result name.
11685
11686             Returns:
11687                 A tuple of two GEOM_Objects. The first object is a group of all
11688                 non block solids (= not 6 faces, or with 6 faces, but with the
11689                 presence of non-quadrangular faces). The second object is a
11690                 group of all non quadrangular faces.
11691
11692             Usage:
11693                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
11694             """
11695             # Example: see GEOM_Spanner.py
11696             aTuple = self.BlocksOp.GetNonBlocks(theShape)
11697             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
11698             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
11699             return aTuple
11700
11701         ## Remove all seam and degenerated edges from \a theShape.
11702         #  Unite faces and edges, sharing one surface. It means that
11703         #  this faces must have references to one C++ surface object (handle).
11704         #  @param theShape The compound or single solid to remove irregular edges from.
11705         #  @param doUnionFaces If True, then unite faces. If False (the default value),
11706         #         do not unite faces.
11707         #  @param theName Object name; when specified, this parameter is used
11708         #         for result publication in the study. Otherwise, if automatic
11709         #         publication is switched on, default value is used for result name.
11710         #
11711         #  @return Improved shape.
11712         #
11713         #  @ref swig_RemoveExtraEdges "Example"
11714         @ManageTransactions("BlocksOp")
11715         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
11716             """
11717             Remove all seam and degenerated edges from theShape.
11718             Unite faces and edges, sharing one surface. It means that
11719             this faces must have references to one C++ surface object (handle).
11720
11721             Parameters:
11722                 theShape The compound or single solid to remove irregular edges from.
11723                 doUnionFaces If True, then unite faces. If False (the default value),
11724                              do not unite faces.
11725                 theName Object name; when specified, this parameter is used
11726                         for result publication in the study. Otherwise, if automatic
11727                         publication is switched on, default value is used for result name.
11728
11729             Returns:
11730                 Improved shape.
11731             """
11732             # Example: see GEOM_TestOthers.py
11733             nbFacesOptimum = -1 # -1 means do not unite faces
11734             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
11735             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
11736             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
11737             self._autoPublish(anObj, theName, "removeExtraEdges")
11738             return anObj
11739
11740         ## Performs union faces of \a theShape
11741         #  Unite faces sharing one surface. It means that
11742         #  these faces must have references to one C++ surface object (handle).
11743         #  @param theShape The compound or single solid that contains faces
11744         #         to perform union.
11745         #  @param theName Object name; when specified, this parameter is used
11746         #         for result publication in the study. Otherwise, if automatic
11747         #         publication is switched on, default value is used for result name.
11748         #
11749         #  @return Improved shape.
11750         #
11751         #  @ref swig_UnionFaces "Example"
11752         @ManageTransactions("BlocksOp")
11753         def UnionFaces(self, theShape, theName=None):
11754             """
11755             Performs union faces of theShape.
11756             Unite faces sharing one surface. It means that
11757             these faces must have references to one C++ surface object (handle).
11758
11759             Parameters:
11760                 theShape The compound or single solid that contains faces
11761                          to perform union.
11762                 theName Object name; when specified, this parameter is used
11763                         for result publication in the study. Otherwise, if automatic
11764                         publication is switched on, default value is used for result name.
11765
11766             Returns:
11767                 Improved shape.
11768             """
11769             # Example: see GEOM_TestOthers.py
11770             anObj = self.BlocksOp.UnionFaces(theShape)
11771             RaiseIfFailed("UnionFaces", self.BlocksOp)
11772             self._autoPublish(anObj, theName, "unionFaces")
11773             return anObj
11774
11775         ## Check, if the given shape is a blocks compound.
11776         #  Fix all detected errors.
11777         #    \note Single block can be also fixed by this method.
11778         #  @param theShape The compound to check and improve.
11779         #  @param theName Object name; when specified, this parameter is used
11780         #         for result publication in the study. Otherwise, if automatic
11781         #         publication is switched on, default value is used for result name.
11782         #
11783         #  @return Improved compound.
11784         #
11785         #  @ref swig_CheckAndImprove "Example"
11786         @ManageTransactions("BlocksOp")
11787         def CheckAndImprove(self, theShape, theName=None):
11788             """
11789             Check, if the given shape is a blocks compound.
11790             Fix all detected errors.
11791
11792             Note:
11793                 Single block can be also fixed by this method.
11794
11795             Parameters:
11796                 theShape The compound to check and improve.
11797                 theName Object name; when specified, this parameter is used
11798                         for result publication in the study. Otherwise, if automatic
11799                         publication is switched on, default value is used for result name.
11800
11801             Returns:
11802                 Improved compound.
11803             """
11804             # Example: see GEOM_TestOthers.py
11805             anObj = self.BlocksOp.CheckAndImprove(theShape)
11806             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
11807             self._autoPublish(anObj, theName, "improved")
11808             return anObj
11809
11810         # end of l4_blocks_measure
11811         ## @}
11812
11813         ## @addtogroup l3_blocks_op
11814         ## @{
11815
11816         ## Get all the blocks, contained in the given compound.
11817         #  @param theCompound The compound to explode.
11818         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
11819         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
11820         #  @param theName Object name; when specified, this parameter is used
11821         #         for result publication in the study. Otherwise, if automatic
11822         #         publication is switched on, default value is used for result name.
11823         #
11824         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11825         #
11826         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
11827         #
11828         #  @ref tui_explode_on_blocks "Example 1"
11829         #  \n @ref swig_MakeBlockExplode "Example 2"
11830         @ManageTransactions("BlocksOp")
11831         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
11832             """
11833             Get all the blocks, contained in the given compound.
11834
11835             Parameters:
11836                 theCompound The compound to explode.
11837                 theMinNbFaces If solid has lower number of faces, it is not a block.
11838                 theMaxNbFaces If solid has higher number of faces, it is not a block.
11839                 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             Note:
11844                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11845
11846             Returns:
11847                 List of GEOM.GEOM_Object, containing the retrieved blocks.
11848             """
11849             # Example: see GEOM_TestOthers.py
11850             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
11851             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
11852             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
11853             for anObj in aList:
11854                 anObj.SetParameters(Parameters)
11855                 pass
11856             self._autoPublish(aList, theName, "block")
11857             return aList
11858
11859         ## Find block, containing the given point inside its volume or on boundary.
11860         #  @param theCompound Compound, to find block in.
11861         #  @param thePoint Point, close to the desired block. If the point lays on
11862         #         boundary between some blocks, we return block with nearest center.
11863         #  @param theName Object name; when specified, this parameter is used
11864         #         for result publication in the study. Otherwise, if automatic
11865         #         publication is switched on, default value is used for result name.
11866         #
11867         #  @return New GEOM.GEOM_Object, containing the found block.
11868         #
11869         #  @ref swig_todo "Example"
11870         @ManageTransactions("BlocksOp")
11871         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
11872             """
11873             Find block, containing the given point inside its volume or on boundary.
11874
11875             Parameters:
11876                 theCompound Compound, to find block in.
11877                 thePoint Point, close to the desired block. If the point lays on
11878                          boundary between some blocks, we return block with nearest center.
11879                 theName Object name; when specified, this parameter is used
11880                         for result publication in the study. Otherwise, if automatic
11881                         publication is switched on, default value is used for result name.
11882
11883             Returns:
11884                 New GEOM.GEOM_Object, containing the found block.
11885             """
11886             # Example: see GEOM_Spanner.py
11887             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
11888             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
11889             self._autoPublish(anObj, theName, "block")
11890             return anObj
11891
11892         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11893         #  @param theCompound Compound, to find block in.
11894         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
11895         #  @param theName Object name; when specified, this parameter is used
11896         #         for result publication in the study. Otherwise, if automatic
11897         #         publication is switched on, default value is used for result name.
11898         #
11899         #  @return New GEOM.GEOM_Object, containing the found block.
11900         #
11901         #  @ref swig_GetBlockByParts "Example"
11902         @ManageTransactions("BlocksOp")
11903         def GetBlockByParts(self, theCompound, theParts, theName=None):
11904             """
11905              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11906
11907              Parameters:
11908                 theCompound Compound, to find block in.
11909                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11910                 theName Object name; when specified, this parameter is used
11911                         for result publication in the study. Otherwise, if automatic
11912                         publication is switched on, default value is used for result name.
11913
11914             Returns:
11915                 New GEOM_Object, containing the found block.
11916             """
11917             # Example: see GEOM_TestOthers.py
11918             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11919             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11920             self._autoPublish(anObj, theName, "block")
11921             return anObj
11922
11923         ## Return all blocks, containing all the elements, passed as the parts.
11924         #  @param theCompound Compound, to find blocks in.
11925         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11926         #  @param theName Object name; when specified, this parameter is used
11927         #         for result publication in the study. Otherwise, if automatic
11928         #         publication is switched on, default value is used for result name.
11929         #
11930         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11931         #
11932         #  @ref swig_todo "Example"
11933         @ManageTransactions("BlocksOp")
11934         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11935             """
11936             Return all blocks, containing all the elements, passed as the parts.
11937
11938             Parameters:
11939                 theCompound Compound, to find blocks in.
11940                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11941                 theName Object name; when specified, this parameter is used
11942                         for result publication in the study. Otherwise, if automatic
11943                         publication is switched on, default value is used for result name.
11944
11945             Returns:
11946                 List of GEOM.GEOM_Object, containing the found blocks.
11947             """
11948             # Example: see GEOM_Spanner.py
11949             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11950             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11951             self._autoPublish(aList, theName, "block")
11952             return aList
11953
11954         ## Multi-transformate block and glue the result.
11955         #  Transformation is defined so, as to superpose direction faces.
11956         #  @param Block Hexahedral solid to be multi-transformed.
11957         #  @param DirFace1 ID of First direction face.
11958         #  @param DirFace2 ID of Second direction face.
11959         #  @param NbTimes Quantity of transformations to be done.
11960         #  @param theName Object name; when specified, this parameter is used
11961         #         for result publication in the study. Otherwise, if automatic
11962         #         publication is switched on, default value is used for result name.
11963         #
11964         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11965         #
11966         #  @return New GEOM.GEOM_Object, containing the result shape.
11967         #
11968         #  @ref tui_multi_transformation "Example"
11969         @ManageTransactions("BlocksOp")
11970         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11971             """
11972             Multi-transformate block and glue the result.
11973             Transformation is defined so, as to superpose direction faces.
11974
11975             Parameters:
11976                 Block Hexahedral solid to be multi-transformed.
11977                 DirFace1 ID of First direction face.
11978                 DirFace2 ID of Second direction face.
11979                 NbTimes Quantity of transformations to be done.
11980                 theName Object name; when specified, this parameter is used
11981                         for result publication in the study. Otherwise, if automatic
11982                         publication is switched on, default value is used for result name.
11983
11984             Note:
11985                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11986
11987             Returns:
11988                 New GEOM.GEOM_Object, containing the result shape.
11989             """
11990             # Example: see GEOM_Spanner.py
11991             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11992             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11993             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11994             anObj.SetParameters(Parameters)
11995             self._autoPublish(anObj, theName, "transformed")
11996             return anObj
11997
11998         ## Multi-transformate block and glue the result.
11999         #  @param Block Hexahedral solid to be multi-transformed.
12000         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12001         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12002         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12003         #  @param theName Object name; when specified, this parameter is used
12004         #         for result publication in the study. Otherwise, if automatic
12005         #         publication is switched on, default value is used for result name.
12006         #
12007         #  @return New GEOM.GEOM_Object, containing the result shape.
12008         #
12009         #  @ref tui_multi_transformation "Example"
12010         @ManageTransactions("BlocksOp")
12011         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12012                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12013             """
12014             Multi-transformate block and glue the result.
12015
12016             Parameters:
12017                 Block Hexahedral solid to be multi-transformed.
12018                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12019                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12020                 NbTimesU,NbTimesV Quantity of transformations to be done.
12021                 theName Object name; when specified, this parameter is used
12022                         for result publication in the study. Otherwise, if automatic
12023                         publication is switched on, default value is used for result name.
12024
12025             Returns:
12026                 New GEOM.GEOM_Object, containing the result shape.
12027             """
12028             # Example: see GEOM_Spanner.py
12029             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
12030               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
12031             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
12032                                                             DirFace1V, DirFace2V, NbTimesV)
12033             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
12034             anObj.SetParameters(Parameters)
12035             self._autoPublish(anObj, theName, "transformed")
12036             return anObj
12037
12038         ## Build all possible propagation groups.
12039         #  Propagation group is a set of all edges, opposite to one (main)
12040         #  edge of this group directly or through other opposite edges.
12041         #  Notion of Opposite Edge make sence only on quadrangle face.
12042         #  @param theShape Shape to build propagation groups on.
12043         #  @param theName Object name; when specified, this parameter is used
12044         #         for result publication in the study. Otherwise, if automatic
12045         #         publication is switched on, default value is used for result name.
12046         #
12047         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
12048         #
12049         #  @ref swig_Propagate "Example"
12050         @ManageTransactions("BlocksOp")
12051         def Propagate(self, theShape, theName=None):
12052             """
12053             Build all possible propagation groups.
12054             Propagation group is a set of all edges, opposite to one (main)
12055             edge of this group directly or through other opposite edges.
12056             Notion of Opposite Edge make sence only on quadrangle face.
12057
12058             Parameters:
12059                 theShape Shape to build propagation groups on.
12060                 theName Object name; when specified, this parameter is used
12061                         for result publication in the study. Otherwise, if automatic
12062                         publication is switched on, default value is used for result name.
12063
12064             Returns:
12065                 List of GEOM.GEOM_Object, each of them is a propagation group.
12066             """
12067             # Example: see GEOM_TestOthers.py
12068             listChains = self.BlocksOp.Propagate(theShape)
12069             RaiseIfFailed("Propagate", self.BlocksOp)
12070             self._autoPublish(listChains, theName, "propagate")
12071             return listChains
12072
12073         # end of l3_blocks_op
12074         ## @}
12075
12076         ## @addtogroup l3_groups
12077         ## @{
12078
12079         ## Creates a new group which will store sub-shapes of theMainShape
12080         #  @param theMainShape is a GEOM object on which the group is selected
12081         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
12082         #  @param theName Object name; when specified, this parameter is used
12083         #         for result publication in the study. Otherwise, if automatic
12084         #         publication is switched on, default value is used for result name.
12085         #
12086         #  @return a newly created GEOM group (GEOM.GEOM_Object)
12087         #
12088         #  @ref tui_working_with_groups_page "Example 1"
12089         #  \n @ref swig_CreateGroup "Example 2"
12090         @ManageTransactions("GroupOp")
12091         def CreateGroup(self, theMainShape, theShapeType, theName=None):
12092             """
12093             Creates a new group which will store sub-shapes of theMainShape
12094
12095             Parameters:
12096                theMainShape is a GEOM object on which the group is selected
12097                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
12098                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
12099                 theName Object name; when specified, this parameter is used
12100                         for result publication in the study. Otherwise, if automatic
12101                         publication is switched on, default value is used for result name.
12102
12103             Returns:
12104                a newly created GEOM group
12105
12106             Example of usage:
12107                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
12108
12109             """
12110             # Example: see GEOM_TestOthers.py
12111             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
12112             RaiseIfFailed("CreateGroup", self.GroupOp)
12113             self._autoPublish(anObj, theName, "group")
12114             return anObj
12115
12116         ## Adds a sub-object with ID theSubShapeId to the group
12117         #  @param theGroup is a GEOM group to which the new sub-shape is added
12118         #  @param theSubShapeID is a sub-shape ID in the main object.
12119         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12120         #
12121         #  @ref tui_working_with_groups_page "Example"
12122         @ManageTransactions("GroupOp")
12123         def AddObject(self,theGroup, theSubShapeID):
12124             """
12125             Adds a sub-object with ID theSubShapeId to the group
12126
12127             Parameters:
12128                 theGroup       is a GEOM group to which the new sub-shape is added
12129                 theSubShapeID  is a sub-shape ID in the main object.
12130
12131             Note:
12132                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12133             """
12134             # Example: see GEOM_TestOthers.py
12135             self.GroupOp.AddObject(theGroup, theSubShapeID)
12136             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
12137                 RaiseIfFailed("AddObject", self.GroupOp)
12138                 pass
12139             pass
12140
12141         ## Removes a sub-object with ID \a theSubShapeId from the group
12142         #  @param theGroup is a GEOM group from which the new sub-shape is removed
12143         #  @param theSubShapeID is a sub-shape ID in the main object.
12144         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12145         #
12146         #  @ref tui_working_with_groups_page "Example"
12147         @ManageTransactions("GroupOp")
12148         def RemoveObject(self,theGroup, theSubShapeID):
12149             """
12150             Removes a sub-object with ID theSubShapeId from the group
12151
12152             Parameters:
12153                 theGroup is a GEOM group from which the new sub-shape is removed
12154                 theSubShapeID is a sub-shape ID in the main object.
12155
12156             Note:
12157                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12158             """
12159             # Example: see GEOM_TestOthers.py
12160             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
12161             RaiseIfFailed("RemoveObject", self.GroupOp)
12162             pass
12163
12164         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12165         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12166         #  @param theSubShapes is a list of sub-shapes to be added.
12167         #
12168         #  @ref tui_working_with_groups_page "Example"
12169         @ManageTransactions("GroupOp")
12170         def UnionList (self,theGroup, theSubShapes):
12171             """
12172             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12173
12174             Parameters:
12175                 theGroup is a GEOM group to which the new sub-shapes are added.
12176                 theSubShapes is a list of sub-shapes to be added.
12177             """
12178             # Example: see GEOM_TestOthers.py
12179             self.GroupOp.UnionList(theGroup, theSubShapes)
12180             RaiseIfFailed("UnionList", self.GroupOp)
12181             pass
12182
12183         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12184         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12185         #  @param theSubShapes is a list of indices of sub-shapes to be added.
12186         #
12187         #  @ref swig_UnionIDs "Example"
12188         @ManageTransactions("GroupOp")
12189         def UnionIDs(self,theGroup, theSubShapes):
12190             """
12191             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12192
12193             Parameters:
12194                 theGroup is a GEOM group to which the new sub-shapes are added.
12195                 theSubShapes is a list of indices of sub-shapes to be added.
12196             """
12197             # Example: see GEOM_TestOthers.py
12198             self.GroupOp.UnionIDs(theGroup, theSubShapes)
12199             RaiseIfFailed("UnionIDs", self.GroupOp)
12200             pass
12201
12202         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12203         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12204         #  @param theSubShapes is a list of sub-shapes to be removed.
12205         #
12206         #  @ref tui_working_with_groups_page "Example"
12207         @ManageTransactions("GroupOp")
12208         def DifferenceList (self,theGroup, theSubShapes):
12209             """
12210             Removes from the group all the given shapes. No errors, if some shapes are not included.
12211
12212             Parameters:
12213                 theGroup is a GEOM group from which the sub-shapes are removed.
12214                 theSubShapes is a list of sub-shapes to be removed.
12215             """
12216             # Example: see GEOM_TestOthers.py
12217             self.GroupOp.DifferenceList(theGroup, theSubShapes)
12218             RaiseIfFailed("DifferenceList", self.GroupOp)
12219             pass
12220
12221         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12222         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12223         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
12224         #
12225         #  @ref swig_DifferenceIDs "Example"
12226         @ManageTransactions("GroupOp")
12227         def DifferenceIDs(self,theGroup, theSubShapes):
12228             """
12229             Removes from the group all the given shapes. No errors, if some shapes are not included.
12230
12231             Parameters:
12232                 theGroup is a GEOM group from which the sub-shapes are removed.
12233                 theSubShapes is a list of indices of sub-shapes to be removed.
12234             """
12235             # Example: see GEOM_TestOthers.py
12236             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
12237             RaiseIfFailed("DifferenceIDs", self.GroupOp)
12238             pass
12239
12240         ## Union of two groups.
12241         #  New group is created. It will contain all entities
12242         #  which are present in groups theGroup1 and theGroup2.
12243         #  @param theGroup1, theGroup2 are the initial GEOM groups
12244         #                              to create the united group from.
12245         #  @param theName Object name; when specified, this parameter is used
12246         #         for result publication in the study. Otherwise, if automatic
12247         #         publication is switched on, default value is used for result name.
12248         #
12249         #  @return a newly created GEOM group.
12250         #
12251         #  @ref tui_union_groups_anchor "Example"
12252         @ManageTransactions("GroupOp")
12253         def UnionGroups (self, theGroup1, theGroup2, theName=None):
12254             """
12255             Union of two groups.
12256             New group is created. It will contain all entities
12257             which are present in groups theGroup1 and theGroup2.
12258
12259             Parameters:
12260                 theGroup1, theGroup2 are the initial GEOM groups
12261                                      to create the united group from.
12262                 theName Object name; when specified, this parameter is used
12263                         for result publication in the study. Otherwise, if automatic
12264                         publication is switched on, default value is used for result name.
12265
12266             Returns:
12267                 a newly created GEOM group.
12268             """
12269             # Example: see GEOM_TestOthers.py
12270             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
12271             RaiseIfFailed("UnionGroups", self.GroupOp)
12272             self._autoPublish(aGroup, theName, "group")
12273             return aGroup
12274
12275         ## Intersection of two groups.
12276         #  New group is created. It will contain only those entities
12277         #  which are present in both groups theGroup1 and theGroup2.
12278         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12279         #  @param theName Object name; when specified, this parameter is used
12280         #         for result publication in the study. Otherwise, if automatic
12281         #         publication is switched on, default value is used for result name.
12282         #
12283         #  @return a newly created GEOM group.
12284         #
12285         #  @ref tui_intersect_groups_anchor "Example"
12286         @ManageTransactions("GroupOp")
12287         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
12288             """
12289             Intersection of two groups.
12290             New group is created. It will contain only those entities
12291             which are present in both groups theGroup1 and theGroup2.
12292
12293             Parameters:
12294                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12295                 theName Object name; when specified, this parameter is used
12296                         for result publication in the study. Otherwise, if automatic
12297                         publication is switched on, default value is used for result name.
12298
12299             Returns:
12300                 a newly created GEOM group.
12301             """
12302             # Example: see GEOM_TestOthers.py
12303             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
12304             RaiseIfFailed("IntersectGroups", self.GroupOp)
12305             self._autoPublish(aGroup, theName, "group")
12306             return aGroup
12307
12308         ## Cut of two groups.
12309         #  New group is created. It will contain entities which are
12310         #  present in group theGroup1 but are not present in group theGroup2.
12311         #  @param theGroup1 is a GEOM group to include elements of.
12312         #  @param theGroup2 is a GEOM group to exclude elements of.
12313         #  @param theName Object name; when specified, this parameter is used
12314         #         for result publication in the study. Otherwise, if automatic
12315         #         publication is switched on, default value is used for result name.
12316         #
12317         #  @return a newly created GEOM group.
12318         #
12319         #  @ref tui_cut_groups_anchor "Example"
12320         @ManageTransactions("GroupOp")
12321         def CutGroups (self, theGroup1, theGroup2, theName=None):
12322             """
12323             Cut of two groups.
12324             New group is created. It will contain entities which are
12325             present in group theGroup1 but are not present in group theGroup2.
12326
12327             Parameters:
12328                 theGroup1 is a GEOM group to include elements of.
12329                 theGroup2 is a GEOM group to exclude elements of.
12330                 theName Object name; when specified, this parameter is used
12331                         for result publication in the study. Otherwise, if automatic
12332                         publication is switched on, default value is used for result name.
12333
12334             Returns:
12335                 a newly created GEOM group.
12336             """
12337             # Example: see GEOM_TestOthers.py
12338             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
12339             RaiseIfFailed("CutGroups", self.GroupOp)
12340             self._autoPublish(aGroup, theName, "group")
12341             return aGroup
12342
12343         ## Union of list of groups.
12344         #  New group is created. It will contain all entities that are
12345         #  present in groups listed in theGList.
12346         #  @param theGList is a list of GEOM groups to create the united group from.
12347         #  @param theName Object name; when specified, this parameter is used
12348         #         for result publication in the study. Otherwise, if automatic
12349         #         publication is switched on, default value is used for result name.
12350         #
12351         #  @return a newly created GEOM group.
12352         #
12353         #  @ref tui_union_groups_anchor "Example"
12354         @ManageTransactions("GroupOp")
12355         def UnionListOfGroups (self, theGList, theName=None):
12356             """
12357             Union of list of groups.
12358             New group is created. It will contain all entities that are
12359             present in groups listed in theGList.
12360
12361             Parameters:
12362                 theGList is a list of GEOM groups to create the united group from.
12363                 theName Object name; when specified, this parameter is used
12364                         for result publication in the study. Otherwise, if automatic
12365                         publication is switched on, default value is used for result name.
12366
12367             Returns:
12368                 a newly created GEOM group.
12369             """
12370             # Example: see GEOM_TestOthers.py
12371             aGroup = self.GroupOp.UnionListOfGroups(theGList)
12372             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
12373             self._autoPublish(aGroup, theName, "group")
12374             return aGroup
12375
12376         ## Cut of lists of groups.
12377         #  New group is created. It will contain only entities
12378         #  which are present in groups listed in theGList.
12379         #  @param theGList is a list of GEOM groups to include elements of.
12380         #  @param theName Object name; when specified, this parameter is used
12381         #         for result publication in the study. Otherwise, if automatic
12382         #         publication is switched on, default value is used for result name.
12383         #
12384         #  @return a newly created GEOM group.
12385         #
12386         #  @ref tui_intersect_groups_anchor "Example"
12387         @ManageTransactions("GroupOp")
12388         def IntersectListOfGroups (self, theGList, theName=None):
12389             """
12390             Cut of lists of groups.
12391             New group is created. It will contain only entities
12392             which are present in groups listed in theGList.
12393
12394             Parameters:
12395                 theGList is a list of GEOM groups to include elements of.
12396                 theName Object name; when specified, this parameter is used
12397                         for result publication in the study. Otherwise, if automatic
12398                         publication is switched on, default value is used for result name.
12399
12400             Returns:
12401                 a newly created GEOM group.
12402             """
12403             # Example: see GEOM_TestOthers.py
12404             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
12405             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
12406             self._autoPublish(aGroup, theName, "group")
12407             return aGroup
12408
12409         ## Cut of lists of groups.
12410         #  New group is created. It will contain only entities
12411         #  which are present in groups listed in theGList1 but
12412         #  are not present in groups from theGList2.
12413         #  @param theGList1 is a list of GEOM groups to include elements of.
12414         #  @param theGList2 is a list of GEOM groups to exclude elements of.
12415         #  @param theName Object name; when specified, this parameter is used
12416         #         for result publication in the study. Otherwise, if automatic
12417         #         publication is switched on, default value is used for result name.
12418         #
12419         #  @return a newly created GEOM group.
12420         #
12421         #  @ref tui_cut_groups_anchor "Example"
12422         @ManageTransactions("GroupOp")
12423         def CutListOfGroups (self, theGList1, theGList2, theName=None):
12424             """
12425             Cut of lists of groups.
12426             New group is created. It will contain only entities
12427             which are present in groups listed in theGList1 but
12428             are not present in groups from theGList2.
12429
12430             Parameters:
12431                 theGList1 is a list of GEOM groups to include elements of.
12432                 theGList2 is a list of GEOM groups to exclude elements of.
12433                 theName Object name; when specified, this parameter is used
12434                         for result publication in the study. Otherwise, if automatic
12435                         publication is switched on, default value is used for result name.
12436
12437             Returns:
12438                 a newly created GEOM group.
12439             """
12440             # Example: see GEOM_TestOthers.py
12441             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
12442             RaiseIfFailed("CutListOfGroups", self.GroupOp)
12443             self._autoPublish(aGroup, theName, "group")
12444             return aGroup
12445
12446         ## Returns a list of sub-objects ID stored in the group
12447         #  @param theGroup is a GEOM group for which a list of IDs is requested
12448         #
12449         #  @ref swig_GetObjectIDs "Example"
12450         @ManageTransactions("GroupOp")
12451         def GetObjectIDs(self,theGroup):
12452             """
12453             Returns a list of sub-objects ID stored in the group
12454
12455             Parameters:
12456                 theGroup is a GEOM group for which a list of IDs is requested
12457             """
12458             # Example: see GEOM_TestOthers.py
12459             ListIDs = self.GroupOp.GetObjects(theGroup)
12460             RaiseIfFailed("GetObjects", self.GroupOp)
12461             return ListIDs
12462
12463         ## Returns a type of sub-objects stored in the group
12464         #  @param theGroup is a GEOM group which type is returned.
12465         #
12466         #  @ref swig_GetType "Example"
12467         @ManageTransactions("GroupOp")
12468         def GetType(self,theGroup):
12469             """
12470             Returns a type of sub-objects stored in the group
12471
12472             Parameters:
12473                 theGroup is a GEOM group which type is returned.
12474             """
12475             # Example: see GEOM_TestOthers.py
12476             aType = self.GroupOp.GetType(theGroup)
12477             RaiseIfFailed("GetType", self.GroupOp)
12478             return aType
12479
12480         ## Convert a type of geom object from id to string value
12481         #  @param theId is a GEOM obect type id.
12482         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12483         #  @ref swig_GetType "Example"
12484         def ShapeIdToType(self, theId):
12485             """
12486             Convert a type of geom object from id to string value
12487
12488             Parameters:
12489                 theId is a GEOM obect type id.
12490
12491             Returns:
12492                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12493             """
12494             if theId == 0:
12495                 return "COPY"
12496             if theId == 1:
12497                 return "IMPORT"
12498             if theId == 2:
12499                 return "POINT"
12500             if theId == 3:
12501                 return "VECTOR"
12502             if theId == 4:
12503                 return "PLANE"
12504             if theId == 5:
12505                 return "LINE"
12506             if theId == 6:
12507                 return "TORUS"
12508             if theId == 7:
12509                 return "BOX"
12510             if theId == 8:
12511                 return "CYLINDER"
12512             if theId == 9:
12513                 return "CONE"
12514             if theId == 10:
12515                 return "SPHERE"
12516             if theId == 11:
12517                 return "PRISM"
12518             if theId == 12:
12519                 return "REVOLUTION"
12520             if theId == 13:
12521                 return "BOOLEAN"
12522             if theId == 14:
12523                 return "PARTITION"
12524             if theId == 15:
12525                 return "POLYLINE"
12526             if theId == 16:
12527                 return "CIRCLE"
12528             if theId == 17:
12529                 return "SPLINE"
12530             if theId == 18:
12531                 return "ELLIPSE"
12532             if theId == 19:
12533                 return "CIRC_ARC"
12534             if theId == 20:
12535                 return "FILLET"
12536             if theId == 21:
12537                 return "CHAMFER"
12538             if theId == 22:
12539                 return "EDGE"
12540             if theId == 23:
12541                 return "WIRE"
12542             if theId == 24:
12543                 return "FACE"
12544             if theId == 25:
12545                 return "SHELL"
12546             if theId == 26:
12547                 return "SOLID"
12548             if theId == 27:
12549                 return "COMPOUND"
12550             if theId == 28:
12551                 return "SUBSHAPE"
12552             if theId == 29:
12553                 return "PIPE"
12554             if theId == 30:
12555                 return "ARCHIMEDE"
12556             if theId == 31:
12557                 return "FILLING"
12558             if theId == 32:
12559                 return "EXPLODE"
12560             if theId == 33:
12561                 return "GLUED"
12562             if theId == 34:
12563                 return "SKETCHER"
12564             if theId == 35:
12565                 return "CDG"
12566             if theId == 36:
12567                 return "FREE_BOUNDS"
12568             if theId == 37:
12569                 return "GROUP"
12570             if theId == 38:
12571                 return "BLOCK"
12572             if theId == 39:
12573                 return "MARKER"
12574             if theId == 40:
12575                 return "THRUSECTIONS"
12576             if theId == 41:
12577                 return "COMPOUNDFILTER"
12578             if theId == 42:
12579                 return "SHAPES_ON_SHAPE"
12580             if theId == 43:
12581                 return "ELLIPSE_ARC"
12582             if theId == 44:
12583                 return "3DSKETCHER"
12584             if theId == 45:
12585                 return "FILLET_2D"
12586             if theId == 46:
12587                 return "FILLET_1D"
12588             if theId == 201:
12589                 return "PIPETSHAPE"
12590             return "Shape Id not exist."
12591
12592         ## Returns a main shape associated with the group
12593         #  @param theGroup is a GEOM group for which a main shape object is requested
12594         #  @return a GEOM object which is a main shape for theGroup
12595         #
12596         #  @ref swig_GetMainShape "Example"
12597         @ManageTransactions("GroupOp")
12598         def GetMainShape(self,theGroup):
12599             """
12600             Returns a main shape associated with the group
12601
12602             Parameters:
12603                 theGroup is a GEOM group for which a main shape object is requested
12604
12605             Returns:
12606                 a GEOM object which is a main shape for theGroup
12607
12608             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
12609             """
12610             # Example: see GEOM_TestOthers.py
12611             anObj = self.GroupOp.GetMainShape(theGroup)
12612             RaiseIfFailed("GetMainShape", self.GroupOp)
12613             return anObj
12614
12615         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
12616         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12617         #  @param theShape given shape (see GEOM.GEOM_Object)
12618         #  @param min_length minimum length of edges of theShape
12619         #  @param max_length maximum length of edges of theShape
12620         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12621         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12622         #  @param theName Object name; when specified, this parameter is used
12623         #         for result publication in the study. Otherwise, if automatic
12624         #         publication is switched on, default value is used for result name.
12625         #
12626         #  @return a newly created GEOM group of edges
12627         #
12628         #  @@ref swig_todo "Example"
12629         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
12630             """
12631             Create group of edges of theShape, whose length is in range [min_length, max_length].
12632             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12633
12634             Parameters:
12635                 theShape given shape
12636                 min_length minimum length of edges of theShape
12637                 max_length maximum length of edges of theShape
12638                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12639                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12640                 theName Object name; when specified, this parameter is used
12641                         for result publication in the study. Otherwise, if automatic
12642                         publication is switched on, default value is used for result name.
12643
12644              Returns:
12645                 a newly created GEOM group of edges.
12646             """
12647             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
12648             edges_in_range = []
12649             for edge in edges:
12650                 Props = self.BasicProperties(edge)
12651                 if min_length <= Props[0] and Props[0] <= max_length:
12652                     if (not include_min) and (min_length == Props[0]):
12653                         skip = 1
12654                     else:
12655                         if (not include_max) and (Props[0] == max_length):
12656                             skip = 1
12657                         else:
12658                             edges_in_range.append(edge)
12659
12660             if len(edges_in_range) <= 0:
12661                 print "No edges found by given criteria"
12662                 return None
12663
12664             # note: auto-publishing is done in self.CreateGroup()
12665             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
12666             self.UnionList(group_edges, edges_in_range)
12667
12668             return group_edges
12669
12670         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
12671         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12672         #  @param min_length minimum length of edges of selected shape
12673         #  @param max_length maximum length of edges of selected shape
12674         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12675         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12676         #  @return a newly created GEOM group of edges
12677         #  @ref swig_todo "Example"
12678         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
12679             """
12680             Create group of edges of selected shape, whose length is in range [min_length, max_length].
12681             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12682
12683             Parameters:
12684                 min_length minimum length of edges of selected shape
12685                 max_length maximum length of edges of selected shape
12686                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12687                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12688
12689              Returns:
12690                 a newly created GEOM group of edges.
12691             """
12692             nb_selected = sg.SelectedCount()
12693             if nb_selected < 1:
12694                 print "Select a shape before calling this function, please."
12695                 return 0
12696             if nb_selected > 1:
12697                 print "Only one shape must be selected"
12698                 return 0
12699
12700             id_shape = sg.getSelected(0)
12701             shape = IDToObject( id_shape )
12702
12703             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
12704
12705             left_str  = " < "
12706             right_str = " < "
12707             if include_min: left_str  = " <= "
12708             if include_max: right_str  = " <= "
12709
12710             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
12711                                     + left_str + "length" + right_str + `max_length`)
12712
12713             sg.updateObjBrowser(1)
12714
12715             return group_edges
12716
12717         # end of l3_groups
12718         ## @}
12719
12720         #@@ insert new functions before this line @@ do not remove this line @@#
12721
12722         ## Create a copy of the given object
12723         #
12724         #  @param theOriginal geometry object for copy
12725         #  @param theName Object name; when specified, this parameter is used
12726         #         for result publication in the study. Otherwise, if automatic
12727         #         publication is switched on, default value is used for result name.
12728         #
12729         #  @return New GEOM_Object, containing the copied shape.
12730         #
12731         #  @ingroup l1_geomBuilder_auxiliary
12732         #  @ref swig_MakeCopy "Example"
12733         @ManageTransactions("InsertOp")
12734         def MakeCopy(self, theOriginal, theName=None):
12735             """
12736             Create a copy of the given object
12737
12738             Parameters:
12739                 theOriginal geometry object for copy
12740                 theName Object name; when specified, this parameter is used
12741                         for result publication in the study. Otherwise, if automatic
12742                         publication is switched on, default value is used for result name.
12743
12744             Returns:
12745                 New GEOM_Object, containing the copied shape.
12746
12747             Example of usage: Copy = geompy.MakeCopy(Box)
12748             """
12749             # Example: see GEOM_TestAll.py
12750             anObj = self.InsertOp.MakeCopy(theOriginal)
12751             RaiseIfFailed("MakeCopy", self.InsertOp)
12752             self._autoPublish(anObj, theName, "copy")
12753             return anObj
12754
12755         ## Add Path to load python scripts from
12756         #  @param Path a path to load python scripts from
12757         #  @ingroup l1_geomBuilder_auxiliary
12758         def addPath(self,Path):
12759             """
12760             Add Path to load python scripts from
12761
12762             Parameters:
12763                 Path a path to load python scripts from
12764             """
12765             if (sys.path.count(Path) < 1):
12766                 sys.path.append(Path)
12767                 pass
12768             pass
12769
12770         ## Load marker texture from the file
12771         #  @param Path a path to the texture file
12772         #  @return unique texture identifier
12773         #  @ingroup l1_geomBuilder_auxiliary
12774         @ManageTransactions("InsertOp")
12775         def LoadTexture(self, Path):
12776             """
12777             Load marker texture from the file
12778
12779             Parameters:
12780                 Path a path to the texture file
12781
12782             Returns:
12783                 unique texture identifier
12784             """
12785             # Example: see GEOM_TestAll.py
12786             ID = self.InsertOp.LoadTexture(Path)
12787             RaiseIfFailed("LoadTexture", self.InsertOp)
12788             return ID
12789
12790         ## Get internal name of the object based on its study entry
12791         #  @note This method does not provide an unique identifier of the geometry object.
12792         #  @note This is internal function of GEOM component, though it can be used outside it for
12793         #  appropriate reason (e.g. for identification of geometry object).
12794         #  @param obj geometry object
12795         #  @return unique object identifier
12796         #  @ingroup l1_geomBuilder_auxiliary
12797         def getObjectID(self, obj):
12798             """
12799             Get internal name of the object based on its study entry.
12800             Note: this method does not provide an unique identifier of the geometry object.
12801             It is an internal function of GEOM component, though it can be used outside GEOM for
12802             appropriate reason (e.g. for identification of geometry object).
12803
12804             Parameters:
12805                 obj geometry object
12806
12807             Returns:
12808                 unique object identifier
12809             """
12810             ID = ""
12811             entry = salome.ObjectToID(obj)
12812             if entry is not None:
12813                 lst = entry.split(":")
12814                 if len(lst) > 0:
12815                     ID = lst[-1] # -1 means last item in the list
12816                     return "GEOM_" + ID
12817             return ID
12818
12819
12820
12821         ## Add marker texture. @a Width and @a Height parameters
12822         #  specify width and height of the texture in pixels.
12823         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12824         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12825         #  parameter should be unpacked string, in which '1' symbols represent opaque
12826         #  pixels and '0' represent transparent pixels of the texture bitmap.
12827         #
12828         #  @param Width texture width in pixels
12829         #  @param Height texture height in pixels
12830         #  @param Texture texture data
12831         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12832         #  @return unique texture identifier
12833         #  @ingroup l1_geomBuilder_auxiliary
12834         @ManageTransactions("InsertOp")
12835         def AddTexture(self, Width, Height, Texture, RowData=False):
12836             """
12837             Add marker texture. Width and Height parameters
12838             specify width and height of the texture in pixels.
12839             If RowData is True, Texture parameter should represent texture data
12840             packed into the byte array. If RowData is False (default), Texture
12841             parameter should be unpacked string, in which '1' symbols represent opaque
12842             pixels and '0' represent transparent pixels of the texture bitmap.
12843
12844             Parameters:
12845                 Width texture width in pixels
12846                 Height texture height in pixels
12847                 Texture texture data
12848                 RowData if True, Texture data are packed in the byte stream
12849
12850             Returns:
12851                 return unique texture identifier
12852             """
12853             if not RowData: Texture = PackData(Texture)
12854             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12855             RaiseIfFailed("AddTexture", self.InsertOp)
12856             return ID
12857
12858         ## Creates a new folder object. It is a container for any GEOM objects.
12859         #  @param Name name of the container
12860         #  @param Father parent object. If None,
12861         #         folder under 'Geometry' root object will be created.
12862         #  @return a new created folder
12863         #  @ingroup l1_publish_data
12864         def NewFolder(self, Name, Father=None):
12865             """
12866             Create a new folder object. It is an auxiliary container for any GEOM objects.
12867
12868             Parameters:
12869                 Name name of the container
12870                 Father parent object. If None,
12871                 folder under 'Geometry' root object will be created.
12872
12873             Returns:
12874                 a new created folder
12875             """
12876             if not Father: Father = self.father
12877             return self.CreateFolder(Name, Father)
12878
12879         ## Move object to the specified folder
12880         #  @param Object object to move
12881         #  @param Folder target folder
12882         #  @ingroup l1_publish_data
12883         def PutToFolder(self, Object, Folder):
12884             """
12885             Move object to the specified folder
12886
12887             Parameters:
12888                 Object object to move
12889                 Folder target folder
12890             """
12891             self.MoveToFolder(Object, Folder)
12892             pass
12893
12894         ## Move list of objects to the specified folder
12895         #  @param ListOfSO list of objects to move
12896         #  @param Folder target folder
12897         #  @ingroup l1_publish_data
12898         def PutListToFolder(self, ListOfSO, Folder):
12899             """
12900             Move list of objects to the specified folder
12901
12902             Parameters:
12903                 ListOfSO list of objects to move
12904                 Folder target folder
12905             """
12906             self.MoveListToFolder(ListOfSO, Folder)
12907             pass
12908
12909         ## @addtogroup l2_field
12910         ## @{
12911
12912         ## Creates a field
12913         #  @param shape the shape the field lies on
12914         #  @param name the field name
12915         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
12916         #  @param dimension dimension of the shape the field lies on
12917         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12918         #  @param componentNames names of components
12919         #  @return a created field
12920         @ManageTransactions("FieldOp")
12921         def CreateField(self, shape, name, type, dimension, componentNames):
12922             """
12923             Creates a field
12924
12925             Parameters:
12926                 shape the shape the field lies on
12927                 name  the field name
12928                 type  type of field data
12929                 dimension dimension of the shape the field lies on
12930                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12931                 componentNames names of components
12932
12933             Returns:
12934                 a created field
12935             """
12936             if isinstance( type, int ):
12937                 if type < 0 or type > 3:
12938                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
12939                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
12940
12941             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
12942             RaiseIfFailed("CreateField", self.FieldOp)
12943             global geom
12944             geom._autoPublish( f, "", name)
12945             return f
12946
12947         ## Removes a field from the GEOM component
12948         #  @param field the field to remove
12949         def RemoveField(self, field):
12950             "Removes a field from the GEOM component"
12951             global geom
12952             if isinstance( field, GEOM._objref_GEOM_Field ):
12953                 geom.RemoveObject( field )
12954             elif isinstance( field, geomField ):
12955                 geom.RemoveObject( field.field )
12956             else:
12957                 raise RuntimeError, "RemoveField() : the object is not a field"
12958             return
12959
12960         ## Returns number of fields on a shape
12961         @ManageTransactions("FieldOp")
12962         def CountFields(self, shape):
12963             "Returns number of fields on a shape"
12964             nb = self.FieldOp.CountFields( shape )
12965             RaiseIfFailed("CountFields", self.FieldOp)
12966             return nb
12967
12968         ## Returns all fields on a shape
12969         @ManageTransactions("FieldOp")
12970         def GetFields(self, shape):
12971             "Returns all fields on a shape"
12972             ff = self.FieldOp.GetFields( shape )
12973             RaiseIfFailed("GetFields", self.FieldOp)
12974             return ff
12975
12976         ## Returns a field on a shape by its name
12977         @ManageTransactions("FieldOp")
12978         def GetField(self, shape, name):
12979             "Returns a field on a shape by its name"
12980             f = self.FieldOp.GetField( shape, name )
12981             RaiseIfFailed("GetField", self.FieldOp)
12982             return f
12983
12984         # end of l2_field
12985         ## @}
12986
12987
12988 import omniORB
12989 # Register the new proxy for GEOM_Gen
12990 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12991
12992
12993 ## Field on Geometry
12994 #  @ingroup l2_field
12995 class geomField( GEOM._objref_GEOM_Field ):
12996
12997     def __init__(self):
12998         GEOM._objref_GEOM_Field.__init__(self)
12999         self.field = GEOM._objref_GEOM_Field
13000         return
13001
13002     ## Returns the shape the field lies on
13003     def getShape(self):
13004         "Returns the shape the field lies on"
13005         return self.field.GetShape(self)
13006
13007     ## Returns the field name
13008     def getName(self):
13009         "Returns the field name"
13010         return self.field.GetName(self)
13011
13012     ## Returns type of field data as integer [0-3]
13013     def getType(self):
13014         "Returns type of field data"
13015         return self.field.GetDataType(self)._v
13016
13017     ## Returns type of field data:
13018     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13019     def getTypeEnum(self):
13020         "Returns type of field data"
13021         return self.field.GetDataType(self)
13022
13023     ## Returns dimension of the shape the field lies on:
13024     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13025     def getDimension(self):
13026         """Returns dimension of the shape the field lies on:
13027         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13028         return self.field.GetDimension(self)
13029
13030     ## Returns names of components
13031     def getComponents(self):
13032         "Returns names of components"
13033         return self.field.GetComponents(self)
13034
13035     ## Adds a time step to the field
13036     #  @param step the time step number further used as the step identifier
13037     #  @param stamp the time step time
13038     #  @param values the values of the time step
13039     def addStep(self, step, stamp, values):
13040         "Adds a time step to the field"
13041         stp = self.field.AddStep( self, step, stamp )
13042         if not stp:
13043             raise RuntimeError, \
13044                   "Field.addStep() : Error: step %s already exists in this field"%step
13045         global geom
13046         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13047         self.setValues( step, values )
13048         return stp
13049
13050     ## Remove a time step from the field
13051     def removeStep(self,step):
13052         "Remove a time step from the field"
13053         stepSO = None
13054         try:
13055             stepObj = self.field.GetStep( self, step )
13056             if stepObj:
13057                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13058         except:
13059             #import traceback
13060             #traceback.print_exc()
13061             pass
13062         self.field.RemoveStep( self, step )
13063         if stepSO:
13064             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13065         return
13066
13067     ## Returns number of time steps in the field
13068     def countSteps(self):
13069         "Returns number of time steps in the field"
13070         return self.field.CountSteps(self)
13071
13072     ## Returns a list of time step IDs in the field
13073     def getSteps(self):
13074         "Returns a list of time step IDs in the field"
13075         return self.field.GetSteps(self)
13076
13077     ## Returns a time step by its ID
13078     def getStep(self,step):
13079         "Returns a time step by its ID"
13080         stp = self.field.GetStep(self, step)
13081         if not stp:
13082             raise RuntimeError, "Step %s is missing from this field"%step
13083         return stp
13084
13085     ## Returns the time of the field step
13086     def getStamp(self,step):
13087         "Returns the time of the field step"
13088         return self.getStep(step).GetStamp()
13089
13090     ## Changes the time of the field step
13091     def setStamp(self, step, stamp):
13092         "Changes the time of the field step"
13093         return self.getStep(step).SetStamp(stamp)
13094
13095     ## Returns values of the field step
13096     def getValues(self, step):
13097         "Returns values of the field step"
13098         return self.getStep(step).GetValues()
13099
13100     ## Changes values of the field step
13101     def setValues(self, step, values):
13102         "Changes values of the field step"
13103         stp = self.getStep(step)
13104         errBeg = "Field.setValues(values) : Error: "
13105         try:
13106             ok = stp.SetValues( values )
13107         except Exception, e:
13108             excStr = str(e)
13109             if excStr.find("WrongPythonType") > 0:
13110                 raise RuntimeError, errBeg +\
13111                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
13112             raise RuntimeError, errBeg + str(e)
13113         if not ok:
13114             nbOK = self.field.GetArraySize(self)
13115             nbKO = len(values)
13116             if nbOK != nbKO:
13117                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
13118             else:
13119                 raise RuntimeError, errBeg + "failed"
13120         return
13121
13122     pass # end of class geomField
13123
13124 # Register the new proxy for GEOM_Field
13125 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
13126
13127
13128 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
13129 #  interface to GEOM operations.
13130 #
13131 #  Typical use is:
13132 #  \code
13133 #    import salome
13134 #    salome.salome_init()
13135 #    from salome.geom import geomBuilder
13136 #    geompy = geomBuilder.New(salome.myStudy)
13137 #  \endcode
13138 #  @param  study     SALOME study, generally obtained by salome.myStudy.
13139 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13140 #  @return geomBuilder instance
13141 def New( study, instance=None):
13142     """
13143     Create a new geomBuilder instance.The geomBuilder class provides the Python
13144     interface to GEOM operations.
13145
13146     Typical use is:
13147         import salome
13148         salome.salome_init()
13149         from salome.geom import geomBuilder
13150         geompy = geomBuilder.New(salome.myStudy)
13151
13152     Parameters:
13153         study     SALOME study, generally obtained by salome.myStudy.
13154         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13155     Returns:
13156         geomBuilder instance
13157     """
13158     #print "New geomBuilder ", study, instance
13159     global engine
13160     global geom
13161     global doLcc
13162     engine = instance
13163     if engine is None:
13164       doLcc = True
13165     geom = geomBuilder()
13166     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13167     geom.init_geom(study)
13168     return geom
13169
13170
13171 # Register methods from the plug-ins in the geomBuilder class 
13172 plugins_var = os.environ.get( "GEOM_PluginsList" )
13173
13174 plugins = None
13175 if plugins_var is not None:
13176     plugins = plugins_var.split( ":" )
13177     plugins=filter(lambda x: len(x)>0, plugins)
13178 if plugins is not None:
13179     for pluginName in plugins:
13180         pluginBuilderName = pluginName + "Builder"
13181         try:
13182             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
13183         except Exception, e:
13184             from salome_utils import verbose
13185             print "Exception while loading %s: %s" % ( pluginBuilderName, e )
13186             continue
13187         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
13188         plugin = eval( pluginBuilderName )
13189         
13190         # add methods from plugin module to the geomBuilder class
13191         for k in dir( plugin ):
13192             if k[0] == '_': continue
13193             method = getattr( plugin, k )
13194             if type( method ).__name__ == 'function':
13195                 if not hasattr( geomBuilder, k ):
13196                     setattr( geomBuilder, k, method )
13197                 pass
13198             pass
13199         del pluginName
13200         pass
13201     pass