Salome HOME
Merge remote branch 'origin/V7_4_BR'
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup geomBuilder geomBuilder Python module
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ##
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ##
50 ## For example, consider the following Python script:
51 ##
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New(salome.myStudy)
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ##
60 ## Last two lines can be replaced by one-line instruction:
61 ##
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ##
66 ## ... or simply
67 ##
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, "nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, ("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ##
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New(salome.myStudy)
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100)
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still containes all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## It is possible to customize the representation of the geometrical
148 ## data in the data tree; this can be done by using folders. A folder can
149 ## be created in the study tree using function
150 ## \ref geomBuilder.geomBuilder.NewFolder() "NewFolder()"
151 ## (by default it is created under the "Geometry" root object).
152 ## As soon as folder is created, any published geometry object
153 ## can be moved into it.
154 ##
155 ## For example:
156 ##
157 ## @code
158 ## import salome
159 ## from salome.geom import geomBuilder
160 ## geompy = geomBuilder.New(salome.myStudy)
161 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box")
162 ## # the box was created and published in the study
163 ## folder = geompy.NewFolder("Primitives")
164 ## # an empty "Primitives" folder was created under default "Geometry" root object
165 ## geompy.PutToFolder(box, folder)
166 ## # the box was moved into "Primitives" folder
167 ## @endcode
168 ##
169 ## Subfolders are also can be created by specifying another folder as a parent:
170 ##
171 ## @code
172 ## subfolder = geompy.NewFolder("3D", folder)
173 ## # "3D" folder was created under "Primitives" folder
174 ## @endcode
175 ##
176 ## @note
177 ## - Folder container is just a representation layer object that
178 ## deals with already published objects only. So, any geometry object
179 ## should be published in the study (for example, with
180 ## \ref geomBuilder.geomBuilder.PutToFolder() "addToStudy()" function)
181 ## BEFORE moving it into any existing folder.
182 ## - \ref geomBuilder.geomBuilder.PutToFolder() "PutToFolder()" function
183 ## does not change physical position of geometry object in the study tree,
184 ## it only affects on the representation of the data tree.
185 ## - It is impossible to publish geometry object using any folder as father.
186 ##
187 ##  \defgroup l1_publish_data
188 ##  \defgroup l1_geomBuilder_auxiliary
189 ##  \defgroup l1_geomBuilder_purpose
190 ## @}
191
192 ## @defgroup l1_publish_data Publishing results in SALOME study
193
194 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
195
196 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
197 ## @{
198 ##   @defgroup l2_import_export Importing/exporting geometrical objects
199 ##   @defgroup l2_creating      Creating geometrical objects
200 ##   @{
201 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
202 ##     @{
203 ##       @defgroup l4_curves        Creating Curves
204
205 ##     @}
206 ##     @defgroup l3_3d_primitives Creating 3D Primitives
207 ##     @defgroup l3_complex       Creating Complex Objects
208 ##     @defgroup l3_groups        Working with groups
209 ##     @defgroup l3_blocks        Building by blocks
210 ##     @{
211 ##       @defgroup l4_blocks_measure Check and Improve
212
213 ##     @}
214 ##     @defgroup l3_sketcher      Sketcher
215 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
216 ##     @{
217 ##       @defgroup l4_decompose     Decompose objects
218 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
219 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
220 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
221 ##       @defgroup l4_advanced      Advanced objects creation functions
222
223 ##     @}
224
225 ##   @}
226 ##   @defgroup l2_transforming  Transforming geometrical objects
227 ##   @{
228 ##     @defgroup l3_basic_op      Basic Operations
229 ##     @defgroup l3_boolean       Boolean Operations
230 ##     @defgroup l3_transform     Transformation Operations
231 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
232 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
233 ##     @defgroup l3_blocks_op     Blocks Operations
234 ##     @defgroup l3_healing       Repairing Operations
235 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
236
237 ##   @}
238 ##   @defgroup l2_measure       Using measurement tools
239 ##   @defgroup l2_field         Field on Geometry
240
241 ## @}
242
243 # initialize SALOME session in try/except block
244 # to avoid problems in some cases, e.g. when generating documentation
245 try:
246     import salome
247     salome.salome_init()
248     from salome import *
249 except:
250     pass
251
252 from salome_notebook import *
253
254 import GEOM
255 import math
256 import os
257 import functools
258
259 from salome.geom.gsketcher import Sketcher3D, Sketcher2D
260
261 # service function
262 def _toListOfNames(_names, _size=-1):
263     l = []
264     import types
265     if type(_names) in [types.ListType, types.TupleType]:
266         for i in _names: l.append(i)
267     elif _names:
268         l.append(_names)
269     if l and len(l) < _size:
270         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
271     return l
272
273 # Decorator function to manage transactions for all geometric operations.
274 def ManageTransactions(theOpeName):
275     def MTDecorator(theFunction):
276         # To keep the original function name an documentation.
277         @functools.wraps(theFunction)
278         def OpenCallClose(self, *args, **kwargs):
279             # Open transaction
280             anOperation = getattr(self, theOpeName)
281             anOperation.StartOperation()
282             try:
283                 # Call the function
284                 res = theFunction(self, *args, **kwargs)
285                 # Commit transaction
286                 anOperation.FinishOperation()
287                 return res
288             except:
289                 # Abort transaction
290                 anOperation.AbortOperation()
291                 raise
292         return OpenCallClose
293     return MTDecorator
294
295 ## Raise an Error, containing the Method_name, if Operation is Failed
296 ## @ingroup l1_geomBuilder_auxiliary
297 def RaiseIfFailed (Method_name, Operation):
298     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
299         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
300
301 ## Return list of variables value from salome notebook
302 ## @ingroup l1_geomBuilder_auxiliary
303 def ParseParameters(*parameters):
304     Result = []
305     StringResult = []
306     for parameter in parameters:
307         if isinstance(parameter, list):
308             lResults = ParseParameters(*parameter)
309             if len(lResults) > 0:
310                 Result.append(lResults[:-1])
311                 StringResult += lResults[-1].split(":")
312                 pass
313             pass
314         else:
315             if isinstance(parameter,str):
316                 if notebook.isVariable(parameter):
317                     Result.append(notebook.get(parameter))
318                 else:
319                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
320                 pass
321             else:
322                 Result.append(parameter)
323                 pass
324             StringResult.append(str(parameter))
325             pass
326         pass
327     if Result:
328         Result.append(":".join(StringResult))
329     else:
330         Result = ":".join(StringResult)
331     return Result
332
333 ## Return list of variables value from salome notebook
334 ## @ingroup l1_geomBuilder_auxiliary
335 def ParseList(list):
336     Result = []
337     StringResult = ""
338     for parameter in list:
339         if isinstance(parameter,str) and notebook.isVariable(parameter):
340             Result.append(str(notebook.get(parameter)))
341             pass
342         else:
343             Result.append(str(parameter))
344             pass
345
346         StringResult = StringResult + str(parameter)
347         StringResult = StringResult + ":"
348         pass
349     StringResult = StringResult[:len(StringResult)-1]
350     return Result, StringResult
351
352 ## Return list of variables value from salome notebook
353 ## @ingroup l1_geomBuilder_auxiliary
354 def ParseSketcherCommand(command):
355     Result = ""
356     StringResult = ""
357     sections = command.split(":")
358     for section in sections:
359         parameters = section.split(" ")
360         paramIndex = 1
361         for parameter in parameters:
362             if paramIndex > 1 and parameter.find("'") != -1:
363                 parameter = parameter.replace("'","")
364                 if notebook.isVariable(parameter):
365                     Result = Result + str(notebook.get(parameter)) + " "
366                     pass
367                 else:
368                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
369                     pass
370                 pass
371             else:
372                 Result = Result + str(parameter) + " "
373                 pass
374             if paramIndex > 1:
375                 StringResult = StringResult + parameter
376                 StringResult = StringResult + ":"
377                 pass
378             paramIndex = paramIndex + 1
379             pass
380         Result = Result[:len(Result)-1] + ":"
381         pass
382     Result = Result[:len(Result)-1]
383     return Result, StringResult
384
385 ## Helper function which can be used to pack the passed string to the byte data.
386 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
387 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
388 ## For example,
389 ## \code
390 ## val = PackData("10001110") # val = 0xAE
391 ## val = PackData("1")        # val = 0x80
392 ## \endcode
393 ## @param data unpacked data - a string containing '1' and '0' symbols
394 ## @return data packed to the byte stream
395 ## @ingroup l1_geomBuilder_auxiliary
396 def PackData(data):
397     """
398     Helper function which can be used to pack the passed string to the byte data.
399     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
400     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
401
402     Parameters:
403         data unpacked data - a string containing '1' and '0' symbols
404
405     Returns:
406         data packed to the byte stream
407
408     Example of usage:
409         val = PackData("10001110") # val = 0xAE
410         val = PackData("1")        # val = 0x80
411     """
412     bytes = len(data)/8
413     if len(data)%8: bytes += 1
414     res = ""
415     for b in range(bytes):
416         d = data[b*8:(b+1)*8]
417         val = 0
418         for i in range(8):
419             val *= 2
420             if i < len(d):
421                 if d[i] == "1": val += 1
422                 elif d[i] != "0":
423                     raise "Invalid symbol %s" % d[i]
424                 pass
425             pass
426         res += chr(val)
427         pass
428     return res
429
430 ## Read bitmap texture from the text file.
431 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
432 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
433 ## The function returns width and height of the pixmap in pixels and byte stream representing
434 ## texture bitmap itself.
435 ##
436 ## This function can be used to read the texture to the byte stream in order to pass it to
437 ## the AddTexture() function of geomBuilder class.
438 ## For example,
439 ## \code
440 ## from salome.geom import geomBuilder
441 ## geompy = geomBuilder.New(salome.myStudy)
442 ## texture = geompy.readtexture('mytexture.dat')
443 ## texture = geompy.AddTexture(*texture)
444 ## obj.SetMarkerTexture(texture)
445 ## \endcode
446 ## @param fname texture file name
447 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
448 ## @ingroup l1_geomBuilder_auxiliary
449 def ReadTexture(fname):
450     """
451     Read bitmap texture from the text file.
452     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
453     A zero symbol ('0') represents transparent pixel of the texture bitmap.
454     The function returns width and height of the pixmap in pixels and byte stream representing
455     texture bitmap itself.
456     This function can be used to read the texture to the byte stream in order to pass it to
457     the AddTexture() function of geomBuilder class.
458
459     Parameters:
460         fname texture file name
461
462     Returns:
463         sequence of tree values: texture's width, height in pixels and its byte stream
464
465     Example of usage:
466         from salome.geom import geomBuilder
467         geompy = geomBuilder.New(salome.myStudy)
468         texture = geompy.readtexture('mytexture.dat')
469         texture = geompy.AddTexture(*texture)
470         obj.SetMarkerTexture(texture)
471     """
472     try:
473         f = open(fname)
474         lines = [ l.strip() for l in f.readlines()]
475         f.close()
476         maxlen = 0
477         if lines: maxlen = max([len(x) for x in lines])
478         lenbytes = maxlen/8
479         if maxlen%8: lenbytes += 1
480         bytedata=""
481         for line in lines:
482             if len(line)%8:
483                 lenline = (len(line)/8+1)*8
484                 pass
485             else:
486                 lenline = (len(line)/8)*8
487                 pass
488             for i in range(lenline/8):
489                 byte=""
490                 for j in range(8):
491                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
492                     else: byte += "0"
493                     pass
494                 bytedata += PackData(byte)
495                 pass
496             for i in range(lenline/8, lenbytes):
497                 bytedata += PackData("0")
498             pass
499         return lenbytes*8, len(lines), bytedata
500     except:
501         pass
502     return 0, 0, ""
503
504 ## Returns a long value from enumeration type
505 #  Can be used for CORBA enumerator types like GEOM.shape_type
506 #  @param theItem enumeration type
507 #  @ingroup l1_geomBuilder_auxiliary
508 def EnumToLong(theItem):
509     """
510     Returns a long value from enumeration type
511     Can be used for CORBA enumerator types like geomBuilder.ShapeType
512
513     Parameters:
514         theItem enumeration type
515     """
516     ret = theItem
517     if hasattr(theItem, "_v"): ret = theItem._v
518     return ret
519
520 ## Information about closed/unclosed state of shell or wire
521 #  @ingroup l1_geomBuilder_auxiliary
522 class info:
523     """
524     Information about closed/unclosed state of shell or wire
525     """
526     UNKNOWN  = 0
527     CLOSED   = 1
528     UNCLOSED = 2
529
530 ## Private class used to bind calls of plugin operations to geomBuilder
531 class PluginOperation:
532   def __init__(self, operation, function):
533     self.operation = operation
534     self.function = function
535     pass
536
537   @ManageTransactions("operation")
538   def __call__(self, *args):
539     res = self.function(self.operation, *args)
540     RaiseIfFailed(self.function.__name__, self.operation)
541     return res
542
543 # Warning: geom is a singleton
544 geom = None
545 engine = None
546 doLcc = False
547 created = False
548
549 class geomBuilder(object, GEOM._objref_GEOM_Gen):
550
551         ## Enumeration ShapeType as a dictionary. \n
552         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
553         #  @ingroup l1_geomBuilder_auxiliary
554         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
555
556         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
557         #  and a list of parameters, describing the shape.
558         #  List of parameters, describing the shape:
559         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
560         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
561         #
562         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
563         #
564         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
565         #
566         #  - SPHERE:       [xc yc zc            R]
567         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
568         #  - BOX:          [xc yc zc                      ax ay az]
569         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
570         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
571         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
572         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
573         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
574         #
575         #  - SPHERE2D:     [xc yc zc            R]
576         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
577         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
578         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
579         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
580         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
581         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
582         #  - PLANE:        [xo yo zo  dx dy dz]
583         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
584         #  - FACE:                                       [nb_edges  nb_vertices]
585         #
586         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
587         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
588         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
589         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
590         #  - LINE:         [xo yo zo  dx dy dz]
591         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
592         #  - EDGE:                                                 [nb_vertices]
593         #
594         #  - VERTEX:       [x  y  z]
595         #  @ingroup l1_geomBuilder_auxiliary
596         kind = GEOM.GEOM_IKindOfShape
597
598         def __new__(cls):
599             global engine
600             global geom
601             global doLcc
602             global created
603             #print "==== __new__ ", engine, geom, doLcc, created
604             if geom is None:
605                 # geom engine is either retrieved from engine, or created
606                 geom = engine
607                 # Following test avoids a recursive loop
608                 if doLcc:
609                     if geom is not None:
610                         # geom engine not created: existing engine found
611                         doLcc = False
612                     if doLcc and not created:
613                         doLcc = False
614                         # FindOrLoadComponent called:
615                         # 1. CORBA resolution of server
616                         # 2. the __new__ method is called again
617                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
618                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
619                         #print "====1 ",geom
620                 else:
621                     # FindOrLoadComponent not called
622                     if geom is None:
623                         # geomBuilder instance is created from lcc.FindOrLoadComponent
624                         #print "==== super ", engine, geom, doLcc, created
625                         geom = super(geomBuilder,cls).__new__(cls)
626                         #print "====2 ",geom
627                     else:
628                         # geom engine not created: existing engine found
629                         #print "==== existing ", engine, geom, doLcc, created
630                         pass
631                 #print "return geom 1 ", geom
632                 return geom
633
634             #print "return geom 2 ", geom
635             return geom
636
637         def __init__(self):
638             global created
639             #print "-------- geomBuilder __init__ --- ", created, self
640             if not created:
641               created = True
642               GEOM._objref_GEOM_Gen.__init__(self)
643               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
644               self.myBuilder = None
645               self.myStudyId = 0
646               self.father    = None
647
648               self.BasicOp  = None
649               self.CurvesOp = None
650               self.PrimOp   = None
651               self.ShapesOp = None
652               self.HealOp   = None
653               self.InsertOp = None
654               self.BoolOp   = None
655               self.TrsfOp   = None
656               self.LocalOp  = None
657               self.MeasuOp  = None
658               self.BlocksOp = None
659               self.GroupOp  = None
660               self.AdvOp    = None
661               self.FieldOp  = None
662             pass
663
664         ## Process object publication in the study, as follows:
665         #  - if @a theName is specified (not None), the object is published in the study
666         #    with this name, not taking into account "auto-publishing" option;
667         #  - if @a theName is NOT specified, the object is published in the study
668         #    (using default name, which can be customized using @a theDefaultName parameter)
669         #    only if auto-publishing is switched on.
670         #
671         #  @param theObj  object, a subject for publishing
672         #  @param theName object name for study
673         #  @param theDefaultName default name for the auto-publishing
674         #
675         #  @sa addToStudyAuto()
676         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
677             # ---
678             def _item_name(_names, _defname, _idx=-1):
679                 if not _names: _names = _defname
680                 if type(_names) in [types.ListType, types.TupleType]:
681                     if _idx >= 0:
682                         if _idx >= len(_names) or not _names[_idx]:
683                             if type(_defname) not in [types.ListType, types.TupleType]:
684                                 _name = "%s_%d"%(_defname, _idx+1)
685                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
686                                 _name = _defname[_idx]
687                             else:
688                                 _name = "%noname_%d"%(dn, _idx+1)
689                             pass
690                         else:
691                             _name = _names[_idx]
692                         pass
693                     else:
694                         # must be wrong  usage
695                         _name = _names[0]
696                     pass
697                 else:
698                     if _idx >= 0:
699                         _name = "%s_%d"%(_names, _idx+1)
700                     else:
701                         _name = _names
702                     pass
703                 return _name
704             # ---
705             def _publish( _name, _obj ):
706                 fatherObj = None
707                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
708                     fatherObj = _obj.GetShape()
709                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
710                     fatherObj = _obj.GetField()
711                 elif not _obj.IsMainShape():
712                     fatherObj = _obj.GetMainShape()
713                     pass
714                 if fatherObj and fatherObj.GetStudyEntry():
715                     self.addToStudyInFather(fatherObj, _obj, _name)
716                 else:
717                     self.addToStudy(_obj, _name)
718                     pass
719                 return
720             # ---
721             if not theObj:
722                 return # null object
723             if not theName and not self.myMaxNbSubShapesAllowed:
724                 return # nothing to do: auto-publishing is disabled
725             if not theName and not theDefaultName:
726                 return # neither theName nor theDefaultName is given
727             import types
728             if type(theObj) in [types.ListType, types.TupleType]:
729                 # list of objects is being published
730                 idx = 0
731                 for obj in theObj:
732                     if not obj: continue # bad object
733                     name = _item_name(theName, theDefaultName, idx)
734                     _publish( name, obj )
735                     idx = idx+1
736                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
737                     pass
738                 pass
739             else:
740                 # single object is published
741                 name = _item_name(theName, theDefaultName)
742                 _publish( name, theObj )
743             pass
744
745         ## @addtogroup l1_geomBuilder_auxiliary
746         ## @{
747         def init_geom(self,theStudy):
748             self.myStudy = theStudy
749             self.myStudyId = self.myStudy._get_StudyId()
750             self.myBuilder = self.myStudy.NewBuilder()
751             self.father = self.myStudy.FindComponent("GEOM")
752             notebook.myStudy = theStudy
753             if self.father is None:
754                 self.father = self.myBuilder.NewComponent("GEOM")
755                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
756                 FName = A1._narrow(SALOMEDS.AttributeName)
757                 FName.SetValue("Geometry")
758                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
759                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
760                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
761                 self.myBuilder.DefineComponentInstance(self.father,self)
762                 pass
763             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
764             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
765             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
766             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
767             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
768             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
769             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
770             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
771             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
772             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
773             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
774             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
775             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
776
777             # The below line is a right way to map all plugin functions to geomBuilder,
778             # but AdvancedOperations are already mapped, that is why this line is commented
779             # and presents here only as an axample
780             #self.AdvOp    = self.GetPluginOperations (self.myStudyId, "AdvancedEngine")
781
782             # self.AdvOp is used by functions MakePipeTShape*, MakeDividedDisk, etc.
783             self.AdvOp = GEOM._objref_GEOM_Gen.GetPluginOperations (self, self.myStudyId, "AdvancedEngine")
784
785             # set GEOM as root in the use case tree
786             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
787             self.myUseCaseBuilder.SetRootCurrent()
788             self.myUseCaseBuilder.Append(self.father)
789             pass
790
791         def GetPluginOperations(self, studyID, libraryName):
792             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
793             if op:
794                 # bind methods of operations to self
795                 methods = op.__class__.__dict__['__methods__']
796                 avoid_methods = self.BasicOp.__class__.__dict__['__methods__']
797                 for meth_name in methods:
798                     if not meth_name in avoid_methods: # avoid basic methods
799                         function = getattr(op.__class__, meth_name)
800                         if callable(function):
801                             #self.__dict__[meth_name] = self.__PluginOperation(op, function)
802                             self.__dict__[meth_name] = PluginOperation(op, function)
803             return op
804
805         ## Enable / disable results auto-publishing
806         #
807         #  The automatic publishing is managed in the following way:
808         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
809         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
810         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
811         #  value passed as parameter has the same effect.
812         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
813         #  maximum number of sub-shapes allowed for publishing is set to specified value.
814         #
815         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
816         #  @ingroup l1_publish_data
817         def addToStudyAuto(self, maxNbSubShapes=-1):
818             """
819             Enable / disable results auto-publishing
820
821             The automatic publishing is managed in the following way:
822             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
823             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
824             maximum number of sub-shapes allowed for publishing is unlimited; any negative
825             value passed as parameter has the same effect.
826             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
827             maximum number of sub-shapes allowed for publishing is set to this value.
828
829             Parameters:
830                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
831
832             Example of usage:
833                 geompy.addToStudyAuto()   # enable auto-publishing
834                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
835                 geompy.addToStudyAuto(0)  # disable auto-publishing
836             """
837             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
838             pass
839
840         ## Dump component to the Python script
841         #  This method overrides IDL function to allow default values for the parameters.
842         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
843             """
844             Dump component to the Python script
845             This method overrides IDL function to allow default values for the parameters.
846             """
847             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
848
849         ## Get name for sub-shape aSubObj of shape aMainObj
850         #
851         # @ref swig_SubShapeName "Example"
852         @ManageTransactions("ShapesOp")
853         def SubShapeName(self,aSubObj, aMainObj):
854             """
855             Get name for sub-shape aSubObj of shape aMainObj
856             """
857             # Example: see GEOM_TestAll.py
858
859             #aSubId  = orb.object_to_string(aSubObj)
860             #aMainId = orb.object_to_string(aMainObj)
861             #index = gg.getIndexTopology(aSubId, aMainId)
862             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
863             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
864             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
865             return name
866
867         ## Publish in study aShape with name aName
868         #
869         #  \param aShape the shape to be published
870         #  \param aName  the name for the shape
871         #  \param doRestoreSubShapes if True, finds and publishes also
872         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
873         #         and published sub-shapes of arguments
874         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
875         #                                                  these arguments description
876         #  \return study entry of the published shape in form of string
877         #
878         #  @ingroup l1_publish_data
879         #  @ref swig_all_addtostudy "Example"
880         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
881                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
882             """
883             Publish in study aShape with name aName
884
885             Parameters:
886                 aShape the shape to be published
887                 aName  the name for the shape
888                 doRestoreSubShapes if True, finds and publishes also
889                                    sub-shapes of aShape, corresponding to its arguments
890                                    and published sub-shapes of arguments
891                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
892                                                          these arguments description
893
894             Returns:
895                 study entry of the published shape in form of string
896
897             Example of usage:
898                 id_block1 = geompy.addToStudy(Block1, "Block 1")
899             """
900             # Example: see GEOM_TestAll.py
901             try:
902                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
903                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
904                 if doRestoreSubShapes:
905                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
906                                             theFindMethod, theInheritFirstArg, True )
907             except:
908                 print "addToStudy() failed"
909                 return ""
910             return aShape.GetStudyEntry()
911
912         ## Publish in study aShape with name aName as sub-object of previously published aFather
913         #  \param aFather previously published object
914         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
915         #  \param aName  the name for the shape
916         #
917         #  \return study entry of the published shape in form of string
918         #
919         #  @ingroup l1_publish_data
920         #  @ref swig_all_addtostudyInFather "Example"
921         def addToStudyInFather(self, aFather, aShape, aName):
922             """
923             Publish in study aShape with name aName as sub-object of previously published aFather
924
925             Parameters:
926                 aFather previously published object
927                 aShape the shape to be published as sub-object of aFather
928                 aName  the name for the shape
929
930             Returns:
931                 study entry of the published shape in form of string
932             """
933             # Example: see GEOM_TestAll.py
934             try:
935                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
936                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
937             except:
938                 print "addToStudyInFather() failed"
939                 return ""
940             return aShape.GetStudyEntry()
941
942         ## Unpublish object in study
943         #
944         #  \param obj the object to be unpublished
945         def hideInStudy(self, obj):
946             """
947             Unpublish object in study
948
949             Parameters:
950                 obj the object to be unpublished
951             """
952             ior = salome.orb.object_to_string(obj)
953             aSObject = self.myStudy.FindObjectIOR(ior)
954             if aSObject is not None:
955                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
956                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
957                 drwAttribute.SetDrawable(False)
958                 # hide references if any
959                 vso = self.myStudy.FindDependances(aSObject);
960                 for refObj in vso :
961                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
962                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
963                     drwAttribute.SetDrawable(False)
964                     pass
965                 pass
966
967         # end of l1_geomBuilder_auxiliary
968         ## @}
969
970         ## @addtogroup l3_restore_ss
971         ## @{
972
973         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
974         #  To be used from python scripts out of addToStudy() (non-default usage)
975         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
976         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
977         #                   If this list is empty, all operation arguments will be published
978         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
979         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
980         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
981         #                            Do not publish sub-shapes in place of arguments, but only
982         #                            in place of sub-shapes of the first argument,
983         #                            because the whole shape corresponds to the first argument.
984         #                            Mainly to be used after transformations, but it also can be
985         #                            usefull after partition with one object shape, and some other
986         #                            operations, where only the first argument has to be considered.
987         #                            If theObject has only one argument shape, this flag is automatically
988         #                            considered as True, not regarding really passed value.
989         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
990         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
991         #  \return list of published sub-shapes
992         #
993         #  @ref tui_restore_prs_params "Example"
994         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
995                               theInheritFirstArg=False, theAddPrefix=True):
996             """
997             Publish sub-shapes, standing for arguments and sub-shapes of arguments
998             To be used from python scripts out of geompy.addToStudy (non-default usage)
999
1000             Parameters:
1001                 theObject published GEOM.GEOM_Object, arguments of which will be published
1002                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1003                           If this list is empty, all operation arguments will be published
1004                 theFindMethod method to search sub-shapes, corresponding to arguments and
1005                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
1006                 theInheritFirstArg set properties of the first argument for theObject.
1007                                    Do not publish sub-shapes in place of arguments, but only
1008                                    in place of sub-shapes of the first argument,
1009                                    because the whole shape corresponds to the first argument.
1010                                    Mainly to be used after transformations, but it also can be
1011                                    usefull after partition with one object shape, and some other
1012                                    operations, where only the first argument has to be considered.
1013                                    If theObject has only one argument shape, this flag is automatically
1014                                    considered as True, not regarding really passed value.
1015                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1016                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1017             Returns:
1018                 list of published sub-shapes
1019             """
1020             # Example: see GEOM_TestAll.py
1021             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
1022                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1023
1024         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1025         #  To be used from python scripts out of addToStudy() (non-default usage)
1026         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1027         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1028         #                   If this list is empty, all operation arguments will be published
1029         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1030         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1031         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1032         #                            Do not publish sub-shapes in place of arguments, but only
1033         #                            in place of sub-shapes of the first argument,
1034         #                            because the whole shape corresponds to the first argument.
1035         #                            Mainly to be used after transformations, but it also can be
1036         #                            usefull after partition with one object shape, and some other
1037         #                            operations, where only the first argument has to be considered.
1038         #                            If theObject has only one argument shape, this flag is automatically
1039         #                            considered as True, not regarding really passed value.
1040         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1041         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1042         #  \return list of published sub-shapes
1043         #
1044         #  @ref tui_restore_prs_params "Example"
1045         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1046                                    theInheritFirstArg=False, theAddPrefix=True):
1047             """
1048             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1049             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1050
1051             Parameters:
1052                 theObject published GEOM.GEOM_Object, arguments of which will be published
1053                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1054                           If this list is empty, all operation arguments will be published
1055                 theFindMethod method to search sub-shapes, corresponding to arguments and
1056                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1057                 theInheritFirstArg set properties of the first argument for theObject.
1058                                    Do not publish sub-shapes in place of arguments, but only
1059                                    in place of sub-shapes of the first argument,
1060                                    because the whole shape corresponds to the first argument.
1061                                    Mainly to be used after transformations, but it also can be
1062                                    usefull after partition with one object shape, and some other
1063                                    operations, where only the first argument has to be considered.
1064                                    If theObject has only one argument shape, this flag is automatically
1065                                    considered as True, not regarding really passed value.
1066                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1067                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1068
1069             Returns:
1070                 list of published sub-shapes
1071             """
1072             # Example: see GEOM_TestAll.py
1073             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1074                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1075
1076         # end of l3_restore_ss
1077         ## @}
1078
1079         ## @addtogroup l3_basic_go
1080         ## @{
1081
1082         ## Create point by three coordinates.
1083         #  @param theX The X coordinate of the point.
1084         #  @param theY The Y coordinate of the point.
1085         #  @param theZ The Z coordinate of the point.
1086         #  @param theName Object name; when specified, this parameter is used
1087         #         for result publication in the study. Otherwise, if automatic
1088         #         publication is switched on, default value is used for result name.
1089         #
1090         #  @return New GEOM.GEOM_Object, containing the created point.
1091         #
1092         #  @ref tui_creation_point "Example"
1093         @ManageTransactions("BasicOp")
1094         def MakeVertex(self, theX, theY, theZ, theName=None):
1095             """
1096             Create point by three coordinates.
1097
1098             Parameters:
1099                 theX The X coordinate of the point.
1100                 theY The Y coordinate of the point.
1101                 theZ The Z coordinate of the point.
1102                 theName Object name; when specified, this parameter is used
1103                         for result publication in the study. Otherwise, if automatic
1104                         publication is switched on, default value is used for result name.
1105
1106             Returns:
1107                 New GEOM.GEOM_Object, containing the created point.
1108             """
1109             # Example: see GEOM_TestAll.py
1110             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1111             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1112             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1113             anObj.SetParameters(Parameters)
1114             self._autoPublish(anObj, theName, "vertex")
1115             return anObj
1116
1117         ## Create a point, distant from the referenced point
1118         #  on the given distances along the coordinate axes.
1119         #  @param theReference The referenced point.
1120         #  @param theX Displacement from the referenced point along OX axis.
1121         #  @param theY Displacement from the referenced point along OY axis.
1122         #  @param theZ Displacement from the referenced point along OZ axis.
1123         #  @param theName Object name; when specified, this parameter is used
1124         #         for result publication in the study. Otherwise, if automatic
1125         #         publication is switched on, default value is used for result name.
1126         #
1127         #  @return New GEOM.GEOM_Object, containing the created point.
1128         #
1129         #  @ref tui_creation_point "Example"
1130         @ManageTransactions("BasicOp")
1131         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1132             """
1133             Create a point, distant from the referenced point
1134             on the given distances along the coordinate axes.
1135
1136             Parameters:
1137                 theReference The referenced point.
1138                 theX Displacement from the referenced point along OX axis.
1139                 theY Displacement from the referenced point along OY axis.
1140                 theZ Displacement from the referenced point along OZ axis.
1141                 theName Object name; when specified, this parameter is used
1142                         for result publication in the study. Otherwise, if automatic
1143                         publication is switched on, default value is used for result name.
1144
1145             Returns:
1146                 New GEOM.GEOM_Object, containing the created point.
1147             """
1148             # Example: see GEOM_TestAll.py
1149             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1150             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1151             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1152             anObj.SetParameters(Parameters)
1153             self._autoPublish(anObj, theName, "vertex")
1154             return anObj
1155
1156         ## Create a point, corresponding to the given parameter on the given curve.
1157         #  @param theRefCurve The referenced curve.
1158         #  @param theParameter Value of parameter on the referenced curve.
1159         #  @param theName Object name; when specified, this parameter is used
1160         #         for result publication in the study. Otherwise, if automatic
1161         #         publication is switched on, default value is used for result name.
1162         #
1163         #  @return New GEOM.GEOM_Object, containing the created point.
1164         #
1165         #  @ref tui_creation_point "Example"
1166         @ManageTransactions("BasicOp")
1167         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1168             """
1169             Create a point, corresponding to the given parameter on the given curve.
1170
1171             Parameters:
1172                 theRefCurve The referenced curve.
1173                 theParameter Value of parameter on the referenced curve.
1174                 theName Object name; when specified, this parameter is used
1175                         for result publication in the study. Otherwise, if automatic
1176                         publication is switched on, default value is used for result name.
1177
1178             Returns:
1179                 New GEOM.GEOM_Object, containing the created point.
1180
1181             Example of usage:
1182                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1183             """
1184             # Example: see GEOM_TestAll.py
1185             theParameter, Parameters = ParseParameters(theParameter)
1186             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1187             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1188             anObj.SetParameters(Parameters)
1189             self._autoPublish(anObj, theName, "vertex")
1190             return anObj
1191
1192         ## Create a point by projection give coordinates on the given curve
1193         #  @param theRefCurve The referenced curve.
1194         #  @param theX X-coordinate in 3D space
1195         #  @param theY Y-coordinate in 3D space
1196         #  @param theZ Z-coordinate in 3D space
1197         #  @param theName Object name; when specified, this parameter is used
1198         #         for result publication in the study. Otherwise, if automatic
1199         #         publication is switched on, default value is used for result name.
1200         #
1201         #  @return New GEOM.GEOM_Object, containing the created point.
1202         #
1203         #  @ref tui_creation_point "Example"
1204         @ManageTransactions("BasicOp")
1205         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1206             """
1207             Create a point by projection give coordinates on the given curve
1208
1209             Parameters:
1210                 theRefCurve The referenced curve.
1211                 theX X-coordinate in 3D space
1212                 theY Y-coordinate in 3D space
1213                 theZ Z-coordinate in 3D space
1214                 theName Object name; when specified, this parameter is used
1215                         for result publication in the study. Otherwise, if automatic
1216                         publication is switched on, default value is used for result name.
1217
1218             Returns:
1219                 New GEOM.GEOM_Object, containing the created point.
1220
1221             Example of usage:
1222                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1223             """
1224             # Example: see GEOM_TestAll.py
1225             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1226             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1227             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1228             anObj.SetParameters(Parameters)
1229             self._autoPublish(anObj, theName, "vertex")
1230             return anObj
1231
1232         ## Create a point, corresponding to the given length on the given curve.
1233         #  @param theRefCurve The referenced curve.
1234         #  @param theLength Length on the referenced curve. It can be negative.
1235         #  @param theStartPoint Point allowing to choose the direction for the calculation
1236         #                       of the length. If None, start from the first point of theRefCurve.
1237         #  @param theName Object name; when specified, this parameter is used
1238         #         for result publication in the study. Otherwise, if automatic
1239         #         publication is switched on, default value is used for result name.
1240         #
1241         #  @return New GEOM.GEOM_Object, containing the created point.
1242         #
1243         #  @ref tui_creation_point "Example"
1244         @ManageTransactions("BasicOp")
1245         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1246             """
1247             Create a point, corresponding to the given length on the given curve.
1248
1249             Parameters:
1250                 theRefCurve The referenced curve.
1251                 theLength Length on the referenced curve. It can be negative.
1252                 theStartPoint Point allowing to choose the direction for the calculation
1253                               of the length. If None, start from the first point of theRefCurve.
1254                 theName Object name; when specified, this parameter is used
1255                         for result publication in the study. Otherwise, if automatic
1256                         publication is switched on, default value is used for result name.
1257
1258             Returns:
1259                 New GEOM.GEOM_Object, containing the created point.
1260             """
1261             # Example: see GEOM_TestAll.py
1262             theLength, Parameters = ParseParameters(theLength)
1263             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1264             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1265             anObj.SetParameters(Parameters)
1266             self._autoPublish(anObj, theName, "vertex")
1267             return anObj
1268
1269         ## Create a point, corresponding to the given parameters on the
1270         #    given surface.
1271         #  @param theRefSurf The referenced surface.
1272         #  @param theUParameter Value of U-parameter on the referenced surface.
1273         #  @param theVParameter Value of V-parameter on the referenced surface.
1274         #  @param theName Object name; when specified, this parameter is used
1275         #         for result publication in the study. Otherwise, if automatic
1276         #         publication is switched on, default value is used for result name.
1277         #
1278         #  @return New GEOM.GEOM_Object, containing the created point.
1279         #
1280         #  @ref swig_MakeVertexOnSurface "Example"
1281         @ManageTransactions("BasicOp")
1282         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1283             """
1284             Create a point, corresponding to the given parameters on the
1285             given surface.
1286
1287             Parameters:
1288                 theRefSurf The referenced surface.
1289                 theUParameter Value of U-parameter on the referenced surface.
1290                 theVParameter Value of V-parameter on the referenced surface.
1291                 theName Object name; when specified, this parameter is used
1292                         for result publication in the study. Otherwise, if automatic
1293                         publication is switched on, default value is used for result name.
1294
1295             Returns:
1296                 New GEOM.GEOM_Object, containing the created point.
1297
1298             Example of usage:
1299                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1300             """
1301             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1302             # Example: see GEOM_TestAll.py
1303             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1304             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1305             anObj.SetParameters(Parameters);
1306             self._autoPublish(anObj, theName, "vertex")
1307             return anObj
1308
1309         ## Create a point by projection give coordinates on the given surface
1310         #  @param theRefSurf The referenced surface.
1311         #  @param theX X-coordinate in 3D space
1312         #  @param theY Y-coordinate in 3D space
1313         #  @param theZ Z-coordinate in 3D space
1314         #  @param theName Object name; when specified, this parameter is used
1315         #         for result publication in the study. Otherwise, if automatic
1316         #         publication is switched on, default value is used for result name.
1317         #
1318         #  @return New GEOM.GEOM_Object, containing the created point.
1319         #
1320         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1321         @ManageTransactions("BasicOp")
1322         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1323             """
1324             Create a point by projection give coordinates on the given surface
1325
1326             Parameters:
1327                 theRefSurf The referenced surface.
1328                 theX X-coordinate in 3D space
1329                 theY Y-coordinate in 3D space
1330                 theZ Z-coordinate in 3D space
1331                 theName Object name; when specified, this parameter is used
1332                         for result publication in the study. Otherwise, if automatic
1333                         publication is switched on, default value is used for result name.
1334
1335             Returns:
1336                 New GEOM.GEOM_Object, containing the created point.
1337
1338             Example of usage:
1339                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1340             """
1341             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1342             # Example: see GEOM_TestAll.py
1343             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1344             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1345             anObj.SetParameters(Parameters);
1346             self._autoPublish(anObj, theName, "vertex")
1347             return anObj
1348
1349         ## Create a point, which lays on the given face.
1350         #  The point will lay in arbitrary place of the face.
1351         #  The only condition on it is a non-zero distance to the face boundary.
1352         #  Such point can be used to uniquely identify the face inside any
1353         #  shape in case, when the shape does not contain overlapped faces.
1354         #  @param theFace The referenced face.
1355         #  @param theName Object name; when specified, this parameter is used
1356         #         for result publication in the study. Otherwise, if automatic
1357         #         publication is switched on, default value is used for result name.
1358         #
1359         #  @return New GEOM.GEOM_Object, containing the created point.
1360         #
1361         #  @ref swig_MakeVertexInsideFace "Example"
1362         @ManageTransactions("BasicOp")
1363         def MakeVertexInsideFace (self, theFace, theName=None):
1364             """
1365             Create a point, which lays on the given face.
1366             The point will lay in arbitrary place of the face.
1367             The only condition on it is a non-zero distance to the face boundary.
1368             Such point can be used to uniquely identify the face inside any
1369             shape in case, when the shape does not contain overlapped faces.
1370
1371             Parameters:
1372                 theFace The referenced face.
1373                 theName Object name; when specified, this parameter is used
1374                         for result publication in the study. Otherwise, if automatic
1375                         publication is switched on, default value is used for result name.
1376
1377             Returns:
1378                 New GEOM.GEOM_Object, containing the created point.
1379
1380             Example of usage:
1381                 p_on_face = geompy.MakeVertexInsideFace(Face)
1382             """
1383             # Example: see GEOM_TestAll.py
1384             anObj = self.BasicOp.MakePointOnFace(theFace)
1385             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1386             self._autoPublish(anObj, theName, "vertex")
1387             return anObj
1388
1389         ## Create a point on intersection of two lines.
1390         #  @param theRefLine1, theRefLine2 The referenced lines.
1391         #  @param theName Object name; when specified, this parameter is used
1392         #         for result publication in the study. Otherwise, if automatic
1393         #         publication is switched on, default value is used for result name.
1394         #
1395         #  @return New GEOM.GEOM_Object, containing the created point.
1396         #
1397         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1398         @ManageTransactions("BasicOp")
1399         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1400             """
1401             Create a point on intersection of two lines.
1402
1403             Parameters:
1404                 theRefLine1, theRefLine2 The referenced lines.
1405                 theName Object name; when specified, this parameter is used
1406                         for result publication in the study. Otherwise, if automatic
1407                         publication is switched on, default value is used for result name.
1408
1409             Returns:
1410                 New GEOM.GEOM_Object, containing the created point.
1411             """
1412             # Example: see GEOM_TestAll.py
1413             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1414             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1415             self._autoPublish(anObj, theName, "vertex")
1416             return anObj
1417
1418         ## Create a tangent, corresponding to the given parameter on the given curve.
1419         #  @param theRefCurve The referenced curve.
1420         #  @param theParameter Value of parameter on the referenced curve.
1421         #  @param theName Object name; when specified, this parameter is used
1422         #         for result publication in the study. Otherwise, if automatic
1423         #         publication is switched on, default value is used for result name.
1424         #
1425         #  @return New GEOM.GEOM_Object, containing the created tangent.
1426         #
1427         #  @ref swig_MakeTangentOnCurve "Example"
1428         @ManageTransactions("BasicOp")
1429         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1430             """
1431             Create a tangent, corresponding to the given parameter on the given curve.
1432
1433             Parameters:
1434                 theRefCurve The referenced curve.
1435                 theParameter Value of parameter on the referenced curve.
1436                 theName Object name; when specified, this parameter is used
1437                         for result publication in the study. Otherwise, if automatic
1438                         publication is switched on, default value is used for result name.
1439
1440             Returns:
1441                 New GEOM.GEOM_Object, containing the created tangent.
1442
1443             Example of usage:
1444                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1445             """
1446             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1447             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1448             self._autoPublish(anObj, theName, "tangent")
1449             return anObj
1450
1451         ## Create a tangent plane, corresponding to the given parameter on the given face.
1452         #  @param theFace The face for which tangent plane should be built.
1453         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1454         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1455         #  @param theTrimSize the size of plane.
1456         #  @param theName Object name; when specified, this parameter is used
1457         #         for result publication in the study. Otherwise, if automatic
1458         #         publication is switched on, default value is used for result name.
1459         #
1460         #  @return New GEOM.GEOM_Object, containing the created tangent.
1461         #
1462         #  @ref swig_MakeTangentPlaneOnFace "Example"
1463         @ManageTransactions("BasicOp")
1464         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1465             """
1466             Create a tangent plane, corresponding to the given parameter on the given face.
1467
1468             Parameters:
1469                 theFace The face for which tangent plane should be built.
1470                 theParameterV vertical value of the center point (0.0 - 1.0).
1471                 theParameterU horisontal value of the center point (0.0 - 1.0).
1472                 theTrimSize the size of plane.
1473                 theName Object name; when specified, this parameter is used
1474                         for result publication in the study. Otherwise, if automatic
1475                         publication is switched on, default value is used for result name.
1476
1477            Returns:
1478                 New GEOM.GEOM_Object, containing the created tangent.
1479
1480            Example of usage:
1481                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1482             """
1483             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1484             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1485             self._autoPublish(anObj, theName, "tangent")
1486             return anObj
1487
1488         ## Create a vector with the given components.
1489         #  @param theDX X component of the vector.
1490         #  @param theDY Y component of the vector.
1491         #  @param theDZ Z component of the vector.
1492         #  @param theName Object name; when specified, this parameter is used
1493         #         for result publication in the study. Otherwise, if automatic
1494         #         publication is switched on, default value is used for result name.
1495         #
1496         #  @return New GEOM.GEOM_Object, containing the created vector.
1497         #
1498         #  @ref tui_creation_vector "Example"
1499         @ManageTransactions("BasicOp")
1500         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1501             """
1502             Create a vector with the given components.
1503
1504             Parameters:
1505                 theDX X component of the vector.
1506                 theDY Y component of the vector.
1507                 theDZ Z component of the vector.
1508                 theName Object name; when specified, this parameter is used
1509                         for result publication in the study. Otherwise, if automatic
1510                         publication is switched on, default value is used for result name.
1511
1512             Returns:
1513                 New GEOM.GEOM_Object, containing the created vector.
1514             """
1515             # Example: see GEOM_TestAll.py
1516             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1517             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1518             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1519             anObj.SetParameters(Parameters)
1520             self._autoPublish(anObj, theName, "vector")
1521             return anObj
1522
1523         ## Create a vector between two points.
1524         #  @param thePnt1 Start point for the vector.
1525         #  @param thePnt2 End point for the vector.
1526         #  @param theName Object name; when specified, this parameter is used
1527         #         for result publication in the study. Otherwise, if automatic
1528         #         publication is switched on, default value is used for result name.
1529         #
1530         #  @return New GEOM.GEOM_Object, containing the created vector.
1531         #
1532         #  @ref tui_creation_vector "Example"
1533         @ManageTransactions("BasicOp")
1534         def MakeVector(self, thePnt1, thePnt2, theName=None):
1535             """
1536             Create a vector between two points.
1537
1538             Parameters:
1539                 thePnt1 Start point for the vector.
1540                 thePnt2 End point for the vector.
1541                 theName Object name; when specified, this parameter is used
1542                         for result publication in the study. Otherwise, if automatic
1543                         publication is switched on, default value is used for result name.
1544
1545             Returns:
1546                 New GEOM.GEOM_Object, containing the created vector.
1547             """
1548             # Example: see GEOM_TestAll.py
1549             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1550             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1551             self._autoPublish(anObj, theName, "vector")
1552             return anObj
1553
1554         ## Create a line, passing through the given point
1555         #  and parrallel to the given direction
1556         #  @param thePnt Point. The resulting line will pass through it.
1557         #  @param theDir Direction. The resulting line will be parallel to it.
1558         #  @param theName Object name; when specified, this parameter is used
1559         #         for result publication in the study. Otherwise, if automatic
1560         #         publication is switched on, default value is used for result name.
1561         #
1562         #  @return New GEOM.GEOM_Object, containing the created line.
1563         #
1564         #  @ref tui_creation_line "Example"
1565         @ManageTransactions("BasicOp")
1566         def MakeLine(self, thePnt, theDir, theName=None):
1567             """
1568             Create a line, passing through the given point
1569             and parrallel to the given direction
1570
1571             Parameters:
1572                 thePnt Point. The resulting line will pass through it.
1573                 theDir Direction. The resulting line will be parallel to it.
1574                 theName Object name; when specified, this parameter is used
1575                         for result publication in the study. Otherwise, if automatic
1576                         publication is switched on, default value is used for result name.
1577
1578             Returns:
1579                 New GEOM.GEOM_Object, containing the created line.
1580             """
1581             # Example: see GEOM_TestAll.py
1582             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1583             RaiseIfFailed("MakeLine", self.BasicOp)
1584             self._autoPublish(anObj, theName, "line")
1585             return anObj
1586
1587         ## Create a line, passing through the given points
1588         #  @param thePnt1 First of two points, defining the line.
1589         #  @param thePnt2 Second of two points, defining the line.
1590         #  @param theName Object name; when specified, this parameter is used
1591         #         for result publication in the study. Otherwise, if automatic
1592         #         publication is switched on, default value is used for result name.
1593         #
1594         #  @return New GEOM.GEOM_Object, containing the created line.
1595         #
1596         #  @ref tui_creation_line "Example"
1597         @ManageTransactions("BasicOp")
1598         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1599             """
1600             Create a line, passing through the given points
1601
1602             Parameters:
1603                 thePnt1 First of two points, defining the line.
1604                 thePnt2 Second of two points, defining the line.
1605                 theName Object name; when specified, this parameter is used
1606                         for result publication in the study. Otherwise, if automatic
1607                         publication is switched on, default value is used for result name.
1608
1609             Returns:
1610                 New GEOM.GEOM_Object, containing the created line.
1611             """
1612             # Example: see GEOM_TestAll.py
1613             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1614             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1615             self._autoPublish(anObj, theName, "line")
1616             return anObj
1617
1618         ## Create a line on two faces intersection.
1619         #  @param theFace1 First of two faces, defining the line.
1620         #  @param theFace2 Second of two faces, defining the line.
1621         #  @param theName Object name; when specified, this parameter is used
1622         #         for result publication in the study. Otherwise, if automatic
1623         #         publication is switched on, default value is used for result name.
1624         #
1625         #  @return New GEOM.GEOM_Object, containing the created line.
1626         #
1627         #  @ref swig_MakeLineTwoFaces "Example"
1628         @ManageTransactions("BasicOp")
1629         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1630             """
1631             Create a line on two faces intersection.
1632
1633             Parameters:
1634                 theFace1 First of two faces, defining the line.
1635                 theFace2 Second of two faces, defining the line.
1636                 theName Object name; when specified, this parameter is used
1637                         for result publication in the study. Otherwise, if automatic
1638                         publication is switched on, default value is used for result name.
1639
1640             Returns:
1641                 New GEOM.GEOM_Object, containing the created line.
1642             """
1643             # Example: see GEOM_TestAll.py
1644             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1645             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1646             self._autoPublish(anObj, theName, "line")
1647             return anObj
1648
1649         ## Create a plane, passing through the given point
1650         #  and normal to the given vector.
1651         #  @param thePnt Point, the plane has to pass through.
1652         #  @param theVec Vector, defining the plane normal direction.
1653         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1654         #  @param theName Object name; when specified, this parameter is used
1655         #         for result publication in the study. Otherwise, if automatic
1656         #         publication is switched on, default value is used for result name.
1657         #
1658         #  @return New GEOM.GEOM_Object, containing the created plane.
1659         #
1660         #  @ref tui_creation_plane "Example"
1661         @ManageTransactions("BasicOp")
1662         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1663             """
1664             Create a plane, passing through the given point
1665             and normal to the given vector.
1666
1667             Parameters:
1668                 thePnt Point, the plane has to pass through.
1669                 theVec Vector, defining the plane normal direction.
1670                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1671                 theName Object name; when specified, this parameter is used
1672                         for result publication in the study. Otherwise, if automatic
1673                         publication is switched on, default value is used for result name.
1674
1675             Returns:
1676                 New GEOM.GEOM_Object, containing the created plane.
1677             """
1678             # Example: see GEOM_TestAll.py
1679             theTrimSize, Parameters = ParseParameters(theTrimSize);
1680             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1681             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1682             anObj.SetParameters(Parameters)
1683             self._autoPublish(anObj, theName, "plane")
1684             return anObj
1685
1686         ## Create a plane, passing through the three given points
1687         #  @param thePnt1 First of three points, defining the plane.
1688         #  @param thePnt2 Second of three points, defining the plane.
1689         #  @param thePnt3 Fird of three points, defining the plane.
1690         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1691         #  @param theName Object name; when specified, this parameter is used
1692         #         for result publication in the study. Otherwise, if automatic
1693         #         publication is switched on, default value is used for result name.
1694         #
1695         #  @return New GEOM.GEOM_Object, containing the created plane.
1696         #
1697         #  @ref tui_creation_plane "Example"
1698         @ManageTransactions("BasicOp")
1699         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1700             """
1701             Create a plane, passing through the three given points
1702
1703             Parameters:
1704                 thePnt1 First of three points, defining the plane.
1705                 thePnt2 Second of three points, defining the plane.
1706                 thePnt3 Fird of three points, defining the plane.
1707                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1708                 theName Object name; when specified, this parameter is used
1709                         for result publication in the study. Otherwise, if automatic
1710                         publication is switched on, default value is used for result name.
1711
1712             Returns:
1713                 New GEOM.GEOM_Object, containing the created plane.
1714             """
1715             # Example: see GEOM_TestAll.py
1716             theTrimSize, Parameters = ParseParameters(theTrimSize);
1717             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1718             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1719             anObj.SetParameters(Parameters)
1720             self._autoPublish(anObj, theName, "plane")
1721             return anObj
1722
1723         ## Create a plane, similar to the existing one, but with another size of representing face.
1724         #  @param theFace Referenced plane or LCS(Marker).
1725         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1726         #  @param theName Object name; when specified, this parameter is used
1727         #         for result publication in the study. Otherwise, if automatic
1728         #         publication is switched on, default value is used for result name.
1729         #
1730         #  @return New GEOM.GEOM_Object, containing the created plane.
1731         #
1732         #  @ref tui_creation_plane "Example"
1733         @ManageTransactions("BasicOp")
1734         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1735             """
1736             Create a plane, similar to the existing one, but with another size of representing face.
1737
1738             Parameters:
1739                 theFace Referenced plane or LCS(Marker).
1740                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1741                 theName Object name; when specified, this parameter is used
1742                         for result publication in the study. Otherwise, if automatic
1743                         publication is switched on, default value is used for result name.
1744
1745             Returns:
1746                 New GEOM.GEOM_Object, containing the created plane.
1747             """
1748             # Example: see GEOM_TestAll.py
1749             theTrimSize, Parameters = ParseParameters(theTrimSize);
1750             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1751             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1752             anObj.SetParameters(Parameters)
1753             self._autoPublish(anObj, theName, "plane")
1754             return anObj
1755
1756         ## Create a plane, passing through the 2 vectors
1757         #  with center in a start point of the first vector.
1758         #  @param theVec1 Vector, defining center point and plane direction.
1759         #  @param theVec2 Vector, defining the plane normal direction.
1760         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1761         #  @param theName Object name; when specified, this parameter is used
1762         #         for result publication in the study. Otherwise, if automatic
1763         #         publication is switched on, default value is used for result name.
1764         #
1765         #  @return New GEOM.GEOM_Object, containing the created plane.
1766         #
1767         #  @ref tui_creation_plane "Example"
1768         @ManageTransactions("BasicOp")
1769         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1770             """
1771             Create a plane, passing through the 2 vectors
1772             with center in a start point of the first vector.
1773
1774             Parameters:
1775                 theVec1 Vector, defining center point and plane direction.
1776                 theVec2 Vector, defining the plane normal direction.
1777                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1778                 theName Object name; when specified, this parameter is used
1779                         for result publication in the study. Otherwise, if automatic
1780                         publication is switched on, default value is used for result name.
1781
1782             Returns:
1783                 New GEOM.GEOM_Object, containing the created plane.
1784             """
1785             # Example: see GEOM_TestAll.py
1786             theTrimSize, Parameters = ParseParameters(theTrimSize);
1787             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1788             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1789             anObj.SetParameters(Parameters)
1790             self._autoPublish(anObj, theName, "plane")
1791             return anObj
1792
1793         ## Create a plane, based on a Local coordinate system.
1794         #  @param theLCS  coordinate system, defining plane.
1795         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1796         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1797         #  @param theName Object name; when specified, this parameter is used
1798         #         for result publication in the study. Otherwise, if automatic
1799         #         publication is switched on, default value is used for result name.
1800         #
1801         #  @return New GEOM.GEOM_Object, containing the created plane.
1802         #
1803         #  @ref tui_creation_plane "Example"
1804         @ManageTransactions("BasicOp")
1805         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1806             """
1807             Create a plane, based on a Local coordinate system.
1808
1809            Parameters:
1810                 theLCS  coordinate system, defining plane.
1811                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1812                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1813                 theName Object name; when specified, this parameter is used
1814                         for result publication in the study. Otherwise, if automatic
1815                         publication is switched on, default value is used for result name.
1816
1817             Returns:
1818                 New GEOM.GEOM_Object, containing the created plane.
1819             """
1820             # Example: see GEOM_TestAll.py
1821             theTrimSize, Parameters = ParseParameters(theTrimSize);
1822             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1823             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1824             anObj.SetParameters(Parameters)
1825             self._autoPublish(anObj, theName, "plane")
1826             return anObj
1827
1828         ## Create a local coordinate system.
1829         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1830         #  @param XDX,XDY,XDZ Three components of OX direction
1831         #  @param YDX,YDY,YDZ Three components of OY direction
1832         #  @param theName Object name; when specified, this parameter is used
1833         #         for result publication in the study. Otherwise, if automatic
1834         #         publication is switched on, default value is used for result name.
1835         #
1836         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1837         #
1838         #  @ref swig_MakeMarker "Example"
1839         @ManageTransactions("BasicOp")
1840         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1841             """
1842             Create a local coordinate system.
1843
1844             Parameters:
1845                 OX,OY,OZ Three coordinates of coordinate system origin.
1846                 XDX,XDY,XDZ Three components of OX direction
1847                 YDX,YDY,YDZ Three components of OY direction
1848                 theName Object name; when specified, this parameter is used
1849                         for result publication in the study. Otherwise, if automatic
1850                         publication is switched on, default value is used for result name.
1851
1852             Returns:
1853                 New GEOM.GEOM_Object, containing the created coordinate system.
1854             """
1855             # Example: see GEOM_TestAll.py
1856             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1857             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1858             RaiseIfFailed("MakeMarker", self.BasicOp)
1859             anObj.SetParameters(Parameters)
1860             self._autoPublish(anObj, theName, "lcs")
1861             return anObj
1862
1863         ## Create a local coordinate system from shape.
1864         #  @param theShape The initial shape to detect the coordinate system.
1865         #  @param theName Object name; when specified, this parameter is used
1866         #         for result publication in the study. Otherwise, if automatic
1867         #         publication is switched on, default value is used for result name.
1868         #
1869         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1870         #
1871         #  @ref tui_creation_lcs "Example"
1872         @ManageTransactions("BasicOp")
1873         def MakeMarkerFromShape(self, theShape, theName=None):
1874             """
1875             Create a local coordinate system from shape.
1876
1877             Parameters:
1878                 theShape The initial shape to detect the coordinate system.
1879                 theName Object name; when specified, this parameter is used
1880                         for result publication in the study. Otherwise, if automatic
1881                         publication is switched on, default value is used for result name.
1882
1883             Returns:
1884                 New GEOM.GEOM_Object, containing the created coordinate system.
1885             """
1886             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1887             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1888             self._autoPublish(anObj, theName, "lcs")
1889             return anObj
1890
1891         ## Create a local coordinate system from point and two vectors.
1892         #  @param theOrigin Point of coordinate system origin.
1893         #  @param theXVec Vector of X direction
1894         #  @param theYVec Vector of Y direction
1895         #  @param theName Object name; when specified, this parameter is used
1896         #         for result publication in the study. Otherwise, if automatic
1897         #         publication is switched on, default value is used for result name.
1898         #
1899         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1900         #
1901         #  @ref tui_creation_lcs "Example"
1902         @ManageTransactions("BasicOp")
1903         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1904             """
1905             Create a local coordinate system from point and two vectors.
1906
1907             Parameters:
1908                 theOrigin Point of coordinate system origin.
1909                 theXVec Vector of X direction
1910                 theYVec Vector of Y direction
1911                 theName Object name; when specified, this parameter is used
1912                         for result publication in the study. Otherwise, if automatic
1913                         publication is switched on, default value is used for result name.
1914
1915             Returns:
1916                 New GEOM.GEOM_Object, containing the created coordinate system.
1917
1918             """
1919             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1920             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1921             self._autoPublish(anObj, theName, "lcs")
1922             return anObj
1923
1924         # end of l3_basic_go
1925         ## @}
1926
1927         ## @addtogroup l4_curves
1928         ## @{
1929
1930         ##  Create an arc of circle, passing through three given points.
1931         #  @param thePnt1 Start point of the arc.
1932         #  @param thePnt2 Middle point of the arc.
1933         #  @param thePnt3 End point of the arc.
1934         #  @param theName Object name; when specified, this parameter is used
1935         #         for result publication in the study. Otherwise, if automatic
1936         #         publication is switched on, default value is used for result name.
1937         #
1938         #  @return New GEOM.GEOM_Object, containing the created arc.
1939         #
1940         #  @ref swig_MakeArc "Example"
1941         @ManageTransactions("CurvesOp")
1942         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1943             """
1944             Create an arc of circle, passing through three given points.
1945
1946             Parameters:
1947                 thePnt1 Start point of the arc.
1948                 thePnt2 Middle point of the arc.
1949                 thePnt3 End point of the arc.
1950                 theName Object name; when specified, this parameter is used
1951                         for result publication in the study. Otherwise, if automatic
1952                         publication is switched on, default value is used for result name.
1953
1954             Returns:
1955                 New GEOM.GEOM_Object, containing the created arc.
1956             """
1957             # Example: see GEOM_TestAll.py
1958             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1959             RaiseIfFailed("MakeArc", self.CurvesOp)
1960             self._autoPublish(anObj, theName, "arc")
1961             return anObj
1962
1963         ##  Create an arc of circle from a center and 2 points.
1964         #  @param thePnt1 Center of the arc
1965         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1966         #  @param thePnt3 End point of the arc (Gives also a direction)
1967         #  @param theSense Orientation of the arc
1968         #  @param theName Object name; when specified, this parameter is used
1969         #         for result publication in the study. Otherwise, if automatic
1970         #         publication is switched on, default value is used for result name.
1971         #
1972         #  @return New GEOM.GEOM_Object, containing the created arc.
1973         #
1974         #  @ref swig_MakeArc "Example"
1975         @ManageTransactions("CurvesOp")
1976         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1977             """
1978             Create an arc of circle from a center and 2 points.
1979
1980             Parameters:
1981                 thePnt1 Center of the arc
1982                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1983                 thePnt3 End point of the arc (Gives also a direction)
1984                 theSense Orientation of the arc
1985                 theName Object name; when specified, this parameter is used
1986                         for result publication in the study. Otherwise, if automatic
1987                         publication is switched on, default value is used for result name.
1988
1989             Returns:
1990                 New GEOM.GEOM_Object, containing the created arc.
1991             """
1992             # Example: see GEOM_TestAll.py
1993             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1994             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1995             self._autoPublish(anObj, theName, "arc")
1996             return anObj
1997
1998         ##  Create an arc of ellipse, of center and two points.
1999         #  @param theCenter Center of the arc.
2000         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2001         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2002         #  @param theName Object name; when specified, this parameter is used
2003         #         for result publication in the study. Otherwise, if automatic
2004         #         publication is switched on, default value is used for result name.
2005         #
2006         #  @return New GEOM.GEOM_Object, containing the created arc.
2007         #
2008         #  @ref swig_MakeArc "Example"
2009         @ManageTransactions("CurvesOp")
2010         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2011             """
2012             Create an arc of ellipse, of center and two points.
2013
2014             Parameters:
2015                 theCenter Center of the arc.
2016                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2017                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2018                 theName Object name; when specified, this parameter is used
2019                         for result publication in the study. Otherwise, if automatic
2020                         publication is switched on, default value is used for result name.
2021
2022             Returns:
2023                 New GEOM.GEOM_Object, containing the created arc.
2024             """
2025             # Example: see GEOM_TestAll.py
2026             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2027             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2028             self._autoPublish(anObj, theName, "arc")
2029             return anObj
2030
2031         ## Create a circle with given center, normal vector and radius.
2032         #  @param thePnt Circle center.
2033         #  @param theVec Vector, normal to the plane of the circle.
2034         #  @param theR Circle radius.
2035         #  @param theName Object name; when specified, this parameter is used
2036         #         for result publication in the study. Otherwise, if automatic
2037         #         publication is switched on, default value is used for result name.
2038         #
2039         #  @return New GEOM.GEOM_Object, containing the created circle.
2040         #
2041         #  @ref tui_creation_circle "Example"
2042         @ManageTransactions("CurvesOp")
2043         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2044             """
2045             Create a circle with given center, normal vector and radius.
2046
2047             Parameters:
2048                 thePnt Circle center.
2049                 theVec Vector, normal to the plane of the circle.
2050                 theR Circle radius.
2051                 theName Object name; when specified, this parameter is used
2052                         for result publication in the study. Otherwise, if automatic
2053                         publication is switched on, default value is used for result name.
2054
2055             Returns:
2056                 New GEOM.GEOM_Object, containing the created circle.
2057             """
2058             # Example: see GEOM_TestAll.py
2059             theR, Parameters = ParseParameters(theR)
2060             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2061             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2062             anObj.SetParameters(Parameters)
2063             self._autoPublish(anObj, theName, "circle")
2064             return anObj
2065
2066         ## Create a circle with given radius.
2067         #  Center of the circle will be in the origin of global
2068         #  coordinate system and normal vector will be codirected with Z axis
2069         #  @param theR Circle radius.
2070         #  @param theName Object name; when specified, this parameter is used
2071         #         for result publication in the study. Otherwise, if automatic
2072         #         publication is switched on, default value is used for result name.
2073         #
2074         #  @return New GEOM.GEOM_Object, containing the created circle.
2075         @ManageTransactions("CurvesOp")
2076         def MakeCircleR(self, theR, theName=None):
2077             """
2078             Create a circle with given radius.
2079             Center of the circle will be in the origin of global
2080             coordinate system and normal vector will be codirected with Z axis
2081
2082             Parameters:
2083                 theR Circle radius.
2084                 theName Object name; when specified, this parameter is used
2085                         for result publication in the study. Otherwise, if automatic
2086                         publication is switched on, default value is used for result name.
2087
2088             Returns:
2089                 New GEOM.GEOM_Object, containing the created circle.
2090             """
2091             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2092             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2093             self._autoPublish(anObj, theName, "circle")
2094             return anObj
2095
2096         ## Create a circle, passing through three given points
2097         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2098         #  @param theName Object name; when specified, this parameter is used
2099         #         for result publication in the study. Otherwise, if automatic
2100         #         publication is switched on, default value is used for result name.
2101         #
2102         #  @return New GEOM.GEOM_Object, containing the created circle.
2103         #
2104         #  @ref tui_creation_circle "Example"
2105         @ManageTransactions("CurvesOp")
2106         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2107             """
2108             Create a circle, passing through three given points
2109
2110             Parameters:
2111                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2112                 theName Object name; when specified, this parameter is used
2113                         for result publication in the study. Otherwise, if automatic
2114                         publication is switched on, default value is used for result name.
2115
2116             Returns:
2117                 New GEOM.GEOM_Object, containing the created circle.
2118             """
2119             # Example: see GEOM_TestAll.py
2120             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2121             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2122             self._autoPublish(anObj, theName, "circle")
2123             return anObj
2124
2125         ## Create a circle, with given point1 as center,
2126         #  passing through the point2 as radius and laying in the plane,
2127         #  defined by all three given points.
2128         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2129         #  @param theName Object name; when specified, this parameter is used
2130         #         for result publication in the study. Otherwise, if automatic
2131         #         publication is switched on, default value is used for result name.
2132         #
2133         #  @return New GEOM.GEOM_Object, containing the created circle.
2134         #
2135         #  @ref swig_MakeCircle "Example"
2136         @ManageTransactions("CurvesOp")
2137         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2138             """
2139             Create a circle, with given point1 as center,
2140             passing through the point2 as radius and laying in the plane,
2141             defined by all three given points.
2142
2143             Parameters:
2144                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2145                 theName Object name; when specified, this parameter is used
2146                         for result publication in the study. Otherwise, if automatic
2147                         publication is switched on, default value is used for result name.
2148
2149             Returns:
2150                 New GEOM.GEOM_Object, containing the created circle.
2151             """
2152             # Example: see GEOM_example6.py
2153             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2154             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2155             self._autoPublish(anObj, theName, "circle")
2156             return anObj
2157
2158         ## Create an ellipse with given center, normal vector and radiuses.
2159         #  @param thePnt Ellipse center.
2160         #  @param theVec Vector, normal to the plane of the ellipse.
2161         #  @param theRMajor Major ellipse radius.
2162         #  @param theRMinor Minor ellipse radius.
2163         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2164         #  @param theName Object name; when specified, this parameter is used
2165         #         for result publication in the study. Otherwise, if automatic
2166         #         publication is switched on, default value is used for result name.
2167         #
2168         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2169         #
2170         #  @ref tui_creation_ellipse "Example"
2171         @ManageTransactions("CurvesOp")
2172         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2173             """
2174             Create an ellipse with given center, normal vector and radiuses.
2175
2176             Parameters:
2177                 thePnt Ellipse center.
2178                 theVec Vector, normal to the plane of the ellipse.
2179                 theRMajor Major ellipse radius.
2180                 theRMinor Minor ellipse radius.
2181                 theVecMaj Vector, direction of the ellipse's main axis.
2182                 theName Object name; when specified, this parameter is used
2183                         for result publication in the study. Otherwise, if automatic
2184                         publication is switched on, default value is used for result name.
2185
2186             Returns:
2187                 New GEOM.GEOM_Object, containing the created ellipse.
2188             """
2189             # Example: see GEOM_TestAll.py
2190             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2191             if theVecMaj is not None:
2192                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2193             else:
2194                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2195                 pass
2196             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2197             anObj.SetParameters(Parameters)
2198             self._autoPublish(anObj, theName, "ellipse")
2199             return anObj
2200
2201         ## Create an ellipse with given radiuses.
2202         #  Center of the ellipse will be in the origin of global
2203         #  coordinate system and normal vector will be codirected with Z axis
2204         #  @param theRMajor Major ellipse radius.
2205         #  @param theRMinor Minor ellipse radius.
2206         #  @param theName Object name; when specified, this parameter is used
2207         #         for result publication in the study. Otherwise, if automatic
2208         #         publication is switched on, default value is used for result name.
2209         #
2210         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2211         @ManageTransactions("CurvesOp")
2212         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2213             """
2214             Create an ellipse with given radiuses.
2215             Center of the ellipse will be in the origin of global
2216             coordinate system and normal vector will be codirected with Z axis
2217
2218             Parameters:
2219                 theRMajor Major ellipse radius.
2220                 theRMinor Minor ellipse radius.
2221                 theName Object name; when specified, this parameter is used
2222                         for result publication in the study. Otherwise, if automatic
2223                         publication is switched on, default value is used for result name.
2224
2225             Returns:
2226             New GEOM.GEOM_Object, containing the created ellipse.
2227             """
2228             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2229             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2230             self._autoPublish(anObj, theName, "ellipse")
2231             return anObj
2232
2233         ## Create a polyline on the set of points.
2234         #  @param thePoints Sequence of points for the polyline.
2235         #  @param theIsClosed If True, build a closed wire.
2236         #  @param theName Object name; when specified, this parameter is used
2237         #         for result publication in the study. Otherwise, if automatic
2238         #         publication is switched on, default value is used for result name.
2239         #
2240         #  @return New GEOM.GEOM_Object, containing the created polyline.
2241         #
2242         #  @ref tui_creation_curve "Example"
2243         @ManageTransactions("CurvesOp")
2244         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2245             """
2246             Create a polyline on the set of points.
2247
2248             Parameters:
2249                 thePoints Sequence of points for the polyline.
2250                 theIsClosed If True, build a closed wire.
2251                 theName Object name; when specified, this parameter is used
2252                         for result publication in the study. Otherwise, if automatic
2253                         publication is switched on, default value is used for result name.
2254
2255             Returns:
2256                 New GEOM.GEOM_Object, containing the created polyline.
2257             """
2258             # Example: see GEOM_TestAll.py
2259             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2260             RaiseIfFailed("MakePolyline", self.CurvesOp)
2261             self._autoPublish(anObj, theName, "polyline")
2262             return anObj
2263
2264         ## Create bezier curve on the set of points.
2265         #  @param thePoints Sequence of points for the bezier curve.
2266         #  @param theIsClosed If True, build a closed curve.
2267         #  @param theName Object name; when specified, this parameter is used
2268         #         for result publication in the study. Otherwise, if automatic
2269         #         publication is switched on, default value is used for result name.
2270         #
2271         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2272         #
2273         #  @ref tui_creation_curve "Example"
2274         @ManageTransactions("CurvesOp")
2275         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2276             """
2277             Create bezier curve on the set of points.
2278
2279             Parameters:
2280                 thePoints Sequence of points for the bezier curve.
2281                 theIsClosed If True, build a closed curve.
2282                 theName Object name; when specified, this parameter is used
2283                         for result publication in the study. Otherwise, if automatic
2284                         publication is switched on, default value is used for result name.
2285
2286             Returns:
2287                 New GEOM.GEOM_Object, containing the created bezier curve.
2288             """
2289             # Example: see GEOM_TestAll.py
2290             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2291             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2292             self._autoPublish(anObj, theName, "bezier")
2293             return anObj
2294
2295         ## Create B-Spline curve on the set of points.
2296         #  @param thePoints Sequence of points for the B-Spline curve.
2297         #  @param theIsClosed If True, build a closed curve.
2298         #  @param theDoReordering If TRUE, the algo does not follow the order of
2299         #                         \a thePoints but searches for the closest vertex.
2300         #  @param theName Object name; when specified, this parameter is used
2301         #         for result publication in the study. Otherwise, if automatic
2302         #         publication is switched on, default value is used for result name.
2303         #
2304         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2305         #
2306         #  @ref tui_creation_curve "Example"
2307         @ManageTransactions("CurvesOp")
2308         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2309             """
2310             Create B-Spline curve on the set of points.
2311
2312             Parameters:
2313                 thePoints Sequence of points for the B-Spline curve.
2314                 theIsClosed If True, build a closed curve.
2315                 theDoReordering If True, the algo does not follow the order of
2316                                 thePoints but searches for the closest vertex.
2317                 theName Object name; when specified, this parameter is used
2318                         for result publication in the study. Otherwise, if automatic
2319                         publication is switched on, default value is used for result name.
2320
2321             Returns:
2322                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2323             """
2324             # Example: see GEOM_TestAll.py
2325             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2326             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2327             self._autoPublish(anObj, theName, "bspline")
2328             return anObj
2329
2330         ## Create B-Spline curve on the set of points.
2331         #  @param thePoints Sequence of points for the B-Spline curve.
2332         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2333         #  @param theLastVec Vector object, defining the curve direction at its last point.
2334         #  @param theName Object name; when specified, this parameter is used
2335         #         for result publication in the study. Otherwise, if automatic
2336         #         publication is switched on, default value is used for result name.
2337         #
2338         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2339         #
2340         #  @ref tui_creation_curve "Example"
2341         @ManageTransactions("CurvesOp")
2342         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2343             """
2344             Create B-Spline curve on the set of points.
2345
2346             Parameters:
2347                 thePoints Sequence of points for the B-Spline curve.
2348                 theFirstVec Vector object, defining the curve direction at its first point.
2349                 theLastVec Vector object, defining the curve direction at its last point.
2350                 theName Object name; when specified, this parameter is used
2351                         for result publication in the study. Otherwise, if automatic
2352                         publication is switched on, default value is used for result name.
2353
2354             Returns:
2355                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2356             """
2357             # Example: see GEOM_TestAll.py
2358             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2359             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2360             self._autoPublish(anObj, theName, "bspline")
2361             return anObj
2362
2363         ## Creates a curve using the parametric definition of the basic points.
2364         #  @param thexExpr parametric equation of the coordinates X.
2365         #  @param theyExpr parametric equation of the coordinates Y.
2366         #  @param thezExpr parametric equation of the coordinates Z.
2367         #  @param theParamMin the minimal value of the parameter.
2368         #  @param theParamMax the maximum value of the parameter.
2369         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2370         #  @param theCurveType the type of the curve,
2371         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2372         #  @param theNewMethod flag for switching to the new method if the flag is set to false a deprecated method is used which can lead to a bug.
2373         #  @param theName Object name; when specified, this parameter is used
2374         #         for result publication in the study. Otherwise, if automatic
2375         #         publication is switched on, default value is used for result name.
2376         #
2377         #  @return New GEOM.GEOM_Object, containing the created curve.
2378         #
2379         #  @ref tui_creation_curve "Example"
2380         @ManageTransactions("CurvesOp")
2381         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2382                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2383             """
2384             Creates a curve using the parametric definition of the basic points.
2385
2386             Parameters:
2387                 thexExpr parametric equation of the coordinates X.
2388                 theyExpr parametric equation of the coordinates Y.
2389                 thezExpr parametric equation of the coordinates Z.
2390                 theParamMin the minimal value of the parameter.
2391                 theParamMax the maximum value of the parameter.
2392                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2393                 theCurveType the type of the curve,
2394                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2395                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2396                              method is used which can lead to a bug.
2397                 theName Object name; when specified, this parameter is used
2398                         for result publication in the study. Otherwise, if automatic
2399                         publication is switched on, default value is used for result name.
2400
2401             Returns:
2402                 New GEOM.GEOM_Object, containing the created curve.
2403             """
2404             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2405             if theNewMethod:
2406               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2407             else:
2408               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2409             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2410             anObj.SetParameters(Parameters)
2411             self._autoPublish(anObj, theName, "curve")
2412             return anObj
2413
2414         ## Create an isoline curve on a face.
2415         #  @param theFace the face for which an isoline is created.
2416         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2417         #         creation.
2418         #  @param theParameter the U parameter for U-isoline or V parameter
2419         #         for V-isoline.
2420         #  @param theName Object name; when specified, this parameter is used
2421         #         for result publication in the study. Otherwise, if automatic
2422         #         publication is switched on, default value is used for result name.
2423         #
2424         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2425         #          a compound of edges.
2426         #
2427         #  @ref tui_creation_curve "Example"
2428         @ManageTransactions("CurvesOp")
2429         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2430             """
2431             Create an isoline curve on a face.
2432
2433             Parameters:
2434                 theFace the face for which an isoline is created.
2435                 IsUIsoline True for U-isoline creation; False for V-isoline
2436                            creation.
2437                 theParameter the U parameter for U-isoline or V parameter
2438                              for V-isoline.
2439                 theName Object name; when specified, this parameter is used
2440                         for result publication in the study. Otherwise, if automatic
2441                         publication is switched on, default value is used for result name.
2442
2443             Returns:
2444                 New GEOM.GEOM_Object, containing the created isoline edge or a
2445                 compound of edges.
2446             """
2447             # Example: see GEOM_TestAll.py
2448             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2449             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2450             if IsUIsoline:
2451                 self._autoPublish(anObj, theName, "U-Isoline")
2452             else:
2453                 self._autoPublish(anObj, theName, "V-Isoline")
2454             return anObj
2455
2456         # end of l4_curves
2457         ## @}
2458
2459         ## @addtogroup l3_sketcher
2460         ## @{
2461
2462         ## Create a sketcher (wire or face), following the textual description,
2463         #  passed through <VAR>theCommand</VAR> argument. \n
2464         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2465         #  Format of the description string have to be the following:
2466         #
2467         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2468         #
2469         #  Where:
2470         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2471         #  - CMD is one of
2472         #     - "R angle" : Set the direction by angle
2473         #     - "D dx dy" : Set the direction by DX & DY
2474         #     .
2475         #       \n
2476         #     - "TT x y" : Create segment by point at X & Y
2477         #     - "T dx dy" : Create segment by point with DX & DY
2478         #     - "L length" : Create segment by direction & Length
2479         #     - "IX x" : Create segment by direction & Intersect. X
2480         #     - "IY y" : Create segment by direction & Intersect. Y
2481         #     .
2482         #       \n
2483         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2484         #     - "AA x y": Create arc by point at X & Y
2485         #     - "A dx dy" : Create arc by point with DX & DY
2486         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2487         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2488         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2489         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2490         #     .
2491         #       \n
2492         #     - "WW" : Close Wire (to finish)
2493         #     - "WF" : Close Wire and build face (to finish)
2494         #     .
2495         #        \n
2496         #  - Flag1 (= reverse) is 0 or 2 ...
2497         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2498         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2499         #     .
2500         #        \n
2501         #  - Flag2 (= control tolerance) is 0 or 1 ...
2502         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2503         #     - if 1 the wire is built only if the end point is on the arc
2504         #       with a tolerance of 10^-7 on the distance else the creation fails
2505         #
2506         #  @param theCommand String, defining the sketcher in local
2507         #                    coordinates of the working plane.
2508         #  @param theWorkingPlane Nine double values, defining origin,
2509         #                         OZ and OX directions of the working plane.
2510         #  @param theName Object name; when specified, this parameter is used
2511         #         for result publication in the study. Otherwise, if automatic
2512         #         publication is switched on, default value is used for result name.
2513         #
2514         #  @return New GEOM.GEOM_Object, containing the created wire.
2515         #
2516         #  @ref tui_sketcher_page "Example"
2517         @ManageTransactions("CurvesOp")
2518         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2519             """
2520             Create a sketcher (wire or face), following the textual description, passed
2521             through theCommand argument.
2522             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2523             Format of the description string have to be the following:
2524                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2525             Where:
2526             - x1, y1 are coordinates of the first sketcher point (zero by default),
2527             - CMD is one of
2528                - "R angle" : Set the direction by angle
2529                - "D dx dy" : Set the direction by DX & DY
2530
2531                - "TT x y" : Create segment by point at X & Y
2532                - "T dx dy" : Create segment by point with DX & DY
2533                - "L length" : Create segment by direction & Length
2534                - "IX x" : Create segment by direction & Intersect. X
2535                - "IY y" : Create segment by direction & Intersect. Y
2536
2537                - "C radius length" : Create arc by direction, radius and length(in degree)
2538                - "AA x y": Create arc by point at X & Y
2539                - "A dx dy" : Create arc by point with DX & DY
2540                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2541                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2542                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2543                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2544
2545                - "WW" : Close Wire (to finish)
2546                - "WF" : Close Wire and build face (to finish)
2547
2548             - Flag1 (= reverse) is 0 or 2 ...
2549                - if 0 the drawn arc is the one of lower angle (< Pi)
2550                - if 2 the drawn arc ius the one of greater angle (> Pi)
2551
2552             - Flag2 (= control tolerance) is 0 or 1 ...
2553                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2554                - if 1 the wire is built only if the end point is on the arc
2555                  with a tolerance of 10^-7 on the distance else the creation fails
2556
2557             Parameters:
2558                 theCommand String, defining the sketcher in local
2559                            coordinates of the working plane.
2560                 theWorkingPlane Nine double values, defining origin,
2561                                 OZ and OX directions of the working plane.
2562                 theName Object name; when specified, this parameter is used
2563                         for result publication in the study. Otherwise, if automatic
2564                         publication is switched on, default value is used for result name.
2565
2566             Returns:
2567                 New GEOM.GEOM_Object, containing the created wire.
2568             """
2569             # Example: see GEOM_TestAll.py
2570             theCommand,Parameters = ParseSketcherCommand(theCommand)
2571             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2572             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2573             anObj.SetParameters(Parameters)
2574             self._autoPublish(anObj, theName, "wire")
2575             return anObj
2576
2577         ## Create a sketcher (wire or face), following the textual description,
2578         #  passed through <VAR>theCommand</VAR> argument. \n
2579         #  For format of the description string see MakeSketcher() method.\n
2580         #  @param theCommand String, defining the sketcher in local
2581         #                    coordinates of the working plane.
2582         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2583         #  @param theName Object name; when specified, this parameter is used
2584         #         for result publication in the study. Otherwise, if automatic
2585         #         publication is switched on, default value is used for result name.
2586         #
2587         #  @return New GEOM.GEOM_Object, containing the created wire.
2588         #
2589         #  @ref tui_sketcher_page "Example"
2590         @ManageTransactions("CurvesOp")
2591         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2592             """
2593             Create a sketcher (wire or face), following the textual description,
2594             passed through theCommand argument.
2595             For format of the description string see geompy.MakeSketcher() method.
2596
2597             Parameters:
2598                 theCommand String, defining the sketcher in local
2599                            coordinates of the working plane.
2600                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2601                 theName Object name; when specified, this parameter is used
2602                         for result publication in the study. Otherwise, if automatic
2603                         publication is switched on, default value is used for result name.
2604
2605             Returns:
2606                 New GEOM.GEOM_Object, containing the created wire.
2607             """
2608             theCommand,Parameters = ParseSketcherCommand(theCommand)
2609             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2610             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2611             anObj.SetParameters(Parameters)
2612             self._autoPublish(anObj, theName, "wire")
2613             return anObj
2614
2615         ## Obtain a 2D sketcher interface
2616         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2617         def Sketcher2D (self):
2618             """
2619             Obtain a 2D sketcher interface.
2620
2621             Example of usage:
2622                sk = geompy.Sketcher2D()
2623                sk.addPoint(20, 20)
2624                sk.addSegmentRelative(15, 70)
2625                sk.addSegmentPerpY(50)
2626                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2627                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2628                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2629                sk.close()
2630                Sketch_1 = sk.wire(geomObj_1)
2631             """
2632             sk = Sketcher2D (self)
2633             return sk
2634
2635         ## Create a sketcher wire, following the numerical description,
2636         #  passed through <VAR>theCoordinates</VAR> argument. \n
2637         #  @param theCoordinates double values, defining points to create a wire,
2638         #                                                      passing from it.
2639         #  @param theName Object name; when specified, this parameter is used
2640         #         for result publication in the study. Otherwise, if automatic
2641         #         publication is switched on, default value is used for result name.
2642         #
2643         #  @return New GEOM.GEOM_Object, containing the created wire.
2644         #
2645         #  @ref tui_3dsketcher_page "Example"
2646         @ManageTransactions("CurvesOp")
2647         def Make3DSketcher(self, theCoordinates, theName=None):
2648             """
2649             Create a sketcher wire, following the numerical description,
2650             passed through theCoordinates argument.
2651
2652             Parameters:
2653                 theCoordinates double values, defining points to create a wire,
2654                                passing from it.
2655                 theName Object name; when specified, this parameter is used
2656                         for result publication in the study. Otherwise, if automatic
2657                         publication is switched on, default value is used for result name.
2658
2659             Returns:
2660                 New GEOM_Object, containing the created wire.
2661             """
2662             theCoordinates,Parameters = ParseParameters(theCoordinates)
2663             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2664             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2665             anObj.SetParameters(Parameters)
2666             self._autoPublish(anObj, theName, "wire")
2667             return anObj
2668
2669         ## Obtain a 3D sketcher interface
2670         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2671         #
2672         #  @ref tui_3dsketcher_page "Example"
2673         def Sketcher3D (self):
2674             """
2675             Obtain a 3D sketcher interface.
2676
2677             Example of usage:
2678                 sk = geompy.Sketcher3D()
2679                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2680                 sk.addPointsRelative(0, 0, 130)
2681                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2682                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2683                 sk.close()
2684                 a3D_Sketcher_1 = sk.wire()
2685             """
2686             sk = Sketcher3D (self)
2687             return sk
2688
2689         # end of l3_sketcher
2690         ## @}
2691
2692         ## @addtogroup l3_3d_primitives
2693         ## @{
2694
2695         ## Create a box by coordinates of two opposite vertices.
2696         #
2697         #  @param x1,y1,z1 double values, defining first point it.
2698         #  @param x2,y2,z2 double values, defining first point it.
2699         #  @param theName Object name; when specified, this parameter is used
2700         #         for result publication in the study. Otherwise, if automatic
2701         #         publication is switched on, default value is used for result name.
2702         #
2703         #  @return New GEOM.GEOM_Object, containing the created box.
2704         #
2705         #  @ref tui_creation_box "Example"
2706         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2707             """
2708             Create a box by coordinates of two opposite vertices.
2709
2710             Parameters:
2711                 x1,y1,z1 double values, defining first point.
2712                 x2,y2,z2 double values, defining second point.
2713                 theName Object name; when specified, this parameter is used
2714                         for result publication in the study. Otherwise, if automatic
2715                         publication is switched on, default value is used for result name.
2716
2717             Returns:
2718                 New GEOM.GEOM_Object, containing the created box.
2719             """
2720             # Example: see GEOM_TestAll.py
2721             pnt1 = self.MakeVertex(x1,y1,z1)
2722             pnt2 = self.MakeVertex(x2,y2,z2)
2723             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2724             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2725
2726         ## Create a box with specified dimensions along the coordinate axes
2727         #  and with edges, parallel to the coordinate axes.
2728         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2729         #  @param theDX Length of Box edges, parallel to OX axis.
2730         #  @param theDY Length of Box edges, parallel to OY axis.
2731         #  @param theDZ Length of Box edges, parallel to OZ axis.
2732         #  @param theName Object name; when specified, this parameter is used
2733         #         for result publication in the study. Otherwise, if automatic
2734         #         publication is switched on, default value is used for result name.
2735         #
2736         #  @return New GEOM.GEOM_Object, containing the created box.
2737         #
2738         #  @ref tui_creation_box "Example"
2739         @ManageTransactions("PrimOp")
2740         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2741             """
2742             Create a box with specified dimensions along the coordinate axes
2743             and with edges, parallel to the coordinate axes.
2744             Center of the box will be at point (DX/2, DY/2, DZ/2).
2745
2746             Parameters:
2747                 theDX Length of Box edges, parallel to OX axis.
2748                 theDY Length of Box edges, parallel to OY axis.
2749                 theDZ Length of Box edges, parallel to OZ axis.
2750                 theName Object name; when specified, this parameter is used
2751                         for result publication in the study. Otherwise, if automatic
2752                         publication is switched on, default value is used for result name.
2753
2754             Returns:
2755                 New GEOM.GEOM_Object, containing the created box.
2756             """
2757             # Example: see GEOM_TestAll.py
2758             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2759             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2760             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2761             anObj.SetParameters(Parameters)
2762             self._autoPublish(anObj, theName, "box")
2763             return anObj
2764
2765         ## Create a box with two specified opposite vertices,
2766         #  and with edges, parallel to the coordinate axes
2767         #  @param thePnt1 First of two opposite vertices.
2768         #  @param thePnt2 Second of two opposite vertices.
2769         #  @param theName Object name; when specified, this parameter is used
2770         #         for result publication in the study. Otherwise, if automatic
2771         #         publication is switched on, default value is used for result name.
2772         #
2773         #  @return New GEOM.GEOM_Object, containing the created box.
2774         #
2775         #  @ref tui_creation_box "Example"
2776         @ManageTransactions("PrimOp")
2777         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2778             """
2779             Create a box with two specified opposite vertices,
2780             and with edges, parallel to the coordinate axes
2781
2782             Parameters:
2783                 thePnt1 First of two opposite vertices.
2784                 thePnt2 Second of two opposite vertices.
2785                 theName Object name; when specified, this parameter is used
2786                         for result publication in the study. Otherwise, if automatic
2787                         publication is switched on, default value is used for result name.
2788
2789             Returns:
2790                 New GEOM.GEOM_Object, containing the created box.
2791             """
2792             # Example: see GEOM_TestAll.py
2793             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2794             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2795             self._autoPublish(anObj, theName, "box")
2796             return anObj
2797
2798         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2799         #  @param theH height of Face.
2800         #  @param theW width of Face.
2801         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2802         #  @param theName Object name; when specified, this parameter is used
2803         #         for result publication in the study. Otherwise, if automatic
2804         #         publication is switched on, default value is used for result name.
2805         #
2806         #  @return New GEOM.GEOM_Object, containing the created face.
2807         #
2808         #  @ref tui_creation_face "Example"
2809         @ManageTransactions("PrimOp")
2810         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2811             """
2812             Create a face with specified dimensions with edges parallel to coordinate axes.
2813
2814             Parameters:
2815                 theH height of Face.
2816                 theW width of Face.
2817                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2818                 theName Object name; when specified, this parameter is used
2819                         for result publication in the study. Otherwise, if automatic
2820                         publication is switched on, default value is used for result name.
2821
2822             Returns:
2823                 New GEOM.GEOM_Object, containing the created face.
2824             """
2825             # Example: see GEOM_TestAll.py
2826             theH,theW,Parameters = ParseParameters(theH, theW)
2827             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2828             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2829             anObj.SetParameters(Parameters)
2830             self._autoPublish(anObj, theName, "rectangle")
2831             return anObj
2832
2833         ## Create a face from another plane and two sizes,
2834         #  vertical size and horisontal size.
2835         #  @param theObj   Normale vector to the creating face or
2836         #  the face object.
2837         #  @param theH     Height (vertical size).
2838         #  @param theW     Width (horisontal size).
2839         #  @param theName Object name; when specified, this parameter is used
2840         #         for result publication in the study. Otherwise, if automatic
2841         #         publication is switched on, default value is used for result name.
2842         #
2843         #  @return New GEOM.GEOM_Object, containing the created face.
2844         #
2845         #  @ref tui_creation_face "Example"
2846         @ManageTransactions("PrimOp")
2847         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2848             """
2849             Create a face from another plane and two sizes,
2850             vertical size and horisontal size.
2851
2852             Parameters:
2853                 theObj   Normale vector to the creating face or
2854                          the face object.
2855                 theH     Height (vertical size).
2856                 theW     Width (horisontal size).
2857                 theName Object name; when specified, this parameter is used
2858                         for result publication in the study. Otherwise, if automatic
2859                         publication is switched on, default value is used for result name.
2860
2861             Returns:
2862                 New GEOM_Object, containing the created face.
2863             """
2864             # Example: see GEOM_TestAll.py
2865             theH,theW,Parameters = ParseParameters(theH, theW)
2866             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2867             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2868             anObj.SetParameters(Parameters)
2869             self._autoPublish(anObj, theName, "rectangle")
2870             return anObj
2871
2872         ## Create a disk with given center, normal vector and radius.
2873         #  @param thePnt Disk center.
2874         #  @param theVec Vector, normal to the plane of the disk.
2875         #  @param theR Disk radius.
2876         #  @param theName Object name; when specified, this parameter is used
2877         #         for result publication in the study. Otherwise, if automatic
2878         #         publication is switched on, default value is used for result name.
2879         #
2880         #  @return New GEOM.GEOM_Object, containing the created disk.
2881         #
2882         #  @ref tui_creation_disk "Example"
2883         @ManageTransactions("PrimOp")
2884         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2885             """
2886             Create a disk with given center, normal vector and radius.
2887
2888             Parameters:
2889                 thePnt Disk center.
2890                 theVec Vector, normal to the plane of the disk.
2891                 theR Disk radius.
2892                 theName Object name; when specified, this parameter is used
2893                         for result publication in the study. Otherwise, if automatic
2894                         publication is switched on, default value is used for result name.
2895
2896             Returns:
2897                 New GEOM.GEOM_Object, containing the created disk.
2898             """
2899             # Example: see GEOM_TestAll.py
2900             theR,Parameters = ParseParameters(theR)
2901             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2902             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2903             anObj.SetParameters(Parameters)
2904             self._autoPublish(anObj, theName, "disk")
2905             return anObj
2906
2907         ## Create a disk, passing through three given points
2908         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2909         #  @param theName Object name; when specified, this parameter is used
2910         #         for result publication in the study. Otherwise, if automatic
2911         #         publication is switched on, default value is used for result name.
2912         #
2913         #  @return New GEOM.GEOM_Object, containing the created disk.
2914         #
2915         #  @ref tui_creation_disk "Example"
2916         @ManageTransactions("PrimOp")
2917         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2918             """
2919             Create a disk, passing through three given points
2920
2921             Parameters:
2922                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2923                 theName Object name; when specified, this parameter is used
2924                         for result publication in the study. Otherwise, if automatic
2925                         publication is switched on, default value is used for result name.
2926
2927             Returns:
2928                 New GEOM.GEOM_Object, containing the created disk.
2929             """
2930             # Example: see GEOM_TestAll.py
2931             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2932             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2933             self._autoPublish(anObj, theName, "disk")
2934             return anObj
2935
2936         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2937         #  @param theR Radius of Face.
2938         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2939         #  @param theName Object name; when specified, this parameter is used
2940         #         for result publication in the study. Otherwise, if automatic
2941         #         publication is switched on, default value is used for result name.
2942         #
2943         #  @return New GEOM.GEOM_Object, containing the created disk.
2944         #
2945         #  @ref tui_creation_face "Example"
2946         @ManageTransactions("PrimOp")
2947         def MakeDiskR(self, theR, theOrientation, theName=None):
2948             """
2949             Create a disk with specified dimensions along OX-OY coordinate axes.
2950
2951             Parameters:
2952                 theR Radius of Face.
2953                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2954                 theName Object name; when specified, this parameter is used
2955                         for result publication in the study. Otherwise, if automatic
2956                         publication is switched on, default value is used for result name.
2957
2958             Returns:
2959                 New GEOM.GEOM_Object, containing the created disk.
2960
2961             Example of usage:
2962                 Disk3 = geompy.MakeDiskR(100., 1)
2963             """
2964             # Example: see GEOM_TestAll.py
2965             theR,Parameters = ParseParameters(theR)
2966             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2967             RaiseIfFailed("MakeDiskR", self.PrimOp)
2968             anObj.SetParameters(Parameters)
2969             self._autoPublish(anObj, theName, "disk")
2970             return anObj
2971
2972         ## Create a cylinder with given base point, axis, radius and height.
2973         #  @param thePnt Central point of cylinder base.
2974         #  @param theAxis Cylinder axis.
2975         #  @param theR Cylinder radius.
2976         #  @param theH Cylinder height.
2977         #  @param theName Object name; when specified, this parameter is used
2978         #         for result publication in the study. Otherwise, if automatic
2979         #         publication is switched on, default value is used for result name.
2980         #
2981         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2982         #
2983         #  @ref tui_creation_cylinder "Example"
2984         @ManageTransactions("PrimOp")
2985         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2986             """
2987             Create a cylinder with given base point, axis, radius and height.
2988
2989             Parameters:
2990                 thePnt Central point of cylinder base.
2991                 theAxis Cylinder axis.
2992                 theR Cylinder radius.
2993                 theH Cylinder height.
2994                 theName Object name; when specified, this parameter is used
2995                         for result publication in the study. Otherwise, if automatic
2996                         publication is switched on, default value is used for result name.
2997
2998             Returns:
2999                 New GEOM.GEOM_Object, containing the created cylinder.
3000             """
3001             # Example: see GEOM_TestAll.py
3002             theR,theH,Parameters = ParseParameters(theR, theH)
3003             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3004             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3005             anObj.SetParameters(Parameters)
3006             self._autoPublish(anObj, theName, "cylinder")
3007             return anObj
3008             
3009         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3010         #  @param thePnt Central point of cylinder base.
3011         #  @param theAxis Cylinder axis.
3012         #  @param theR Cylinder radius.
3013         #  @param theH Cylinder height.
3014         #  @param theA Cylinder angle in radians.
3015         #  @param theName Object name; when specified, this parameter is used
3016         #         for result publication in the study. Otherwise, if automatic
3017         #         publication is switched on, default value is used for result name.
3018         #
3019         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3020         #
3021         #  @ref tui_creation_cylinder "Example"
3022         @ManageTransactions("PrimOp")
3023         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3024             """
3025             Create a a portion of cylinder with given base point, axis, radius, height and angle.
3026
3027             Parameters:
3028                 thePnt Central point of cylinder base.
3029                 theAxis Cylinder axis.
3030                 theR Cylinder radius.
3031                 theH Cylinder height.
3032                 theA Cylinder angle in radians.
3033                 theName Object name; when specified, this parameter is used
3034                         for result publication in the study. Otherwise, if automatic
3035                         publication is switched on, default value is used for result name.
3036
3037             Returns:
3038                 New GEOM.GEOM_Object, containing the created cylinder.
3039             """
3040             # Example: see GEOM_TestAll.py
3041             flag = False
3042             if isinstance(theA,str):
3043                 flag = True
3044             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3045             if flag:
3046                 theA = theA*math.pi/180.
3047             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3048             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3049             anObj.SetParameters(Parameters)
3050             self._autoPublish(anObj, theName, "cylinder")
3051             return anObj
3052
3053         ## Create a cylinder with given radius and height at
3054         #  the origin of coordinate system. Axis of the cylinder
3055         #  will be collinear to the OZ axis of the coordinate system.
3056         #  @param theR Cylinder radius.
3057         #  @param theH Cylinder height.
3058         #  @param theName Object name; when specified, this parameter is used
3059         #         for result publication in the study. Otherwise, if automatic
3060         #         publication is switched on, default value is used for result name.
3061         #
3062         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3063         #
3064         #  @ref tui_creation_cylinder "Example"
3065         @ManageTransactions("PrimOp")
3066         def MakeCylinderRH(self, theR, theH, theName=None):
3067             """
3068             Create a cylinder with given radius and height at
3069             the origin of coordinate system. Axis of the cylinder
3070             will be collinear to the OZ axis of the coordinate system.
3071
3072             Parameters:
3073                 theR Cylinder radius.
3074                 theH Cylinder height.
3075                 theName Object name; when specified, this parameter is used
3076                         for result publication in the study. Otherwise, if automatic
3077                         publication is switched on, default value is used for result name.
3078
3079             Returns:
3080                 New GEOM.GEOM_Object, containing the created cylinder.
3081             """
3082             # Example: see GEOM_TestAll.py
3083             theR,theH,Parameters = ParseParameters(theR, theH)
3084             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3085             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3086             anObj.SetParameters(Parameters)
3087             self._autoPublish(anObj, theName, "cylinder")
3088             return anObj
3089             
3090         ## Create a portion of cylinder with given radius, height and angle at
3091         #  the origin of coordinate system. Axis of the cylinder
3092         #  will be collinear to the OZ axis of the coordinate system.
3093         #  @param theR Cylinder radius.
3094         #  @param theH Cylinder height.
3095         #  @param theA Cylinder angle in radians.
3096         #  @param theName Object name; when specified, this parameter is used
3097         #         for result publication in the study. Otherwise, if automatic
3098         #         publication is switched on, default value is used for result name.
3099         #
3100         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3101         #
3102         #  @ref tui_creation_cylinder "Example"
3103         @ManageTransactions("PrimOp")
3104         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3105             """
3106             Create a portion of cylinder with given radius, height and angle at
3107             the origin of coordinate system. Axis of the cylinder
3108             will be collinear to the OZ axis of the coordinate system.
3109
3110             Parameters:
3111                 theR Cylinder radius.
3112                 theH Cylinder height.
3113                 theA Cylinder angle in radians.
3114                 theName Object name; when specified, this parameter is used
3115                         for result publication in the study. Otherwise, if automatic
3116                         publication is switched on, default value is used for result name.
3117
3118             Returns:
3119                 New GEOM.GEOM_Object, containing the created cylinder.
3120             """
3121             # Example: see GEOM_TestAll.py
3122             flag = False
3123             if isinstance(theA,str):
3124                 flag = True
3125             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3126             if flag:
3127                 theA = theA*math.pi/180.
3128             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3129             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3130             anObj.SetParameters(Parameters)
3131             self._autoPublish(anObj, theName, "cylinder")
3132             return anObj
3133
3134         ## Create a sphere with given center and radius.
3135         #  @param thePnt Sphere center.
3136         #  @param theR Sphere radius.
3137         #  @param theName Object name; when specified, this parameter is used
3138         #         for result publication in the study. Otherwise, if automatic
3139         #         publication is switched on, default value is used for result name.
3140         #
3141         #  @return New GEOM.GEOM_Object, containing the created sphere.
3142         #
3143         #  @ref tui_creation_sphere "Example"
3144         @ManageTransactions("PrimOp")
3145         def MakeSpherePntR(self, thePnt, theR, theName=None):
3146             """
3147             Create a sphere with given center and radius.
3148
3149             Parameters:
3150                 thePnt Sphere center.
3151                 theR Sphere radius.
3152                 theName Object name; when specified, this parameter is used
3153                         for result publication in the study. Otherwise, if automatic
3154                         publication is switched on, default value is used for result name.
3155
3156             Returns:
3157                 New GEOM.GEOM_Object, containing the created sphere.
3158             """
3159             # Example: see GEOM_TestAll.py
3160             theR,Parameters = ParseParameters(theR)
3161             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3162             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3163             anObj.SetParameters(Parameters)
3164             self._autoPublish(anObj, theName, "sphere")
3165             return anObj
3166
3167         ## Create a sphere with given center and radius.
3168         #  @param x,y,z Coordinates of sphere center.
3169         #  @param theR Sphere radius.
3170         #  @param theName Object name; when specified, this parameter is used
3171         #         for result publication in the study. Otherwise, if automatic
3172         #         publication is switched on, default value is used for result name.
3173         #
3174         #  @return New GEOM.GEOM_Object, containing the created sphere.
3175         #
3176         #  @ref tui_creation_sphere "Example"
3177         def MakeSphere(self, x, y, z, theR, theName=None):
3178             """
3179             Create a sphere with given center and radius.
3180
3181             Parameters:
3182                 x,y,z Coordinates of sphere center.
3183                 theR Sphere radius.
3184                 theName Object name; when specified, this parameter is used
3185                         for result publication in the study. Otherwise, if automatic
3186                         publication is switched on, default value is used for result name.
3187
3188             Returns:
3189                 New GEOM.GEOM_Object, containing the created sphere.
3190             """
3191             # Example: see GEOM_TestAll.py
3192             point = self.MakeVertex(x, y, z)
3193             # note: auto-publishing is done in self.MakeSpherePntR()
3194             anObj = self.MakeSpherePntR(point, theR, theName)
3195             return anObj
3196
3197         ## Create a sphere with given radius at the origin of coordinate system.
3198         #  @param theR Sphere radius.
3199         #  @param theName Object name; when specified, this parameter is used
3200         #         for result publication in the study. Otherwise, if automatic
3201         #         publication is switched on, default value is used for result name.
3202         #
3203         #  @return New GEOM.GEOM_Object, containing the created sphere.
3204         #
3205         #  @ref tui_creation_sphere "Example"
3206         @ManageTransactions("PrimOp")
3207         def MakeSphereR(self, theR, theName=None):
3208             """
3209             Create a sphere with given radius at the origin of coordinate system.
3210
3211             Parameters:
3212                 theR Sphere radius.
3213                 theName Object name; when specified, this parameter is used
3214                         for result publication in the study. Otherwise, if automatic
3215                         publication is switched on, default value is used for result name.
3216
3217             Returns:
3218                 New GEOM.GEOM_Object, containing the created sphere.
3219             """
3220             # Example: see GEOM_TestAll.py
3221             theR,Parameters = ParseParameters(theR)
3222             anObj = self.PrimOp.MakeSphereR(theR)
3223             RaiseIfFailed("MakeSphereR", self.PrimOp)
3224             anObj.SetParameters(Parameters)
3225             self._autoPublish(anObj, theName, "sphere")
3226             return anObj
3227
3228         ## Create a cone with given base point, axis, height and radiuses.
3229         #  @param thePnt Central point of the first cone base.
3230         #  @param theAxis Cone axis.
3231         #  @param theR1 Radius of the first cone base.
3232         #  @param theR2 Radius of the second cone base.
3233         #    \note If both radiuses are non-zero, the cone will be truncated.
3234         #    \note If the radiuses are equal, a cylinder will be created instead.
3235         #  @param theH Cone height.
3236         #  @param theName Object name; when specified, this parameter is used
3237         #         for result publication in the study. Otherwise, if automatic
3238         #         publication is switched on, default value is used for result name.
3239         #
3240         #  @return New GEOM.GEOM_Object, containing the created cone.
3241         #
3242         #  @ref tui_creation_cone "Example"
3243         @ManageTransactions("PrimOp")
3244         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3245             """
3246             Create a cone with given base point, axis, height and radiuses.
3247
3248             Parameters:
3249                 thePnt Central point of the first cone base.
3250                 theAxis Cone axis.
3251                 theR1 Radius of the first cone base.
3252                 theR2 Radius of the second cone base.
3253                 theH Cone height.
3254                 theName Object name; when specified, this parameter is used
3255                         for result publication in the study. Otherwise, if automatic
3256                         publication is switched on, default value is used for result name.
3257
3258             Note:
3259                 If both radiuses are non-zero, the cone will be truncated.
3260                 If the radiuses are equal, a cylinder will be created instead.
3261
3262             Returns:
3263                 New GEOM.GEOM_Object, containing the created cone.
3264             """
3265             # Example: see GEOM_TestAll.py
3266             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3267             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3268             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3269             anObj.SetParameters(Parameters)
3270             self._autoPublish(anObj, theName, "cone")
3271             return anObj
3272
3273         ## Create a cone with given height and radiuses at
3274         #  the origin of coordinate system. Axis of the cone will
3275         #  be collinear to the OZ axis of the coordinate system.
3276         #  @param theR1 Radius of the first cone base.
3277         #  @param theR2 Radius of the second cone base.
3278         #    \note If both radiuses are non-zero, the cone will be truncated.
3279         #    \note If the radiuses are equal, a cylinder will be created instead.
3280         #  @param theH Cone height.
3281         #  @param theName Object name; when specified, this parameter is used
3282         #         for result publication in the study. Otherwise, if automatic
3283         #         publication is switched on, default value is used for result name.
3284         #
3285         #  @return New GEOM.GEOM_Object, containing the created cone.
3286         #
3287         #  @ref tui_creation_cone "Example"
3288         @ManageTransactions("PrimOp")
3289         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3290             """
3291             Create a cone with given height and radiuses at
3292             the origin of coordinate system. Axis of the cone will
3293             be collinear to the OZ axis of the coordinate system.
3294
3295             Parameters:
3296                 theR1 Radius of the first cone base.
3297                 theR2 Radius of the second cone base.
3298                 theH Cone height.
3299                 theName Object name; when specified, this parameter is used
3300                         for result publication in the study. Otherwise, if automatic
3301                         publication is switched on, default value is used for result name.
3302
3303             Note:
3304                 If both radiuses are non-zero, the cone will be truncated.
3305                 If the radiuses are equal, a cylinder will be created instead.
3306
3307             Returns:
3308                 New GEOM.GEOM_Object, containing the created cone.
3309             """
3310             # Example: see GEOM_TestAll.py
3311             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3312             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3313             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3314             anObj.SetParameters(Parameters)
3315             self._autoPublish(anObj, theName, "cone")
3316             return anObj
3317
3318         ## Create a torus with given center, normal vector and radiuses.
3319         #  @param thePnt Torus central point.
3320         #  @param theVec Torus axis of symmetry.
3321         #  @param theRMajor Torus major radius.
3322         #  @param theRMinor Torus minor radius.
3323         #  @param theName Object name; when specified, this parameter is used
3324         #         for result publication in the study. Otherwise, if automatic
3325         #         publication is switched on, default value is used for result name.
3326         #
3327         #  @return New GEOM.GEOM_Object, containing the created torus.
3328         #
3329         #  @ref tui_creation_torus "Example"
3330         @ManageTransactions("PrimOp")
3331         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3332             """
3333             Create a torus with given center, normal vector and radiuses.
3334
3335             Parameters:
3336                 thePnt Torus central point.
3337                 theVec Torus axis of symmetry.
3338                 theRMajor Torus major radius.
3339                 theRMinor Torus minor radius.
3340                 theName Object name; when specified, this parameter is used
3341                         for result publication in the study. Otherwise, if automatic
3342                         publication is switched on, default value is used for result name.
3343
3344            Returns:
3345                 New GEOM.GEOM_Object, containing the created torus.
3346             """
3347             # Example: see GEOM_TestAll.py
3348             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3349             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3350             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3351             anObj.SetParameters(Parameters)
3352             self._autoPublish(anObj, theName, "torus")
3353             return anObj
3354
3355         ## Create a torus with given radiuses at the origin of coordinate system.
3356         #  @param theRMajor Torus major radius.
3357         #  @param theRMinor Torus minor radius.
3358         #  @param theName Object name; when specified, this parameter is used
3359         #         for result publication in the study. Otherwise, if automatic
3360         #         publication is switched on, default value is used for result name.
3361         #
3362         #  @return New GEOM.GEOM_Object, containing the created torus.
3363         #
3364         #  @ref tui_creation_torus "Example"
3365         @ManageTransactions("PrimOp")
3366         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3367             """
3368            Create a torus with given radiuses at the origin of coordinate system.
3369
3370            Parameters:
3371                 theRMajor Torus major radius.
3372                 theRMinor Torus minor radius.
3373                 theName Object name; when specified, this parameter is used
3374                         for result publication in the study. Otherwise, if automatic
3375                         publication is switched on, default value is used for result name.
3376
3377            Returns:
3378                 New GEOM.GEOM_Object, containing the created torus.
3379             """
3380             # Example: see GEOM_TestAll.py
3381             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3382             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3383             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3384             anObj.SetParameters(Parameters)
3385             self._autoPublish(anObj, theName, "torus")
3386             return anObj
3387
3388         # end of l3_3d_primitives
3389         ## @}
3390
3391         ## @addtogroup l3_complex
3392         ## @{
3393
3394         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3395         #  @param theBase Base shape to be extruded.
3396         #  @param thePoint1 First end of extrusion vector.
3397         #  @param thePoint2 Second end of extrusion vector.
3398         #  @param theScaleFactor Use it to make prism with scaled second base.
3399         #                        Nagative value means not scaled second base.
3400         #  @param theName Object name; when specified, this parameter is used
3401         #         for result publication in the study. Otherwise, if automatic
3402         #         publication is switched on, default value is used for result name.
3403         #
3404         #  @return New GEOM.GEOM_Object, containing the created prism.
3405         #
3406         #  @ref tui_creation_prism "Example"
3407         @ManageTransactions("PrimOp")
3408         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3409             """
3410             Create a shape by extrusion of the base shape along a vector, defined by two points.
3411
3412             Parameters:
3413                 theBase Base shape to be extruded.
3414                 thePoint1 First end of extrusion vector.
3415                 thePoint2 Second end of extrusion vector.
3416                 theScaleFactor Use it to make prism with scaled second base.
3417                                Nagative value means not scaled second base.
3418                 theName Object name; when specified, this parameter is used
3419                         for result publication in the study. Otherwise, if automatic
3420                         publication is switched on, default value is used for result name.
3421
3422             Returns:
3423                 New GEOM.GEOM_Object, containing the created prism.
3424             """
3425             # Example: see GEOM_TestAll.py
3426             anObj = None
3427             Parameters = ""
3428             if theScaleFactor > 0:
3429                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3430                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3431             else:
3432                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3433             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3434             anObj.SetParameters(Parameters)
3435             self._autoPublish(anObj, theName, "prism")
3436             return anObj
3437
3438         ## Create a shape by extrusion of the base shape along a
3439         #  vector, defined by two points, in 2 Ways (forward/backward).
3440         #  @param theBase Base shape to be extruded.
3441         #  @param thePoint1 First end of extrusion vector.
3442         #  @param thePoint2 Second end of extrusion vector.
3443         #  @param theName Object name; when specified, this parameter is used
3444         #         for result publication in the study. Otherwise, if automatic
3445         #         publication is switched on, default value is used for result name.
3446         #
3447         #  @return New GEOM.GEOM_Object, containing the created prism.
3448         #
3449         #  @ref tui_creation_prism "Example"
3450         @ManageTransactions("PrimOp")
3451         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3452             """
3453             Create a shape by extrusion of the base shape along a
3454             vector, defined by two points, in 2 Ways (forward/backward).
3455
3456             Parameters:
3457                 theBase Base shape to be extruded.
3458                 thePoint1 First end of extrusion vector.
3459                 thePoint2 Second end of extrusion vector.
3460                 theName Object name; when specified, this parameter is used
3461                         for result publication in the study. Otherwise, if automatic
3462                         publication is switched on, default value is used for result name.
3463
3464             Returns:
3465                 New GEOM.GEOM_Object, containing the created prism.
3466             """
3467             # Example: see GEOM_TestAll.py
3468             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3469             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3470             self._autoPublish(anObj, theName, "prism")
3471             return anObj
3472
3473         ## Create a shape by extrusion of the base shape along the vector,
3474         #  i.e. all the space, transfixed by the base shape during its translation
3475         #  along the vector on the given distance.
3476         #  @param theBase Base shape to be extruded.
3477         #  @param theVec Direction of extrusion.
3478         #  @param theH Prism dimension along theVec.
3479         #  @param theScaleFactor Use it to make prism with scaled second base.
3480         #                        Negative value means not scaled second base.
3481         #  @param theName Object name; when specified, this parameter is used
3482         #         for result publication in the study. Otherwise, if automatic
3483         #         publication is switched on, default value is used for result name.
3484         #
3485         #  @return New GEOM.GEOM_Object, containing the created prism.
3486         #
3487         #  @ref tui_creation_prism "Example"
3488         @ManageTransactions("PrimOp")
3489         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3490             """
3491             Create a shape by extrusion of the base shape along the vector,
3492             i.e. all the space, transfixed by the base shape during its translation
3493             along the vector on the given distance.
3494
3495             Parameters:
3496                 theBase Base shape to be extruded.
3497                 theVec Direction of extrusion.
3498                 theH Prism dimension along theVec.
3499                 theScaleFactor Use it to make prism with scaled second base.
3500                                Negative value means not scaled second base.
3501                 theName Object name; when specified, this parameter is used
3502                         for result publication in the study. Otherwise, if automatic
3503                         publication is switched on, default value is used for result name.
3504
3505             Returns:
3506                 New GEOM.GEOM_Object, containing the created prism.
3507             """
3508             # Example: see GEOM_TestAll.py
3509             anObj = None
3510             Parameters = ""
3511             if theScaleFactor > 0:
3512                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3513                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3514             else:
3515                 theH,Parameters = ParseParameters(theH)
3516                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3517             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3518             anObj.SetParameters(Parameters)
3519             self._autoPublish(anObj, theName, "prism")
3520             return anObj
3521
3522         ## Create a shape by extrusion of the base shape along the vector,
3523         #  i.e. all the space, transfixed by the base shape during its translation
3524         #  along the vector on the given distance in 2 Ways (forward/backward).
3525         #  @param theBase Base shape to be extruded.
3526         #  @param theVec Direction of extrusion.
3527         #  @param theH Prism dimension along theVec in forward direction.
3528         #  @param theName Object name; when specified, this parameter is used
3529         #         for result publication in the study. Otherwise, if automatic
3530         #         publication is switched on, default value is used for result name.
3531         #
3532         #  @return New GEOM.GEOM_Object, containing the created prism.
3533         #
3534         #  @ref tui_creation_prism "Example"
3535         @ManageTransactions("PrimOp")
3536         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3537             """
3538             Create a shape by extrusion of the base shape along the vector,
3539             i.e. all the space, transfixed by the base shape during its translation
3540             along the vector on the given distance in 2 Ways (forward/backward).
3541
3542             Parameters:
3543                 theBase Base shape to be extruded.
3544                 theVec Direction of extrusion.
3545                 theH Prism dimension along theVec in forward direction.
3546                 theName Object name; when specified, this parameter is used
3547                         for result publication in the study. Otherwise, if automatic
3548                         publication is switched on, default value is used for result name.
3549
3550             Returns:
3551                 New GEOM.GEOM_Object, containing the created prism.
3552             """
3553             # Example: see GEOM_TestAll.py
3554             theH,Parameters = ParseParameters(theH)
3555             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3556             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3557             anObj.SetParameters(Parameters)
3558             self._autoPublish(anObj, theName, "prism")
3559             return anObj
3560
3561         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3562         #  @param theBase Base shape to be extruded.
3563         #  @param theDX, theDY, theDZ Directions of extrusion.
3564         #  @param theScaleFactor Use it to make prism with scaled second base.
3565         #                        Nagative value means not scaled second base.
3566         #  @param theName Object name; when specified, this parameter is used
3567         #         for result publication in the study. Otherwise, if automatic
3568         #         publication is switched on, default value is used for result name.
3569         #
3570         #  @return New GEOM.GEOM_Object, containing the created prism.
3571         #
3572         #  @ref tui_creation_prism "Example"
3573         @ManageTransactions("PrimOp")
3574         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3575             """
3576             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3577
3578             Parameters:
3579                 theBase Base shape to be extruded.
3580                 theDX, theDY, theDZ Directions of extrusion.
3581                 theScaleFactor Use it to make prism with scaled second base.
3582                                Nagative value means not scaled second base.
3583                 theName Object name; when specified, this parameter is used
3584                         for result publication in the study. Otherwise, if automatic
3585                         publication is switched on, default value is used for result name.
3586
3587             Returns:
3588                 New GEOM.GEOM_Object, containing the created prism.
3589             """
3590             # Example: see GEOM_TestAll.py
3591             anObj = None
3592             Parameters = ""
3593             if theScaleFactor > 0:
3594                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3595                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3596             else:
3597                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3598                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3599             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3600             anObj.SetParameters(Parameters)
3601             self._autoPublish(anObj, theName, "prism")
3602             return anObj
3603
3604         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3605         #  i.e. all the space, transfixed by the base shape during its translation
3606         #  along the vector on the given distance in 2 Ways (forward/backward).
3607         #  @param theBase Base shape to be extruded.
3608         #  @param theDX, theDY, theDZ Directions of extrusion.
3609         #  @param theName Object name; when specified, this parameter is used
3610         #         for result publication in the study. Otherwise, if automatic
3611         #         publication is switched on, default value is used for result name.
3612         #
3613         #  @return New GEOM.GEOM_Object, containing the created prism.
3614         #
3615         #  @ref tui_creation_prism "Example"
3616         @ManageTransactions("PrimOp")
3617         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3618             """
3619             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3620             i.e. all the space, transfixed by the base shape during its translation
3621             along the vector on the given distance in 2 Ways (forward/backward).
3622
3623             Parameters:
3624                 theBase Base shape to be extruded.
3625                 theDX, theDY, theDZ Directions of extrusion.
3626                 theName Object name; when specified, this parameter is used
3627                         for result publication in the study. Otherwise, if automatic
3628                         publication is switched on, default value is used for result name.
3629
3630             Returns:
3631                 New GEOM.GEOM_Object, containing the created prism.
3632             """
3633             # Example: see GEOM_TestAll.py
3634             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3635             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3636             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3637             anObj.SetParameters(Parameters)
3638             self._autoPublish(anObj, theName, "prism")
3639             return anObj
3640
3641         ## Create a shape by revolution of the base shape around the axis
3642         #  on the given angle, i.e. all the space, transfixed by the base
3643         #  shape during its rotation around the axis on the given angle.
3644         #  @param theBase Base shape to be rotated.
3645         #  @param theAxis Rotation axis.
3646         #  @param theAngle Rotation angle in radians.
3647         #  @param theName Object name; when specified, this parameter is used
3648         #         for result publication in the study. Otherwise, if automatic
3649         #         publication is switched on, default value is used for result name.
3650         #
3651         #  @return New GEOM.GEOM_Object, containing the created revolution.
3652         #
3653         #  @ref tui_creation_revolution "Example"
3654         @ManageTransactions("PrimOp")
3655         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3656             """
3657             Create a shape by revolution of the base shape around the axis
3658             on the given angle, i.e. all the space, transfixed by the base
3659             shape during its rotation around the axis on the given angle.
3660
3661             Parameters:
3662                 theBase Base shape to be rotated.
3663                 theAxis Rotation axis.
3664                 theAngle Rotation angle in radians.
3665                 theName Object name; when specified, this parameter is used
3666                         for result publication in the study. Otherwise, if automatic
3667                         publication is switched on, default value is used for result name.
3668
3669             Returns:
3670                 New GEOM.GEOM_Object, containing the created revolution.
3671             """
3672             # Example: see GEOM_TestAll.py
3673             theAngle,Parameters = ParseParameters(theAngle)
3674             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3675             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3676             anObj.SetParameters(Parameters)
3677             self._autoPublish(anObj, theName, "revolution")
3678             return anObj
3679
3680         ## Create a shape by revolution of the base shape around the axis
3681         #  on the given angle, i.e. all the space, transfixed by the base
3682         #  shape during its rotation around the axis on the given angle in
3683         #  both directions (forward/backward)
3684         #  @param theBase Base shape to be rotated.
3685         #  @param theAxis Rotation axis.
3686         #  @param theAngle Rotation angle in radians.
3687         #  @param theName Object name; when specified, this parameter is used
3688         #         for result publication in the study. Otherwise, if automatic
3689         #         publication is switched on, default value is used for result name.
3690         #
3691         #  @return New GEOM.GEOM_Object, containing the created revolution.
3692         #
3693         #  @ref tui_creation_revolution "Example"
3694         @ManageTransactions("PrimOp")
3695         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3696             """
3697             Create a shape by revolution of the base shape around the axis
3698             on the given angle, i.e. all the space, transfixed by the base
3699             shape during its rotation around the axis on the given angle in
3700             both directions (forward/backward).
3701
3702             Parameters:
3703                 theBase Base shape to be rotated.
3704                 theAxis Rotation axis.
3705                 theAngle Rotation angle in radians.
3706                 theName Object name; when specified, this parameter is used
3707                         for result publication in the study. Otherwise, if automatic
3708                         publication is switched on, default value is used for result name.
3709
3710             Returns:
3711                 New GEOM.GEOM_Object, containing the created revolution.
3712             """
3713             theAngle,Parameters = ParseParameters(theAngle)
3714             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3715             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3716             anObj.SetParameters(Parameters)
3717             self._autoPublish(anObj, theName, "revolution")
3718             return anObj
3719
3720         ## Create a filling from the given compound of contours.
3721         #  @param theShape the compound of contours
3722         #  @param theMinDeg a minimal degree of BSpline surface to create
3723         #  @param theMaxDeg a maximal degree of BSpline surface to create
3724         #  @param theTol2D a 2d tolerance to be reached
3725         #  @param theTol3D a 3d tolerance to be reached
3726         #  @param theNbIter a number of iteration of approximation algorithm
3727         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3728         #  @param isApprox if True, BSpline curves are generated in the process
3729         #                  of surface construction. By default it is False, that means
3730         #                  the surface is created using given curves. The usage of
3731         #                  Approximation makes the algorithm work slower, but allows
3732         #                  building the surface for rather complex cases.
3733         #  @param theName Object name; when specified, this parameter is used
3734         #         for result publication in the study. Otherwise, if automatic
3735         #         publication is switched on, default value is used for result name.
3736         #
3737         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3738         #
3739         #  @ref tui_creation_filling "Example"
3740         @ManageTransactions("PrimOp")
3741         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3742                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3743             """
3744             Create a filling from the given compound of contours.
3745
3746             Parameters:
3747                 theShape the compound of contours
3748                 theMinDeg a minimal degree of BSpline surface to create
3749                 theMaxDeg a maximal degree of BSpline surface to create
3750                 theTol2D a 2d tolerance to be reached
3751                 theTol3D a 3d tolerance to be reached
3752                 theNbIter a number of iteration of approximation algorithm
3753                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3754                 isApprox if True, BSpline curves are generated in the process
3755                          of surface construction. By default it is False, that means
3756                          the surface is created using given curves. The usage of
3757                          Approximation makes the algorithm work slower, but allows
3758                          building the surface for rather complex cases
3759                 theName Object name; when specified, this parameter is used
3760                         for result publication in the study. Otherwise, if automatic
3761                         publication is switched on, default value is used for result name.
3762
3763             Returns:
3764                 New GEOM.GEOM_Object, containing the created filling surface.
3765
3766             Example of usage:
3767                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3768             """
3769             # Example: see GEOM_TestAll.py
3770             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3771             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3772                                             theTol2D, theTol3D, theNbIter,
3773                                             theMethod, isApprox)
3774             RaiseIfFailed("MakeFilling", self.PrimOp)
3775             anObj.SetParameters(Parameters)
3776             self._autoPublish(anObj, theName, "filling")
3777             return anObj
3778
3779
3780         ## Create a filling from the given compound of contours.
3781         #  This method corresponds to MakeFilling with isApprox=True
3782         #  @param theShape the compound of contours
3783         #  @param theMinDeg a minimal degree of BSpline surface to create
3784         #  @param theMaxDeg a maximal degree of BSpline surface to create
3785         #  @param theTol3D a 3d tolerance to be reached
3786         #  @param theName Object name; when specified, this parameter is used
3787         #         for result publication in the study. Otherwise, if automatic
3788         #         publication is switched on, default value is used for result name.
3789         #
3790         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3791         #
3792         #  @ref tui_creation_filling "Example"
3793         @ManageTransactions("PrimOp")
3794         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3795             """
3796             Create a filling from the given compound of contours.
3797             This method corresponds to MakeFilling with isApprox=True
3798
3799             Parameters:
3800                 theShape the compound of contours
3801                 theMinDeg a minimal degree of BSpline surface to create
3802                 theMaxDeg a maximal degree of BSpline surface to create
3803                 theTol3D a 3d tolerance to be reached
3804                 theName Object name; when specified, this parameter is used
3805                         for result publication in the study. Otherwise, if automatic
3806                         publication is switched on, default value is used for result name.
3807
3808             Returns:
3809                 New GEOM.GEOM_Object, containing the created filling surface.
3810
3811             Example of usage:
3812                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3813             """
3814             # Example: see GEOM_TestAll.py
3815             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3816             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3817                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3818             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3819             anObj.SetParameters(Parameters)
3820             self._autoPublish(anObj, theName, "filling")
3821             return anObj
3822
3823         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3824         #  @param theSeqSections - set of specified sections.
3825         #  @param theModeSolid - mode defining building solid or shell
3826         #  @param thePreci - precision 3D used for smoothing
3827         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3828         #  @param theName Object name; when specified, this parameter is used
3829         #         for result publication in the study. Otherwise, if automatic
3830         #         publication is switched on, default value is used for result name.
3831         #
3832         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3833         #
3834         #  @ref swig_todo "Example"
3835         @ManageTransactions("PrimOp")
3836         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3837             """
3838             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3839
3840             Parameters:
3841                 theSeqSections - set of specified sections.
3842                 theModeSolid - mode defining building solid or shell
3843                 thePreci - precision 3D used for smoothing
3844                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3845                 theName Object name; when specified, this parameter is used
3846                         for result publication in the study. Otherwise, if automatic
3847                         publication is switched on, default value is used for result name.
3848
3849             Returns:
3850                 New GEOM.GEOM_Object, containing the created shell or solid.
3851             """
3852             # Example: see GEOM_TestAll.py
3853             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3854             RaiseIfFailed("MakeThruSections", self.PrimOp)
3855             self._autoPublish(anObj, theName, "filling")
3856             return anObj
3857
3858         ## Create a shape by extrusion of the base shape along
3859         #  the path shape. The path shape can be a wire or an edge.
3860         #  @param theBase Base shape to be extruded.
3861         #  @param thePath Path shape to extrude the base shape along it.
3862         #  @param theName Object name; when specified, this parameter is used
3863         #         for result publication in the study. Otherwise, if automatic
3864         #         publication is switched on, default value is used for result name.
3865         #
3866         #  @return New GEOM.GEOM_Object, containing the created pipe.
3867         #
3868         #  @ref tui_creation_pipe "Example"
3869         @ManageTransactions("PrimOp")
3870         def MakePipe(self, theBase, thePath, theName=None):
3871             """
3872             Create a shape by extrusion of the base shape along
3873             the path shape. The path shape can be a wire or an edge.
3874
3875             Parameters:
3876                 theBase Base shape to be extruded.
3877                 thePath Path shape to extrude the base shape along it.
3878                 theName Object name; when specified, this parameter is used
3879                         for result publication in the study. Otherwise, if automatic
3880                         publication is switched on, default value is used for result name.
3881
3882             Returns:
3883                 New GEOM.GEOM_Object, containing the created pipe.
3884             """
3885             # Example: see GEOM_TestAll.py
3886             anObj = self.PrimOp.MakePipe(theBase, thePath)
3887             RaiseIfFailed("MakePipe", self.PrimOp)
3888             self._autoPublish(anObj, theName, "pipe")
3889             return anObj
3890
3891         ## Create a shape by extrusion of the profile shape along
3892         #  the path shape. The path shape can be a wire or an edge.
3893         #  the several profiles can be specified in the several locations of path.
3894         #  @param theSeqBases - list of  Bases shape to be extruded.
3895         #  @param theLocations - list of locations on the path corresponding
3896         #                        specified list of the Bases shapes. Number of locations
3897         #                        should be equal to number of bases or list of locations can be empty.
3898         #  @param thePath - Path shape to extrude the base shape along it.
3899         #  @param theWithContact - the mode defining that the section is translated to be in
3900         #                          contact with the spine.
3901         #  @param theWithCorrection - defining that the section is rotated to be
3902         #                             orthogonal to the spine tangent in the correspondent point
3903         #  @param theName Object name; when specified, this parameter is used
3904         #         for result publication in the study. Otherwise, if automatic
3905         #         publication is switched on, default value is used for result name.
3906         #
3907         #  @return New GEOM.GEOM_Object, containing the created pipe.
3908         #
3909         #  @ref tui_creation_pipe_with_diff_sec "Example"
3910         @ManageTransactions("PrimOp")
3911         def MakePipeWithDifferentSections(self, theSeqBases,
3912                                           theLocations, thePath,
3913                                           theWithContact, theWithCorrection, theName=None):
3914             """
3915             Create a shape by extrusion of the profile shape along
3916             the path shape. The path shape can be a wire or an edge.
3917             the several profiles can be specified in the several locations of path.
3918
3919             Parameters:
3920                 theSeqBases - list of  Bases shape to be extruded.
3921                 theLocations - list of locations on the path corresponding
3922                                specified list of the Bases shapes. Number of locations
3923                                should be equal to number of bases or list of locations can be empty.
3924                 thePath - Path shape to extrude the base shape along it.
3925                 theWithContact - the mode defining that the section is translated to be in
3926                                  contact with the spine(0/1)
3927                 theWithCorrection - defining that the section is rotated to be
3928                                     orthogonal to the spine tangent in the correspondent point (0/1)
3929                 theName Object name; when specified, this parameter is used
3930                         for result publication in the study. Otherwise, if automatic
3931                         publication is switched on, default value is used for result name.
3932
3933             Returns:
3934                 New GEOM.GEOM_Object, containing the created pipe.
3935             """
3936             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3937                                                               theLocations, thePath,
3938                                                               theWithContact, theWithCorrection)
3939             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3940             self._autoPublish(anObj, theName, "pipe")
3941             return anObj
3942
3943         ## Create a shape by extrusion of the profile shape along
3944         #  the path shape. The path shape can be a wire or a edge.
3945         #  the several profiles can be specified in the several locations of path.
3946         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3947         #                       shell or face. If number of faces in neighbour sections
3948         #                       aren't coincided result solid between such sections will
3949         #                       be created using external boundaries of this shells.
3950         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3951         #                          This list is used for searching correspondences between
3952         #                          faces in the sections. Size of this list must be equal
3953         #                          to size of list of base shapes.
3954         #  @param theLocations - list of locations on the path corresponding
3955         #                        specified list of the Bases shapes. Number of locations
3956         #                        should be equal to number of bases. First and last
3957         #                        locations must be coincided with first and last vertexes
3958         #                        of path correspondingly.
3959         #  @param thePath - Path shape to extrude the base shape along it.
3960         #  @param theWithContact - the mode defining that the section is translated to be in
3961         #                          contact with the spine.
3962         #  @param theWithCorrection - defining that the section is rotated to be
3963         #                             orthogonal to the spine tangent in the correspondent point
3964         #  @param theName Object name; when specified, this parameter is used
3965         #         for result publication in the study. Otherwise, if automatic
3966         #         publication is switched on, default value is used for result name.
3967         #
3968         #  @return New GEOM.GEOM_Object, containing the created solids.
3969         #
3970         #  @ref tui_creation_pipe_with_shell_sec "Example"
3971         @ManageTransactions("PrimOp")
3972         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3973                                       theLocations, thePath,
3974                                       theWithContact, theWithCorrection, theName=None):
3975             """
3976             Create a shape by extrusion of the profile shape along
3977             the path shape. The path shape can be a wire or a edge.
3978             the several profiles can be specified in the several locations of path.
3979
3980             Parameters:
3981                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3982                               shell or face. If number of faces in neighbour sections
3983                               aren't coincided result solid between such sections will
3984                               be created using external boundaries of this shells.
3985                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3986                                  This list is used for searching correspondences between
3987                                  faces in the sections. Size of this list must be equal
3988                                  to size of list of base shapes.
3989                 theLocations - list of locations on the path corresponding
3990                                specified list of the Bases shapes. Number of locations
3991                                should be equal to number of bases. First and last
3992                                locations must be coincided with first and last vertexes
3993                                of path correspondingly.
3994                 thePath - Path shape to extrude the base shape along it.
3995                 theWithContact - the mode defining that the section is translated to be in
3996                                  contact with the spine (0/1)
3997                 theWithCorrection - defining that the section is rotated to be
3998                                     orthogonal to the spine tangent in the correspondent point (0/1)
3999                 theName Object name; when specified, this parameter is used
4000                         for result publication in the study. Otherwise, if automatic
4001                         publication is switched on, default value is used for result name.
4002
4003             Returns:
4004                 New GEOM.GEOM_Object, containing the created solids.
4005             """
4006             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4007                                                           theLocations, thePath,
4008                                                           theWithContact, theWithCorrection)
4009             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4010             self._autoPublish(anObj, theName, "pipe")
4011             return anObj
4012
4013         ## Create a shape by extrusion of the profile shape along
4014         #  the path shape. This function is used only for debug pipe
4015         #  functionality - it is a version of function MakePipeWithShellSections()
4016         #  which give a possibility to recieve information about
4017         #  creating pipe between each pair of sections step by step.
4018         @ManageTransactions("PrimOp")
4019         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4020                                              theLocations, thePath,
4021                                              theWithContact, theWithCorrection, theName=None):
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 previous function
4026             geompy.MakePipeWithShellSections() which give a possibility to
4027             recieve information about creating pipe between each pair of
4028             sections step by step.
4029             """
4030             res = []
4031             nbsect = len(theSeqBases)
4032             nbsubsect = len(theSeqSubBases)
4033             #print "nbsect = ",nbsect
4034             for i in range(1,nbsect):
4035                 #print "  i = ",i
4036                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4037                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4038                 tmpSeqSubBases = []
4039                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4040                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4041                                                               tmpLocations, thePath,
4042                                                               theWithContact, theWithCorrection)
4043                 if self.PrimOp.IsDone() == 0:
4044                     print "Problems with pipe creation between ",i," and ",i+1," sections"
4045                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4046                     break
4047                 else:
4048                     print "Pipe between ",i," and ",i+1," sections is OK"
4049                     res.append(anObj)
4050                     pass
4051                 pass
4052
4053             resc = self.MakeCompound(res)
4054             #resc = self.MakeSewing(res, 0.001)
4055             #print "resc: ",resc
4056             self._autoPublish(resc, theName, "pipe")
4057             return resc
4058
4059         ## Create solids between given sections
4060         #  @param theSeqBases - list of sections (shell or face).
4061         #  @param theLocations - list of corresponding vertexes
4062         #  @param theName Object name; when specified, this parameter is used
4063         #         for result publication in the study. Otherwise, if automatic
4064         #         publication is switched on, default value is used for result name.
4065         #
4066         #  @return New GEOM.GEOM_Object, containing the created solids.
4067         #
4068         #  @ref tui_creation_pipe_without_path "Example"
4069         @ManageTransactions("PrimOp")
4070         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
4071             """
4072             Create solids between given sections
4073
4074             Parameters:
4075                 theSeqBases - list of sections (shell or face).
4076                 theLocations - list of corresponding vertexes
4077                 theName Object name; when specified, this parameter is used
4078                         for result publication in the study. Otherwise, if automatic
4079                         publication is switched on, default value is used for result name.
4080
4081             Returns:
4082                 New GEOM.GEOM_Object, containing the created solids.
4083             """
4084             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
4085             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4086             self._autoPublish(anObj, theName, "pipe")
4087             return anObj
4088
4089         ## Create a shape by extrusion of the base shape along
4090         #  the path shape with constant bi-normal direction along the given vector.
4091         #  The path shape can be a wire or an edge.
4092         #  @param theBase Base shape to be extruded.
4093         #  @param thePath Path shape to extrude the base shape along it.
4094         #  @param theVec Vector defines a constant binormal direction to keep the
4095         #                same angle beetween the direction and the sections
4096         #                along the sweep surface.
4097         #  @param theName Object name; when specified, this parameter is used
4098         #         for result publication in the study. Otherwise, if automatic
4099         #         publication is switched on, default value is used for result name.
4100         #
4101         #  @return New GEOM.GEOM_Object, containing the created pipe.
4102         #
4103         #  @ref tui_creation_pipe "Example"
4104         @ManageTransactions("PrimOp")
4105         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
4106             """
4107             Create a shape by extrusion of the base shape along
4108             the path shape with constant bi-normal direction along the given vector.
4109             The path shape can be a wire or an edge.
4110
4111             Parameters:
4112                 theBase Base shape to be extruded.
4113                 thePath Path shape to extrude the base shape along it.
4114                 theVec Vector defines a constant binormal direction to keep the
4115                        same angle beetween the direction and the sections
4116                        along the sweep surface.
4117                 theName Object name; when specified, this parameter is used
4118                         for result publication in the study. Otherwise, if automatic
4119                         publication is switched on, default value is used for result name.
4120
4121             Returns:
4122                 New GEOM.GEOM_Object, containing the created pipe.
4123             """
4124             # Example: see GEOM_TestAll.py
4125             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
4126             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4127             self._autoPublish(anObj, theName, "pipe")
4128             return anObj
4129
4130         ## Makes a thick solid from a face or a shell
4131         #  @param theShape Face or Shell to be thicken
4132         #  @param theThickness Thickness of the resulting solid
4133         #  @param theName Object name; when specified, this parameter is used
4134         #         for result publication in the study. Otherwise, if automatic
4135         #         publication is switched on, default value is used for result name.
4136         #
4137         #  @return New GEOM.GEOM_Object, containing the created solid
4138         #
4139         @ManageTransactions("PrimOp")
4140         def MakeThickSolid(self, theShape, theThickness, theName=None):
4141             """
4142             Make a thick solid from a face or a shell
4143
4144             Parameters:
4145                  theShape Face or Shell to be thicken
4146                  theThickness Thickness of the resulting solid
4147                  theName Object name; when specified, this parameter is used
4148                  for result publication in the study. Otherwise, if automatic
4149                  publication is switched on, default value is used for result name.
4150
4151             Returns:
4152                 New GEOM.GEOM_Object, containing the created solid
4153             """
4154             # Example: see GEOM_TestAll.py
4155             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
4156             RaiseIfFailed("MakeThickening", self.PrimOp)
4157             self._autoPublish(anObj, theName, "pipe")
4158             return anObj
4159
4160
4161         ## Modifies a face or a shell to make it a thick solid
4162         #  @param theShape Face or Shell to be thicken
4163         #  @param theThickness Thickness of the resulting solid
4164         #
4165         #  @return The modified shape
4166         #
4167         @ManageTransactions("PrimOp")
4168         def Thicken(self, theShape, theThickness):
4169             """
4170             Modifies a face or a shell to make it a thick solid
4171
4172             Parameters:
4173                 theBase Base shape to be extruded.
4174                 thePath Path shape to extrude the base shape along it.
4175                 theName Object name; when specified, this parameter is used
4176                         for result publication in the study. Otherwise, if automatic
4177                         publication is switched on, default value is used for result name.
4178
4179             Returns:
4180                 The modified shape
4181             """
4182             # Example: see GEOM_TestAll.py
4183             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
4184             RaiseIfFailed("MakeThickening", self.PrimOp)
4185             return anObj
4186
4187         ## Build a middle path of a pipe-like shape.
4188         #  The path shape can be a wire or an edge.
4189         #  @param theShape It can be closed or unclosed pipe-like shell
4190         #                  or a pipe-like solid.
4191         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4192         #                            should be wires or faces of theShape.
4193         #  @param theName Object name; when specified, this parameter is used
4194         #         for result publication in the study. Otherwise, if automatic
4195         #         publication is switched on, default value is used for result name.
4196         #
4197         #  @note It is not assumed that exact or approximate copy of theShape
4198         #        can be obtained by applying existing Pipe operation on the
4199         #        resulting "Path" wire taking theBase1 as the base - it is not
4200         #        always possible; though in some particular cases it might work
4201         #        it is not guaranteed. Thus, RestorePath function should not be
4202         #        considered as an exact reverse operation of the Pipe.
4203         #
4204         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4205         #                                source pipe's "path".
4206         #
4207         #  @ref tui_creation_pipe_path "Example"
4208         @ManageTransactions("PrimOp")
4209         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4210             """
4211             Build a middle path of a pipe-like shape.
4212             The path shape can be a wire or an edge.
4213
4214             Parameters:
4215                 theShape It can be closed or unclosed pipe-like shell
4216                          or a pipe-like solid.
4217                 theBase1, theBase2 Two bases of the supposed pipe. This
4218                                    should be wires or faces of theShape.
4219                 theName Object name; when specified, this parameter is used
4220                         for result publication in the study. Otherwise, if automatic
4221                         publication is switched on, default value is used for result name.
4222
4223             Returns:
4224                 New GEOM_Object, containing an edge or wire that represent
4225                                  source pipe's path.
4226             """
4227             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4228             RaiseIfFailed("RestorePath", self.PrimOp)
4229             self._autoPublish(anObj, theName, "path")
4230             return anObj
4231
4232         ## Build a middle path of a pipe-like shape.
4233         #  The path shape can be a wire or an edge.
4234         #  @param theShape It can be closed or unclosed pipe-like shell
4235         #                  or a pipe-like solid.
4236         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4237         #                                should be lists of edges of theShape.
4238         #  @param theName Object name; when specified, this parameter is used
4239         #         for result publication in the study. Otherwise, if automatic
4240         #         publication is switched on, default value is used for result name.
4241         #
4242         #  @note It is not assumed that exact or approximate copy of theShape
4243         #        can be obtained by applying existing Pipe operation on the
4244         #        resulting "Path" wire taking theBase1 as the base - it is not
4245         #        always possible; though in some particular cases it might work
4246         #        it is not guaranteed. Thus, RestorePath function should not be
4247         #        considered as an exact reverse operation of the Pipe.
4248         #
4249         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4250         #                                source pipe's "path".
4251         #
4252         #  @ref tui_creation_pipe_path "Example"
4253         @ManageTransactions("PrimOp")
4254         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4255             """
4256             Build a middle path of a pipe-like shape.
4257             The path shape can be a wire or an edge.
4258
4259             Parameters:
4260                 theShape It can be closed or unclosed pipe-like shell
4261                          or a pipe-like solid.
4262                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4263                                        should be lists of edges of theShape.
4264                 theName Object name; when specified, this parameter is used
4265                         for result publication in the study. Otherwise, if automatic
4266                         publication is switched on, default value is used for result name.
4267
4268             Returns:
4269                 New GEOM_Object, containing an edge or wire that represent
4270                                  source pipe's path.
4271             """
4272             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4273             RaiseIfFailed("RestorePath", self.PrimOp)
4274             self._autoPublish(anObj, theName, "path")
4275             return anObj
4276
4277         # end of l3_complex
4278         ## @}
4279
4280         ## @addtogroup l3_advanced
4281         ## @{
4282
4283         ## Create a linear edge with specified ends.
4284         #  @param thePnt1 Point for the first end of edge.
4285         #  @param thePnt2 Point for the second end of edge.
4286         #  @param theName Object name; when specified, this parameter is used
4287         #         for result publication in the study. Otherwise, if automatic
4288         #         publication is switched on, default value is used for result name.
4289         #
4290         #  @return New GEOM.GEOM_Object, containing the created edge.
4291         #
4292         #  @ref tui_creation_edge "Example"
4293         @ManageTransactions("ShapesOp")
4294         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4295             """
4296             Create a linear edge with specified ends.
4297
4298             Parameters:
4299                 thePnt1 Point for the first end of edge.
4300                 thePnt2 Point for the second end of edge.
4301                 theName Object name; when specified, this parameter is used
4302                         for result publication in the study. Otherwise, if automatic
4303                         publication is switched on, default value is used for result name.
4304
4305             Returns:
4306                 New GEOM.GEOM_Object, containing the created edge.
4307             """
4308             # Example: see GEOM_TestAll.py
4309             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4310             RaiseIfFailed("MakeEdge", self.ShapesOp)
4311             self._autoPublish(anObj, theName, "edge")
4312             return anObj
4313
4314         ## Create a new edge, corresponding to the given length on the given curve.
4315         #  @param theRefCurve The referenced curve (edge).
4316         #  @param theLength Length on the referenced curve. It can be negative.
4317         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4318         #                       at the end of \a theRefCurve, close to the selected point.
4319         #                       If None, start from the first point of \a theRefCurve.
4320         #  @param theName Object name; when specified, this parameter is used
4321         #         for result publication in the study. Otherwise, if automatic
4322         #         publication is switched on, default value is used for result name.
4323         #
4324         #  @return New GEOM.GEOM_Object, containing the created edge.
4325         #
4326         #  @ref tui_creation_edge "Example"
4327         @ManageTransactions("ShapesOp")
4328         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4329             """
4330             Create a new edge, corresponding to the given length on the given curve.
4331
4332             Parameters:
4333                 theRefCurve The referenced curve (edge).
4334                 theLength Length on the referenced curve. It can be negative.
4335                 theStartPoint Any point can be selected for it, the new edge will begin
4336                               at the end of theRefCurve, close to the selected point.
4337                               If None, start from the first point of theRefCurve.
4338                 theName Object name; when specified, this parameter is used
4339                         for result publication in the study. Otherwise, if automatic
4340                         publication is switched on, default value is used for result name.
4341
4342             Returns:
4343                 New GEOM.GEOM_Object, containing the created edge.
4344             """
4345             # Example: see GEOM_TestAll.py
4346             theLength, Parameters = ParseParameters(theLength)
4347             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4348             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4349             anObj.SetParameters(Parameters)
4350             self._autoPublish(anObj, theName, "edge")
4351             return anObj
4352
4353         ## Create an edge from specified wire.
4354         #  @param theWire source Wire
4355         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4356         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4357         #  @param theName Object name; when specified, this parameter is used
4358         #         for result publication in the study. Otherwise, if automatic
4359         #         publication is switched on, default value is used for result name.
4360         #
4361         #  @return New GEOM.GEOM_Object, containing the created edge.
4362         #
4363         #  @ref tui_creation_edge "Example"
4364         @ManageTransactions("ShapesOp")
4365         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4366             """
4367             Create an edge from specified wire.
4368
4369             Parameters:
4370                 theWire source Wire
4371                 theLinearTolerance linear tolerance value (default = 1e-07)
4372                 theAngularTolerance angular tolerance value (default = 1e-12)
4373                 theName Object name; when specified, this parameter is used
4374                         for result publication in the study. Otherwise, if automatic
4375                         publication is switched on, default value is used for result name.
4376
4377             Returns:
4378                 New GEOM.GEOM_Object, containing the created edge.
4379             """
4380             # Example: see GEOM_TestAll.py
4381             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4382             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4383             self._autoPublish(anObj, theName, "edge")
4384             return anObj
4385
4386         ## Create a wire from the set of edges and wires.
4387         #  @param theEdgesAndWires List of edges and/or wires.
4388         #  @param theTolerance Maximum distance between vertices, that will be merged.
4389         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4390         #  @param theName Object name; when specified, this parameter is used
4391         #         for result publication in the study. Otherwise, if automatic
4392         #         publication is switched on, default value is used for result name.
4393         #
4394         #  @return New GEOM.GEOM_Object, containing the created wire.
4395         #
4396         #  @ref tui_creation_wire "Example"
4397         @ManageTransactions("ShapesOp")
4398         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4399             """
4400             Create a wire from the set of edges and wires.
4401
4402             Parameters:
4403                 theEdgesAndWires List of edges and/or wires.
4404                 theTolerance Maximum distance between vertices, that will be merged.
4405                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4406                 theName Object name; when specified, this parameter is used
4407                         for result publication in the study. Otherwise, if automatic
4408                         publication is switched on, default value is used for result name.
4409
4410             Returns:
4411                 New GEOM.GEOM_Object, containing the created wire.
4412             """
4413             # Example: see GEOM_TestAll.py
4414             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4415             RaiseIfFailed("MakeWire", self.ShapesOp)
4416             self._autoPublish(anObj, theName, "wire")
4417             return anObj
4418
4419         ## Create a face on the given wire.
4420         #  @param theWire closed Wire or Edge to build the face on.
4421         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4422         #                        If the tolerance of the obtained planar face is less
4423         #                        than 1e-06, this face will be returned, otherwise the
4424         #                        algorithm tries to build any suitable face on the given
4425         #                        wire and prints a warning message.
4426         #  @param theName Object name; when specified, this parameter is used
4427         #         for result publication in the study. Otherwise, if automatic
4428         #         publication is switched on, default value is used for result name.
4429         #
4430         #  @return New GEOM.GEOM_Object, containing the created face.
4431         #
4432         #  @ref tui_creation_face "Example"
4433         @ManageTransactions("ShapesOp")
4434         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4435             """
4436             Create a face on the given wire.
4437
4438             Parameters:
4439                 theWire closed Wire or Edge to build the face on.
4440                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4441                                If the tolerance of the obtained planar face is less
4442                                than 1e-06, this face will be returned, otherwise the
4443                                algorithm tries to build any suitable face on the given
4444                                wire and prints a warning message.
4445                 theName Object name; when specified, this parameter is used
4446                         for result publication in the study. Otherwise, if automatic
4447                         publication is switched on, default value is used for result name.
4448
4449             Returns:
4450                 New GEOM.GEOM_Object, containing the created face.
4451             """
4452             # Example: see GEOM_TestAll.py
4453             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4454             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4455                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4456             else:
4457                 RaiseIfFailed("MakeFace", self.ShapesOp)
4458             self._autoPublish(anObj, theName, "face")
4459             return anObj
4460
4461         ## Create a face on the given wires set.
4462         #  @param theWires List of closed wires or edges to build the face on.
4463         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4464         #                        If the tolerance of the obtained planar face is less
4465         #                        than 1e-06, this face will be returned, otherwise the
4466         #                        algorithm tries to build any suitable face on the given
4467         #                        wire and prints a warning message.
4468         #  @param theName Object name; when specified, this parameter is used
4469         #         for result publication in the study. Otherwise, if automatic
4470         #         publication is switched on, default value is used for result name.
4471         #
4472         #  @return New GEOM.GEOM_Object, containing the created face.
4473         #
4474         #  @ref tui_creation_face "Example"
4475         @ManageTransactions("ShapesOp")
4476         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4477             """
4478             Create a face on the given wires set.
4479
4480             Parameters:
4481                 theWires List of closed wires or edges to build the face on.
4482                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4483                                If the tolerance of the obtained planar face is less
4484                                than 1e-06, this face will be returned, otherwise the
4485                                algorithm tries to build any suitable face on the given
4486                                wire and prints a warning message.
4487                 theName Object name; when specified, this parameter is used
4488                         for result publication in the study. Otherwise, if automatic
4489                         publication is switched on, default value is used for result name.
4490
4491             Returns:
4492                 New GEOM.GEOM_Object, containing the created face.
4493             """
4494             # Example: see GEOM_TestAll.py
4495             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4496             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4497                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4498             else:
4499                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4500             self._autoPublish(anObj, theName, "face")
4501             return anObj
4502
4503         ## See MakeFaceWires() method for details.
4504         #
4505         #  @ref tui_creation_face "Example 1"
4506         #  \n @ref swig_MakeFaces  "Example 2"
4507         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4508             """
4509             See geompy.MakeFaceWires() method for details.
4510             """
4511             # Example: see GEOM_TestOthers.py
4512             # note: auto-publishing is done in self.MakeFaceWires()
4513             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4514             return anObj
4515
4516         ## Create a shell from the set of faces and shells.
4517         #  @param theFacesAndShells List of faces and/or shells.
4518         #  @param theName Object name; when specified, this parameter is used
4519         #         for result publication in the study. Otherwise, if automatic
4520         #         publication is switched on, default value is used for result name.
4521         #
4522         #  @return New GEOM.GEOM_Object, containing the created shell.
4523         #
4524         #  @ref tui_creation_shell "Example"
4525         @ManageTransactions("ShapesOp")
4526         def MakeShell(self, theFacesAndShells, theName=None):
4527             """
4528             Create a shell from the set of faces and shells.
4529
4530             Parameters:
4531                 theFacesAndShells List of faces and/or shells.
4532                 theName Object name; when specified, this parameter is used
4533                         for result publication in the study. Otherwise, if automatic
4534                         publication is switched on, default value is used for result name.
4535
4536             Returns:
4537                 New GEOM.GEOM_Object, containing the created shell.
4538             """
4539             # Example: see GEOM_TestAll.py
4540             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4541             RaiseIfFailed("MakeShell", self.ShapesOp)
4542             self._autoPublish(anObj, theName, "shell")
4543             return anObj
4544
4545         ## Create a solid, bounded by the given shells.
4546         #  @param theShells Sequence of bounding shells.
4547         #  @param theName Object name; when specified, this parameter is used
4548         #         for result publication in the study. Otherwise, if automatic
4549         #         publication is switched on, default value is used for result name.
4550         #
4551         #  @return New GEOM.GEOM_Object, containing the created solid.
4552         #
4553         #  @ref tui_creation_solid "Example"
4554         @ManageTransactions("ShapesOp")
4555         def MakeSolid(self, theShells, theName=None):
4556             """
4557             Create a solid, bounded by the given shells.
4558
4559             Parameters:
4560                 theShells Sequence of bounding shells.
4561                 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             Returns:
4566                 New GEOM.GEOM_Object, containing the created solid.
4567             """
4568             # Example: see GEOM_TestAll.py
4569             if len(theShells) == 1:
4570                 descr = self._IsGoodForSolid(theShells[0])
4571                 #if len(descr) > 0:
4572                 #    raise RuntimeError, "MakeSolidShells : " + descr
4573                 if descr == "WRN_SHAPE_UNCLOSED":
4574                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4575             anObj = self.ShapesOp.MakeSolidShells(theShells)
4576             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4577             self._autoPublish(anObj, theName, "solid")
4578             return anObj
4579
4580         ## Create a compound of the given shapes.
4581         #  @param theShapes List of shapes to put in compound.
4582         #  @param theName Object name; when specified, this parameter is used
4583         #         for result publication in the study. Otherwise, if automatic
4584         #         publication is switched on, default value is used for result name.
4585         #
4586         #  @return New GEOM.GEOM_Object, containing the created compound.
4587         #
4588         #  @ref tui_creation_compound "Example"
4589         @ManageTransactions("ShapesOp")
4590         def MakeCompound(self, theShapes, theName=None):
4591             """
4592             Create a compound of the given shapes.
4593
4594             Parameters:
4595                 theShapes List of shapes to put in compound.
4596                 theName Object name; when specified, this parameter is used
4597                         for result publication in the study. Otherwise, if automatic
4598                         publication is switched on, default value is used for result name.
4599
4600             Returns:
4601                 New GEOM.GEOM_Object, containing the created compound.
4602             """
4603             # Example: see GEOM_TestAll.py
4604             anObj = self.ShapesOp.MakeCompound(theShapes)
4605             RaiseIfFailed("MakeCompound", self.ShapesOp)
4606             self._autoPublish(anObj, theName, "compound")
4607             return anObj
4608
4609         # end of l3_advanced
4610         ## @}
4611
4612         ## @addtogroup l2_measure
4613         ## @{
4614
4615         ## Gives quantity of faces in the given shape.
4616         #  @param theShape Shape to count faces of.
4617         #  @return Quantity of faces.
4618         #
4619         #  @ref swig_NumberOf "Example"
4620         @ManageTransactions("ShapesOp")
4621         def NumberOfFaces(self, theShape):
4622             """
4623             Gives quantity of faces in the given shape.
4624
4625             Parameters:
4626                 theShape Shape to count faces of.
4627
4628             Returns:
4629                 Quantity of faces.
4630             """
4631             # Example: see GEOM_TestOthers.py
4632             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4633             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4634             return nb_faces
4635
4636         ## Gives quantity of edges in the given shape.
4637         #  @param theShape Shape to count edges of.
4638         #  @return Quantity of edges.
4639         #
4640         #  @ref swig_NumberOf "Example"
4641         @ManageTransactions("ShapesOp")
4642         def NumberOfEdges(self, theShape):
4643             """
4644             Gives quantity of edges in the given shape.
4645
4646             Parameters:
4647                 theShape Shape to count edges of.
4648
4649             Returns:
4650                 Quantity of edges.
4651             """
4652             # Example: see GEOM_TestOthers.py
4653             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4654             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4655             return nb_edges
4656
4657         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4658         #  @param theShape Shape to count sub-shapes of.
4659         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4660         #  @return Quantity of sub-shapes of given type.
4661         #
4662         #  @ref swig_NumberOf "Example"
4663         @ManageTransactions("ShapesOp")
4664         def NumberOfSubShapes(self, theShape, theShapeType):
4665             """
4666             Gives quantity of sub-shapes of type theShapeType in the given shape.
4667
4668             Parameters:
4669                 theShape Shape to count sub-shapes of.
4670                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4671
4672             Returns:
4673                 Quantity of sub-shapes of given type.
4674             """
4675             # Example: see GEOM_TestOthers.py
4676             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4677             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4678             return nb_ss
4679
4680         ## Gives quantity of solids in the given shape.
4681         #  @param theShape Shape to count solids in.
4682         #  @return Quantity of solids.
4683         #
4684         #  @ref swig_NumberOf "Example"
4685         @ManageTransactions("ShapesOp")
4686         def NumberOfSolids(self, theShape):
4687             """
4688             Gives quantity of solids in the given shape.
4689
4690             Parameters:
4691                 theShape Shape to count solids in.
4692
4693             Returns:
4694                 Quantity of solids.
4695             """
4696             # Example: see GEOM_TestOthers.py
4697             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4698             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4699             return nb_solids
4700
4701         # end of l2_measure
4702         ## @}
4703
4704         ## @addtogroup l3_healing
4705         ## @{
4706
4707         ## Reverses an orientation the given shape.
4708         #  @param theShape Shape to be reversed.
4709         #  @param theName Object name; when specified, this parameter is used
4710         #         for result publication in the study. Otherwise, if automatic
4711         #         publication is switched on, default value is used for result name.
4712         #
4713         #  @return The reversed copy of theShape.
4714         #
4715         #  @ref swig_ChangeOrientation "Example"
4716         @ManageTransactions("ShapesOp")
4717         def ChangeOrientation(self, theShape, theName=None):
4718             """
4719             Reverses an orientation the given shape.
4720
4721             Parameters:
4722                 theShape Shape to be reversed.
4723                 theName Object name; when specified, this parameter is used
4724                         for result publication in the study. Otherwise, if automatic
4725                         publication is switched on, default value is used for result name.
4726
4727             Returns:
4728                 The reversed copy of theShape.
4729             """
4730             # Example: see GEOM_TestAll.py
4731             anObj = self.ShapesOp.ChangeOrientation(theShape)
4732             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4733             self._autoPublish(anObj, theName, "reversed")
4734             return anObj
4735
4736         ## See ChangeOrientation() method for details.
4737         #
4738         #  @ref swig_OrientationChange "Example"
4739         def OrientationChange(self, theShape, theName=None):
4740             """
4741             See geompy.ChangeOrientation method for details.
4742             """
4743             # Example: see GEOM_TestOthers.py
4744             # note: auto-publishing is done in self.ChangeOrientation()
4745             anObj = self.ChangeOrientation(theShape, theName)
4746             return anObj
4747
4748         # end of l3_healing
4749         ## @}
4750
4751         ## @addtogroup l4_obtain
4752         ## @{
4753
4754         ## Retrieve all free faces from the given shape.
4755         #  Free face is a face, which is not shared between two shells of the shape.
4756         #  @param theShape Shape to find free faces in.
4757         #  @return List of IDs of all free faces, contained in theShape.
4758         #
4759         #  @ref tui_measurement_tools_page "Example"
4760         @ManageTransactions("ShapesOp")
4761         def GetFreeFacesIDs(self,theShape):
4762             """
4763             Retrieve all free faces from the given shape.
4764             Free face is a face, which is not shared between two shells of the shape.
4765
4766             Parameters:
4767                 theShape Shape to find free faces in.
4768
4769             Returns:
4770                 List of IDs of all free faces, contained in theShape.
4771             """
4772             # Example: see GEOM_TestOthers.py
4773             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4774             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4775             return anIDs
4776
4777         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4778         #  @param theShape1 Shape to find sub-shapes in.
4779         #  @param theShape2 Shape to find shared sub-shapes with.
4780         #  @param theShapeType Type of sub-shapes to be retrieved.
4781         #  @param theName Object name; when specified, this parameter is used
4782         #         for result publication in the study. Otherwise, if automatic
4783         #         publication is switched on, default value is used for result name.
4784         #
4785         #  @return List of sub-shapes of theShape1, shared with theShape2.
4786         #
4787         #  @ref swig_GetSharedShapes "Example"
4788         @ManageTransactions("ShapesOp")
4789         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4790             """
4791             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4792
4793             Parameters:
4794                 theShape1 Shape to find sub-shapes in.
4795                 theShape2 Shape to find shared sub-shapes with.
4796                 theShapeType Type of sub-shapes to be retrieved.
4797                 theName Object name; when specified, this parameter is used
4798                         for result publication in the study. Otherwise, if automatic
4799                         publication is switched on, default value is used for result name.
4800
4801             Returns:
4802                 List of sub-shapes of theShape1, shared with theShape2.
4803             """
4804             # Example: see GEOM_TestOthers.py
4805             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4806             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4807             self._autoPublish(aList, theName, "shared")
4808             return aList
4809
4810         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4811         #  @param theShapes Shapes to find common sub-shapes of.
4812         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4813         #  @param theName Object name; when specified, this parameter is used
4814         #         for result publication in the study. Otherwise, if automatic
4815         #         publication is switched on, default value is used for result name.
4816         #
4817         #  @return List of objects, that are sub-shapes of all given shapes.
4818         #
4819         #  @ref swig_GetSharedShapes "Example"
4820         @ManageTransactions("ShapesOp")
4821         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4822             """
4823             Get all sub-shapes, shared by all shapes in the list theShapes.
4824
4825             Parameters:
4826                 theShapes Shapes to find common sub-shapes of.
4827                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4828                 theName Object name; when specified, this parameter is used
4829                         for result publication in the study. Otherwise, if automatic
4830                         publication is switched on, default value is used for result name.
4831
4832             Returns:
4833                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4834             """
4835             # Example: see GEOM_TestOthers.py
4836             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4837             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4838             self._autoPublish(aList, theName, "shared")
4839             return aList
4840
4841         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4842         #  situated relatively the specified plane by the certain way,
4843         #  defined through <VAR>theState</VAR> parameter.
4844         #  @param theShape Shape to find sub-shapes of.
4845         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4846         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4847         #                direction and location of the plane to find shapes on.
4848         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4849         #  @param theName Object name; when specified, this parameter is used
4850         #         for result publication in the study. Otherwise, if automatic
4851         #         publication is switched on, default value is used for result name.
4852         #
4853         #  @return List of all found sub-shapes.
4854         #
4855         #  @ref swig_GetShapesOnPlane "Example"
4856         @ManageTransactions("ShapesOp")
4857         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4858             """
4859             Find in theShape all sub-shapes of type theShapeType,
4860             situated relatively the specified plane by the certain way,
4861             defined through theState parameter.
4862
4863             Parameters:
4864                 theShape Shape to find sub-shapes of.
4865                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4866                 theAx1 Vector (or line, or linear edge), specifying normal
4867                        direction and location of the plane to find shapes on.
4868                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4869                 theName Object name; when specified, this parameter is used
4870                         for result publication in the study. Otherwise, if automatic
4871                         publication is switched on, default value is used for result name.
4872
4873             Returns:
4874                 List of all found sub-shapes.
4875             """
4876             # Example: see GEOM_TestOthers.py
4877             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4878             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4879             self._autoPublish(aList, theName, "shapeOnPlane")
4880             return aList
4881
4882         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4883         #  situated relatively the specified plane by the certain way,
4884         #  defined through <VAR>theState</VAR> parameter.
4885         #  @param theShape Shape to find sub-shapes of.
4886         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4887         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4888         #                direction and location of the plane to find shapes on.
4889         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4890         #
4891         #  @return List of all found sub-shapes indices.
4892         #
4893         #  @ref swig_GetShapesOnPlaneIDs "Example"
4894         @ManageTransactions("ShapesOp")
4895         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4896             """
4897             Find in theShape all sub-shapes of type theShapeType,
4898             situated relatively the specified plane by the certain way,
4899             defined through theState parameter.
4900
4901             Parameters:
4902                 theShape Shape to find sub-shapes of.
4903                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4904                 theAx1 Vector (or line, or linear edge), specifying normal
4905                        direction and location of the plane to find shapes on.
4906                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4907
4908             Returns:
4909                 List of all found sub-shapes indices.
4910             """
4911             # Example: see GEOM_TestOthers.py
4912             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4913             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4914             return aList
4915
4916         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4917         #  situated relatively the specified plane by the certain way,
4918         #  defined through <VAR>theState</VAR> parameter.
4919         #  @param theShape Shape to find sub-shapes of.
4920         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4921         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4922         #                direction of the plane to find shapes on.
4923         #  @param thePnt Point specifying location of the plane to find shapes on.
4924         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4925         #  @param theName Object name; when specified, this parameter is used
4926         #         for result publication in the study. Otherwise, if automatic
4927         #         publication is switched on, default value is used for result name.
4928         #
4929         #  @return List of all found sub-shapes.
4930         #
4931         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4932         @ManageTransactions("ShapesOp")
4933         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4934             """
4935             Find in theShape all sub-shapes of type theShapeType,
4936             situated relatively the specified plane by the certain way,
4937             defined through theState parameter.
4938
4939             Parameters:
4940                 theShape Shape to find sub-shapes of.
4941                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4942                 theAx1 Vector (or line, or linear edge), specifying normal
4943                        direction and location of the plane to find shapes on.
4944                 thePnt Point specifying 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.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4955                                                                theAx1, thePnt, theState)
4956             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4957             self._autoPublish(aList, theName, "shapeOnPlane")
4958             return aList
4959
4960         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4961         #  situated relatively the specified plane by the certain way,
4962         #  defined through <VAR>theState</VAR> parameter.
4963         #  @param theShape Shape to find sub-shapes of.
4964         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4965         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4966         #                direction of the plane to find shapes on.
4967         #  @param thePnt Point specifying location of the plane to find shapes on.
4968         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4969         #
4970         #  @return List of all found sub-shapes indices.
4971         #
4972         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4973         @ManageTransactions("ShapesOp")
4974         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4975             """
4976             Find in theShape all sub-shapes of type theShapeType,
4977             situated relatively the specified plane by the certain way,
4978             defined through theState parameter.
4979
4980             Parameters:
4981                 theShape Shape to find sub-shapes of.
4982                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4983                 theAx1 Vector (or line, or linear edge), specifying normal
4984                        direction and location of the plane to find shapes on.
4985                 thePnt Point specifying location of the plane to find shapes on.
4986                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4987
4988             Returns:
4989                 List of all found sub-shapes indices.
4990             """
4991             # Example: see GEOM_TestOthers.py
4992             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4993                                                                   theAx1, thePnt, theState)
4994             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4995             return aList
4996
4997         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4998         #  the specified cylinder by the certain way, defined through \a theState parameter.
4999         #  @param theShape Shape to find sub-shapes of.
5000         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5001         #  @param theAxis Vector (or line, or linear edge), specifying
5002         #                 axis of the cylinder to find shapes on.
5003         #  @param theRadius Radius of the cylinder to find shapes on.
5004         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5005         #  @param theName Object name; when specified, this parameter is used
5006         #         for result publication in the study. Otherwise, if automatic
5007         #         publication is switched on, default value is used for result name.
5008         #
5009         #  @return List of all found sub-shapes.
5010         #
5011         #  @ref swig_GetShapesOnCylinder "Example"
5012         @ManageTransactions("ShapesOp")
5013         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5014             """
5015             Find in theShape all sub-shapes of type theShapeType, situated relatively
5016             the specified cylinder by the certain way, defined through theState parameter.
5017
5018             Parameters:
5019                 theShape Shape to find sub-shapes of.
5020                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5021                 theAxis Vector (or line, or linear edge), specifying
5022                         axis of the cylinder to find shapes on.
5023                 theRadius Radius of the cylinder to find shapes on.
5024                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5025                 theName Object name; when specified, this parameter is used
5026                         for result publication in the study. Otherwise, if automatic
5027                         publication is switched on, default value is used for result name.
5028
5029             Returns:
5030                 List of all found sub-shapes.
5031             """
5032             # Example: see GEOM_TestOthers.py
5033             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5034             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5035             self._autoPublish(aList, theName, "shapeOnCylinder")
5036             return aList
5037
5038         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5039         #  the specified cylinder by the certain way, defined through \a theState parameter.
5040         #  @param theShape Shape to find sub-shapes of.
5041         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5042         #  @param theAxis Vector (or line, or linear edge), specifying
5043         #                 axis of the cylinder to find shapes on.
5044         #  @param theRadius Radius of the cylinder 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_GetShapesOnCylinderIDs "Example"
5050         @ManageTransactions("ShapesOp")
5051         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5052             """
5053             Find in theShape all sub-shapes of type theShapeType, situated relatively
5054             the specified cylinder by the certain way, defined through theState parameter.
5055
5056             Parameters:
5057                 theShape Shape to find sub-shapes of.
5058                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5059                 theAxis Vector (or line, or linear edge), specifying
5060                         axis of the cylinder to find shapes on.
5061                 theRadius Radius of the cylinder to find shapes on.
5062                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5063
5064             Returns:
5065                 List of all found sub-shapes indices.
5066             """
5067             # Example: see GEOM_TestOthers.py
5068             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5069             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5070             return aList
5071
5072         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5073         #  the specified cylinder by the certain way, defined through \a theState parameter.
5074         #  @param theShape Shape to find sub-shapes of.
5075         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5076         #  @param theAxis Vector (or line, or linear edge), specifying
5077         #                 axis of the cylinder to find shapes on.
5078         #  @param thePnt Point specifying location of the bottom of the cylinder.
5079         #  @param theRadius Radius of the cylinder to find shapes on.
5080         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5081         #  @param theName Object name; when specified, this parameter is used
5082         #         for result publication in the study. Otherwise, if automatic
5083         #         publication is switched on, default value is used for result name.
5084         #
5085         #  @return List of all found sub-shapes.
5086         #
5087         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5088         @ManageTransactions("ShapesOp")
5089         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5090             """
5091             Find in theShape all sub-shapes of type theShapeType, situated relatively
5092             the specified cylinder by the certain way, defined through theState parameter.
5093
5094             Parameters:
5095                 theShape Shape to find sub-shapes of.
5096                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5097                 theAxis Vector (or line, or linear edge), specifying
5098                         axis of the cylinder to find shapes on.
5099                 theRadius Radius of the cylinder to find shapes on.
5100                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5101                 theName Object name; when specified, this parameter is used
5102                         for result publication in the study. Otherwise, if automatic
5103                         publication is switched on, default value is used for result name.
5104
5105             Returns:
5106                 List of all found sub-shapes.
5107             """
5108             # Example: see GEOM_TestOthers.py
5109             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5110             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5111             self._autoPublish(aList, theName, "shapeOnCylinder")
5112             return aList
5113
5114         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5115         #  the specified cylinder by the certain way, defined through \a theState parameter.
5116         #  @param theShape Shape to find sub-shapes of.
5117         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5118         #  @param theAxis Vector (or line, or linear edge), specifying
5119         #                 axis of the cylinder to find shapes on.
5120         #  @param thePnt Point specifying location of the bottom of the cylinder.
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_GetShapesOnCylinderWithLocationIDs "Example"
5127         @ManageTransactions("ShapesOp")
5128         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, 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.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5146             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5147             return aList
5148
5149         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5150         #  the specified sphere 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 theCenter Point, specifying center of the sphere to find shapes on.
5154         #  @param theRadius Radius of the sphere to find shapes on.
5155         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5156         #  @param theName Object name; when specified, this parameter is used
5157         #         for result publication in the study. Otherwise, if automatic
5158         #         publication is switched on, default value is used for result name.
5159         #
5160         #  @return List of all found sub-shapes.
5161         #
5162         #  @ref swig_GetShapesOnSphere "Example"
5163         @ManageTransactions("ShapesOp")
5164         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5165             """
5166             Find in theShape all sub-shapes of type theShapeType, situated relatively
5167             the specified sphere by the certain way, defined through theState parameter.
5168
5169             Parameters:
5170                 theShape Shape to find sub-shapes of.
5171                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5172                 theCenter Point, specifying center of the sphere to find shapes on.
5173                 theRadius Radius of the sphere to find shapes on.
5174                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5175                 theName Object name; when specified, this parameter is used
5176                         for result publication in the study. Otherwise, if automatic
5177                         publication is switched on, default value is used for result name.
5178
5179             Returns:
5180                 List of all found sub-shapes.
5181             """
5182             # Example: see GEOM_TestOthers.py
5183             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5184             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5185             self._autoPublish(aList, theName, "shapeOnSphere")
5186             return aList
5187
5188         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5189         #  the specified sphere by the certain way, defined through \a theState parameter.
5190         #  @param theShape Shape to find sub-shapes of.
5191         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5192         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5193         #  @param theRadius Radius of the sphere to find shapes on.
5194         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5195         #
5196         #  @return List of all found sub-shapes indices.
5197         #
5198         #  @ref swig_GetShapesOnSphereIDs "Example"
5199         @ManageTransactions("ShapesOp")
5200         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5201             """
5202             Find in theShape all sub-shapes of type theShapeType, situated relatively
5203             the specified sphere by the certain way, defined through theState parameter.
5204
5205             Parameters:
5206                 theShape Shape to find sub-shapes of.
5207                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5208                 theCenter Point, specifying center of the sphere to find shapes on.
5209                 theRadius Radius of the sphere to find shapes on.
5210                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5211
5212             Returns:
5213                 List of all found sub-shapes indices.
5214             """
5215             # Example: see GEOM_TestOthers.py
5216             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5217             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5218             return aList
5219
5220         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5221         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5222         #  @param theShape Shape to find sub-shapes of.
5223         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5224         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5225         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5226         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5227         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5228         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5229         #  @param theName Object name; when specified, this parameter is used
5230         #         for result publication in the study. Otherwise, if automatic
5231         #         publication is switched on, default value is used for result name.
5232         #
5233         #  @return List of all found sub-shapes.
5234         #
5235         #  @ref swig_GetShapesOnQuadrangle "Example"
5236         @ManageTransactions("ShapesOp")
5237         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5238                                   theTopLeftPoint, theTopRigthPoint,
5239                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5240             """
5241             Find in theShape all sub-shapes of type theShapeType, situated relatively
5242             the specified quadrangle by the certain way, defined through theState parameter.
5243
5244             Parameters:
5245                 theShape Shape to find sub-shapes of.
5246                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5247                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5248                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5249                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5250                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
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.GetShapesOnQuadrangle(theShape, theShapeType,
5261                                                         theTopLeftPoint, theTopRigthPoint,
5262                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5263             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5264             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5265             return aList
5266
5267         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5268         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5269         #  @param theShape Shape to find sub-shapes of.
5270         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5271         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5272         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5273         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5274         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5275         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5276         #
5277         #  @return List of all found sub-shapes indices.
5278         #
5279         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5280         @ManageTransactions("ShapesOp")
5281         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5282                                      theTopLeftPoint, theTopRigthPoint,
5283                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5284             """
5285             Find in theShape all sub-shapes of type theShapeType, situated relatively
5286             the specified quadrangle by the certain way, defined through theState parameter.
5287
5288             Parameters:
5289                 theShape Shape to find sub-shapes of.
5290                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5291                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5292                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5293                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5294                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5295                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5296
5297             Returns:
5298                 List of all found sub-shapes indices.
5299             """
5300
5301             # Example: see GEOM_TestOthers.py
5302             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5303                                                            theTopLeftPoint, theTopRigthPoint,
5304                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5305             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5306             return aList
5307
5308         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5309         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5310         #  @param theBox Shape for relative comparing.
5311         #  @param theShape Shape to find sub-shapes of.
5312         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5313         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5314         #  @param theName Object name; when specified, this parameter is used
5315         #         for result publication in the study. Otherwise, if automatic
5316         #         publication is switched on, default value is used for result name.
5317         #
5318         #  @return List of all found sub-shapes.
5319         #
5320         #  @ref swig_GetShapesOnBox "Example"
5321         @ManageTransactions("ShapesOp")
5322         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5323             """
5324             Find in theShape all sub-shapes of type theShapeType, situated relatively
5325             the specified theBox by the certain way, defined through theState parameter.
5326
5327             Parameters:
5328                 theBox Shape for relative comparing.
5329                 theShape Shape to find sub-shapes of.
5330                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5331                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5332                 theName Object name; when specified, this parameter is used
5333                         for result publication in the study. Otherwise, if automatic
5334                         publication is switched on, default value is used for result name.
5335
5336             Returns:
5337                 List of all found sub-shapes.
5338             """
5339             # Example: see GEOM_TestOthers.py
5340             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5341             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5342             self._autoPublish(aList, theName, "shapeOnBox")
5343             return aList
5344
5345         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5346         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5347         #  @param theBox Shape for relative comparing.
5348         #  @param theShape Shape to find sub-shapes of.
5349         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5350         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5351         #
5352         #  @return List of all found sub-shapes indices.
5353         #
5354         #  @ref swig_GetShapesOnBoxIDs "Example"
5355         @ManageTransactions("ShapesOp")
5356         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5357             """
5358             Find in theShape all sub-shapes of type theShapeType, situated relatively
5359             the specified theBox by the certain way, defined through theState parameter.
5360
5361             Parameters:
5362                 theBox Shape for relative comparing.
5363                 theShape Shape to find sub-shapes of.
5364                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5365                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5366
5367             Returns:
5368                 List of all found sub-shapes indices.
5369             """
5370             # Example: see GEOM_TestOthers.py
5371             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5372             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5373             return aList
5374
5375         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5376         #  situated relatively the specified \a theCheckShape by the
5377         #  certain way, defined through \a theState parameter.
5378         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5379         #  @param theShape Shape to find sub-shapes of.
5380         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5381         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5382         #  @param theName Object name; when specified, this parameter is used
5383         #         for result publication in the study. Otherwise, if automatic
5384         #         publication is switched on, default value is used for result name.
5385         #
5386         #  @return List of all found sub-shapes.
5387         #
5388         #  @ref swig_GetShapesOnShape "Example"
5389         @ManageTransactions("ShapesOp")
5390         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5391             """
5392             Find in theShape all sub-shapes of type theShapeType,
5393             situated relatively the specified theCheckShape by the
5394             certain way, defined through theState parameter.
5395
5396             Parameters:
5397                 theCheckShape Shape for relative comparing. It must be a solid.
5398                 theShape Shape to find sub-shapes of.
5399                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5400                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5401                 theName Object name; when specified, this parameter is used
5402                         for result publication in the study. Otherwise, if automatic
5403                         publication is switched on, default value is used for result name.
5404
5405             Returns:
5406                 List of all found sub-shapes.
5407             """
5408             # Example: see GEOM_TestOthers.py
5409             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5410                                                    theShapeType, theState)
5411             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5412             self._autoPublish(aList, theName, "shapeOnShape")
5413             return aList
5414
5415         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5416         #  situated relatively the specified \a theCheckShape by the
5417         #  certain way, defined through \a theState parameter.
5418         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5419         #  @param theShape Shape to find sub-shapes of.
5420         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5421         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5422         #  @param theName Object name; when specified, this parameter is used
5423         #         for result publication in the study. Otherwise, if automatic
5424         #         publication is switched on, default value is used for result name.
5425         #
5426         #  @return All found sub-shapes as compound.
5427         #
5428         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5429         @ManageTransactions("ShapesOp")
5430         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5431             """
5432             Find in theShape all sub-shapes of type theShapeType,
5433             situated relatively the specified theCheckShape by the
5434             certain way, defined through theState parameter.
5435
5436             Parameters:
5437                 theCheckShape Shape for relative comparing. It must be a solid.
5438                 theShape Shape to find sub-shapes of.
5439                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5440                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5441                 theName Object name; when specified, this parameter is used
5442                         for result publication in the study. Otherwise, if automatic
5443                         publication is switched on, default value is used for result name.
5444
5445             Returns:
5446                 All found sub-shapes as compound.
5447             """
5448             # Example: see GEOM_TestOthers.py
5449             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5450                                                              theShapeType, theState)
5451             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5452             self._autoPublish(anObj, theName, "shapeOnShape")
5453             return anObj
5454
5455         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5456         #  situated relatively the specified \a theCheckShape by the
5457         #  certain way, defined through \a theState parameter.
5458         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5459         #  @param theShape Shape to find sub-shapes of.
5460         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5461         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5462         #
5463         #  @return List of all found sub-shapes indices.
5464         #
5465         #  @ref swig_GetShapesOnShapeIDs "Example"
5466         @ManageTransactions("ShapesOp")
5467         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
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
5479             Returns:
5480                 List of all found sub-shapes indices.
5481             """
5482             # Example: see GEOM_TestOthers.py
5483             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5484                                                       theShapeType, theState)
5485             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5486             return aList
5487
5488         ## Get sub-shape(s) of theShapeWhere, which are
5489         #  coincident with \a theShapeWhat or could be a part of it.
5490         #  @param theShapeWhere Shape to find sub-shapes of.
5491         #  @param theShapeWhat Shape, specifying what to find.
5492         #  @param isNewImplementation implementation of GetInPlace functionality
5493         #             (default = False, old alghorithm based on shape properties)
5494         #  @param theName Object name; when specified, this parameter is used
5495         #         for result publication in the study. Otherwise, if automatic
5496         #         publication is switched on, default value is used for result name.
5497         #
5498         #  @return Group of all found sub-shapes or a single found sub-shape.
5499         #
5500         #  @note This function has a restriction on argument shapes.
5501         #        If \a theShapeWhere has curved parts with significantly
5502         #        outstanding centres (i.e. the mass centre of a part is closer to
5503         #        \a theShapeWhat than to the part), such parts will not be found.
5504         #        @image html get_in_place_lost_part.png
5505         #
5506         #  @ref swig_GetInPlace "Example"
5507         @ManageTransactions("ShapesOp")
5508         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5509             """
5510             Get sub-shape(s) of theShapeWhere, which are
5511             coincident with  theShapeWhat or could be a part of it.
5512
5513             Parameters:
5514                 theShapeWhere Shape to find sub-shapes of.
5515                 theShapeWhat Shape, specifying what to find.
5516                 isNewImplementation Implementation of GetInPlace functionality
5517                                     (default = False, old alghorithm based on shape properties)
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                 Group of all found sub-shapes or a single found sub-shape.
5524
5525
5526             Note:
5527                 This function has a restriction on argument shapes.
5528                 If theShapeWhere has curved parts with significantly
5529                 outstanding centres (i.e. the mass centre of a part is closer to
5530                 theShapeWhat than to the part), such parts will not be found.
5531             """
5532             # Example: see GEOM_TestOthers.py
5533             anObj = None
5534             if isNewImplementation:
5535                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5536             else:
5537                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5538                 pass
5539             RaiseIfFailed("GetInPlace", self.ShapesOp)
5540             self._autoPublish(anObj, theName, "inplace")
5541             return anObj
5542
5543         ## Get sub-shape(s) of \a theShapeWhere, which are
5544         #  coincident with \a theShapeWhat or could be a part of it.
5545         #
5546         #  Implementation of this method is based on a saved history of an operation,
5547         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5548         #  arguments (an argument shape or a sub-shape of an argument shape).
5549         #  The operation could be the Partition or one of boolean operations,
5550         #  performed on simple shapes (not on compounds).
5551         #
5552         #  @param theShapeWhere Shape to find sub-shapes of.
5553         #  @param theShapeWhat Shape, specifying what to find (must be in the
5554         #                      building history of the ShapeWhere).
5555         #  @param theName Object name; when specified, this parameter is used
5556         #         for result publication in the study. Otherwise, if automatic
5557         #         publication is switched on, default value is used for result name.
5558         #
5559         #  @return Group of all found sub-shapes or a single found sub-shape.
5560         #
5561         #  @ref swig_GetInPlace "Example"
5562         @ManageTransactions("ShapesOp")
5563         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5564             """
5565             Implementation of this method is based on a saved history of an operation,
5566             produced theShapeWhere. The theShapeWhat must be among this operation's
5567             arguments (an argument shape or a sub-shape of an argument shape).
5568             The operation could be the Partition or one of boolean operations,
5569             performed on simple shapes (not on compounds).
5570
5571             Parameters:
5572                 theShapeWhere Shape to find sub-shapes of.
5573                 theShapeWhat Shape, specifying what to find (must be in the
5574                                 building history of the ShapeWhere).
5575                 theName Object name; when specified, this parameter is used
5576                         for result publication in the study. Otherwise, if automatic
5577                         publication is switched on, default value is used for result name.
5578
5579             Returns:
5580                 Group of all found sub-shapes or a single found sub-shape.
5581             """
5582             # Example: see GEOM_TestOthers.py
5583             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5584             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5585             self._autoPublish(anObj, theName, "inplace")
5586             return anObj
5587
5588         ## Get sub-shape of theShapeWhere, which is
5589         #  equal to \a theShapeWhat.
5590         #  @param theShapeWhere Shape to find sub-shape of.
5591         #  @param theShapeWhat Shape, specifying what to find.
5592         #  @param theName Object name; when specified, this parameter is used
5593         #         for result publication in the study. Otherwise, if automatic
5594         #         publication is switched on, default value is used for result name.
5595         #
5596         #  @return New GEOM.GEOM_Object for found sub-shape.
5597         #
5598         #  @ref swig_GetSame "Example"
5599         @ManageTransactions("ShapesOp")
5600         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5601             """
5602             Get sub-shape of theShapeWhere, which is
5603             equal to theShapeWhat.
5604
5605             Parameters:
5606                 theShapeWhere Shape to find sub-shape of.
5607                 theShapeWhat Shape, specifying what to find.
5608                 theName Object name; when specified, this parameter is used
5609                         for result publication in the study. Otherwise, if automatic
5610                         publication is switched on, default value is used for result name.
5611
5612             Returns:
5613                 New GEOM.GEOM_Object for found sub-shape.
5614             """
5615             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5616             RaiseIfFailed("GetSame", self.ShapesOp)
5617             self._autoPublish(anObj, theName, "sameShape")
5618             return anObj
5619
5620
5621         ## Get sub-shape indices of theShapeWhere, which is
5622         #  equal to \a theShapeWhat.
5623         #  @param theShapeWhere Shape to find sub-shape of.
5624         #  @param theShapeWhat Shape, specifying what to find.
5625         #  @return List of all found sub-shapes indices.
5626         #
5627         #  @ref swig_GetSame "Example"
5628         @ManageTransactions("ShapesOp")
5629         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5630             """
5631             Get sub-shape indices of theShapeWhere, which is
5632             equal to theShapeWhat.
5633
5634             Parameters:
5635                 theShapeWhere Shape to find sub-shape of.
5636                 theShapeWhat Shape, specifying what to find.
5637
5638             Returns:
5639                 List of all found sub-shapes indices.
5640             """
5641             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5642             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5643             return anObj
5644
5645
5646         # end of l4_obtain
5647         ## @}
5648
5649         ## @addtogroup l4_access
5650         ## @{
5651
5652         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5653         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5654         #  @param aShape Shape to get sub-shape of.
5655         #  @param ListOfID List of sub-shapes indices.
5656         #  @param theName Object name; when specified, this parameter is used
5657         #         for result publication in the study. Otherwise, if automatic
5658         #         publication is switched on, default value is used for result name.
5659         #
5660         #  @return Found sub-shape.
5661         #
5662         #  @ref swig_all_decompose "Example"
5663         def GetSubShape(self, aShape, ListOfID, theName=None):
5664             """
5665             Obtain a composite sub-shape of aShape, composed from sub-shapes
5666             of aShape, selected by their unique IDs inside aShape
5667
5668             Parameters:
5669                 aShape Shape to get sub-shape of.
5670                 ListOfID List of sub-shapes indices.
5671                 theName Object name; when specified, this parameter is used
5672                         for result publication in the study. Otherwise, if automatic
5673                         publication is switched on, default value is used for result name.
5674
5675             Returns:
5676                 Found sub-shape.
5677             """
5678             # Example: see GEOM_TestAll.py
5679             anObj = self.AddSubShape(aShape,ListOfID)
5680             self._autoPublish(anObj, theName, "subshape")
5681             return anObj
5682
5683         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5684         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5685         #  @param aShape Shape to get sub-shape of.
5686         #  @param aSubShape Sub-shapes of aShape.
5687         #  @return ID of found sub-shape.
5688         #
5689         #  @ref swig_all_decompose "Example"
5690         @ManageTransactions("LocalOp")
5691         def GetSubShapeID(self, aShape, aSubShape):
5692             """
5693             Obtain unique ID of sub-shape aSubShape inside aShape
5694             of aShape, selected by their unique IDs inside aShape
5695
5696             Parameters:
5697                aShape Shape to get sub-shape of.
5698                aSubShape Sub-shapes of aShape.
5699
5700             Returns:
5701                ID of found sub-shape.
5702             """
5703             # Example: see GEOM_TestAll.py
5704             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5705             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5706             return anID
5707
5708         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5709         #  This function is provided for performance purpose. The complexity is O(n) with n
5710         #  the number of subobjects of aShape
5711         #  @param aShape Shape to get sub-shape of.
5712         #  @param aSubShapes Sub-shapes of aShape.
5713         #  @return list of IDs of found sub-shapes.
5714         #
5715         #  @ref swig_all_decompose "Example"
5716         @ManageTransactions("ShapesOp")
5717         def GetSubShapesIDs(self, aShape, aSubShapes):
5718             """
5719             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5720             This function is provided for performance purpose. The complexity is O(n) with n
5721             the number of subobjects of aShape
5722
5723             Parameters:
5724                aShape Shape to get sub-shape of.
5725                aSubShapes Sub-shapes of aShape.
5726
5727             Returns:
5728                List of IDs of found sub-shape.
5729             """
5730             # Example: see GEOM_TestAll.py
5731             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5732             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5733             return anIDs
5734
5735         # end of l4_access
5736         ## @}
5737
5738         ## @addtogroup l4_decompose
5739         ## @{
5740
5741         ## Get all sub-shapes and groups of \a theShape,
5742         #  that were created already by any other methods.
5743         #  @param theShape Any shape.
5744         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5745         #                       returned, else all found sub-shapes and groups.
5746         #  @return List of existing sub-objects of \a theShape.
5747         #
5748         #  @ref swig_all_decompose "Example"
5749         @ManageTransactions("ShapesOp")
5750         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5751             """
5752             Get all sub-shapes and groups of theShape,
5753             that were created already by any other methods.
5754
5755             Parameters:
5756                 theShape Any shape.
5757                 theGroupsOnly If this parameter is TRUE, only groups will be
5758                                  returned, else all found sub-shapes and groups.
5759
5760             Returns:
5761                 List of existing sub-objects of theShape.
5762             """
5763             # Example: see GEOM_TestAll.py
5764             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5765             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5766             return ListObj
5767
5768         ## Get all groups of \a theShape,
5769         #  that were created already by any other methods.
5770         #  @param theShape Any shape.
5771         #  @return List of existing groups of \a theShape.
5772         #
5773         #  @ref swig_all_decompose "Example"
5774         @ManageTransactions("ShapesOp")
5775         def GetGroups(self, theShape):
5776             """
5777             Get all groups of theShape,
5778             that were created already by any other methods.
5779
5780             Parameters:
5781                 theShape Any shape.
5782
5783             Returns:
5784                 List of existing groups of theShape.
5785             """
5786             # Example: see GEOM_TestAll.py
5787             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5788             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5789             return ListObj
5790
5791         ## Explode a shape on sub-shapes of a given type.
5792         #  If the shape itself matches the type, it is also returned.
5793         #  @param aShape Shape to be exploded.
5794         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5795         #  @param theName Object name; when specified, this parameter is used
5796         #         for result publication in the study. Otherwise, if automatic
5797         #         publication is switched on, default value is used for result name.
5798         #
5799         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5800         #
5801         #  @ref swig_all_decompose "Example"
5802         @ManageTransactions("ShapesOp")
5803         def SubShapeAll(self, aShape, aType, theName=None):
5804             """
5805             Explode a shape on sub-shapes of a given type.
5806             If the shape itself matches the type, it is also returned.
5807
5808             Parameters:
5809                 aShape Shape to be exploded.
5810                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5811                 theName Object name; when specified, this parameter is used
5812                         for result publication in the study. Otherwise, if automatic
5813                         publication is switched on, default value is used for result name.
5814
5815             Returns:
5816                 List of sub-shapes of type theShapeType, contained in theShape.
5817             """
5818             # Example: see GEOM_TestAll.py
5819             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5820             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5821             self._autoPublish(ListObj, theName, "subshape")
5822             return ListObj
5823
5824         ## Explode a shape on sub-shapes of a given type.
5825         #  @param aShape Shape to be exploded.
5826         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5827         #  @return List of IDs of sub-shapes.
5828         #
5829         #  @ref swig_all_decompose "Example"
5830         @ManageTransactions("ShapesOp")
5831         def SubShapeAllIDs(self, aShape, aType):
5832             """
5833             Explode a shape on sub-shapes of a given type.
5834
5835             Parameters:
5836                 aShape Shape to be exploded (see geompy.ShapeType)
5837                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5838
5839             Returns:
5840                 List of IDs of sub-shapes.
5841             """
5842             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5843             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5844             return ListObj
5845
5846         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5847         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5848         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5849         #  @param aShape Shape to get sub-shape of.
5850         #  @param ListOfInd List of sub-shapes indices.
5851         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5852         #  @param theName Object name; when specified, this parameter is used
5853         #         for result publication in the study. Otherwise, if automatic
5854         #         publication is switched on, default value is used for result name.
5855         #
5856         #  @return A compound of sub-shapes of aShape.
5857         #
5858         #  @ref swig_all_decompose "Example"
5859         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5860             """
5861             Obtain a compound of sub-shapes of aShape,
5862             selected by their indices in list of all sub-shapes of type aType.
5863             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5864
5865             Parameters:
5866                 aShape Shape to get sub-shape of.
5867                 ListOfID List of sub-shapes indices.
5868                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5869                 theName Object name; when specified, this parameter is used
5870                         for result publication in the study. Otherwise, if automatic
5871                         publication is switched on, default value is used for result name.
5872
5873             Returns:
5874                 A compound of sub-shapes of aShape.
5875             """
5876             # Example: see GEOM_TestAll.py
5877             ListOfIDs = []
5878             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5879             for ind in ListOfInd:
5880                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5881             # note: auto-publishing is done in self.GetSubShape()
5882             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5883             return anObj
5884
5885         ## Explode a shape on sub-shapes of a given type.
5886         #  Sub-shapes will be sorted taking into account their gravity centers,
5887         #  to provide stable order of sub-shapes.
5888         #  If the shape itself matches the type, it is also returned.
5889         #  @param aShape Shape to be exploded.
5890         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5891         #  @param theName Object name; when specified, this parameter is used
5892         #         for result publication in the study. Otherwise, if automatic
5893         #         publication is switched on, default value is used for result name.
5894         #
5895         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5896         #
5897         #  @ref swig_SubShapeAllSorted "Example"
5898         @ManageTransactions("ShapesOp")
5899         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5900             """
5901             Explode a shape on sub-shapes of a given type.
5902             Sub-shapes will be sorted taking into account their gravity centers,
5903             to provide stable order of sub-shapes.
5904             If the shape itself matches the type, it is also returned.
5905
5906             Parameters:
5907                 aShape Shape to be exploded.
5908                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5909                 theName Object name; when specified, this parameter is used
5910                         for result publication in the study. Otherwise, if automatic
5911                         publication is switched on, default value is used for result name.
5912
5913             Returns:
5914                 List of sub-shapes of type theShapeType, contained in theShape.
5915             """
5916             # Example: see GEOM_TestAll.py
5917             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5918             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5919             self._autoPublish(ListObj, theName, "subshape")
5920             return ListObj
5921
5922         ## Explode a shape on sub-shapes of a given type.
5923         #  Sub-shapes will be sorted taking into account their gravity centers,
5924         #  to provide stable order of sub-shapes.
5925         #  @param aShape Shape to be exploded.
5926         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5927         #  @return List of IDs of sub-shapes.
5928         #
5929         #  @ref swig_all_decompose "Example"
5930         @ManageTransactions("ShapesOp")
5931         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5932             """
5933             Explode a shape on sub-shapes of a given type.
5934             Sub-shapes will be sorted taking into account their gravity centers,
5935             to provide stable order of sub-shapes.
5936
5937             Parameters:
5938                 aShape Shape to be exploded.
5939                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5940
5941             Returns:
5942                 List of IDs of sub-shapes.
5943             """
5944             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5945             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5946             return ListIDs
5947
5948         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5949         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5950         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5951         #  @param aShape Shape to get sub-shape of.
5952         #  @param ListOfInd List of sub-shapes indices.
5953         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5954         #  @param theName Object name; when specified, this parameter is used
5955         #         for result publication in the study. Otherwise, if automatic
5956         #         publication is switched on, default value is used for result name.
5957         #
5958         #  @return A compound of sub-shapes of aShape.
5959         #
5960         #  @ref swig_all_decompose "Example"
5961         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5962             """
5963             Obtain a compound of sub-shapes of aShape,
5964             selected by they indices in sorted list of all sub-shapes of type aType.
5965             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5966
5967             Parameters:
5968                 aShape Shape to get sub-shape of.
5969                 ListOfID List of sub-shapes indices.
5970                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5971                 theName Object name; when specified, this parameter is used
5972                         for result publication in the study. Otherwise, if automatic
5973                         publication is switched on, default value is used for result name.
5974
5975             Returns:
5976                 A compound of sub-shapes of aShape.
5977             """
5978             # Example: see GEOM_TestAll.py
5979             ListOfIDs = []
5980             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5981             for ind in ListOfInd:
5982                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5983             # note: auto-publishing is done in self.GetSubShape()
5984             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5985             return anObj
5986
5987         ## Extract shapes (excluding the main shape) of given type.
5988         #  @param aShape The shape.
5989         #  @param aType  The shape type (see ShapeType())
5990         #  @param isSorted Boolean flag to switch sorting on/off.
5991         #  @param theName Object name; when specified, this parameter is used
5992         #         for result publication in the study. Otherwise, if automatic
5993         #         publication is switched on, default value is used for result name.
5994         #
5995         #  @return List of sub-shapes of type aType, contained in aShape.
5996         #
5997         #  @ref swig_FilletChamfer "Example"
5998         @ManageTransactions("ShapesOp")
5999         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6000             """
6001             Extract shapes (excluding the main shape) of given type.
6002
6003             Parameters:
6004                 aShape The shape.
6005                 aType  The shape type (see geompy.ShapeType)
6006                 isSorted Boolean flag to switch sorting on/off.
6007                 theName Object name; when specified, this parameter is used
6008                         for result publication in the study. Otherwise, if automatic
6009                         publication is switched on, default value is used for result name.
6010
6011             Returns:
6012                 List of sub-shapes of type aType, contained in aShape.
6013             """
6014             # Example: see GEOM_TestAll.py
6015             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6016             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6017             self._autoPublish(ListObj, theName, "subshape")
6018             return ListObj
6019
6020         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6021         #  @param aShape Main shape.
6022         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6023         #  @param theName Object name; when specified, this parameter is used
6024         #         for result publication in the study. Otherwise, if automatic
6025         #         publication is switched on, default value is used for result name.
6026         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6027         #
6028         #  @ref swig_all_decompose "Example"
6029         @ManageTransactions("ShapesOp")
6030         def SubShapes(self, aShape, anIDs, theName=None):
6031             """
6032             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6033
6034             Parameters:
6035                 aShape Main shape.
6036                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6037                 theName Object name; when specified, this parameter is used
6038                         for result publication in the study. Otherwise, if automatic
6039                         publication is switched on, default value is used for result name.
6040
6041             Returns:
6042                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6043             """
6044             # Example: see GEOM_TestAll.py
6045             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6046             RaiseIfFailed("SubShapes", self.ShapesOp)
6047             self._autoPublish(ListObj, theName, "subshape")
6048             return ListObj
6049
6050         # end of l4_decompose
6051         ## @}
6052
6053         ## @addtogroup l4_decompose_d
6054         ## @{
6055
6056         ## Deprecated method
6057         #  It works like SubShapeAllSortedCentres(), but wrongly
6058         #  defines centres of faces, shells and solids.
6059         @ManageTransactions("ShapesOp")
6060         def SubShapeAllSorted(self, aShape, aType, theName=None):
6061             """
6062             Deprecated method
6063             It works like geompy.SubShapeAllSortedCentres, but wrongly
6064             defines centres of faces, shells and solids.
6065             """
6066             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6067             RaiseIfFailed("MakeExplode", self.ShapesOp)
6068             self._autoPublish(ListObj, theName, "subshape")
6069             return ListObj
6070
6071         ## Deprecated method
6072         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6073         #  defines centres of faces, shells and solids.
6074         @ManageTransactions("ShapesOp")
6075         def SubShapeAllSortedIDs(self, aShape, aType):
6076             """
6077             Deprecated method
6078             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6079             defines centres of faces, shells and solids.
6080             """
6081             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6082             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6083             return ListIDs
6084
6085         ## Deprecated method
6086         #  It works like SubShapeSortedCentres(), but has a bug
6087         #  (wrongly defines centres of faces, shells and solids).
6088         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6089             """
6090             Deprecated method
6091             It works like geompy.SubShapeSortedCentres, but has a bug
6092             (wrongly defines centres of faces, shells and solids).
6093             """
6094             ListOfIDs = []
6095             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6096             for ind in ListOfInd:
6097                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6098             # note: auto-publishing is done in self.GetSubShape()
6099             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6100             return anObj
6101
6102         # end of l4_decompose_d
6103         ## @}
6104
6105         ## @addtogroup l3_healing
6106         ## @{
6107
6108         ## Apply a sequence of Shape Healing operators to the given object.
6109         #  @param theShape Shape to be processed.
6110         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6111         #  @param theParameters List of names of parameters
6112         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6113         #  @param theValues List of values of parameters, in the same order
6114         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6115         #  @param theName Object name; when specified, this parameter is used
6116         #         for result publication in the study. Otherwise, if automatic
6117         #         publication is switched on, default value is used for result name.
6118         #
6119         #  <b> Operators and Parameters: </b> \n
6120         #
6121         #  * \b FixShape - corrects invalid shapes. \n
6122         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6123         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6124         #
6125         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6126         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6127         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6128         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6129         #
6130         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6131         #    surfaces in segments using a certain angle. \n
6132         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6133         #    if Angle=180, four if Angle=90, etc). \n
6134         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6135         #
6136         #  * \b SplitClosedFaces - splits closed faces in segments.
6137         #    The number of segments depends on the number of splitting points.\n
6138         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6139         #
6140         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6141         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6142         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6143         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6144         #   This and the previous parameters can take the following values:\n
6145         #   \b Parametric \b Continuity \n
6146         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6147         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6148         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6149         #    ruling out sharp edges).\n
6150         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6151         #       are of the same magnitude).\n
6152         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6153         #    or surfaces (d/du C(u)) are the same at junction. \n
6154         #   \b Geometric \b Continuity \n
6155         #   \b G1: first derivatives are proportional at junction.\n
6156         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6157         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6158         #   \b G2: first and second derivatives are proportional at junction.
6159         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6160         #    continuity requires that the underlying parameterization was continuous as well.
6161         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6162         #
6163         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6164         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6165         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6166         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6167         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6168         #       with the specified parameters.\n
6169         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6170         #       with the specified parameters.\n
6171         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6172         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6173         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6174         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6175         #
6176         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6177         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6178         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6179         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6180         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6181         #
6182         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6183         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6184         #
6185         #
6186         #  @return New GEOM.GEOM_Object, containing processed shape.
6187         #
6188         #  \n @ref tui_shape_processing "Example"
6189         @ManageTransactions("HealOp")
6190         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6191             """
6192             Apply a sequence of Shape Healing operators to the given object.
6193
6194             Parameters:
6195                 theShape Shape to be processed.
6196                 theValues List of values of parameters, in the same order
6197                           as parameters are listed in theParameters list.
6198                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6199                 theParameters List of names of parameters
6200                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6201                 theName Object name; when specified, this parameter is used
6202                         for result publication in the study. Otherwise, if automatic
6203                         publication is switched on, default value is used for result name.
6204
6205                 Operators and Parameters:
6206
6207                  * FixShape - corrects invalid shapes.
6208                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6209                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6210                  * FixFaceSize - removes small faces, such as spots and strips.
6211                      * FixFaceSize.Tolerance - defines minimum possible face size.
6212                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
6213                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6214                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6215                                 in segments using a certain angle.
6216                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6217                                           if Angle=180, four if Angle=90, etc).
6218                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6219                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6220                                       splitting points.
6221                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6222                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6223                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6224                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6225                      * SplitContinuity.CurveContinuity - required continuity for curves.
6226                        This and the previous parameters can take the following values:
6227
6228                        Parametric Continuity:
6229                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6230                                                    coincidental. The curves or surfaces may still meet at an angle,
6231                                                    giving rise to a sharp corner or edge).
6232                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6233                                                    are parallel, ruling out sharp edges).
6234                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6235                                                   or surfaces are of the same magnitude).
6236                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6237                           curves or surfaces (d/du C(u)) are the same at junction.
6238
6239                        Geometric Continuity:
6240                        G1: first derivatives are proportional at junction.
6241                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6242                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6243                        G2: first and second derivatives are proportional at junction. As the names imply,
6244                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6245                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6246                            geometric continuity of order n, but not vice-versa.
6247                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6248                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6249                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6250                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6251                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6252                                                         the specified parameters.
6253                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6254                                                         the specified parameters.
6255                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6256                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6257                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6258                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6259                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6260                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6261                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6262                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6263                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6264                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6265                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6266
6267             Returns:
6268                 New GEOM.GEOM_Object, containing processed shape.
6269
6270             Note: For more information look through SALOME Geometry User's Guide->
6271                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6272             """
6273             # Example: see GEOM_TestHealing.py
6274             theValues,Parameters = ParseList(theValues)
6275             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6276             # To avoid script failure in case of good argument shape
6277             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6278                 return theShape
6279             RaiseIfFailed("ProcessShape", self.HealOp)
6280             for string in (theOperators + theParameters):
6281                 Parameters = ":" + Parameters
6282                 pass
6283             anObj.SetParameters(Parameters)
6284             self._autoPublish(anObj, theName, "healed")
6285             return anObj
6286
6287         ## Remove faces from the given object (shape).
6288         #  @param theObject Shape to be processed.
6289         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6290         #                  removes ALL faces of the given object.
6291         #  @param theName Object name; when specified, this parameter is used
6292         #         for result publication in the study. Otherwise, if automatic
6293         #         publication is switched on, default value is used for result name.
6294         #
6295         #  @return New GEOM.GEOM_Object, containing processed shape.
6296         #
6297         #  @ref tui_suppress_faces "Example"
6298         @ManageTransactions("HealOp")
6299         def SuppressFaces(self, theObject, theFaces, theName=None):
6300             """
6301             Remove faces from the given object (shape).
6302
6303             Parameters:
6304                 theObject Shape to be processed.
6305                 theFaces Indices of faces to be removed, if EMPTY then the method
6306                          removes ALL faces of the given object.
6307                 theName Object name; when specified, this parameter is used
6308                         for result publication in the study. Otherwise, if automatic
6309                         publication is switched on, default value is used for result name.
6310
6311             Returns:
6312                 New GEOM.GEOM_Object, containing processed shape.
6313             """
6314             # Example: see GEOM_TestHealing.py
6315             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6316             RaiseIfFailed("SuppressFaces", self.HealOp)
6317             self._autoPublish(anObj, theName, "suppressFaces")
6318             return anObj
6319
6320         ## Sewing of some shapes into single shape.
6321         #  @param ListShape Shapes to be processed.
6322         #  @param theTolerance Required tolerance value.
6323         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6324         #  @param theName Object name; when specified, this parameter is used
6325         #         for result publication in the study. Otherwise, if automatic
6326         #         publication is switched on, default value is used for result name.
6327         #
6328         #  @return New GEOM.GEOM_Object, containing processed shape.
6329         #
6330         #  @ref tui_sewing "Example"
6331         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6332             """
6333             Sewing of some shapes into single shape.
6334
6335             Parameters:
6336                 ListShape Shapes to be processed.
6337                 theTolerance Required tolerance value.
6338                 AllowNonManifold Flag that allows non-manifold sewing.
6339                 theName Object name; when specified, this parameter is used
6340                         for result publication in the study. Otherwise, if automatic
6341                         publication is switched on, default value is used for result name.
6342
6343             Returns:
6344                 New GEOM.GEOM_Object, containing processed shape.
6345             """
6346             # Example: see GEOM_TestHealing.py
6347             comp = self.MakeCompound(ListShape)
6348             # note: auto-publishing is done in self.Sew()
6349             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
6350             return anObj
6351
6352         ## Sewing of the given object.
6353         #  @param theObject Shape to be processed.
6354         #  @param theTolerance Required tolerance value.
6355         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6356         #  @param theName Object name; when specified, this parameter is used
6357         #         for result publication in the study. Otherwise, if automatic
6358         #         publication is switched on, default value is used for result name.
6359         #
6360         #  @return New GEOM.GEOM_Object, containing processed shape.
6361         @ManageTransactions("HealOp")
6362         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
6363             """
6364             Sewing of the given object.
6365
6366             Parameters:
6367                 theObject Shape to be processed.
6368                 theTolerance Required tolerance value.
6369                 AllowNonManifold Flag that allows non-manifold sewing.
6370                 theName Object name; when specified, this parameter is used
6371                         for result publication in the study. Otherwise, if automatic
6372                         publication is switched on, default value is used for result name.
6373
6374             Returns:
6375                 New GEOM.GEOM_Object, containing processed shape.
6376             """
6377             # Example: see MakeSewing() above
6378             theTolerance,Parameters = ParseParameters(theTolerance)
6379             if AllowNonManifold:
6380                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
6381             else:
6382                 anObj = self.HealOp.Sew(theObject, theTolerance)
6383             # To avoid script failure in case of good argument shape
6384             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6385                 return theObject
6386             RaiseIfFailed("Sew", self.HealOp)
6387             anObj.SetParameters(Parameters)
6388             self._autoPublish(anObj, theName, "sewed")
6389             return anObj
6390
6391         ## Rebuild the topology of theCompound of solids by removing
6392         #  of the faces that are shared by several solids.
6393         #  @param theCompound Shape to be processed.
6394         #  @param theName Object name; when specified, this parameter is used
6395         #         for result publication in the study. Otherwise, if automatic
6396         #         publication is switched on, default value is used for result name.
6397         #
6398         #  @return New GEOM.GEOM_Object, containing processed shape.
6399         #
6400         #  @ref tui_remove_webs "Example"
6401         @ManageTransactions("HealOp")
6402         def RemoveInternalFaces (self, theCompound, theName=None):
6403             """
6404             Rebuild the topology of theCompound of solids by removing
6405             of the faces that are shared by several solids.
6406
6407             Parameters:
6408                 theCompound Shape to be processed.
6409                 theName Object name; when specified, this parameter is used
6410                         for result publication in the study. Otherwise, if automatic
6411                         publication is switched on, default value is used for result name.
6412
6413             Returns:
6414                 New GEOM.GEOM_Object, containing processed shape.
6415             """
6416             # Example: see GEOM_TestHealing.py
6417             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6418             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6419             self._autoPublish(anObj, theName, "removeWebs")
6420             return anObj
6421
6422         ## Remove internal wires and edges from the given object (face).
6423         #  @param theObject Shape to be processed.
6424         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6425         #                  removes ALL internal wires of the given object.
6426         #  @param theName Object name; when specified, this parameter is used
6427         #         for result publication in the study. Otherwise, if automatic
6428         #         publication is switched on, default value is used for result name.
6429         #
6430         #  @return New GEOM.GEOM_Object, containing processed shape.
6431         #
6432         #  @ref tui_suppress_internal_wires "Example"
6433         @ManageTransactions("HealOp")
6434         def SuppressInternalWires(self, theObject, theWires, theName=None):
6435             """
6436             Remove internal wires and edges from the given object (face).
6437
6438             Parameters:
6439                 theObject Shape to be processed.
6440                 theWires Indices of wires to be removed, if EMPTY then the method
6441                          removes ALL internal wires of the given object.
6442                 theName Object name; when specified, this parameter is used
6443                         for result publication in the study. Otherwise, if automatic
6444                         publication is switched on, default value is used for result name.
6445
6446             Returns:
6447                 New GEOM.GEOM_Object, containing processed shape.
6448             """
6449             # Example: see GEOM_TestHealing.py
6450             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6451             RaiseIfFailed("RemoveIntWires", self.HealOp)
6452             self._autoPublish(anObj, theName, "suppressWires")
6453             return anObj
6454
6455         ## Remove internal closed contours (holes) from the given object.
6456         #  @param theObject Shape to be processed.
6457         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6458         #                  removes ALL internal holes of the given object
6459         #  @param theName Object name; when specified, this parameter is used
6460         #         for result publication in the study. Otherwise, if automatic
6461         #         publication is switched on, default value is used for result name.
6462         #
6463         #  @return New GEOM.GEOM_Object, containing processed shape.
6464         #
6465         #  @ref tui_suppress_holes "Example"
6466         @ManageTransactions("HealOp")
6467         def SuppressHoles(self, theObject, theWires, theName=None):
6468             """
6469             Remove internal closed contours (holes) from the given object.
6470
6471             Parameters:
6472                 theObject Shape to be processed.
6473                 theWires Indices of wires to be removed, if EMPTY then the method
6474                          removes ALL internal holes of the given object
6475                 theName Object name; when specified, this parameter is used
6476                         for result publication in the study. Otherwise, if automatic
6477                         publication is switched on, default value is used for result name.
6478
6479             Returns:
6480                 New GEOM.GEOM_Object, containing processed shape.
6481             """
6482             # Example: see GEOM_TestHealing.py
6483             anObj = self.HealOp.FillHoles(theObject, theWires)
6484             RaiseIfFailed("FillHoles", self.HealOp)
6485             self._autoPublish(anObj, theName, "suppressHoles")
6486             return anObj
6487
6488         ## Close an open wire.
6489         #  @param theObject Shape to be processed.
6490         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6491         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6492         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6493         #                        If False : closure by creation of an edge between ends.
6494         #  @param theName Object name; when specified, this parameter is used
6495         #         for result publication in the study. Otherwise, if automatic
6496         #         publication is switched on, default value is used for result name.
6497         #
6498         #  @return New GEOM.GEOM_Object, containing processed shape.
6499         #
6500         #  @ref tui_close_contour "Example"
6501         @ManageTransactions("HealOp")
6502         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6503             """
6504             Close an open wire.
6505
6506             Parameters:
6507                 theObject Shape to be processed.
6508                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6509                          if [ ], then theObject itself is a wire.
6510                 isCommonVertex If True  : closure by creation of a common vertex,
6511                                If False : closure by creation of an edge between ends.
6512                 theName Object name; when specified, this parameter is used
6513                         for result publication in the study. Otherwise, if automatic
6514                         publication is switched on, default value is used for result name.
6515
6516             Returns:
6517                 New GEOM.GEOM_Object, containing processed shape.
6518             """
6519             # Example: see GEOM_TestHealing.py
6520             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6521             RaiseIfFailed("CloseContour", self.HealOp)
6522             self._autoPublish(anObj, theName, "closeContour")
6523             return anObj
6524
6525         ## Addition of a point to a given edge object.
6526         #  @param theObject Shape to be processed.
6527         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6528         #                      if -1, then theObject itself is the edge.
6529         #  @param theValue Value of parameter on edge or length parameter,
6530         #                  depending on \a isByParameter.
6531         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6532         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6533         #  @param theName Object name; when specified, this parameter is used
6534         #         for result publication in the study. Otherwise, if automatic
6535         #         publication is switched on, default value is used for result name.
6536         #
6537         #  @return New GEOM.GEOM_Object, containing processed shape.
6538         #
6539         #  @ref tui_add_point_on_edge "Example"
6540         @ManageTransactions("HealOp")
6541         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6542             """
6543             Addition of a point to a given edge object.
6544
6545             Parameters:
6546                 theObject Shape to be processed.
6547                 theEdgeIndex Index of edge to be divided within theObject's shape,
6548                              if -1, then theObject itself is the edge.
6549                 theValue Value of parameter on edge or length parameter,
6550                          depending on isByParameter.
6551                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6552                               if FALSE : theValue is treated as a length parameter [0..1]
6553                 theName Object name; when specified, this parameter is used
6554                         for result publication in the study. Otherwise, if automatic
6555                         publication is switched on, default value is used for result name.
6556
6557             Returns:
6558                 New GEOM.GEOM_Object, containing processed shape.
6559             """
6560             # Example: see GEOM_TestHealing.py
6561             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6562             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6563             RaiseIfFailed("DivideEdge", self.HealOp)
6564             anObj.SetParameters(Parameters)
6565             self._autoPublish(anObj, theName, "divideEdge")
6566             return anObj
6567
6568         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6569         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6570         #  @param theVertices A list of vertices to suppress. If the list
6571         #                     is empty, all vertices in a wire will be assumed.
6572         #  @param theName Object name; when specified, this parameter is used
6573         #         for result publication in the study. Otherwise, if automatic
6574         #         publication is switched on, default value is used for result name.
6575         #
6576         #  @return New GEOM.GEOM_Object with modified wire.
6577         #
6578         #  @ref tui_fuse_collinear_edges "Example"
6579         @ManageTransactions("HealOp")
6580         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6581             """
6582             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6583
6584             Parameters:
6585                 theWire Wire to minimize the number of C1 continuous edges in.
6586                 theVertices A list of vertices to suppress. If the list
6587                             is empty, all vertices in a wire will be assumed.
6588                 theName Object name; when specified, this parameter is used
6589                         for result publication in the study. Otherwise, if automatic
6590                         publication is switched on, default value is used for result name.
6591
6592             Returns:
6593                 New GEOM.GEOM_Object with modified wire.
6594             """
6595             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6596             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6597             self._autoPublish(anObj, theName, "fuseEdges")
6598             return anObj
6599
6600         ## Change orientation of the given object. Updates given shape.
6601         #  @param theObject Shape to be processed.
6602         #  @return Updated <var>theObject</var>
6603         #
6604         #  @ref swig_todo "Example"
6605         @ManageTransactions("HealOp")
6606         def ChangeOrientationShell(self,theObject):
6607             """
6608             Change orientation of the given object. Updates given shape.
6609
6610             Parameters:
6611                 theObject Shape to be processed.
6612
6613             Returns:
6614                 Updated theObject
6615             """
6616             theObject = self.HealOp.ChangeOrientation(theObject)
6617             RaiseIfFailed("ChangeOrientation", self.HealOp)
6618             pass
6619
6620         ## Change orientation of the given object.
6621         #  @param theObject Shape to be processed.
6622         #  @param theName Object name; when specified, this parameter is used
6623         #         for result publication in the study. Otherwise, if automatic
6624         #         publication is switched on, default value is used for result name.
6625         #
6626         #  @return New GEOM.GEOM_Object, containing processed shape.
6627         #
6628         #  @ref swig_todo "Example"
6629         @ManageTransactions("HealOp")
6630         def ChangeOrientationShellCopy(self, theObject, theName=None):
6631             """
6632             Change orientation of the given object.
6633
6634             Parameters:
6635                 theObject Shape to be processed.
6636                 theName Object name; when specified, this parameter is used
6637                         for result publication in the study. Otherwise, if automatic
6638                         publication is switched on, default value is used for result name.
6639
6640             Returns:
6641                 New GEOM.GEOM_Object, containing processed shape.
6642             """
6643             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6644             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6645             self._autoPublish(anObj, theName, "reversed")
6646             return anObj
6647
6648         ## Try to limit tolerance of the given object by value \a theTolerance.
6649         #  @param theObject Shape to be processed.
6650         #  @param theTolerance Required tolerance value.
6651         #  @param theName Object name; when specified, this parameter is used
6652         #         for result publication in the study. Otherwise, if automatic
6653         #         publication is switched on, default value is used for result name.
6654         #
6655         #  @return New GEOM.GEOM_Object, containing processed shape.
6656         #
6657         #  @ref tui_limit_tolerance "Example"
6658         @ManageTransactions("HealOp")
6659         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6660             """
6661             Try to limit tolerance of the given object by value theTolerance.
6662
6663             Parameters:
6664                 theObject Shape to be processed.
6665                 theTolerance Required tolerance value.
6666                 theName Object name; when specified, this parameter is used
6667                         for result publication in the study. Otherwise, if automatic
6668                         publication is switched on, default value is used for result name.
6669
6670             Returns:
6671                 New GEOM.GEOM_Object, containing processed shape.
6672             """
6673             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6674             RaiseIfFailed("LimitTolerance", self.HealOp)
6675             self._autoPublish(anObj, theName, "limitTolerance")
6676             return anObj
6677
6678         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6679         #  that constitute a free boundary of the given shape.
6680         #  @param theObject Shape to get free boundary of.
6681         #  @param theName Object name; when specified, this parameter is used
6682         #         for result publication in the study. Otherwise, if automatic
6683         #         publication is switched on, default value is used for result name.
6684         #
6685         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6686         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6687         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6688         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6689         #
6690         #  @ref tui_measurement_tools_page "Example"
6691         @ManageTransactions("HealOp")
6692         def GetFreeBoundary(self, theObject, theName=None):
6693             """
6694             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6695             that constitute a free boundary of the given shape.
6696
6697             Parameters:
6698                 theObject Shape to get free boundary of.
6699                 theName Object name; when specified, this parameter is used
6700                         for result publication in the study. Otherwise, if automatic
6701                         publication is switched on, default value is used for result name.
6702
6703             Returns:
6704                 [status, theClosedWires, theOpenWires]
6705                  status: FALSE, if an error(s) occured during the method execution.
6706                  theClosedWires: Closed wires on the free boundary of the given shape.
6707                  theOpenWires: Open wires on the free boundary of the given shape.
6708             """
6709             # Example: see GEOM_TestHealing.py
6710             anObj = self.HealOp.GetFreeBoundary(theObject)
6711             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6712             self._autoPublish(anObj[1], theName, "closedWire")
6713             self._autoPublish(anObj[2], theName, "openWire")
6714             return anObj
6715
6716         ## Replace coincident faces in theShape by one face.
6717         #  @param theShape Initial shape.
6718         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6719         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6720         #                         otherwise all initial shapes.
6721         #  @param theName Object name; when specified, this parameter is used
6722         #         for result publication in the study. Otherwise, if automatic
6723         #         publication is switched on, default value is used for result name.
6724         #
6725         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6726         #
6727         #  @ref tui_glue_faces "Example"
6728         @ManageTransactions("ShapesOp")
6729         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6730             """
6731             Replace coincident faces in theShape by one face.
6732
6733             Parameters:
6734                 theShape Initial shape.
6735                 theTolerance Maximum distance between faces, which can be considered as coincident.
6736                 doKeepNonSolids If FALSE, only solids will present in the result,
6737                                 otherwise all initial shapes.
6738                 theName Object name; when specified, this parameter is used
6739                         for result publication in the study. Otherwise, if automatic
6740                         publication is switched on, default value is used for result name.
6741
6742             Returns:
6743                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6744             """
6745             # Example: see GEOM_Spanner.py
6746             theTolerance,Parameters = ParseParameters(theTolerance)
6747             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6748             if anObj is None:
6749                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6750             anObj.SetParameters(Parameters)
6751             self._autoPublish(anObj, theName, "glueFaces")
6752             return anObj
6753
6754         ## Find coincident faces in theShape for possible gluing.
6755         #  @param theShape Initial shape.
6756         #  @param theTolerance Maximum distance between faces,
6757         #                      which can be considered as coincident.
6758         #  @param theName Object name; when specified, this parameter is used
6759         #         for result publication in the study. Otherwise, if automatic
6760         #         publication is switched on, default value is used for result name.
6761         #
6762         #  @return GEOM.ListOfGO
6763         #
6764         #  @ref tui_glue_faces "Example"
6765         @ManageTransactions("ShapesOp")
6766         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6767             """
6768             Find coincident faces in theShape for possible gluing.
6769
6770             Parameters:
6771                 theShape Initial shape.
6772                 theTolerance Maximum distance between faces,
6773                              which can be considered as coincident.
6774                 theName Object name; when specified, this parameter is used
6775                         for result publication in the study. Otherwise, if automatic
6776                         publication is switched on, default value is used for result name.
6777
6778             Returns:
6779                 GEOM.ListOfGO
6780             """
6781             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6782             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6783             self._autoPublish(anObj, theName, "facesToGlue")
6784             return anObj
6785
6786         ## Replace coincident faces in theShape by one face
6787         #  in compliance with given list of faces
6788         #  @param theShape Initial shape.
6789         #  @param theTolerance Maximum distance between faces,
6790         #                      which can be considered as coincident.
6791         #  @param theFaces List of faces for gluing.
6792         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6793         #                         otherwise all initial shapes.
6794         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6795         #                        will be glued, otherwise only the edges,
6796         #                        belonging to <VAR>theFaces</VAR>.
6797         #  @param theName Object name; when specified, this parameter is used
6798         #         for result publication in the study. Otherwise, if automatic
6799         #         publication is switched on, default value is used for result name.
6800         #
6801         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6802         #          without some faces.
6803         #
6804         #  @ref tui_glue_faces "Example"
6805         @ManageTransactions("ShapesOp")
6806         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6807                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6808             """
6809             Replace coincident faces in theShape by one face
6810             in compliance with given list of faces
6811
6812             Parameters:
6813                 theShape Initial shape.
6814                 theTolerance Maximum distance between faces,
6815                              which can be considered as coincident.
6816                 theFaces List of faces for gluing.
6817                 doKeepNonSolids If FALSE, only solids will present in the result,
6818                                 otherwise all initial shapes.
6819                 doGlueAllEdges If TRUE, all coincident edges of theShape
6820                                will be glued, otherwise only the edges,
6821                                belonging to theFaces.
6822                 theName Object name; when specified, this parameter is used
6823                         for result publication in the study. Otherwise, if automatic
6824                         publication is switched on, default value is used for result name.
6825
6826             Returns:
6827                 New GEOM.GEOM_Object, containing a copy of theShape
6828                     without some faces.
6829             """
6830             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6831                                                       doKeepNonSolids, doGlueAllEdges)
6832             if anObj is None:
6833                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6834             self._autoPublish(anObj, theName, "glueFaces")
6835             return anObj
6836
6837         ## Replace coincident edges in theShape by one edge.
6838         #  @param theShape Initial shape.
6839         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6840         #  @param theName Object name; when specified, this parameter is used
6841         #         for result publication in the study. Otherwise, if automatic
6842         #         publication is switched on, default value is used for result name.
6843         #
6844         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6845         #
6846         #  @ref tui_glue_edges "Example"
6847         @ManageTransactions("ShapesOp")
6848         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6849             """
6850             Replace coincident edges in theShape by one edge.
6851
6852             Parameters:
6853                 theShape Initial shape.
6854                 theTolerance Maximum distance between edges, which can be considered as coincident.
6855                 theName Object name; when specified, this parameter is used
6856                         for result publication in the study. Otherwise, if automatic
6857                         publication is switched on, default value is used for result name.
6858
6859             Returns:
6860                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6861             """
6862             theTolerance,Parameters = ParseParameters(theTolerance)
6863             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6864             if anObj is None:
6865                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6866             anObj.SetParameters(Parameters)
6867             self._autoPublish(anObj, theName, "glueEdges")
6868             return anObj
6869
6870         ## Find coincident edges in theShape for possible gluing.
6871         #  @param theShape Initial shape.
6872         #  @param theTolerance Maximum distance between edges,
6873         #                      which can be considered as coincident.
6874         #  @param theName Object name; when specified, this parameter is used
6875         #         for result publication in the study. Otherwise, if automatic
6876         #         publication is switched on, default value is used for result name.
6877         #
6878         #  @return GEOM.ListOfGO
6879         #
6880         #  @ref tui_glue_edges "Example"
6881         @ManageTransactions("ShapesOp")
6882         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6883             """
6884             Find coincident edges in theShape for possible gluing.
6885
6886             Parameters:
6887                 theShape Initial shape.
6888                 theTolerance Maximum distance between edges,
6889                              which can be considered as coincident.
6890                 theName Object name; when specified, this parameter is used
6891                         for result publication in the study. Otherwise, if automatic
6892                         publication is switched on, default value is used for result name.
6893
6894             Returns:
6895                 GEOM.ListOfGO
6896             """
6897             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6898             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6899             self._autoPublish(anObj, theName, "edgesToGlue")
6900             return anObj
6901
6902         ## Replace coincident edges in theShape by one edge
6903         #  in compliance with given list of edges.
6904         #  @param theShape Initial shape.
6905         #  @param theTolerance Maximum distance between edges,
6906         #                      which can be considered as coincident.
6907         #  @param theEdges List of edges for gluing.
6908         #  @param theName Object name; when specified, this parameter is used
6909         #         for result publication in the study. Otherwise, if automatic
6910         #         publication is switched on, default value is used for result name.
6911         #
6912         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6913         #          without some edges.
6914         #
6915         #  @ref tui_glue_edges "Example"
6916         @ManageTransactions("ShapesOp")
6917         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6918             """
6919             Replace coincident edges in theShape by one edge
6920             in compliance with given list of edges.
6921
6922             Parameters:
6923                 theShape Initial shape.
6924                 theTolerance Maximum distance between edges,
6925                              which can be considered as coincident.
6926                 theEdges List of edges for gluing.
6927                 theName Object name; when specified, this parameter is used
6928                         for result publication in the study. Otherwise, if automatic
6929                         publication is switched on, default value is used for result name.
6930
6931             Returns:
6932                 New GEOM.GEOM_Object, containing a copy of theShape
6933                 without some edges.
6934             """
6935             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6936             if anObj is None:
6937                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6938             self._autoPublish(anObj, theName, "glueEdges")
6939             return anObj
6940
6941         # end of l3_healing
6942         ## @}
6943
6944         ## @addtogroup l3_boolean Boolean Operations
6945         ## @{
6946
6947         # -----------------------------------------------------------------------------
6948         # Boolean (Common, Cut, Fuse, Section)
6949         # -----------------------------------------------------------------------------
6950
6951         ## Perform one of boolean operations on two given shapes.
6952         #  @param theShape1 First argument for boolean operation.
6953         #  @param theShape2 Second argument for boolean operation.
6954         #  @param theOperation Indicates the operation to be done:\n
6955         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6956         #  @param checkSelfInte The flag that tells if the arguments should
6957         #         be checked for self-intersection prior to the operation.
6958         #  @param theName Object name; when specified, this parameter is used
6959         #         for result publication in the study. Otherwise, if automatic
6960         #         publication is switched on, default value is used for result name.
6961         #
6962         #  @note This algorithm doesn't find all types of self-intersections.
6963         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6964         #        vertex/face and edge/face intersections. Face/face
6965         #        intersections detection is switched off as it is a
6966         #        time-consuming operation that gives an impact on performance.
6967         #        To find all self-intersections please use
6968         #        CheckSelfIntersections() method.
6969         #
6970         #  @return New GEOM.GEOM_Object, containing the result shape.
6971         #
6972         #  @ref tui_fuse "Example"
6973         @ManageTransactions("BoolOp")
6974         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
6975             """
6976             Perform one of boolean operations on two given shapes.
6977
6978             Parameters:
6979                 theShape1 First argument for boolean operation.
6980                 theShape2 Second argument for boolean operation.
6981                 theOperation Indicates the operation to be done:
6982                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6983                 checkSelfInte The flag that tells if the arguments should
6984                               be checked for self-intersection prior to
6985                               the operation.
6986                 theName Object name; when specified, this parameter is used
6987                         for result publication in the study. Otherwise, if automatic
6988                         publication is switched on, default value is used for result name.
6989
6990             Note:
6991                     This algorithm doesn't find all types of self-intersections.
6992                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6993                     vertex/face and edge/face intersections. Face/face
6994                     intersections detection is switched off as it is a
6995                     time-consuming operation that gives an impact on performance.
6996                     To find all self-intersections please use
6997                     CheckSelfIntersections() method.
6998
6999             Returns:
7000                 New GEOM.GEOM_Object, containing the result shape.
7001             """
7002             # Example: see GEOM_TestAll.py
7003             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7004             RaiseIfFailed("MakeBoolean", self.BoolOp)
7005             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7006             self._autoPublish(anObj, theName, def_names[theOperation])
7007             return anObj
7008
7009         ## Perform Common boolean operation on two given shapes.
7010         #  @param theShape1 First argument for boolean operation.
7011         #  @param theShape2 Second argument for boolean operation.
7012         #  @param checkSelfInte The flag that tells if the arguments should
7013         #         be checked for self-intersection prior to the operation.
7014         #  @param theName Object name; when specified, this parameter is used
7015         #         for result publication in the study. Otherwise, if automatic
7016         #         publication is switched on, default value is used for result name.
7017         #
7018         #  @note This algorithm doesn't find all types of self-intersections.
7019         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7020         #        vertex/face and edge/face intersections. Face/face
7021         #        intersections detection is switched off as it is a
7022         #        time-consuming operation that gives an impact on performance.
7023         #        To find all self-intersections please use
7024         #        CheckSelfIntersections() method.
7025         #
7026         #  @return New GEOM.GEOM_Object, containing the result shape.
7027         #
7028         #  @ref tui_common "Example 1"
7029         #  \n @ref swig_MakeCommon "Example 2"
7030         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7031             """
7032             Perform Common boolean operation on two given shapes.
7033
7034             Parameters:
7035                 theShape1 First argument for boolean operation.
7036                 theShape2 Second argument for boolean operation.
7037                 checkSelfInte The flag that tells if the arguments should
7038                               be checked for self-intersection prior to
7039                               the operation.
7040                 theName Object name; when specified, this parameter is used
7041                         for result publication in the study. Otherwise, if automatic
7042                         publication is switched on, default value is used for result name.
7043
7044             Note:
7045                     This algorithm doesn't find all types of self-intersections.
7046                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7047                     vertex/face and edge/face intersections. Face/face
7048                     intersections detection is switched off as it is a
7049                     time-consuming operation that gives an impact on performance.
7050                     To find all self-intersections please use
7051                     CheckSelfIntersections() method.
7052
7053             Returns:
7054                 New GEOM.GEOM_Object, containing the result shape.
7055             """
7056             # Example: see GEOM_TestOthers.py
7057             # note: auto-publishing is done in self.MakeBoolean()
7058             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7059
7060         ## Perform Cut boolean operation on two given shapes.
7061         #  @param theShape1 First argument for boolean operation.
7062         #  @param theShape2 Second argument for boolean operation.
7063         #  @param checkSelfInte The flag that tells if the arguments should
7064         #         be checked for self-intersection prior to the operation.
7065         #  @param theName Object name; when specified, this parameter is used
7066         #         for result publication in the study. Otherwise, if automatic
7067         #         publication is switched on, default value is used for result name.
7068         #
7069         #  @note This algorithm doesn't find all types of self-intersections.
7070         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7071         #        vertex/face and edge/face intersections. Face/face
7072         #        intersections detection is switched off as it is a
7073         #        time-consuming operation that gives an impact on performance.
7074         #        To find all self-intersections please use
7075         #        CheckSelfIntersections() method.
7076         #
7077         #  @return New GEOM.GEOM_Object, containing the result shape.
7078         #
7079         #  @ref tui_cut "Example 1"
7080         #  \n @ref swig_MakeCommon "Example 2"
7081         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7082             """
7083             Perform Cut boolean operation on two given shapes.
7084
7085             Parameters:
7086                 theShape1 First argument for boolean operation.
7087                 theShape2 Second argument for boolean operation.
7088                 checkSelfInte The flag that tells if the arguments should
7089                               be checked for self-intersection prior to
7090                               the operation.
7091                 theName Object name; when specified, this parameter is used
7092                         for result publication in the study. Otherwise, if automatic
7093                         publication is switched on, default value is used for result name.
7094
7095             Note:
7096                     This algorithm doesn't find all types of self-intersections.
7097                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7098                     vertex/face and edge/face intersections. Face/face
7099                     intersections detection is switched off as it is a
7100                     time-consuming operation that gives an impact on performance.
7101                     To find all self-intersections please use
7102                     CheckSelfIntersections() method.
7103
7104             Returns:
7105                 New GEOM.GEOM_Object, containing the result shape.
7106
7107             """
7108             # Example: see GEOM_TestOthers.py
7109             # note: auto-publishing is done in self.MakeBoolean()
7110             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7111
7112         ## Perform Fuse boolean operation on two given shapes.
7113         #  @param theShape1 First argument for boolean operation.
7114         #  @param theShape2 Second argument for boolean operation.
7115         #  @param checkSelfInte The flag that tells if the arguments should
7116         #         be checked for self-intersection prior to the operation.
7117         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7118         #         operation should be performed during the operation.
7119         #  @param theName Object name; when specified, this parameter is used
7120         #         for result publication in the study. Otherwise, if automatic
7121         #         publication is switched on, default value is used for result name.
7122         #
7123         #  @note This algorithm doesn't find all types of self-intersections.
7124         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7125         #        vertex/face and edge/face intersections. Face/face
7126         #        intersections detection is switched off as it is a
7127         #        time-consuming operation that gives an impact on performance.
7128         #        To find all self-intersections please use
7129         #        CheckSelfIntersections() method.
7130         #
7131         #  @return New GEOM.GEOM_Object, containing the result shape.
7132         #
7133         #  @ref tui_fuse "Example 1"
7134         #  \n @ref swig_MakeCommon "Example 2"
7135         @ManageTransactions("BoolOp")
7136         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7137                      rmExtraEdges=False, theName=None):
7138             """
7139             Perform Fuse boolean operation on two given shapes.
7140
7141             Parameters:
7142                 theShape1 First argument for boolean operation.
7143                 theShape2 Second argument for boolean operation.
7144                 checkSelfInte The flag that tells if the arguments should
7145                               be checked for self-intersection prior to
7146                               the operation.
7147                 rmExtraEdges The flag that tells if Remove Extra Edges
7148                              operation should be performed during the operation.
7149                 theName Object name; when specified, this parameter is used
7150                         for result publication in the study. Otherwise, if automatic
7151                         publication is switched on, default value is used for result name.
7152
7153             Note:
7154                     This algorithm doesn't find all types of self-intersections.
7155                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7156                     vertex/face and edge/face intersections. Face/face
7157                     intersections detection is switched off as it is a
7158                     time-consuming operation that gives an impact on performance.
7159                     To find all self-intersections please use
7160                     CheckSelfIntersections() method.
7161
7162             Returns:
7163                 New GEOM.GEOM_Object, containing the result shape.
7164
7165             """
7166             # Example: see GEOM_TestOthers.py
7167             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7168                                          checkSelfInte, rmExtraEdges)
7169             RaiseIfFailed("MakeFuse", self.BoolOp)
7170             self._autoPublish(anObj, theName, "fuse")
7171             return anObj
7172
7173         ## Perform Section boolean operation on two given shapes.
7174         #  @param theShape1 First argument for boolean operation.
7175         #  @param theShape2 Second argument for boolean operation.
7176         #  @param checkSelfInte The flag that tells if the arguments should
7177         #         be checked for self-intersection prior to the operation.
7178         #  @param theName Object name; when specified, this parameter is used
7179         #         for result publication in the study. Otherwise, if automatic
7180         #         publication is switched on, default value is used for result name.
7181         #
7182         #  @note This algorithm doesn't find all types of self-intersections.
7183         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7184         #        vertex/face and edge/face intersections. Face/face
7185         #        intersections detection is switched off as it is a
7186         #        time-consuming operation that gives an impact on performance.
7187         #        To find all self-intersections please use
7188         #        CheckSelfIntersections() method.
7189         #
7190         #  @return New GEOM.GEOM_Object, containing the result shape.
7191         #
7192         #  @ref tui_section "Example 1"
7193         #  \n @ref swig_MakeCommon "Example 2"
7194         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7195             """
7196             Perform Section boolean operation on two given shapes.
7197
7198             Parameters:
7199                 theShape1 First argument for boolean operation.
7200                 theShape2 Second argument for boolean operation.
7201                 checkSelfInte The flag that tells if the arguments should
7202                               be checked for self-intersection prior to
7203                               the operation.
7204                 theName Object name; when specified, this parameter is used
7205                         for result publication in the study. Otherwise, if automatic
7206                         publication is switched on, default value is used for result name.
7207
7208             Note:
7209                     This algorithm doesn't find all types of self-intersections.
7210                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7211                     vertex/face and edge/face intersections. Face/face
7212                     intersections detection is switched off as it is a
7213                     time-consuming operation that gives an impact on performance.
7214                     To find all self-intersections please use
7215                     CheckSelfIntersections() method.
7216
7217             Returns:
7218                 New GEOM.GEOM_Object, containing the result shape.
7219
7220             """
7221             # Example: see GEOM_TestOthers.py
7222             # note: auto-publishing is done in self.MakeBoolean()
7223             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7224
7225         ## Perform Fuse boolean operation on the list of shapes.
7226         #  @param theShapesList Shapes to be fused.
7227         #  @param checkSelfInte The flag that tells if the arguments should
7228         #         be checked for self-intersection prior to the operation.
7229         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7230         #         operation should be performed during the operation.
7231         #  @param theName Object name; when specified, this parameter is used
7232         #         for result publication in the study. Otherwise, if automatic
7233         #         publication is switched on, default value is used for result name.
7234         #
7235         #  @note This algorithm doesn't find all types of self-intersections.
7236         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7237         #        vertex/face and edge/face intersections. Face/face
7238         #        intersections detection is switched off as it is a
7239         #        time-consuming operation that gives an impact on performance.
7240         #        To find all self-intersections please use
7241         #        CheckSelfIntersections() method.
7242         #
7243         #  @return New GEOM.GEOM_Object, containing the result shape.
7244         #
7245         #  @ref tui_fuse "Example 1"
7246         #  \n @ref swig_MakeCommon "Example 2"
7247         @ManageTransactions("BoolOp")
7248         def MakeFuseList(self, theShapesList, checkSelfInte=False,
7249                          rmExtraEdges=False, theName=None):
7250             """
7251             Perform Fuse boolean operation on the list of shapes.
7252
7253             Parameters:
7254                 theShapesList Shapes to be fused.
7255                 checkSelfInte The flag that tells if the arguments should
7256                               be checked for self-intersection prior to
7257                               the operation.
7258                 rmExtraEdges The flag that tells if Remove Extra Edges
7259                              operation should be performed during the operation.
7260                 theName Object name; when specified, this parameter is used
7261                         for result publication in the study. Otherwise, if automatic
7262                         publication is switched on, default value is used for result name.
7263
7264             Note:
7265                     This algorithm doesn't find all types of self-intersections.
7266                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7267                     vertex/face and edge/face intersections. Face/face
7268                     intersections detection is switched off as it is a
7269                     time-consuming operation that gives an impact on performance.
7270                     To find all self-intersections please use
7271                     CheckSelfIntersections() method.
7272
7273             Returns:
7274                 New GEOM.GEOM_Object, containing the result shape.
7275
7276             """
7277             # Example: see GEOM_TestOthers.py
7278             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
7279                                              rmExtraEdges)
7280             RaiseIfFailed("MakeFuseList", self.BoolOp)
7281             self._autoPublish(anObj, theName, "fuse")
7282             return anObj
7283
7284         ## Perform Common boolean operation on the list of shapes.
7285         #  @param theShapesList Shapes for Common operation.
7286         #  @param checkSelfInte The flag that tells if the arguments should
7287         #         be checked for self-intersection prior to the operation.
7288         #  @param theName Object name; when specified, this parameter is used
7289         #         for result publication in the study. Otherwise, if automatic
7290         #         publication is switched on, default value is used for result name.
7291         #
7292         #  @note This algorithm doesn't find all types of self-intersections.
7293         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7294         #        vertex/face and edge/face intersections. Face/face
7295         #        intersections detection is switched off as it is a
7296         #        time-consuming operation that gives an impact on performance.
7297         #        To find all self-intersections please use
7298         #        CheckSelfIntersections() method.
7299         #
7300         #  @return New GEOM.GEOM_Object, containing the result shape.
7301         #
7302         #  @ref tui_common "Example 1"
7303         #  \n @ref swig_MakeCommon "Example 2"
7304         @ManageTransactions("BoolOp")
7305         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7306             """
7307             Perform Common boolean operation on the list of shapes.
7308
7309             Parameters:
7310                 theShapesList Shapes for Common operation.
7311                 checkSelfInte The flag that tells if the arguments should
7312                               be checked for self-intersection prior to
7313                               the operation.
7314                 theName Object name; when specified, this parameter is used
7315                         for result publication in the study. Otherwise, if automatic
7316                         publication is switched on, default value is used for result name.
7317
7318             Note:
7319                     This algorithm doesn't find all types of self-intersections.
7320                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7321                     vertex/face and edge/face intersections. Face/face
7322                     intersections detection is switched off as it is a
7323                     time-consuming operation that gives an impact on performance.
7324                     To find all self-intersections please use
7325                     CheckSelfIntersections() method.
7326
7327             Returns:
7328                 New GEOM.GEOM_Object, containing the result shape.
7329
7330             """
7331             # Example: see GEOM_TestOthers.py
7332             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7333             RaiseIfFailed("MakeCommonList", self.BoolOp)
7334             self._autoPublish(anObj, theName, "common")
7335             return anObj
7336
7337         ## Perform Cut boolean operation on one object and the list of tools.
7338         #  @param theMainShape The object of the operation.
7339         #  @param theShapesList The list of tools of the operation.
7340         #  @param checkSelfInte The flag that tells if the arguments should
7341         #         be checked for self-intersection prior to the operation.
7342         #  @param theName Object name; when specified, this parameter is used
7343         #         for result publication in the study. Otherwise, if automatic
7344         #         publication is switched on, default value is used for result name.
7345         #
7346         #  @note This algorithm doesn't find all types of self-intersections.
7347         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7348         #        vertex/face and edge/face intersections. Face/face
7349         #        intersections detection is switched off as it is a
7350         #        time-consuming operation that gives an impact on performance.
7351         #        To find all self-intersections please use
7352         #        CheckSelfIntersections() method.
7353         #
7354         #  @return New GEOM.GEOM_Object, containing the result shape.
7355         #
7356         #  @ref tui_cut "Example 1"
7357         #  \n @ref swig_MakeCommon "Example 2"
7358         @ManageTransactions("BoolOp")
7359         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7360             """
7361             Perform Cut boolean operation on one object and the list of tools.
7362
7363             Parameters:
7364                 theMainShape The object of the operation.
7365                 theShapesList The list of tools of the operation.
7366                 checkSelfInte The flag that tells if the arguments should
7367                               be checked for self-intersection prior to
7368                               the operation.
7369                 theName Object name; when specified, this parameter is used
7370                         for result publication in the study. Otherwise, if automatic
7371                         publication is switched on, default value is used for result name.
7372
7373             Note:
7374                     This algorithm doesn't find all types of self-intersections.
7375                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7376                     vertex/face and edge/face intersections. Face/face
7377                     intersections detection is switched off as it is a
7378                     time-consuming operation that gives an impact on performance.
7379                     To find all self-intersections please use
7380                     CheckSelfIntersections() method.
7381
7382             Returns:
7383                 New GEOM.GEOM_Object, containing the result shape.
7384
7385             """
7386             # Example: see GEOM_TestOthers.py
7387             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7388             RaiseIfFailed("MakeCutList", self.BoolOp)
7389             self._autoPublish(anObj, theName, "cut")
7390             return anObj
7391
7392         # end of l3_boolean
7393         ## @}
7394
7395         ## @addtogroup l3_basic_op
7396         ## @{
7397
7398         ## Perform partition operation.
7399         #  @param ListShapes Shapes to be intersected.
7400         #  @param ListTools Shapes to intersect theShapes.
7401         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7402         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7403         #         type will be detected automatically.
7404         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7405         #                             target type (equal to Limit) are kept in the result,
7406         #                             else standalone shapes of lower dimension
7407         #                             are kept also (if they exist).
7408         #
7409         #  @param theName Object name; when specified, this parameter is used
7410         #         for result publication in the study. Otherwise, if automatic
7411         #         publication is switched on, default value is used for result name.
7412         #
7413         #  @note Each compound from ListShapes and ListTools will be exploded
7414         #        in order to avoid possible intersection between shapes from this compound.
7415         #
7416         #  After implementation new version of PartitionAlgo (October 2006)
7417         #  other parameters are ignored by current functionality. They are kept
7418         #  in this function only for support old versions.
7419         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7420         #         Each shape from theKeepInside must belong to theShapes also.
7421         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7422         #         Each shape from theRemoveInside must belong to theShapes also.
7423         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7424         #      @param ListMaterials Material indices for each shape. Make sence,
7425         #         only if theRemoveWebs is TRUE.
7426         #
7427         #  @return New GEOM.GEOM_Object, containing the result shapes.
7428         #
7429         #  @ref tui_partition "Example"
7430         @ManageTransactions("BoolOp")
7431         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7432                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7433                           KeepNonlimitShapes=0, theName=None):
7434             """
7435             Perform partition operation.
7436
7437             Parameters:
7438                 ListShapes Shapes to be intersected.
7439                 ListTools Shapes to intersect theShapes.
7440                 Limit Type of resulting shapes (see geompy.ShapeType)
7441                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7442                       type will be detected automatically.
7443                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7444                                     target type (equal to Limit) are kept in the result,
7445                                     else standalone shapes of lower dimension
7446                                     are kept also (if they exist).
7447
7448                 theName Object name; when specified, this parameter is used
7449                         for result publication in the study. Otherwise, if automatic
7450                         publication is switched on, default value is used for result name.
7451             Note:
7452                     Each compound from ListShapes and ListTools will be exploded
7453                     in order to avoid possible intersection between shapes from
7454                     this compound.
7455
7456             After implementation new version of PartitionAlgo (October 2006) other
7457             parameters are ignored by current functionality. They are kept in this
7458             function only for support old versions.
7459
7460             Ignored parameters:
7461                 ListKeepInside Shapes, outside which the results will be deleted.
7462                                Each shape from theKeepInside must belong to theShapes also.
7463                 ListRemoveInside Shapes, inside which the results will be deleted.
7464                                  Each shape from theRemoveInside must belong to theShapes also.
7465                 RemoveWebs If TRUE, perform Glue 3D algorithm.
7466                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
7467
7468             Returns:
7469                 New GEOM.GEOM_Object, containing the result shapes.
7470             """
7471             # Example: see GEOM_TestAll.py
7472             if Limit == self.ShapeType["AUTO"]:
7473                 # automatic detection of the most appropriate shape limit type
7474                 lim = GEOM.SHAPE
7475                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7476                 Limit = EnumToLong(lim)
7477                 pass
7478             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
7479                                               ListKeepInside, ListRemoveInside,
7480                                               Limit, RemoveWebs, ListMaterials,
7481                                               KeepNonlimitShapes);
7482             RaiseIfFailed("MakePartition", self.BoolOp)
7483             self._autoPublish(anObj, theName, "partition")
7484             return anObj
7485
7486         ## Perform partition operation.
7487         #  This method may be useful if it is needed to make a partition for
7488         #  compound contains nonintersected shapes. Performance will be better
7489         #  since intersection between shapes from compound is not performed.
7490         #
7491         #  Description of all parameters as in previous method MakePartition().
7492         #  One additional parameter is provided:
7493         #  @param checkSelfInte The flag that tells if the arguments should
7494         #         be checked for self-intersection prior to the operation.
7495         #
7496         #  @note This algorithm doesn't find all types of self-intersections.
7497         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7498         #        vertex/face and edge/face intersections. Face/face
7499         #        intersections detection is switched off as it is a
7500         #        time-consuming operation that gives an impact on performance.
7501         #        To find all self-intersections please use
7502         #        CheckSelfIntersections() method.
7503         #
7504         #  @note Passed compounds (via ListShapes or via ListTools)
7505         #           have to consist of nonintersecting shapes.
7506         #
7507         #  @return New GEOM.GEOM_Object, containing the result shapes.
7508         #
7509         #  @ref swig_todo "Example"
7510         @ManageTransactions("BoolOp")
7511         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
7512                                                  ListKeepInside=[], ListRemoveInside=[],
7513                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
7514                                                  ListMaterials=[], KeepNonlimitShapes=0,
7515                                                  checkSelfInte=False, theName=None):
7516             """
7517             Perform partition operation.
7518             This method may be useful if it is needed to make a partition for
7519             compound contains nonintersected shapes. Performance will be better
7520             since intersection between shapes from compound is not performed.
7521
7522             Parameters:
7523                 Description of all parameters as in method geompy.MakePartition.
7524                 One additional parameter is provided:
7525                 checkSelfInte The flag that tells if the arguments should
7526                               be checked for self-intersection prior to
7527                               the operation.
7528
7529             Note:
7530                     This algorithm doesn't find all types of self-intersections.
7531                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7532                     vertex/face and edge/face intersections. Face/face
7533                     intersections detection is switched off as it is a
7534                     time-consuming operation that gives an impact on performance.
7535                     To find all self-intersections please use
7536                     CheckSelfIntersections() method.
7537
7538             NOTE:
7539                 Passed compounds (via ListShapes or via ListTools)
7540                 have to consist of nonintersecting shapes.
7541
7542             Returns:
7543                 New GEOM.GEOM_Object, containing the result shapes.
7544             """
7545             if Limit == self.ShapeType["AUTO"]:
7546                 # automatic detection of the most appropriate shape limit type
7547                 lim = GEOM.SHAPE
7548                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7549                 Limit = EnumToLong(lim)
7550                 pass
7551             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7552                                                                      ListKeepInside, ListRemoveInside,
7553                                                                      Limit, RemoveWebs, ListMaterials,
7554                                                                      KeepNonlimitShapes, checkSelfInte);
7555             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7556             self._autoPublish(anObj, theName, "partition")
7557             return anObj
7558
7559         ## See method MakePartition() for more information.
7560         #
7561         #  @ref tui_partition "Example 1"
7562         #  \n @ref swig_Partition "Example 2"
7563         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7564                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7565                       KeepNonlimitShapes=0, theName=None):
7566             """
7567             See method geompy.MakePartition for more information.
7568             """
7569             # Example: see GEOM_TestOthers.py
7570             # note: auto-publishing is done in self.MakePartition()
7571             anObj = self.MakePartition(ListShapes, ListTools,
7572                                        ListKeepInside, ListRemoveInside,
7573                                        Limit, RemoveWebs, ListMaterials,
7574                                        KeepNonlimitShapes, theName);
7575             return anObj
7576
7577         ## Perform partition of the Shape with the Plane
7578         #  @param theShape Shape to be intersected.
7579         #  @param thePlane Tool shape, to intersect theShape.
7580         #  @param theName Object name; when specified, this parameter is used
7581         #         for result publication in the study. Otherwise, if automatic
7582         #         publication is switched on, default value is used for result name.
7583         #
7584         #  @return New GEOM.GEOM_Object, containing the result shape.
7585         #
7586         #  @ref tui_partition "Example"
7587         @ManageTransactions("BoolOp")
7588         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7589             """
7590             Perform partition of the Shape with the Plane
7591
7592             Parameters:
7593                 theShape Shape to be intersected.
7594                 thePlane Tool shape, to intersect theShape.
7595                 theName Object name; when specified, this parameter is used
7596                         for result publication in the study. Otherwise, if automatic
7597                         publication is switched on, default value is used for result name.
7598
7599             Returns:
7600                 New GEOM.GEOM_Object, containing the result shape.
7601             """
7602             # Example: see GEOM_TestAll.py
7603             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7604             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7605             self._autoPublish(anObj, theName, "partition")
7606             return anObj
7607
7608         # end of l3_basic_op
7609         ## @}
7610
7611         ## @addtogroup l3_transform
7612         ## @{
7613
7614         ## Translate the given object along the vector, specified
7615         #  by its end points.
7616         #  @param theObject The object to be translated.
7617         #  @param thePoint1 Start point of translation vector.
7618         #  @param thePoint2 End point of translation vector.
7619         #  @param theCopy Flag used to translate object itself or create a copy.
7620         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7621         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7622         @ManageTransactions("TrsfOp")
7623         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7624             """
7625             Translate the given object along the vector, specified by its end points.
7626
7627             Parameters:
7628                 theObject The object to be translated.
7629                 thePoint1 Start point of translation vector.
7630                 thePoint2 End point of translation vector.
7631                 theCopy Flag used to translate object itself or create a copy.
7632
7633             Returns:
7634                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7635                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7636             """
7637             if theCopy:
7638                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7639             else:
7640                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7641             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7642             return anObj
7643
7644         ## Translate the given object along the vector, specified
7645         #  by its end points, creating its copy before the translation.
7646         #  @param theObject The object to be translated.
7647         #  @param thePoint1 Start point of translation vector.
7648         #  @param thePoint2 End point of translation vector.
7649         #  @param theName Object name; when specified, this parameter is used
7650         #         for result publication in the study. Otherwise, if automatic
7651         #         publication is switched on, default value is used for result name.
7652         #
7653         #  @return New GEOM.GEOM_Object, containing the translated object.
7654         #
7655         #  @ref tui_translation "Example 1"
7656         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7657         @ManageTransactions("TrsfOp")
7658         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7659             """
7660             Translate the given object along the vector, specified
7661             by its end points, creating its copy before the translation.
7662
7663             Parameters:
7664                 theObject The object to be translated.
7665                 thePoint1 Start point of translation vector.
7666                 thePoint2 End point of translation vector.
7667                 theName Object name; when specified, this parameter is used
7668                         for result publication in the study. Otherwise, if automatic
7669                         publication is switched on, default value is used for result name.
7670
7671             Returns:
7672                 New GEOM.GEOM_Object, containing the translated object.
7673             """
7674             # Example: see GEOM_TestAll.py
7675             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7676             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7677             self._autoPublish(anObj, theName, "translated")
7678             return anObj
7679
7680         ## Translate the given object along the vector, specified by its components.
7681         #  @param theObject The object to be translated.
7682         #  @param theDX,theDY,theDZ Components of translation vector.
7683         #  @param theCopy Flag used to translate object itself or create a copy.
7684         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7685         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7686         #
7687         #  @ref tui_translation "Example"
7688         @ManageTransactions("TrsfOp")
7689         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7690             """
7691             Translate the given object along the vector, specified by its components.
7692
7693             Parameters:
7694                 theObject The object to be translated.
7695                 theDX,theDY,theDZ Components of translation vector.
7696                 theCopy Flag used to translate object itself or create a copy.
7697
7698             Returns:
7699                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7700                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7701             """
7702             # Example: see GEOM_TestAll.py
7703             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7704             if theCopy:
7705                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7706             else:
7707                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7708             anObj.SetParameters(Parameters)
7709             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7710             return anObj
7711
7712         ## Translate the given object along the vector, specified
7713         #  by its components, creating its copy before the translation.
7714         #  @param theObject The object to be translated.
7715         #  @param theDX,theDY,theDZ Components of translation vector.
7716         #  @param theName Object name; when specified, this parameter is used
7717         #         for result publication in the study. Otherwise, if automatic
7718         #         publication is switched on, default value is used for result name.
7719         #
7720         #  @return New GEOM.GEOM_Object, containing the translated object.
7721         #
7722         #  @ref tui_translation "Example"
7723         @ManageTransactions("TrsfOp")
7724         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7725             """
7726             Translate the given object along the vector, specified
7727             by its components, creating its copy before the translation.
7728
7729             Parameters:
7730                 theObject The object to be translated.
7731                 theDX,theDY,theDZ Components of translation vector.
7732                 theName Object name; when specified, this parameter is used
7733                         for result publication in the study. Otherwise, if automatic
7734                         publication is switched on, default value is used for result name.
7735
7736             Returns:
7737                 New GEOM.GEOM_Object, containing the translated object.
7738             """
7739             # Example: see GEOM_TestAll.py
7740             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7741             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7742             anObj.SetParameters(Parameters)
7743             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7744             self._autoPublish(anObj, theName, "translated")
7745             return anObj
7746
7747         ## Translate the given object along the given vector.
7748         #  @param theObject The object to be translated.
7749         #  @param theVector The translation vector.
7750         #  @param theCopy Flag used to translate object itself or create a copy.
7751         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7752         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7753         @ManageTransactions("TrsfOp")
7754         def TranslateVector(self, theObject, theVector, theCopy=False):
7755             """
7756             Translate the given object along the given vector.
7757
7758             Parameters:
7759                 theObject The object to be translated.
7760                 theVector The translation vector.
7761                 theCopy Flag used to translate object itself or create a copy.
7762
7763             Returns:
7764                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7765                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7766             """
7767             if theCopy:
7768                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7769             else:
7770                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7771             RaiseIfFailed("TranslateVector", self.TrsfOp)
7772             return anObj
7773
7774         ## Translate the given object along the given vector,
7775         #  creating its copy before the translation.
7776         #  @param theObject The object to be translated.
7777         #  @param theVector The translation vector.
7778         #  @param theName Object name; when specified, this parameter is used
7779         #         for result publication in the study. Otherwise, if automatic
7780         #         publication is switched on, default value is used for result name.
7781         #
7782         #  @return New GEOM.GEOM_Object, containing the translated object.
7783         #
7784         #  @ref tui_translation "Example"
7785         @ManageTransactions("TrsfOp")
7786         def MakeTranslationVector(self, theObject, theVector, theName=None):
7787             """
7788             Translate the given object along the given vector,
7789             creating its copy before the translation.
7790
7791             Parameters:
7792                 theObject The object to be translated.
7793                 theVector The translation vector.
7794                 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             Returns:
7799                 New GEOM.GEOM_Object, containing the translated object.
7800             """
7801             # Example: see GEOM_TestAll.py
7802             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7803             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7804             self._autoPublish(anObj, theName, "translated")
7805             return anObj
7806
7807         ## Translate the given object along the given vector on given distance.
7808         #  @param theObject The object to be translated.
7809         #  @param theVector The translation vector.
7810         #  @param theDistance The translation distance.
7811         #  @param theCopy Flag used to translate object itself or create a copy.
7812         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7813         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7814         #
7815         #  @ref tui_translation "Example"
7816         @ManageTransactions("TrsfOp")
7817         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7818             """
7819             Translate the given object along the given vector on given distance.
7820
7821             Parameters:
7822                 theObject The object to be translated.
7823                 theVector The translation vector.
7824                 theDistance The translation distance.
7825                 theCopy Flag used to translate object itself or create a copy.
7826
7827             Returns:
7828                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7829                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7830             """
7831             # Example: see GEOM_TestAll.py
7832             theDistance,Parameters = ParseParameters(theDistance)
7833             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7834             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7835             anObj.SetParameters(Parameters)
7836             return anObj
7837
7838         ## Translate the given object along the given vector on given distance,
7839         #  creating its copy before the translation.
7840         #  @param theObject The object to be translated.
7841         #  @param theVector The translation vector.
7842         #  @param theDistance The translation distance.
7843         #  @param theName Object name; when specified, this parameter is used
7844         #         for result publication in the study. Otherwise, if automatic
7845         #         publication is switched on, default value is used for result name.
7846         #
7847         #  @return New GEOM.GEOM_Object, containing the translated object.
7848         #
7849         #  @ref tui_translation "Example"
7850         @ManageTransactions("TrsfOp")
7851         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7852             """
7853             Translate the given object along the given vector on given distance,
7854             creating its copy before the translation.
7855
7856             Parameters:
7857                 theObject The object to be translated.
7858                 theVector The translation vector.
7859                 theDistance The translation distance.
7860                 theName Object name; when specified, this parameter is used
7861                         for result publication in the study. Otherwise, if automatic
7862                         publication is switched on, default value is used for result name.
7863
7864             Returns:
7865                 New GEOM.GEOM_Object, containing the translated object.
7866             """
7867             # Example: see GEOM_TestAll.py
7868             theDistance,Parameters = ParseParameters(theDistance)
7869             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7870             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7871             anObj.SetParameters(Parameters)
7872             self._autoPublish(anObj, theName, "translated")
7873             return anObj
7874
7875         ## Rotate the given object around the given axis on the given angle.
7876         #  @param theObject The object to be rotated.
7877         #  @param theAxis Rotation axis.
7878         #  @param theAngle Rotation angle in radians.
7879         #  @param theCopy Flag used to rotate object itself or create a copy.
7880         #
7881         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7882         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7883         #
7884         #  @ref tui_rotation "Example"
7885         @ManageTransactions("TrsfOp")
7886         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7887             """
7888             Rotate the given object around the given axis on the given angle.
7889
7890             Parameters:
7891                 theObject The object to be rotated.
7892                 theAxis Rotation axis.
7893                 theAngle Rotation angle in radians.
7894                 theCopy Flag used to rotate object itself or create a copy.
7895
7896             Returns:
7897                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7898                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7899             """
7900             # Example: see GEOM_TestAll.py
7901             flag = False
7902             if isinstance(theAngle,str):
7903                 flag = True
7904             theAngle, Parameters = ParseParameters(theAngle)
7905             if flag:
7906                 theAngle = theAngle*math.pi/180.0
7907             if theCopy:
7908                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7909             else:
7910                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7911             RaiseIfFailed("Rotate", self.TrsfOp)
7912             anObj.SetParameters(Parameters)
7913             return anObj
7914
7915         ## Rotate the given object around the given axis
7916         #  on the given angle, creating its copy before the rotation.
7917         #  @param theObject The object to be rotated.
7918         #  @param theAxis Rotation axis.
7919         #  @param theAngle Rotation angle in radians.
7920         #  @param theName Object name; when specified, this parameter is used
7921         #         for result publication in the study. Otherwise, if automatic
7922         #         publication is switched on, default value is used for result name.
7923         #
7924         #  @return New GEOM.GEOM_Object, containing the rotated object.
7925         #
7926         #  @ref tui_rotation "Example"
7927         @ManageTransactions("TrsfOp")
7928         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7929             """
7930             Rotate the given object around the given axis
7931             on the given angle, creating its copy before the rotatation.
7932
7933             Parameters:
7934                 theObject The object to be rotated.
7935                 theAxis Rotation axis.
7936                 theAngle Rotation angle in radians.
7937                 theName Object name; when specified, this parameter is used
7938                         for result publication in the study. Otherwise, if automatic
7939                         publication is switched on, default value is used for result name.
7940
7941             Returns:
7942                 New GEOM.GEOM_Object, containing the rotated object.
7943             """
7944             # Example: see GEOM_TestAll.py
7945             flag = False
7946             if isinstance(theAngle,str):
7947                 flag = True
7948             theAngle, Parameters = ParseParameters(theAngle)
7949             if flag:
7950                 theAngle = theAngle*math.pi/180.0
7951             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7952             RaiseIfFailed("RotateCopy", self.TrsfOp)
7953             anObj.SetParameters(Parameters)
7954             self._autoPublish(anObj, theName, "rotated")
7955             return anObj
7956
7957         ## Rotate given object around vector perpendicular to plane
7958         #  containing three points.
7959         #  @param theObject The object to be rotated.
7960         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7961         #  containing the three points.
7962         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7963         #  @param theCopy Flag used to rotate object itself or create a copy.
7964         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7965         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7966         @ManageTransactions("TrsfOp")
7967         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7968             """
7969             Rotate given object around vector perpendicular to plane
7970             containing three points.
7971
7972             Parameters:
7973                 theObject The object to be rotated.
7974                 theCentPoint central point  the axis is the vector perpendicular to the plane
7975                              containing the three points.
7976                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7977                 theCopy Flag used to rotate object itself or create a copy.
7978
7979             Returns:
7980                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7981                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7982             """
7983             if theCopy:
7984                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7985             else:
7986                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7987             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7988             return anObj
7989
7990         ## Rotate given object around vector perpendicular to plane
7991         #  containing three points, creating its copy before the rotatation.
7992         #  @param theObject The object to be rotated.
7993         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7994         #  containing the three points.
7995         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7996         #  @param theName Object name; when specified, this parameter is used
7997         #         for result publication in the study. Otherwise, if automatic
7998         #         publication is switched on, default value is used for result name.
7999         #
8000         #  @return New GEOM.GEOM_Object, containing the rotated object.
8001         #
8002         #  @ref tui_rotation "Example"
8003         @ManageTransactions("TrsfOp")
8004         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8005             """
8006             Rotate given object around vector perpendicular to plane
8007             containing three points, creating its copy before the rotatation.
8008
8009             Parameters:
8010                 theObject The object to be rotated.
8011                 theCentPoint central point  the axis is the vector perpendicular to the plane
8012                              containing the three points.
8013                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8014                 theName Object name; when specified, this parameter is used
8015                         for result publication in the study. Otherwise, if automatic
8016                         publication is switched on, default value is used for result name.
8017
8018             Returns:
8019                 New GEOM.GEOM_Object, containing the rotated object.
8020             """
8021             # Example: see GEOM_TestAll.py
8022             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8023             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8024             self._autoPublish(anObj, theName, "rotated")
8025             return anObj
8026
8027         ## Scale the given object by the specified factor.
8028         #  @param theObject The object to be scaled.
8029         #  @param thePoint Center point for scaling.
8030         #                  Passing None for it means scaling relatively the origin of global CS.
8031         #  @param theFactor Scaling factor value.
8032         #  @param theCopy Flag used to scale object itself or create a copy.
8033         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8034         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8035         @ManageTransactions("TrsfOp")
8036         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8037             """
8038             Scale the given object by the specified factor.
8039
8040             Parameters:
8041                 theObject The object to be scaled.
8042                 thePoint Center point for scaling.
8043                          Passing None for it means scaling relatively the origin of global CS.
8044                 theFactor Scaling factor value.
8045                 theCopy Flag used to scale object itself or create a copy.
8046
8047             Returns:
8048                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8049                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8050             """
8051             # Example: see GEOM_TestAll.py
8052             theFactor, Parameters = ParseParameters(theFactor)
8053             if theCopy:
8054                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8055             else:
8056                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8057             RaiseIfFailed("Scale", self.TrsfOp)
8058             anObj.SetParameters(Parameters)
8059             return anObj
8060
8061         ## Scale the given object by the factor, creating its copy before the scaling.
8062         #  @param theObject The object to be scaled.
8063         #  @param thePoint Center point for scaling.
8064         #                  Passing None for it means scaling relatively the origin of global CS.
8065         #  @param theFactor Scaling factor value.
8066         #  @param theName Object name; when specified, this parameter is used
8067         #         for result publication in the study. Otherwise, if automatic
8068         #         publication is switched on, default value is used for result name.
8069         #
8070         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8071         #
8072         #  @ref tui_scale "Example"
8073         @ManageTransactions("TrsfOp")
8074         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8075             """
8076             Scale the given object by the factor, creating its copy before the scaling.
8077
8078             Parameters:
8079                 theObject The object to be scaled.
8080                 thePoint Center point for scaling.
8081                          Passing None for it means scaling relatively the origin of global CS.
8082                 theFactor Scaling factor value.
8083                 theName Object name; when specified, this parameter is used
8084                         for result publication in the study. Otherwise, if automatic
8085                         publication is switched on, default value is used for result name.
8086
8087             Returns:
8088                 New GEOM.GEOM_Object, containing the scaled shape.
8089             """
8090             # Example: see GEOM_TestAll.py
8091             theFactor, Parameters = ParseParameters(theFactor)
8092             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8093             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8094             anObj.SetParameters(Parameters)
8095             self._autoPublish(anObj, theName, "scaled")
8096             return anObj
8097
8098         ## Scale the given object by different factors along coordinate axes.
8099         #  @param theObject The object to be scaled.
8100         #  @param thePoint Center point for scaling.
8101         #                  Passing None for it means scaling relatively the origin of global CS.
8102         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8103         #  @param theCopy Flag used to scale object itself or create a copy.
8104         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8105         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8106         @ManageTransactions("TrsfOp")
8107         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8108             """
8109             Scale the given object by different factors along coordinate axes.
8110
8111             Parameters:
8112                 theObject The object to be scaled.
8113                 thePoint Center point for scaling.
8114                             Passing None for it means scaling relatively the origin of global CS.
8115                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8116                 theCopy Flag used to scale object itself or create a copy.
8117
8118             Returns:
8119                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8120                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8121             """
8122             # Example: see GEOM_TestAll.py
8123             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8124             if theCopy:
8125                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8126                                                             theFactorX, theFactorY, theFactorZ)
8127             else:
8128                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8129                                                         theFactorX, theFactorY, theFactorZ)
8130             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8131             anObj.SetParameters(Parameters)
8132             return anObj
8133
8134         ## Scale the given object by different factors along coordinate axes,
8135         #  creating its copy before the scaling.
8136         #  @param theObject The object to be scaled.
8137         #  @param thePoint Center point for scaling.
8138         #                  Passing None for it means scaling relatively the origin of global CS.
8139         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8140         #  @param theName Object name; when specified, this parameter is used
8141         #         for result publication in the study. Otherwise, if automatic
8142         #         publication is switched on, default value is used for result name.
8143         #
8144         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8145         #
8146         #  @ref swig_scale "Example"
8147         @ManageTransactions("TrsfOp")
8148         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8149             """
8150             Scale the given object by different factors along coordinate axes,
8151             creating its copy before the scaling.
8152
8153             Parameters:
8154                 theObject The object to be scaled.
8155                 thePoint Center point for scaling.
8156                             Passing None for it means scaling relatively the origin of global CS.
8157                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8158                 theName Object name; when specified, this parameter is used
8159                         for result publication in the study. Otherwise, if automatic
8160                         publication is switched on, default value is used for result name.
8161
8162             Returns:
8163                 New GEOM.GEOM_Object, containing the scaled shape.
8164             """
8165             # Example: see GEOM_TestAll.py
8166             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8167             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8168                                                         theFactorX, theFactorY, theFactorZ)
8169             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8170             anObj.SetParameters(Parameters)
8171             self._autoPublish(anObj, theName, "scaled")
8172             return anObj
8173
8174         ## Mirror an object relatively the given plane.
8175         #  @param theObject The object to be mirrored.
8176         #  @param thePlane Plane of symmetry.
8177         #  @param theCopy Flag used to mirror object itself or create a copy.
8178         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8179         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8180         @ManageTransactions("TrsfOp")
8181         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8182             """
8183             Mirror an object relatively the given plane.
8184
8185             Parameters:
8186                 theObject The object to be mirrored.
8187                 thePlane Plane of symmetry.
8188                 theCopy Flag used to mirror object itself or create a copy.
8189
8190             Returns:
8191                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8192                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8193             """
8194             if theCopy:
8195                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8196             else:
8197                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8198             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8199             return anObj
8200
8201         ## Create an object, symmetrical
8202         #  to the given one relatively the given plane.
8203         #  @param theObject The object to be mirrored.
8204         #  @param thePlane Plane of symmetry.
8205         #  @param theName Object name; when specified, this parameter is used
8206         #         for result publication in the study. Otherwise, if automatic
8207         #         publication is switched on, default value is used for result name.
8208         #
8209         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8210         #
8211         #  @ref tui_mirror "Example"
8212         @ManageTransactions("TrsfOp")
8213         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8214             """
8215             Create an object, symmetrical to the given one relatively the given plane.
8216
8217             Parameters:
8218                 theObject The object to be mirrored.
8219                 thePlane Plane of symmetry.
8220                 theName Object name; when specified, this parameter is used
8221                         for result publication in the study. Otherwise, if automatic
8222                         publication is switched on, default value is used for result name.
8223
8224             Returns:
8225                 New GEOM.GEOM_Object, containing the mirrored shape.
8226             """
8227             # Example: see GEOM_TestAll.py
8228             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8229             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
8230             self._autoPublish(anObj, theName, "mirrored")
8231             return anObj
8232
8233         ## Mirror an object relatively the given axis.
8234         #  @param theObject The object to be mirrored.
8235         #  @param theAxis Axis of symmetry.
8236         #  @param theCopy Flag used to mirror object itself or create a copy.
8237         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8238         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8239         @ManageTransactions("TrsfOp")
8240         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
8241             """
8242             Mirror an object relatively the given axis.
8243
8244             Parameters:
8245                 theObject The object to be mirrored.
8246                 theAxis Axis of symmetry.
8247                 theCopy Flag used to mirror object itself or create a copy.
8248
8249             Returns:
8250                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8251                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8252             """
8253             if theCopy:
8254                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8255             else:
8256                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
8257             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
8258             return anObj
8259
8260         ## Create an object, symmetrical
8261         #  to the given one relatively the given axis.
8262         #  @param theObject The object to be mirrored.
8263         #  @param theAxis Axis of symmetry.
8264         #  @param theName Object name; when specified, this parameter is used
8265         #         for result publication in the study. Otherwise, if automatic
8266         #         publication is switched on, default value is used for result name.
8267         #
8268         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8269         #
8270         #  @ref tui_mirror "Example"
8271         @ManageTransactions("TrsfOp")
8272         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
8273             """
8274             Create an object, symmetrical to the given one relatively the given axis.
8275
8276             Parameters:
8277                 theObject The object to be mirrored.
8278                 theAxis Axis of symmetry.
8279                 theName Object name; when specified, this parameter is used
8280                         for result publication in the study. Otherwise, if automatic
8281                         publication is switched on, default value is used for result name.
8282
8283             Returns:
8284                 New GEOM.GEOM_Object, containing the mirrored shape.
8285             """
8286             # Example: see GEOM_TestAll.py
8287             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8288             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
8289             self._autoPublish(anObj, theName, "mirrored")
8290             return anObj
8291
8292         ## Mirror an object relatively the given point.
8293         #  @param theObject The object to be mirrored.
8294         #  @param thePoint Point of symmetry.
8295         #  @param theCopy Flag used to mirror object itself or create a copy.
8296         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8297         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8298         @ManageTransactions("TrsfOp")
8299         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8300             """
8301             Mirror an object relatively the given point.
8302
8303             Parameters:
8304                 theObject The object to be mirrored.
8305                 thePoint Point of symmetry.
8306                 theCopy Flag used to mirror object itself or create a copy.
8307
8308             Returns:
8309                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8310                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8311             """
8312             # Example: see GEOM_TestAll.py
8313             if theCopy:
8314                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8315             else:
8316                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8317             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8318             return anObj
8319
8320         ## Create an object, symmetrical
8321         #  to the given one relatively the given point.
8322         #  @param theObject The object to be mirrored.
8323         #  @param thePoint Point of symmetry.
8324         #  @param theName Object name; when specified, this parameter is used
8325         #         for result publication in the study. Otherwise, if automatic
8326         #         publication is switched on, default value is used for result name.
8327         #
8328         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8329         #
8330         #  @ref tui_mirror "Example"
8331         @ManageTransactions("TrsfOp")
8332         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8333             """
8334             Create an object, symmetrical
8335             to the given one relatively the given point.
8336
8337             Parameters:
8338                 theObject The object to be mirrored.
8339                 thePoint Point of symmetry.
8340                 theName Object name; when specified, this parameter is used
8341                         for result publication in the study. Otherwise, if automatic
8342                         publication is switched on, default value is used for result name.
8343
8344             Returns:
8345                 New GEOM.GEOM_Object, containing the mirrored shape.
8346             """
8347             # Example: see GEOM_TestAll.py
8348             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8349             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8350             self._autoPublish(anObj, theName, "mirrored")
8351             return anObj
8352
8353         ## Modify the location of the given object.
8354         #  @param theObject The object to be displaced.
8355         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8356         #                     If \a theStartLCS is NULL, displacement
8357         #                     will be performed from global CS.\n
8358         #                     If \a theObject itself is used as \a theStartLCS,
8359         #                     its location will be changed to \a theEndLCS.
8360         #  @param theEndLCS Coordinate system to perform displacement to it.
8361         #  @param theCopy Flag used to displace object itself or create a copy.
8362         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8363         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8364         @ManageTransactions("TrsfOp")
8365         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8366             """
8367             Modify the Location of the given object by LCS, creating its copy before the setting.
8368
8369             Parameters:
8370                 theObject The object to be displaced.
8371                 theStartLCS Coordinate system to perform displacement from it.
8372                             If theStartLCS is NULL, displacement
8373                             will be performed from global CS.
8374                             If theObject itself is used as theStartLCS,
8375                             its location will be changed to theEndLCS.
8376                 theEndLCS Coordinate system to perform displacement to it.
8377                 theCopy Flag used to displace object itself or create a copy.
8378
8379             Returns:
8380                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8381                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8382             """
8383             # Example: see GEOM_TestAll.py
8384             if theCopy:
8385                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8386             else:
8387                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8388             RaiseIfFailed("Displace", self.TrsfOp)
8389             return anObj
8390
8391         ## Modify the Location of the given object by LCS,
8392         #  creating its copy before the setting.
8393         #  @param theObject The object to be displaced.
8394         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8395         #                     If \a theStartLCS is NULL, displacement
8396         #                     will be performed from global CS.\n
8397         #                     If \a theObject itself is used as \a theStartLCS,
8398         #                     its location will be changed to \a theEndLCS.
8399         #  @param theEndLCS Coordinate system to perform displacement to it.
8400         #  @param theName Object name; when specified, this parameter is used
8401         #         for result publication in the study. Otherwise, if automatic
8402         #         publication is switched on, default value is used for result name.
8403         #
8404         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8405         #
8406         #  @ref tui_modify_location "Example"
8407         @ManageTransactions("TrsfOp")
8408         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8409             """
8410             Modify the Location of the given object by LCS, creating its copy before the setting.
8411
8412             Parameters:
8413                 theObject The object to be displaced.
8414                 theStartLCS Coordinate system to perform displacement from it.
8415                             If theStartLCS is NULL, displacement
8416                             will be performed from global CS.
8417                             If theObject itself is used as theStartLCS,
8418                             its location will be changed to theEndLCS.
8419                 theEndLCS Coordinate system to perform displacement to it.
8420                 theName Object name; when specified, this parameter is used
8421                         for result publication in the study. Otherwise, if automatic
8422                         publication is switched on, default value is used for result name.
8423
8424             Returns:
8425                 New GEOM.GEOM_Object, containing the displaced shape.
8426
8427             Example of usage:
8428                 # create local coordinate systems
8429                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8430                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8431                 # modify the location of the given object
8432                 position = geompy.MakePosition(cylinder, cs1, cs2)
8433             """
8434             # Example: see GEOM_TestAll.py
8435             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8436             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8437             self._autoPublish(anObj, theName, "displaced")
8438             return anObj
8439
8440         ## Modify the Location of the given object by Path.
8441         #  @param  theObject The object to be displaced.
8442         #  @param  thePath Wire or Edge along that the object will be translated.
8443         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
8444         #  @param  theCopy is to create a copy objects if true.
8445         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
8446         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
8447         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
8448         #
8449         #  @ref tui_modify_location "Example"
8450         @ManageTransactions("TrsfOp")
8451         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
8452             """
8453             Modify the Location of the given object by Path.
8454
8455             Parameters:
8456                  theObject The object to be displaced.
8457                  thePath Wire or Edge along that the object will be translated.
8458                  theDistance progress of Path (0 = start location, 1 = end of path location).
8459                  theCopy is to create a copy objects if true.
8460                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8461
8462             Returns:
8463                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
8464                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
8465
8466             Example of usage:
8467                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
8468             """
8469             # Example: see GEOM_TestAll.py
8470             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
8471             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8472             return anObj
8473
8474         ## Modify the Location of the given object by Path, creating its copy before the operation.
8475         #  @param theObject The object to be displaced.
8476         #  @param thePath Wire or Edge along that the object will be translated.
8477         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
8478         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
8479         #  @param theName Object name; when specified, this parameter is used
8480         #         for result publication in the study. Otherwise, if automatic
8481         #         publication is switched on, default value is used for result name.
8482         #
8483         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8484         @ManageTransactions("TrsfOp")
8485         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
8486             """
8487             Modify the Location of the given object by Path, creating its copy before the operation.
8488
8489             Parameters:
8490                  theObject The object to be displaced.
8491                  thePath Wire or Edge along that the object will be translated.
8492                  theDistance progress of Path (0 = start location, 1 = end of path location).
8493                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8494                  theName Object name; when specified, this parameter is used
8495                          for result publication in the study. Otherwise, if automatic
8496                          publication is switched on, default value is used for result name.
8497
8498             Returns:
8499                 New GEOM.GEOM_Object, containing the displaced shape.
8500             """
8501             # Example: see GEOM_TestAll.py
8502             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
8503             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8504             self._autoPublish(anObj, theName, "displaced")
8505             return anObj
8506
8507         ## Offset given shape.
8508         #  @param theObject The base object for the offset.
8509         #  @param theOffset Offset value.
8510         #  @param theCopy Flag used to offset object itself or create a copy.
8511         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8512         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
8513         @ManageTransactions("TrsfOp")
8514         def Offset(self, theObject, theOffset, theCopy=False):
8515             """
8516             Offset given shape.
8517
8518             Parameters:
8519                 theObject The base object for the offset.
8520                 theOffset Offset value.
8521                 theCopy Flag used to offset object itself or create a copy.
8522
8523             Returns:
8524                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8525                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8526             """
8527             theOffset, Parameters = ParseParameters(theOffset)
8528             if theCopy:
8529                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8530             else:
8531                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8532             RaiseIfFailed("Offset", self.TrsfOp)
8533             anObj.SetParameters(Parameters)
8534             return anObj
8535
8536         ## Create new object as offset of the given one.
8537         #  @param theObject The base object for the offset.
8538         #  @param theOffset Offset value.
8539         #  @param theName Object name; when specified, this parameter is used
8540         #         for result publication in the study. Otherwise, if automatic
8541         #         publication is switched on, default value is used for result name.
8542         #
8543         #  @return New GEOM.GEOM_Object, containing the offset object.
8544         #
8545         #  @ref tui_offset "Example"
8546         @ManageTransactions("TrsfOp")
8547         def MakeOffset(self, theObject, theOffset, theName=None):
8548             """
8549             Create new object as offset of the given one.
8550
8551             Parameters:
8552                 theObject The base object for the offset.
8553                 theOffset Offset value.
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 offset object.
8560
8561             Example of usage:
8562                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8563                  # create a new object as offset of the given object
8564                  offset = geompy.MakeOffset(box, 70.)
8565             """
8566             # Example: see GEOM_TestAll.py
8567             theOffset, Parameters = ParseParameters(theOffset)
8568             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8569             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8570             anObj.SetParameters(Parameters)
8571             self._autoPublish(anObj, theName, "offset")
8572             return anObj
8573
8574         ## Create new object as projection of the given one on a 2D surface.
8575         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8576         #  @param theTarget The target object. It can be planar or cylindrical face.
8577         #  @param theName Object name; when specified, this parameter is used
8578         #         for result publication in the study. Otherwise, if automatic
8579         #         publication is switched on, default value is used for result name.
8580         #
8581         #  @return New GEOM.GEOM_Object, containing the projection.
8582         #
8583         #  @ref tui_projection "Example"
8584         @ManageTransactions("TrsfOp")
8585         def MakeProjection(self, theSource, theTarget, theName=None):
8586             """
8587             Create new object as projection of the given one on a 2D surface.
8588
8589             Parameters:
8590                 theSource The source object for the projection. It can be a point, edge or wire.
8591                 theTarget The target object. It can be planar or cylindrical face.
8592                 theName Object name; when specified, this parameter is used
8593                         for result publication in the study. Otherwise, if automatic
8594                         publication is switched on, default value is used for result name.
8595
8596             Returns:
8597                 New GEOM.GEOM_Object, containing the projection.
8598             """
8599             # Example: see GEOM_TestAll.py
8600             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8601             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8602             self._autoPublish(anObj, theName, "projection")
8603             return anObj
8604
8605         ## Create a projection projection of the given point on a wire or an edge.
8606         #  If there are no solutions or there are 2 or more solutions It throws an
8607         #  exception.
8608         #  @param thePoint the point to be projected.
8609         #  @param theWire the wire. The edge is accepted as well.
8610         #  @param theName Object name; when specified, this parameter is used
8611         #         for result publication in the study. Otherwise, if automatic
8612         #         publication is switched on, default value is used for result name.
8613         #
8614         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8615         #  \n \a u: The parameter of projection point on edge.
8616         #  \n \a PointOnEdge: The projection point.
8617         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8618         #
8619         #  @ref tui_projection "Example"
8620         @ManageTransactions("TrsfOp")
8621         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8622             """
8623             Create a projection projection of the given point on a wire or an edge.
8624             If there are no solutions or there are 2 or more solutions It throws an
8625             exception.
8626
8627             Parameters:
8628                 thePoint the point to be projected.
8629                 theWire the wire. The edge is accepted as well.
8630                 theName Object name; when specified, this parameter is used
8631                         for result publication in the study. Otherwise, if automatic
8632                         publication is switched on, default value is used for result name.
8633
8634             Returns:
8635                 [u, PointOnEdge, EdgeInWireIndex]
8636                  u: The parameter of projection point on edge.
8637                  PointOnEdge: The projection point.
8638                  EdgeInWireIndex: The index of an edge in a wire.
8639             """
8640             # Example: see GEOM_TestAll.py
8641             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
8642             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
8643             self._autoPublish(anObj[1], theName, "projection")
8644             return anObj
8645
8646         # -----------------------------------------------------------------------------
8647         # Patterns
8648         # -----------------------------------------------------------------------------
8649
8650         ## Translate the given object along the given vector a given number times
8651         #  @param theObject The object to be translated.
8652         #  @param theVector Direction of the translation. DX if None.
8653         #  @param theStep Distance to translate on.
8654         #  @param theNbTimes Quantity of translations to be done.
8655         #  @param theName Object name; when specified, this parameter is used
8656         #         for result publication in the study. Otherwise, if automatic
8657         #         publication is switched on, default value is used for result name.
8658         #
8659         #  @return New GEOM.GEOM_Object, containing compound of all
8660         #          the shapes, obtained after each translation.
8661         #
8662         #  @ref tui_multi_translation "Example"
8663         @ManageTransactions("TrsfOp")
8664         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8665             """
8666             Translate the given object along the given vector a given number times
8667
8668             Parameters:
8669                 theObject The object to be translated.
8670                 theVector Direction of the translation. DX if None.
8671                 theStep Distance to translate on.
8672                 theNbTimes Quantity of translations to be done.
8673                 theName Object name; when specified, this parameter is used
8674                         for result publication in the study. Otherwise, if automatic
8675                         publication is switched on, default value is used for result name.
8676
8677             Returns:
8678                 New GEOM.GEOM_Object, containing compound of all
8679                 the shapes, obtained after each translation.
8680
8681             Example of usage:
8682                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8683             """
8684             # Example: see GEOM_TestAll.py
8685             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8686             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8687             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8688             anObj.SetParameters(Parameters)
8689             self._autoPublish(anObj, theName, "multitranslation")
8690             return anObj
8691
8692         ## Conseqently apply two specified translations to theObject specified number of times.
8693         #  @param theObject The object to be translated.
8694         #  @param theVector1 Direction of the first translation. DX if None.
8695         #  @param theStep1 Step of the first translation.
8696         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8697         #  @param theVector2 Direction of the second translation. DY if None.
8698         #  @param theStep2 Step of the second translation.
8699         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8700         #  @param theName Object name; when specified, this parameter is used
8701         #         for result publication in the study. Otherwise, if automatic
8702         #         publication is switched on, default value is used for result name.
8703         #
8704         #  @return New GEOM.GEOM_Object, containing compound of all
8705         #          the shapes, obtained after each translation.
8706         #
8707         #  @ref tui_multi_translation "Example"
8708         @ManageTransactions("TrsfOp")
8709         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8710                                    theVector2, theStep2, theNbTimes2, theName=None):
8711             """
8712             Conseqently apply two specified translations to theObject specified number of times.
8713
8714             Parameters:
8715                 theObject The object to be translated.
8716                 theVector1 Direction of the first translation. DX if None.
8717                 theStep1 Step of the first translation.
8718                 theNbTimes1 Quantity of translations to be done along theVector1.
8719                 theVector2 Direction of the second translation. DY if None.
8720                 theStep2 Step of the second translation.
8721                 theNbTimes2 Quantity of translations to be done along theVector2.
8722                 theName Object name; when specified, this parameter is used
8723                         for result publication in the study. Otherwise, if automatic
8724                         publication is switched on, default value is used for result name.
8725
8726             Returns:
8727                 New GEOM.GEOM_Object, containing compound of all
8728                 the shapes, obtained after each translation.
8729
8730             Example of usage:
8731                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8732             """
8733             # Example: see GEOM_TestAll.py
8734             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8735             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8736                                                  theVector2, theStep2, theNbTimes2)
8737             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8738             anObj.SetParameters(Parameters)
8739             self._autoPublish(anObj, theName, "multitranslation")
8740             return anObj
8741
8742         ## Rotate the given object around the given axis a given number times.
8743         #  Rotation angle will be 2*PI/theNbTimes.
8744         #  @param theObject The object to be rotated.
8745         #  @param theAxis The rotation axis. DZ if None.
8746         #  @param theNbTimes Quantity of rotations to be done.
8747         #  @param theName Object name; when specified, this parameter is used
8748         #         for result publication in the study. Otherwise, if automatic
8749         #         publication is switched on, default value is used for result name.
8750         #
8751         #  @return New GEOM.GEOM_Object, containing compound of all the
8752         #          shapes, obtained after each rotation.
8753         #
8754         #  @ref tui_multi_rotation "Example"
8755         @ManageTransactions("TrsfOp")
8756         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8757             """
8758             Rotate the given object around the given axis a given number times.
8759             Rotation angle will be 2*PI/theNbTimes.
8760
8761             Parameters:
8762                 theObject The object to be rotated.
8763                 theAxis The rotation axis. DZ if None.
8764                 theNbTimes Quantity of rotations to be done.
8765                 theName Object name; when specified, this parameter is used
8766                         for result publication in the study. Otherwise, if automatic
8767                         publication is switched on, default value is used for result name.
8768
8769             Returns:
8770                 New GEOM.GEOM_Object, containing compound of all the
8771                 shapes, obtained after each rotation.
8772
8773             Example of usage:
8774                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8775             """
8776             # Example: see GEOM_TestAll.py
8777             theNbTimes, Parameters = ParseParameters(theNbTimes)
8778             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8779             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8780             anObj.SetParameters(Parameters)
8781             self._autoPublish(anObj, theName, "multirotation")
8782             return anObj
8783
8784         ## Rotate the given object around the given axis
8785         #  a given number times on the given angle.
8786         #  @param theObject The object to be rotated.
8787         #  @param theAxis The rotation axis. DZ if None.
8788         #  @param theAngleStep Rotation angle in radians.
8789         #  @param theNbTimes Quantity of rotations to be done.
8790         #  @param theName Object name; when specified, this parameter is used
8791         #         for result publication in the study. Otherwise, if automatic
8792         #         publication is switched on, default value is used for result name.
8793         #
8794         #  @return New GEOM.GEOM_Object, containing compound of all the
8795         #          shapes, obtained after each rotation.
8796         #
8797         #  @ref tui_multi_rotation "Example"
8798         @ManageTransactions("TrsfOp")
8799         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8800             """
8801             Rotate the given object around the given axis
8802             a given number times on the given angle.
8803
8804             Parameters:
8805                 theObject The object to be rotated.
8806                 theAxis The rotation axis. DZ if None.
8807                 theAngleStep Rotation angle in radians.
8808                 theNbTimes Quantity of rotations to be done.
8809                 theName Object name; when specified, this parameter is used
8810                         for result publication in the study. Otherwise, if automatic
8811                         publication is switched on, default value is used for result name.
8812
8813             Returns:
8814                 New GEOM.GEOM_Object, containing compound of all the
8815                 shapes, obtained after each rotation.
8816
8817             Example of usage:
8818                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8819             """
8820             # Example: see GEOM_TestAll.py
8821             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8822             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8823             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8824             anObj.SetParameters(Parameters)
8825             self._autoPublish(anObj, theName, "multirotation")
8826             return anObj
8827
8828         ## Rotate the given object around the given axis a given
8829         #  number times and multi-translate each rotation result.
8830         #  Rotation angle will be 2*PI/theNbTimes1.
8831         #  Translation direction passes through center of gravity
8832         #  of rotated shape and its projection on the rotation axis.
8833         #  @param theObject The object to be rotated.
8834         #  @param theAxis Rotation axis. DZ if None.
8835         #  @param theNbTimes1 Quantity of rotations to be done.
8836         #  @param theRadialStep Translation distance.
8837         #  @param theNbTimes2 Quantity of translations to be done.
8838         #  @param theName Object name; when specified, this parameter is used
8839         #         for result publication in the study. Otherwise, if automatic
8840         #         publication is switched on, default value is used for result name.
8841         #
8842         #  @return New GEOM.GEOM_Object, containing compound of all the
8843         #          shapes, obtained after each transformation.
8844         #
8845         #  @ref tui_multi_rotation "Example"
8846         @ManageTransactions("TrsfOp")
8847         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8848             """
8849             Rotate the given object around the
8850             given axis on the given angle a given number
8851             times and multi-translate each rotation result.
8852             Translation direction passes through center of gravity
8853             of rotated shape and its projection on the rotation axis.
8854
8855             Parameters:
8856                 theObject The object to be rotated.
8857                 theAxis Rotation axis. DZ if None.
8858                 theNbTimes1 Quantity of rotations to be done.
8859                 theRadialStep Translation distance.
8860                 theNbTimes2 Quantity of translations to be done.
8861                 theName Object name; when specified, this parameter is used
8862                         for result publication in the study. Otherwise, if automatic
8863                         publication is switched on, default value is used for result name.
8864
8865             Returns:
8866                 New GEOM.GEOM_Object, containing compound of all the
8867                 shapes, obtained after each transformation.
8868
8869             Example of usage:
8870                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8871             """
8872             # Example: see GEOM_TestAll.py
8873             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8874             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8875             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8876             anObj.SetParameters(Parameters)
8877             self._autoPublish(anObj, theName, "multirotation")
8878             return anObj
8879
8880         ## Rotate the given object around the
8881         #  given axis on the given angle a given number
8882         #  times and multi-translate each rotation result.
8883         #  Translation direction passes through center of gravity
8884         #  of rotated shape and its projection on the rotation axis.
8885         #  @param theObject The object to be rotated.
8886         #  @param theAxis Rotation axis. DZ if None.
8887         #  @param theAngleStep Rotation angle in radians.
8888         #  @param theNbTimes1 Quantity of rotations to be done.
8889         #  @param theRadialStep Translation distance.
8890         #  @param theNbTimes2 Quantity of translations to be done.
8891         #  @param theName Object name; when specified, this parameter is used
8892         #         for result publication in the study. Otherwise, if automatic
8893         #         publication is switched on, default value is used for result name.
8894         #
8895         #  @return New GEOM.GEOM_Object, containing compound of all the
8896         #          shapes, obtained after each transformation.
8897         #
8898         #  @ref tui_multi_rotation "Example"
8899         @ManageTransactions("TrsfOp")
8900         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8901             """
8902             Rotate the given object around the
8903             given axis on the given angle a given number
8904             times and multi-translate each rotation result.
8905             Translation direction passes through center of gravity
8906             of rotated shape and its projection on the rotation axis.
8907
8908             Parameters:
8909                 theObject The object to be rotated.
8910                 theAxis Rotation axis. DZ if None.
8911                 theAngleStep Rotation angle in radians.
8912                 theNbTimes1 Quantity of rotations to be done.
8913                 theRadialStep Translation distance.
8914                 theNbTimes2 Quantity of translations to be done.
8915                 theName Object name; when specified, this parameter is used
8916                         for result publication in the study. Otherwise, if automatic
8917                         publication is switched on, default value is used for result name.
8918
8919             Returns:
8920                 New GEOM.GEOM_Object, containing compound of all the
8921                 shapes, obtained after each transformation.
8922
8923             Example of usage:
8924                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8925             """
8926             # Example: see GEOM_TestAll.py
8927             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8928             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8929             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8930             anObj.SetParameters(Parameters)
8931             self._autoPublish(anObj, theName, "multirotation")
8932             return anObj
8933
8934         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8935         #
8936         #  @ref swig_MakeMultiRotation "Example"
8937         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8938             """
8939             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8940
8941             Example of usage:
8942                 pz = geompy.MakeVertex(0, 0, 100)
8943                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8944                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8945             """
8946             # Example: see GEOM_TestOthers.py
8947             aVec = self.MakeLine(aPoint,aDir)
8948             # note: auto-publishing is done in self.MultiRotate1D()
8949             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8950             return anObj
8951
8952         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8953         #
8954         #  @ref swig_MakeMultiRotation "Example"
8955         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8956             """
8957             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8958
8959             Example of usage:
8960                 pz = geompy.MakeVertex(0, 0, 100)
8961                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8962                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8963             """
8964             # Example: see GEOM_TestOthers.py
8965             aVec = self.MakeLine(aPoint,aDir)
8966             # note: auto-publishing is done in self.MultiRotate1D()
8967             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8968             return anObj
8969
8970         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8971         #
8972         #  @ref swig_MakeMultiRotation "Example"
8973         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8974             """
8975             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8976
8977             Example of usage:
8978                 pz = geompy.MakeVertex(0, 0, 100)
8979                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8980                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8981             """
8982             # Example: see GEOM_TestOthers.py
8983             aVec = self.MakeLine(aPoint,aDir)
8984             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8985             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8986             return anObj
8987
8988         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8989         #
8990         #  @ref swig_MakeMultiRotation "Example"
8991         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8992             """
8993             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8994
8995             Example of usage:
8996                 pz = geompy.MakeVertex(0, 0, 100)
8997                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8998                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8999             """
9000             # Example: see GEOM_TestOthers.py
9001             aVec = self.MakeLine(aPoint,aDir)
9002             # note: auto-publishing is done in self.MultiRotate2D()
9003             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9004             return anObj
9005
9006         # end of l3_transform
9007         ## @}
9008
9009         ## @addtogroup l3_transform_d
9010         ## @{
9011
9012         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9013         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9014             """
9015             Deprecated method. Use MultiRotate1DNbTimes instead.
9016             """
9017             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
9018             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9019
9020         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9021         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9022         @ManageTransactions("TrsfOp")
9023         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9024             """
9025             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9026             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9027
9028             Example of usage:
9029                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9030             """
9031             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
9032             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9033             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9034             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9035             anObj.SetParameters(Parameters)
9036             self._autoPublish(anObj, theName, "multirotation")
9037             return anObj
9038
9039         ## The same, as MultiRotate1D(), but axis is given by direction and point
9040         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9041         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9042             """
9043             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9044             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9045
9046             Example of usage:
9047                 pz = geompy.MakeVertex(0, 0, 100)
9048                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9049                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9050             """
9051             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
9052             aVec = self.MakeLine(aPoint,aDir)
9053             # note: auto-publishing is done in self.MultiRotate1D()
9054             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9055             return anObj
9056
9057         ## The same, as MultiRotate2D(), but axis is given by direction and point
9058         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9059         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9060             """
9061             The same, as MultiRotate2D(), but axis is given by direction and point
9062             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9063
9064             Example of usage:
9065                 pz = geompy.MakeVertex(0, 0, 100)
9066                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9067                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
9068             """
9069             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
9070             aVec = self.MakeLine(aPoint,aDir)
9071             # note: auto-publishing is done in self.MultiRotate2D()
9072             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9073             return anObj
9074
9075         # end of l3_transform_d
9076         ## @}
9077
9078         ## @addtogroup l3_local
9079         ## @{
9080
9081         ## Perform a fillet on all edges of the given shape.
9082         #  @param theShape Shape, to perform fillet on.
9083         #  @param theR Fillet radius.
9084         #  @param theName Object name; when specified, this parameter is used
9085         #         for result publication in the study. Otherwise, if automatic
9086         #         publication is switched on, default value is used for result name.
9087         #
9088         #  @return New GEOM.GEOM_Object, containing the result shape.
9089         #
9090         #  @ref tui_fillet "Example 1"
9091         #  \n @ref swig_MakeFilletAll "Example 2"
9092         @ManageTransactions("LocalOp")
9093         def MakeFilletAll(self, theShape, theR, theName=None):
9094             """
9095             Perform a fillet on all edges of the given shape.
9096
9097             Parameters:
9098                 theShape Shape, to perform fillet on.
9099                 theR Fillet radius.
9100                 theName Object name; when specified, this parameter is used
9101                         for result publication in the study. Otherwise, if automatic
9102                         publication is switched on, default value is used for result name.
9103
9104             Returns:
9105                 New GEOM.GEOM_Object, containing the result shape.
9106
9107             Example of usage:
9108                filletall = geompy.MakeFilletAll(prism, 10.)
9109             """
9110             # Example: see GEOM_TestOthers.py
9111             theR,Parameters = ParseParameters(theR)
9112             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
9113             RaiseIfFailed("MakeFilletAll", self.LocalOp)
9114             anObj.SetParameters(Parameters)
9115             self._autoPublish(anObj, theName, "fillet")
9116             return anObj
9117
9118         ## Perform a fillet on the specified edges/faces of the given shape
9119         #  @param theShape Shape, to perform fillet on.
9120         #  @param theR Fillet radius.
9121         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
9122         #  @param theListShapes Global indices of edges/faces to perform fillet on.
9123         #  @param theName Object name; when specified, this parameter is used
9124         #         for result publication in the study. Otherwise, if automatic
9125         #         publication is switched on, default value is used for result name.
9126         #
9127         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9128         #
9129         #  @return New GEOM.GEOM_Object, containing the result shape.
9130         #
9131         #  @ref tui_fillet "Example"
9132         @ManageTransactions("LocalOp")
9133         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
9134             """
9135             Perform a fillet on the specified edges/faces of the given shape
9136
9137             Parameters:
9138                 theShape Shape, to perform fillet on.
9139                 theR Fillet radius.
9140                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
9141                 theListShapes Global indices of edges/faces to perform fillet on.
9142                 theName Object name; when specified, this parameter is used
9143                         for result publication in the study. Otherwise, if automatic
9144                         publication is switched on, default value is used for result name.
9145
9146             Note:
9147                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9148
9149             Returns:
9150                 New GEOM.GEOM_Object, containing the result shape.
9151
9152             Example of usage:
9153                 # get the list of IDs (IDList) for the fillet
9154                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9155                 IDlist_e = []
9156                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9157                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9158                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9159                 # make a fillet on the specified edges of the given shape
9160                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
9161             """
9162             # Example: see GEOM_TestAll.py
9163             theR,Parameters = ParseParameters(theR)
9164             anObj = None
9165             if theShapeType == self.ShapeType["EDGE"]:
9166                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
9167                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
9168             else:
9169                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
9170                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
9171             anObj.SetParameters(Parameters)
9172             self._autoPublish(anObj, theName, "fillet")
9173             return anObj
9174
9175         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
9176         @ManageTransactions("LocalOp")
9177         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
9178             """
9179             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
9180
9181             Example of usage:
9182                 # get the list of IDs (IDList) for the fillet
9183                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9184                 IDlist_e = []
9185                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9186                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9187                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9188                 # make a fillet on the specified edges of the given shape
9189                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
9190             """
9191             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
9192             anObj = None
9193             if theShapeType == self.ShapeType["EDGE"]:
9194                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
9195                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
9196             else:
9197                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
9198                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
9199             anObj.SetParameters(Parameters)
9200             self._autoPublish(anObj, theName, "fillet")
9201             return anObj
9202
9203         ## Perform a fillet on the specified edges of the given shape
9204         #  @param theShape  Wire Shape to perform fillet on.
9205         #  @param theR  Fillet radius.
9206         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9207         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
9208         #    \note The list of vertices could be empty,
9209         #          in this case fillet will done done at all vertices in wire
9210         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
9211         #         by the length of the edges, nearest to the fillet vertex.
9212         #         But sometimes the next edge is C1 continuous with the one, nearest to
9213         #         the fillet point, and such two (or more) edges can be united to allow
9214         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
9215         #         thus ignoring the secant vertex (vertices).
9216         #  @param theName Object name; when specified, this parameter is used
9217         #         for result publication in the study. Otherwise, if automatic
9218         #         publication is switched on, default value is used for result name.
9219         #
9220         #  @return New GEOM.GEOM_Object, containing the result shape.
9221         #
9222         #  @ref tui_fillet2d "Example"
9223         @ManageTransactions("LocalOp")
9224         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
9225             """
9226             Perform a fillet on the specified edges of the given shape
9227
9228             Parameters:
9229                 theShape  Wire Shape to perform fillet on.
9230                 theR  Fillet radius.
9231                 theListOfVertexes Global indices of vertexes to perform fillet on.
9232                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
9233                     by the length of the edges, nearest to the fillet vertex.
9234                     But sometimes the next edge is C1 continuous with the one, nearest to
9235                     the fillet point, and such two (or more) edges can be united to allow
9236                     bigger radius. Set this flag to TRUE to allow collinear edges union,
9237                     thus ignoring the secant vertex (vertices).
9238                 theName Object name; when specified, this parameter is used
9239                         for result publication in the study. Otherwise, if automatic
9240                         publication is switched on, default value is used for result name.
9241             Note:
9242                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9243
9244                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
9245
9246             Returns:
9247                 New GEOM.GEOM_Object, containing the result shape.
9248
9249             Example of usage:
9250                 # create wire
9251                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
9252                 # make fillet at given wire vertices with giver radius
9253                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
9254             """
9255             # Example: see GEOM_TestAll.py
9256             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
9257             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
9258             RaiseIfFailed("MakeFillet1D", self.LocalOp)
9259             anObj.SetParameters(Parameters)
9260             self._autoPublish(anObj, theName, "fillet")
9261             return anObj
9262
9263         ## Perform a fillet at the specified vertices of the given face/shell.
9264         #  @param theShape Face or Shell shape to perform fillet on.
9265         #  @param theR Fillet radius.
9266         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9267         #  @param theName Object name; when specified, this parameter is used
9268         #         for result publication in the study. Otherwise, if automatic
9269         #         publication is switched on, default value is used for result name.
9270         #
9271         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9272         #
9273         #  @return New GEOM.GEOM_Object, containing the result shape.
9274         #
9275         #  @ref tui_fillet2d "Example"
9276         @ManageTransactions("LocalOp")
9277         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
9278             """
9279             Perform a fillet at the specified vertices of the given face/shell.
9280
9281             Parameters:
9282                 theShape  Face or Shell shape to perform fillet on.
9283                 theR  Fillet radius.
9284                 theListOfVertexes Global indices of vertexes to perform fillet on.
9285                 theName Object name; when specified, this parameter is used
9286                         for result publication in the study. Otherwise, if automatic
9287                         publication is switched on, default value is used for result name.
9288             Note:
9289                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9290
9291             Returns:
9292                 New GEOM.GEOM_Object, containing the result shape.
9293
9294             Example of usage:
9295                 face = geompy.MakeFaceHW(100, 100, 1)
9296                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
9297             """
9298             # Example: see GEOM_TestAll.py
9299             theR,Parameters = ParseParameters(theR)
9300             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
9301             RaiseIfFailed("MakeFillet2D", self.LocalOp)
9302             anObj.SetParameters(Parameters)
9303             self._autoPublish(anObj, theName, "fillet")
9304             return anObj
9305
9306         ## Perform a symmetric chamfer on all edges of the given shape.
9307         #  @param theShape Shape, to perform chamfer on.
9308         #  @param theD Chamfer size along each face.
9309         #  @param theName Object name; when specified, this parameter is used
9310         #         for result publication in the study. Otherwise, if automatic
9311         #         publication is switched on, default value is used for result name.
9312         #
9313         #  @return New GEOM.GEOM_Object, containing the result shape.
9314         #
9315         #  @ref tui_chamfer "Example 1"
9316         #  \n @ref swig_MakeChamferAll "Example 2"
9317         @ManageTransactions("LocalOp")
9318         def MakeChamferAll(self, theShape, theD, theName=None):
9319             """
9320             Perform a symmetric chamfer on all edges of the given shape.
9321
9322             Parameters:
9323                 theShape Shape, to perform chamfer on.
9324                 theD Chamfer size along each face.
9325                 theName Object name; when specified, this parameter is used
9326                         for result publication in the study. Otherwise, if automatic
9327                         publication is switched on, default value is used for result name.
9328
9329             Returns:
9330                 New GEOM.GEOM_Object, containing the result shape.
9331
9332             Example of usage:
9333                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9334             """
9335             # Example: see GEOM_TestOthers.py
9336             theD,Parameters = ParseParameters(theD)
9337             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9338             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9339             anObj.SetParameters(Parameters)
9340             self._autoPublish(anObj, theName, "chamfer")
9341             return anObj
9342
9343         ## Perform a chamfer on edges, common to the specified faces,
9344         #  with distance D1 on the Face1
9345         #  @param theShape Shape, to perform chamfer on.
9346         #  @param theD1 Chamfer size along \a theFace1.
9347         #  @param theD2 Chamfer size along \a theFace2.
9348         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9349         #  @param theName Object name; when specified, this parameter is used
9350         #         for result publication in the study. Otherwise, if automatic
9351         #         publication is switched on, default value is used for result name.
9352         #
9353         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9354         #
9355         #  @return New GEOM.GEOM_Object, containing the result shape.
9356         #
9357         #  @ref tui_chamfer "Example"
9358         @ManageTransactions("LocalOp")
9359         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9360             """
9361             Perform a chamfer on edges, common to the specified faces,
9362             with distance D1 on the Face1
9363
9364             Parameters:
9365                 theShape Shape, to perform chamfer on.
9366                 theD1 Chamfer size along theFace1.
9367                 theD2 Chamfer size along theFace2.
9368                 theFace1,theFace2 Global indices of two faces of theShape.
9369                 theName Object name; when specified, this parameter is used
9370                         for result publication in the study. Otherwise, if automatic
9371                         publication is switched on, default value is used for result name.
9372
9373             Note:
9374                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9375
9376             Returns:
9377                 New GEOM.GEOM_Object, containing the result shape.
9378
9379             Example of usage:
9380                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9381                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9382                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9383                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
9384             """
9385             # Example: see GEOM_TestAll.py
9386             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9387             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
9388             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
9389             anObj.SetParameters(Parameters)
9390             self._autoPublish(anObj, theName, "chamfer")
9391             return anObj
9392
9393         ## Perform a chamfer on edges
9394         #  @param theShape Shape, to perform chamfer on.
9395         #  @param theD Chamfer length
9396         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9397         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9398         #  @param theName Object name; when specified, this parameter is used
9399         #         for result publication in the study. Otherwise, if automatic
9400         #         publication is switched on, default value is used for result name.
9401         #
9402         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9403         #
9404         #  @return New GEOM.GEOM_Object, containing the result shape.
9405         @ManageTransactions("LocalOp")
9406         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
9407             """
9408             Perform a chamfer on edges
9409
9410             Parameters:
9411                 theShape Shape, to perform chamfer on.
9412                 theD1 Chamfer size along theFace1.
9413                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
9414                 theFace1,theFace2 Global indices of two faces of theShape.
9415                 theName Object name; when specified, this parameter is used
9416                         for result publication in the study. Otherwise, if automatic
9417                         publication is switched on, default value is used for result name.
9418
9419             Note:
9420                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9421
9422             Returns:
9423                 New GEOM.GEOM_Object, containing the result shape.
9424
9425             Example of usage:
9426                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9427                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9428                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9429                 ang = 30
9430                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
9431             """
9432             flag = False
9433             if isinstance(theAngle,str):
9434                 flag = True
9435             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9436             if flag:
9437                 theAngle = theAngle*math.pi/180.0
9438             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
9439             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
9440             anObj.SetParameters(Parameters)
9441             self._autoPublish(anObj, theName, "chamfer")
9442             return anObj
9443
9444         ## Perform a chamfer on all edges of the specified faces,
9445         #  with distance D1 on the first specified face (if several for one edge)
9446         #  @param theShape Shape, to perform chamfer on.
9447         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
9448         #               connected to the edge, are in \a theFaces, \a theD1
9449         #               will be get along face, which is nearer to \a theFaces beginning.
9450         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
9451         #  @param theFaces Sequence of global indices of faces of \a theShape.
9452         #  @param 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         #
9456         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9457         #
9458         #  @return New GEOM.GEOM_Object, containing the result shape.
9459         #
9460         #  @ref tui_chamfer "Example"
9461         @ManageTransactions("LocalOp")
9462         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
9463             """
9464             Perform a chamfer on all edges of the specified faces,
9465             with distance D1 on the first specified face (if several for one edge)
9466
9467             Parameters:
9468                 theShape Shape, to perform chamfer on.
9469                 theD1 Chamfer size along face from  theFaces. If both faces,
9470                       connected to the edge, are in theFaces, theD1
9471                       will be get along face, which is nearer to theFaces beginning.
9472                 theD2 Chamfer size along another of two faces, connected to the edge.
9473                 theFaces Sequence of global indices of faces of theShape.
9474                 theName Object name; when specified, this parameter is used
9475                         for result publication in the study. Otherwise, if automatic
9476                         publication is switched on, default value is used for result name.
9477
9478             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
9479
9480             Returns:
9481                 New GEOM.GEOM_Object, containing the result shape.
9482             """
9483             # Example: see GEOM_TestAll.py
9484             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9485             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
9486             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
9487             anObj.SetParameters(Parameters)
9488             self._autoPublish(anObj, theName, "chamfer")
9489             return anObj
9490
9491         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
9492         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9493         #
9494         #  @ref swig_FilletChamfer "Example"
9495         @ManageTransactions("LocalOp")
9496         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
9497             """
9498             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
9499             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9500             """
9501             flag = False
9502             if isinstance(theAngle,str):
9503                 flag = True
9504             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9505             if flag:
9506                 theAngle = theAngle*math.pi/180.0
9507             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
9508             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
9509             anObj.SetParameters(Parameters)
9510             self._autoPublish(anObj, theName, "chamfer")
9511             return anObj
9512
9513         ## Perform a chamfer on edges,
9514         #  with distance D1 on the first specified face (if several for one edge)
9515         #  @param theShape Shape, to perform chamfer on.
9516         #  @param theD1,theD2 Chamfer size
9517         #  @param theEdges Sequence of edges of \a theShape.
9518         #  @param theName Object name; when specified, this parameter is used
9519         #         for result publication in the study. Otherwise, if automatic
9520         #         publication is switched on, default value is used for result name.
9521         #
9522         #  @return New GEOM.GEOM_Object, containing the result shape.
9523         #
9524         #  @ref swig_FilletChamfer "Example"
9525         @ManageTransactions("LocalOp")
9526         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
9527             """
9528             Perform a chamfer on edges,
9529             with distance D1 on the first specified face (if several for one edge)
9530
9531             Parameters:
9532                 theShape Shape, to perform chamfer on.
9533                 theD1,theD2 Chamfer size
9534                 theEdges Sequence of edges of theShape.
9535                 theName Object name; when specified, this parameter is used
9536                         for result publication in the study. Otherwise, if automatic
9537                         publication is switched on, default value is used for result name.
9538
9539             Returns:
9540                 New GEOM.GEOM_Object, containing the result shape.
9541             """
9542             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9543             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
9544             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
9545             anObj.SetParameters(Parameters)
9546             self._autoPublish(anObj, theName, "chamfer")
9547             return anObj
9548
9549         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
9550         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9551         @ManageTransactions("LocalOp")
9552         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
9553             """
9554             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
9555             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9556             """
9557             flag = False
9558             if isinstance(theAngle,str):
9559                 flag = True
9560             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9561             if flag:
9562                 theAngle = theAngle*math.pi/180.0
9563             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
9564             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
9565             anObj.SetParameters(Parameters)
9566             self._autoPublish(anObj, theName, "chamfer")
9567             return anObj
9568
9569         ## @sa MakeChamferEdge(), MakeChamferFaces()
9570         #
9571         #  @ref swig_MakeChamfer "Example"
9572         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
9573             """
9574             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
9575             """
9576             # Example: see GEOM_TestOthers.py
9577             anObj = None
9578             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
9579             if aShapeType == self.ShapeType["EDGE"]:
9580                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
9581             else:
9582                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
9583             return anObj
9584
9585         ## Remove material from a solid by extrusion of the base shape on the given distance.
9586         #  @param theInit Shape to remove material from. It must be a solid or
9587         #  a compound made of a single solid.
9588         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9589         #  @param theH Prism dimension along the normal to theBase
9590         #  @param theAngle Draft angle in degrees.
9591         #  @param theName Object name; when specified, this parameter is used
9592         #         for result publication in the study. Otherwise, if automatic
9593         #         publication is switched on, default value is used for result name.
9594         #
9595         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
9596         #
9597         #  @ref tui_creation_prism "Example"
9598         @ManageTransactions("PrimOp")
9599         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9600             """
9601             Add material to a solid by extrusion of the base shape on the given distance.
9602
9603             Parameters:
9604                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9605                 theBase Closed edge or wire defining the base shape to be extruded.
9606                 theH Prism dimension along the normal  to theBase
9607                 theAngle Draft angle in degrees.
9608                 theName Object name; when specified, this parameter is used
9609                         for result publication in the study. Otherwise, if automatic
9610                         publication is switched on, default value is used for result name.
9611
9612             Returns:
9613                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9614             """
9615             # Example: see GEOM_TestAll.py
9616             #theH,Parameters = ParseParameters(theH)
9617             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9618             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9619             #anObj.SetParameters(Parameters)
9620             self._autoPublish(anObj, theName, "extrudedCut")
9621             return anObj
9622
9623         ## Add material to a solid by extrusion of the base shape on the given distance.
9624         #  @param theInit Shape to add material to. It must be a solid or
9625         #  a compound made of a single solid.
9626         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9627         #  @param theH Prism dimension along the normal to theBase
9628         #  @param theAngle Draft angle in degrees.
9629         #  @param 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         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
9634         #
9635         #  @ref tui_creation_prism "Example"
9636         @ManageTransactions("PrimOp")
9637         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
9638             """
9639             Add material to a solid by extrusion of the base shape on the given distance.
9640
9641             Parameters:
9642                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
9643                 theBase Closed edge or wire defining the base shape to be extruded.
9644                 theH Prism dimension along the normal  to theBase
9645                 theAngle Draft angle in degrees.
9646                 theName Object name; when specified, this parameter is used
9647                         for result publication in the study. Otherwise, if automatic
9648                         publication is switched on, default value is used for result name.
9649
9650             Returns:
9651                 New GEOM.GEOM_Object,  containing the initial shape with added material.
9652             """
9653             # Example: see GEOM_TestAll.py
9654             #theH,Parameters = ParseParameters(theH)
9655             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
9656             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9657             #anObj.SetParameters(Parameters)
9658             self._autoPublish(anObj, theName, "extrudedBoss")
9659             return anObj
9660
9661         # end of l3_local
9662         ## @}
9663
9664         ## @addtogroup l3_basic_op
9665         ## @{
9666
9667         ## Perform an Archimde operation on the given shape with given parameters.
9668         #  The object presenting the resulting face is returned.
9669         #  @param theShape Shape to be put in water.
9670         #  @param theWeight Weight og the shape.
9671         #  @param theWaterDensity Density of the water.
9672         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
9673         #  @param theName Object name; when specified, this parameter is used
9674         #         for result publication in the study. Otherwise, if automatic
9675         #         publication is switched on, default value is used for result name.
9676         #
9677         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
9678         #          by a plane, corresponding to water level.
9679         #
9680         #  @ref tui_archimede "Example"
9681         @ManageTransactions("LocalOp")
9682         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9683             """
9684             Perform an Archimde operation on the given shape with given parameters.
9685             The object presenting the resulting face is returned.
9686
9687             Parameters:
9688                 theShape Shape to be put in water.
9689                 theWeight Weight og the shape.
9690                 theWaterDensity Density of the water.
9691                 theMeshDeflection Deflection of the mesh, using to compute the section.
9692                 theName Object name; when specified, this parameter is used
9693                         for result publication in the study. Otherwise, if automatic
9694                         publication is switched on, default value is used for result name.
9695
9696             Returns:
9697                 New GEOM.GEOM_Object, containing a section of theShape
9698                 by a plane, corresponding to water level.
9699             """
9700             # Example: see GEOM_TestAll.py
9701             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9702               theWeight,theWaterDensity,theMeshDeflection)
9703             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9704             RaiseIfFailed("MakeArchimede", self.LocalOp)
9705             anObj.SetParameters(Parameters)
9706             self._autoPublish(anObj, theName, "archimede")
9707             return anObj
9708
9709         # end of l3_basic_op
9710         ## @}
9711
9712         ## @addtogroup l2_measure
9713         ## @{
9714
9715         ## Get point coordinates
9716         #  @return [x, y, z]
9717         #
9718         #  @ref tui_measurement_tools_page "Example"
9719         @ManageTransactions("MeasuOp")
9720         def PointCoordinates(self,Point):
9721             """
9722             Get point coordinates
9723
9724             Returns:
9725                 [x, y, z]
9726             """
9727             # Example: see GEOM_TestMeasures.py
9728             aTuple = self.MeasuOp.PointCoordinates(Point)
9729             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9730             return aTuple
9731
9732         ## Get vector coordinates
9733         #  @return [x, y, z]
9734         #
9735         #  @ref tui_measurement_tools_page "Example"
9736         def VectorCoordinates(self,Vector):
9737             """
9738             Get vector coordinates
9739
9740             Returns:
9741                 [x, y, z]
9742             """
9743
9744             p1=self.GetFirstVertex(Vector)
9745             p2=self.GetLastVertex(Vector)
9746
9747             X1=self.PointCoordinates(p1)
9748             X2=self.PointCoordinates(p2)
9749
9750             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9751
9752
9753         ## Compute cross product
9754         #  @return vector w=u^v
9755         #
9756         #  @ref tui_measurement_tools_page "Example"
9757         def CrossProduct(self, Vector1, Vector2):
9758             """
9759             Compute cross product
9760
9761             Returns: vector w=u^v
9762             """
9763             u=self.VectorCoordinates(Vector1)
9764             v=self.VectorCoordinates(Vector2)
9765             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])
9766
9767             return w
9768
9769         ## Compute cross product
9770         #  @return dot product  p=u.v
9771         #
9772         #  @ref tui_measurement_tools_page "Example"
9773         def DotProduct(self, Vector1, Vector2):
9774             """
9775             Compute cross product
9776
9777             Returns: dot product  p=u.v
9778             """
9779             u=self.VectorCoordinates(Vector1)
9780             v=self.VectorCoordinates(Vector2)
9781             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9782
9783             return p
9784
9785
9786         ## Get summarized length of all wires,
9787         #  area of surface and volume of the given shape.
9788         #  @param theShape Shape to define properties of.
9789         #  @return [theLength, theSurfArea, theVolume]\n
9790         #  theLength:   Summarized length of all wires of the given shape.\n
9791         #  theSurfArea: Area of surface of the given shape.\n
9792         #  theVolume:   Volume of the given shape.
9793         #
9794         #  @ref tui_measurement_tools_page "Example"
9795         @ManageTransactions("MeasuOp")
9796         def BasicProperties(self,theShape):
9797             """
9798             Get summarized length of all wires,
9799             area of surface and volume of the given shape.
9800
9801             Parameters:
9802                 theShape Shape to define properties of.
9803
9804             Returns:
9805                 [theLength, theSurfArea, theVolume]
9806                  theLength:   Summarized length of all wires of the given shape.
9807                  theSurfArea: Area of surface of the given shape.
9808                  theVolume:   Volume of the given shape.
9809             """
9810             # Example: see GEOM_TestMeasures.py
9811             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9812             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9813             return aTuple
9814
9815         ## Get parameters of bounding box of the given shape
9816         #  @param theShape Shape to obtain bounding box of.
9817         #  @param precise TRUE for precise computation; FALSE for fast one.
9818         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9819         #  Xmin,Xmax: Limits of shape along OX axis.
9820         #  Ymin,Ymax: Limits of shape along OY axis.
9821         #  Zmin,Zmax: Limits of shape along OZ axis.
9822         #
9823         #  @ref tui_measurement_tools_page "Example"
9824         @ManageTransactions("MeasuOp")
9825         def BoundingBox (self, theShape, precise=False):
9826             """
9827             Get parameters of bounding box of the given shape
9828
9829             Parameters:
9830                 theShape Shape to obtain bounding box of.
9831                 precise TRUE for precise computation; FALSE for fast one.
9832
9833             Returns:
9834                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9835                  Xmin,Xmax: Limits of shape along OX axis.
9836                  Ymin,Ymax: Limits of shape along OY axis.
9837                  Zmin,Zmax: Limits of shape along OZ axis.
9838             """
9839             # Example: see GEOM_TestMeasures.py
9840             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9841             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9842             return aTuple
9843
9844         ## Get bounding box of the given shape
9845         #  @param theShape Shape to obtain bounding box of.
9846         #  @param precise TRUE for precise computation; FALSE for fast one.
9847         #  @param theName Object name; when specified, this parameter is used
9848         #         for result publication in the study. Otherwise, if automatic
9849         #         publication is switched on, default value is used for result name.
9850         #
9851         #  @return New GEOM.GEOM_Object, containing the created box.
9852         #
9853         #  @ref tui_measurement_tools_page "Example"
9854         @ManageTransactions("MeasuOp")
9855         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9856             """
9857             Get bounding box of the given shape
9858
9859             Parameters:
9860                 theShape Shape to obtain bounding box of.
9861                 precise TRUE for precise computation; FALSE for fast one.
9862                 theName Object name; when specified, this parameter is used
9863                         for result publication in the study. Otherwise, if automatic
9864                         publication is switched on, default value is used for result name.
9865
9866             Returns:
9867                 New GEOM.GEOM_Object, containing the created box.
9868             """
9869             # Example: see GEOM_TestMeasures.py
9870             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9871             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9872             self._autoPublish(anObj, theName, "bndbox")
9873             return anObj
9874
9875         ## Get inertia matrix and moments of inertia of theShape.
9876         #  @param theShape Shape to calculate inertia of.
9877         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9878         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9879         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9880         #
9881         #  @ref tui_measurement_tools_page "Example"
9882         @ManageTransactions("MeasuOp")
9883         def Inertia(self,theShape):
9884             """
9885             Get inertia matrix and moments of inertia of theShape.
9886
9887             Parameters:
9888                 theShape Shape to calculate inertia of.
9889
9890             Returns:
9891                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9892                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9893                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9894             """
9895             # Example: see GEOM_TestMeasures.py
9896             aTuple = self.MeasuOp.GetInertia(theShape)
9897             RaiseIfFailed("GetInertia", self.MeasuOp)
9898             return aTuple
9899
9900         ## Get if coords are included in the shape (ST_IN or ST_ON)
9901         #  @param theShape Shape
9902         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9903         #  @param tolerance to be used (default is 1.0e-7)
9904         #  @return list_of_boolean = [res1, res2, ...]
9905         @ManageTransactions("MeasuOp")
9906         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9907             """
9908             Get if coords are included in the shape (ST_IN or ST_ON)
9909
9910             Parameters:
9911                 theShape Shape
9912                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9913                 tolerance to be used (default is 1.0e-7)
9914
9915             Returns:
9916                 list_of_boolean = [res1, res2, ...]
9917             """
9918             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9919
9920         ## Get minimal distance between the given shapes.
9921         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9922         #  @return Value of the minimal distance between the given shapes.
9923         #
9924         #  @ref tui_measurement_tools_page "Example"
9925         @ManageTransactions("MeasuOp")
9926         def MinDistance(self, theShape1, theShape2):
9927             """
9928             Get minimal distance between the given shapes.
9929
9930             Parameters:
9931                 theShape1,theShape2 Shapes to find minimal distance between.
9932
9933             Returns:
9934                 Value of the minimal distance between the given shapes.
9935             """
9936             # Example: see GEOM_TestMeasures.py
9937             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9938             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9939             return aTuple[0]
9940
9941         ## Get minimal distance between the given shapes.
9942         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9943         #  @return Value of the minimal distance between the given shapes, in form of list
9944         #          [Distance, DX, DY, DZ].
9945         #
9946         #  @ref swig_all_measure "Example"
9947         @ManageTransactions("MeasuOp")
9948         def MinDistanceComponents(self, theShape1, theShape2):
9949             """
9950             Get minimal distance between the given shapes.
9951
9952             Parameters:
9953                 theShape1,theShape2 Shapes to find minimal distance between.
9954
9955             Returns:
9956                 Value of the minimal distance between the given shapes, in form of list
9957                 [Distance, DX, DY, DZ]
9958             """
9959             # Example: see GEOM_TestMeasures.py
9960             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9961             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9962             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9963             return aRes
9964
9965         ## Get closest points of the given shapes.
9966         #  @param theShape1,theShape2 Shapes to find closest points of.
9967         #  @return The number of found solutions (-1 in case of infinite number of
9968         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9969         #
9970         #  @ref tui_measurement_tools_page "Example"
9971         @ManageTransactions("MeasuOp")
9972         def ClosestPoints (self, theShape1, theShape2):
9973             """
9974             Get closest points of the given shapes.
9975
9976             Parameters:
9977                 theShape1,theShape2 Shapes to find closest points of.
9978
9979             Returns:
9980                 The number of found solutions (-1 in case of infinite number of
9981                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9982             """
9983             # Example: see GEOM_TestMeasures.py
9984             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9985             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9986             return aTuple
9987
9988         ## Get angle between the given shapes in degrees.
9989         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9990         #  @note If both arguments are vectors, the angle is computed in accordance
9991         #        with their orientations, otherwise the minimum angle is computed.
9992         #  @return Value of the angle between the given shapes in degrees.
9993         #
9994         #  @ref tui_measurement_tools_page "Example"
9995         @ManageTransactions("MeasuOp")
9996         def GetAngle(self, theShape1, theShape2):
9997             """
9998             Get angle between the given shapes in degrees.
9999
10000             Parameters:
10001                 theShape1,theShape2 Lines or linear edges to find angle between.
10002
10003             Note:
10004                 If both arguments are vectors, the angle is computed in accordance
10005                 with their orientations, otherwise the minimum angle is computed.
10006
10007             Returns:
10008                 Value of the angle between the given shapes in degrees.
10009             """
10010             # Example: see GEOM_TestMeasures.py
10011             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10012             RaiseIfFailed("GetAngle", self.MeasuOp)
10013             return anAngle
10014
10015         ## Get angle between the given shapes in radians.
10016         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10017         #  @note If both arguments are vectors, the angle is computed in accordance
10018         #        with their orientations, otherwise the minimum angle is computed.
10019         #  @return Value of the angle between the given shapes in radians.
10020         #
10021         #  @ref tui_measurement_tools_page "Example"
10022         @ManageTransactions("MeasuOp")
10023         def GetAngleRadians(self, theShape1, theShape2):
10024             """
10025             Get angle between the given shapes in radians.
10026
10027             Parameters:
10028                 theShape1,theShape2 Lines or linear edges to find angle between.
10029
10030
10031             Note:
10032                 If both arguments are vectors, the angle is computed in accordance
10033                 with their orientations, otherwise the minimum angle is computed.
10034
10035             Returns:
10036                 Value of the angle between the given shapes in radians.
10037             """
10038             # Example: see GEOM_TestMeasures.py
10039             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10040             RaiseIfFailed("GetAngle", self.MeasuOp)
10041             return anAngle
10042
10043         ## Get angle between the given vectors in degrees.
10044         #  @param theShape1,theShape2 Vectors to find angle between.
10045         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10046         #                 if False, the opposite vector to the normal vector is used.
10047         #  @return Value of the angle between the given vectors in degrees.
10048         #
10049         #  @ref tui_measurement_tools_page "Example"
10050         @ManageTransactions("MeasuOp")
10051         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10052             """
10053             Get angle between the given vectors in degrees.
10054
10055             Parameters:
10056                 theShape1,theShape2 Vectors to find angle between.
10057                 theFlag If True, the normal vector is defined by the two vectors cross,
10058                         if False, the opposite vector to the normal vector is used.
10059
10060             Returns:
10061                 Value of the angle between the given vectors in degrees.
10062             """
10063             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
10064             if not theFlag:
10065                 anAngle = 360. - anAngle
10066             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
10067             return anAngle
10068
10069         ## The same as GetAngleVectors, but the result is in radians.
10070         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
10071             """
10072             Get angle between the given vectors in radians.
10073
10074             Parameters:
10075                 theShape1,theShape2 Vectors to find angle between.
10076                 theFlag If True, the normal vector is defined by the two vectors cross,
10077                         if False, the opposite vector to the normal vector is used.
10078
10079             Returns:
10080                 Value of the angle between the given vectors in radians.
10081             """
10082             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
10083             return anAngle
10084
10085         ## @name Curve Curvature Measurement
10086         #  Methods for receiving radius of curvature of curves
10087         #  in the given point
10088         ## @{
10089
10090         ## Measure curvature of a curve at a point, set by parameter.
10091         #  @param theCurve a curve.
10092         #  @param theParam parameter.
10093         #  @return radius of curvature of \a theCurve.
10094         #
10095         #  @ref swig_todo "Example"
10096         @ManageTransactions("MeasuOp")
10097         def CurveCurvatureByParam(self, theCurve, theParam):
10098             """
10099             Measure curvature of a curve at a point, set by parameter.
10100
10101             Parameters:
10102                 theCurve a curve.
10103                 theParam parameter.
10104
10105             Returns:
10106                 radius of curvature of theCurve.
10107             """
10108             # Example: see GEOM_TestMeasures.py
10109             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
10110             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
10111             return aCurv
10112
10113         ## Measure curvature of a curve at a point.
10114         #  @param theCurve a curve.
10115         #  @param thePoint given point.
10116         #  @return radius of curvature of \a theCurve.
10117         #
10118         #  @ref swig_todo "Example"
10119         @ManageTransactions("MeasuOp")
10120         def CurveCurvatureByPoint(self, theCurve, thePoint):
10121             """
10122             Measure curvature of a curve at a point.
10123
10124             Parameters:
10125                 theCurve a curve.
10126                 thePoint given point.
10127
10128             Returns:
10129                 radius of curvature of theCurve.
10130             """
10131             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
10132             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
10133             return aCurv
10134         ## @}
10135
10136         ## @name Surface Curvature Measurement
10137         #  Methods for receiving max and min radius of curvature of surfaces
10138         #  in the given point
10139         ## @{
10140
10141         ## Measure max radius of curvature of surface.
10142         #  @param theSurf the given surface.
10143         #  @param theUParam Value of U-parameter on the referenced surface.
10144         #  @param theVParam Value of V-parameter on the referenced surface.
10145         #  @return max radius of curvature of theSurf.
10146         #
10147         ## @ref swig_todo "Example"
10148         @ManageTransactions("MeasuOp")
10149         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10150             """
10151             Measure max radius of curvature of surface.
10152
10153             Parameters:
10154                 theSurf the given surface.
10155                 theUParam Value of U-parameter on the referenced surface.
10156                 theVParam Value of V-parameter on the referenced surface.
10157
10158             Returns:
10159                 max radius of curvature of theSurf.
10160             """
10161             # Example: see GEOM_TestMeasures.py
10162             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10163             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
10164             return aSurf
10165
10166         ## Measure max radius of curvature of surface in the given point
10167         #  @param theSurf the given surface.
10168         #  @param thePoint given point.
10169         #  @return max radius of curvature of theSurf.
10170         #
10171         ## @ref swig_todo "Example"
10172         @ManageTransactions("MeasuOp")
10173         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
10174             """
10175             Measure max radius of curvature of surface in the given point.
10176
10177             Parameters:
10178                 theSurf the given surface.
10179                 thePoint given point.
10180
10181             Returns:
10182                 max radius of curvature of theSurf.
10183             """
10184             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
10185             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
10186             return aSurf
10187
10188         ## Measure min radius of curvature of surface.
10189         #  @param theSurf the given surface.
10190         #  @param theUParam Value of U-parameter on the referenced surface.
10191         #  @param theVParam Value of V-parameter on the referenced surface.
10192         #  @return min radius of curvature of theSurf.
10193         #
10194         ## @ref swig_todo "Example"
10195         @ManageTransactions("MeasuOp")
10196         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10197             """
10198             Measure min radius of curvature of surface.
10199
10200             Parameters:
10201                 theSurf the given surface.
10202                 theUParam Value of U-parameter on the referenced surface.
10203                 theVParam Value of V-parameter on the referenced surface.
10204
10205             Returns:
10206                 Min radius of curvature of theSurf.
10207             """
10208             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10209             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
10210             return aSurf
10211
10212         ## Measure min radius of curvature of surface in the given point
10213         #  @param theSurf the given surface.
10214         #  @param thePoint given point.
10215         #  @return min radius of curvature of theSurf.
10216         #
10217         ## @ref swig_todo "Example"
10218         @ManageTransactions("MeasuOp")
10219         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
10220             """
10221             Measure min radius of curvature of surface in the given point.
10222
10223             Parameters:
10224                 theSurf the given surface.
10225                 thePoint given point.
10226
10227             Returns:
10228                 Min radius of curvature of theSurf.
10229             """
10230             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
10231             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
10232             return aSurf
10233         ## @}
10234
10235         ## Get min and max tolerances of sub-shapes of theShape
10236         #  @param theShape Shape, to get tolerances of.
10237         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
10238         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
10239         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
10240         #  VertMin,VertMax: Min and max tolerances of the vertices.
10241         #
10242         #  @ref tui_measurement_tools_page "Example"
10243         @ManageTransactions("MeasuOp")
10244         def Tolerance(self,theShape):
10245             """
10246             Get min and max tolerances of sub-shapes of theShape
10247
10248             Parameters:
10249                 theShape Shape, to get tolerances of.
10250
10251             Returns:
10252                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
10253                  FaceMin,FaceMax: Min and max tolerances of the faces.
10254                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
10255                  VertMin,VertMax: Min and max tolerances of the vertices.
10256             """
10257             # Example: see GEOM_TestMeasures.py
10258             aTuple = self.MeasuOp.GetTolerance(theShape)
10259             RaiseIfFailed("GetTolerance", self.MeasuOp)
10260             return aTuple
10261
10262         ## Obtain description of the given shape (number of sub-shapes of each type)
10263         #  @param theShape Shape to be described.
10264         #  @return Description of the given shape.
10265         #
10266         #  @ref tui_measurement_tools_page "Example"
10267         @ManageTransactions("MeasuOp")
10268         def WhatIs(self,theShape):
10269             """
10270             Obtain description of the given shape (number of sub-shapes of each type)
10271
10272             Parameters:
10273                 theShape Shape to be described.
10274
10275             Returns:
10276                 Description of the given shape.
10277             """
10278             # Example: see GEOM_TestMeasures.py
10279             aDescr = self.MeasuOp.WhatIs(theShape)
10280             RaiseIfFailed("WhatIs", self.MeasuOp)
10281             return aDescr
10282
10283         ## Obtain quantity of shapes of the given type in \a theShape.
10284         #  If \a theShape is of type \a theType, it is also counted.
10285         #  @param theShape Shape to be described.
10286         #  @param theType the given ShapeType().
10287         #  @return Quantity of shapes of type \a theType in \a theShape.
10288         #
10289         #  @ref tui_measurement_tools_page "Example"
10290         def NbShapes (self, theShape, theType):
10291             """
10292             Obtain quantity of shapes of the given type in theShape.
10293             If theShape is of type theType, it is also counted.
10294
10295             Parameters:
10296                 theShape Shape to be described.
10297                 theType the given geompy.ShapeType
10298
10299             Returns:
10300                 Quantity of shapes of type theType in theShape.
10301             """
10302             # Example: see GEOM_TestMeasures.py
10303             listSh = self.SubShapeAllIDs(theShape, theType)
10304             Nb = len(listSh)
10305             return Nb
10306
10307         ## Obtain quantity of shapes of each type in \a theShape.
10308         #  The \a theShape is also counted.
10309         #  @param theShape Shape to be described.
10310         #  @return Dictionary of ShapeType() with bound quantities of shapes.
10311         #
10312         #  @ref tui_measurement_tools_page "Example"
10313         def ShapeInfo (self, theShape):
10314             """
10315             Obtain quantity of shapes of each type in theShape.
10316             The theShape is also counted.
10317
10318             Parameters:
10319                 theShape Shape to be described.
10320
10321             Returns:
10322                 Dictionary of geompy.ShapeType with bound quantities of shapes.
10323             """
10324             # Example: see GEOM_TestMeasures.py
10325             aDict = {}
10326             for typeSh in self.ShapeType:
10327                 if typeSh in ( "AUTO", "SHAPE" ): continue
10328                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
10329                 Nb = len(listSh)
10330                 aDict[typeSh] = Nb
10331                 pass
10332             return aDict
10333
10334         def GetCreationInformation(self, theShape):
10335             info = theShape.GetCreationInformation()
10336             # operationName
10337             opName = info.operationName
10338             if not opName: opName = "no info available"
10339             res = "Operation: " + opName
10340             # parameters
10341             for parVal in info.params:
10342                 res += " \n %s = %s" % ( parVal.name, parVal.value )
10343             return res
10344
10345         ## Get a point, situated at the centre of mass of theShape.
10346         #  @param theShape Shape to define centre of mass of.
10347         #  @param theName Object name; when specified, this parameter is used
10348         #         for result publication in the study. Otherwise, if automatic
10349         #         publication is switched on, default value is used for result name.
10350         #
10351         #  @return New GEOM.GEOM_Object, containing the created point.
10352         #
10353         #  @ref tui_measurement_tools_page "Example"
10354         @ManageTransactions("MeasuOp")
10355         def MakeCDG(self, theShape, theName=None):
10356             """
10357             Get a point, situated at the centre of mass of theShape.
10358
10359             Parameters:
10360                 theShape Shape to define centre of mass of.
10361                 theName Object name; when specified, this parameter is used
10362                         for result publication in the study. Otherwise, if automatic
10363                         publication is switched on, default value is used for result name.
10364
10365             Returns:
10366                 New GEOM.GEOM_Object, containing the created point.
10367             """
10368             # Example: see GEOM_TestMeasures.py
10369             anObj = self.MeasuOp.GetCentreOfMass(theShape)
10370             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
10371             self._autoPublish(anObj, theName, "centerOfMass")
10372             return anObj
10373
10374         ## Get a vertex sub-shape by index depended with orientation.
10375         #  @param theShape Shape to find sub-shape.
10376         #  @param theIndex Index to find vertex by this index (starting from zero)
10377         #  @param theName Object name; when specified, this parameter is used
10378         #         for result publication in the study. Otherwise, if automatic
10379         #         publication is switched on, default value is used for result name.
10380         #
10381         #  @return New GEOM.GEOM_Object, containing the created vertex.
10382         #
10383         #  @ref tui_measurement_tools_page "Example"
10384         @ManageTransactions("MeasuOp")
10385         def GetVertexByIndex(self, theShape, theIndex, theName=None):
10386             """
10387             Get a vertex sub-shape by index depended with orientation.
10388
10389             Parameters:
10390                 theShape Shape to find sub-shape.
10391                 theIndex Index to find vertex by this index (starting from zero)
10392                 theName Object name; when specified, this parameter is used
10393                         for result publication in the study. Otherwise, if automatic
10394                         publication is switched on, default value is used for result name.
10395
10396             Returns:
10397                 New GEOM.GEOM_Object, containing the created vertex.
10398             """
10399             # Example: see GEOM_TestMeasures.py
10400             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
10401             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
10402             self._autoPublish(anObj, theName, "vertex")
10403             return anObj
10404
10405         ## Get the first vertex of wire/edge depended orientation.
10406         #  @param theShape Shape to find first vertex.
10407         #  @param theName Object name; when specified, this parameter is used
10408         #         for result publication in the study. Otherwise, if automatic
10409         #         publication is switched on, default value is used for result name.
10410         #
10411         #  @return New GEOM.GEOM_Object, containing the created vertex.
10412         #
10413         #  @ref tui_measurement_tools_page "Example"
10414         def GetFirstVertex(self, theShape, theName=None):
10415             """
10416             Get the first vertex of wire/edge depended orientation.
10417
10418             Parameters:
10419                 theShape Shape to find first vertex.
10420                 theName Object name; when specified, this parameter is used
10421                         for result publication in the study. Otherwise, if automatic
10422                         publication is switched on, default value is used for result name.
10423
10424             Returns:
10425                 New GEOM.GEOM_Object, containing the created vertex.
10426             """
10427             # Example: see GEOM_TestMeasures.py
10428             # note: auto-publishing is done in self.GetVertexByIndex()
10429             return self.GetVertexByIndex(theShape, 0, theName)
10430
10431         ## Get the last vertex of wire/edge depended orientation.
10432         #  @param theShape Shape to find last vertex.
10433         #  @param theName Object name; when specified, this parameter is used
10434         #         for result publication in the study. Otherwise, if automatic
10435         #         publication is switched on, default value is used for result name.
10436         #
10437         #  @return New GEOM.GEOM_Object, containing the created vertex.
10438         #
10439         #  @ref tui_measurement_tools_page "Example"
10440         def GetLastVertex(self, theShape, theName=None):
10441             """
10442             Get the last vertex of wire/edge depended orientation.
10443
10444             Parameters:
10445                 theShape Shape to find last vertex.
10446                 theName Object name; when specified, this parameter is used
10447                         for result publication in the study. Otherwise, if automatic
10448                         publication is switched on, default value is used for result name.
10449
10450             Returns:
10451                 New GEOM.GEOM_Object, containing the created vertex.
10452             """
10453             # Example: see GEOM_TestMeasures.py
10454             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
10455             # note: auto-publishing is done in self.GetVertexByIndex()
10456             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
10457
10458         ## Get a normale to the given face. If the point is not given,
10459         #  the normale is calculated at the center of mass.
10460         #  @param theFace Face to define normale of.
10461         #  @param theOptionalPoint Point to compute the normale at.
10462         #  @param theName Object name; when specified, this parameter is used
10463         #         for result publication in the study. Otherwise, if automatic
10464         #         publication is switched on, default value is used for result name.
10465         #
10466         #  @return New GEOM.GEOM_Object, containing the created vector.
10467         #
10468         #  @ref swig_todo "Example"
10469         @ManageTransactions("MeasuOp")
10470         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
10471             """
10472             Get a normale to the given face. If the point is not given,
10473             the normale is calculated at the center of mass.
10474
10475             Parameters:
10476                 theFace Face to define normale of.
10477                 theOptionalPoint Point to compute the normale at.
10478                 theName Object name; when specified, this parameter is used
10479                         for result publication in the study. Otherwise, if automatic
10480                         publication is switched on, default value is used for result name.
10481
10482             Returns:
10483                 New GEOM.GEOM_Object, containing the created vector.
10484             """
10485             # Example: see GEOM_TestMeasures.py
10486             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
10487             RaiseIfFailed("GetNormal", self.MeasuOp)
10488             self._autoPublish(anObj, theName, "normal")
10489             return anObj
10490
10491         ## Print shape errors obtained from CheckShape.
10492         #  @param theShape Shape that was checked.
10493         #  @param theShapeErrors the shape errors obtained by CheckShape.
10494         #  @param theReturnStatus If 0 the description of problem is printed.
10495         #                         If 1 the description of problem is returned.
10496         #  @return If theReturnStatus is equal to 1 the description is returned.
10497         #          Otherwise doesn't return anything.
10498         #
10499         #  @ref tui_measurement_tools_page "Example"
10500         @ManageTransactions("MeasuOp")
10501         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
10502             """
10503             Print shape errors obtained from CheckShape.
10504
10505             Parameters:
10506                 theShape Shape that was checked.
10507                 theShapeErrors the shape errors obtained by CheckShape.
10508                 theReturnStatus If 0 the description of problem is printed.
10509                                 If 1 the description of problem is returned.
10510
10511             Returns:
10512                 If theReturnStatus is equal to 1 the description is returned.
10513                   Otherwise doesn't return anything.
10514             """
10515             # Example: see GEOM_TestMeasures.py
10516             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
10517             if theReturnStatus == 1:
10518                 return Descr
10519             print Descr
10520             pass
10521
10522         ## Check a topology of the given shape.
10523         #  @param theShape Shape to check validity of.
10524         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
10525         #                        if TRUE, the shape's geometry will be checked also.
10526         #  @param theReturnStatus If 0 and if theShape is invalid, a description
10527         #                         of problem is printed.
10528         #                         If 1 isValid flag and the description of
10529         #                         problem is returned.
10530         #                         If 2 isValid flag and the list of error data
10531         #                         is returned.
10532         #  @return TRUE, if the shape "seems to be valid".
10533         #          If theShape is invalid, prints a description of problem.
10534         #          If theReturnStatus is equal to 1 the description is returned
10535         #          along with IsValid flag.
10536         #          If theReturnStatus is equal to 2 the list of error data is
10537         #          returned along with IsValid flag.
10538         #
10539         #  @ref tui_measurement_tools_page "Example"
10540         @ManageTransactions("MeasuOp")
10541         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
10542             """
10543             Check a topology of the given shape.
10544
10545             Parameters:
10546                 theShape Shape to check validity of.
10547                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
10548                                if TRUE, the shape's geometry will be checked also.
10549                 theReturnStatus If 0 and if theShape is invalid, a description
10550                                 of problem is printed.
10551                                 If 1 IsValid flag and the description of
10552                                 problem is returned.
10553                                 If 2 IsValid flag and the list of error data
10554                                 is returned.
10555
10556             Returns:
10557                 TRUE, if the shape "seems to be valid".
10558                 If theShape is invalid, prints a description of problem.
10559                 If theReturnStatus is equal to 1 the description is returned
10560                 along with IsValid flag.
10561                 If theReturnStatus is equal to 2 the list of error data is
10562                 returned along with IsValid flag.
10563             """
10564             # Example: see GEOM_TestMeasures.py
10565             if theIsCheckGeom:
10566                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
10567                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
10568             else:
10569                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
10570                 RaiseIfFailed("CheckShape", self.MeasuOp)
10571             if IsValid == 0:
10572                 if theReturnStatus == 0:
10573                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10574                     print Descr
10575             if theReturnStatus == 1:
10576               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10577               return (IsValid, Descr)
10578             elif theReturnStatus == 2:
10579               return (IsValid, ShapeErrors)
10580             return IsValid
10581
10582         ## Detect self-intersections in the given shape.
10583         #  @param theShape Shape to check.
10584         #  @return TRUE, if the shape contains no self-intersections.
10585         #
10586         #  @ref tui_measurement_tools_page "Example"
10587         @ManageTransactions("MeasuOp")
10588         def CheckSelfIntersections(self, theShape):
10589             """
10590             Detect self-intersections in the given shape.
10591
10592             Parameters:
10593                 theShape Shape to check.
10594
10595             Returns:
10596                 TRUE, if the shape contains no self-intersections.
10597             """
10598             # Example: see GEOM_TestMeasures.py
10599             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
10600             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
10601             return IsValid
10602
10603         ## Get position (LCS) of theShape.
10604         #
10605         #  Origin of the LCS is situated at the shape's center of mass.
10606         #  Axes of the LCS are obtained from shape's location or,
10607         #  if the shape is a planar face, from position of its plane.
10608         #
10609         #  @param theShape Shape to calculate position of.
10610         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10611         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
10612         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10613         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10614         #
10615         #  @ref swig_todo "Example"
10616         @ManageTransactions("MeasuOp")
10617         def GetPosition(self,theShape):
10618             """
10619             Get position (LCS) of theShape.
10620             Origin of the LCS is situated at the shape's center of mass.
10621             Axes of the LCS are obtained from shape's location or,
10622             if the shape is a planar face, from position of its plane.
10623
10624             Parameters:
10625                 theShape Shape to calculate position of.
10626
10627             Returns:
10628                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10629                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
10630                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10631                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10632             """
10633             # Example: see GEOM_TestMeasures.py
10634             aTuple = self.MeasuOp.GetPosition(theShape)
10635             RaiseIfFailed("GetPosition", self.MeasuOp)
10636             return aTuple
10637
10638         ## Get kind of theShape.
10639         #
10640         #  @param theShape Shape to get a kind of.
10641         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
10642         #          and a list of parameters, describing the shape.
10643         #  @note  Concrete meaning of each value, returned via \a theIntegers
10644         #         or \a theDoubles list depends on the kind() of the shape.
10645         #
10646         #  @ref swig_todo "Example"
10647         @ManageTransactions("MeasuOp")
10648         def KindOfShape(self,theShape):
10649             """
10650             Get kind of theShape.
10651
10652             Parameters:
10653                 theShape Shape to get a kind of.
10654
10655             Returns:
10656                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
10657                     and a list of parameters, describing the shape.
10658             Note:
10659                 Concrete meaning of each value, returned via theIntegers
10660                 or theDoubles list depends on the geompy.kind of the shape
10661             """
10662             # Example: see GEOM_TestMeasures.py
10663             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
10664             RaiseIfFailed("KindOfShape", self.MeasuOp)
10665
10666             aKind  = aRoughTuple[0]
10667             anInts = aRoughTuple[1]
10668             aDbls  = aRoughTuple[2]
10669
10670             # Now there is no exception from this rule:
10671             aKindTuple = [aKind] + aDbls + anInts
10672
10673             # If they are we will regroup parameters for such kind of shape.
10674             # For example:
10675             #if aKind == kind.SOME_KIND:
10676             #    #  SOME_KIND     int int double int double double
10677             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
10678
10679             return aKindTuple
10680
10681         ## Returns the string that describes if the shell is good for solid.
10682         #  This is a support method for MakeSolid.
10683         #
10684         #  @param theShell the shell to be checked.
10685         #  @return Returns a string that describes the shell validity for
10686         #          solid construction.
10687         @ManageTransactions("MeasuOp")
10688         def _IsGoodForSolid(self, theShell):
10689             """
10690             Returns the string that describes if the shell is good for solid.
10691             This is a support method for MakeSolid.
10692
10693             Parameter:
10694                 theShell the shell to be checked.
10695
10696             Returns:
10697                 Returns a string that describes the shell validity for
10698                 solid construction.
10699             """
10700             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
10701             return aDescr
10702
10703         # end of l2_measure
10704         ## @}
10705
10706         ## @addtogroup l2_import_export
10707         ## @{
10708
10709         ## Import a shape from the BREP or IGES or STEP file
10710         #  (depends on given format) with given name.
10711         #  @param theFileName The file, containing the shape.
10712         #  @param theFormatName Specify format for the file reading.
10713         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
10714         #         If format 'IGES_SCALE' is used instead of 'IGES' or
10715         #            format 'STEP_SCALE' is used instead of 'STEP',
10716         #            length unit will be set to 'meter' and result model will be scaled.
10717         #  @param theName Object name; when specified, this parameter is used
10718         #         for result publication in the study. Otherwise, if automatic
10719         #         publication is switched on, default value is used for result name.
10720         #
10721         #  @return New GEOM.GEOM_Object, containing the imported shape.
10722         #          If material names are imported it returns the list of
10723         #          objects. The first one is the imported object followed by
10724         #          material groups.
10725         #  @note Auto publishing is allowed for the shape itself. Imported
10726         #        material groups are not automatically published.
10727         #
10728         #  @ref swig_Import_Export "Example"
10729         @ManageTransactions("InsertOp")
10730         def ImportFile(self, theFileName, theFormatName, theName=None):
10731             """
10732             Import a shape from the BREP or IGES or STEP file
10733             (depends on given format) with given name.
10734
10735             Parameters:
10736                 theFileName The file, containing the shape.
10737                 theFormatName Specify format for the file reading.
10738                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
10739                     If format 'IGES_SCALE' is used instead of 'IGES' or
10740                        format 'STEP_SCALE' is used instead of 'STEP',
10741                        length unit will be set to 'meter' and result model will be scaled.
10742                 theName Object name; when specified, this parameter is used
10743                         for result publication in the study. Otherwise, if automatic
10744                         publication is switched on, default value is used for result name.
10745
10746             Returns:
10747                 New GEOM.GEOM_Object, containing the imported shape.
10748                 If material names are imported it returns the list of
10749                 objects. The first one is the imported object followed by
10750                 material groups.
10751             Note:
10752                 Auto publishing is allowed for the shape itself. Imported
10753                 material groups are not automatically published.
10754             """
10755             # Example: see GEOM_TestOthers.py
10756             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
10757             RaiseIfFailed("ImportFile", self.InsertOp)
10758             aNbObj = len(aListObj)
10759             if aNbObj > 0:
10760                 self._autoPublish(aListObj[0], theName, "imported")
10761             if aNbObj == 1:
10762                 return aListObj[0]
10763             return aListObj
10764
10765         ## Deprecated analog of ImportFile()
10766         def Import(self, theFileName, theFormatName, theName=None):
10767             """
10768             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
10769             """
10770             print "WARNING: Function Import is deprecated, use ImportFile instead"
10771             # note: auto-publishing is done in self.ImportFile()
10772             return self.ImportFile(theFileName, theFormatName, theName)
10773
10774         ## Shortcut to ImportFile() for BREP format.
10775         #  Import a shape from the BREP file with given name.
10776         #  @param theFileName The file, containing the shape.
10777         #  @param theName Object name; when specified, this parameter is used
10778         #         for result publication in the study. Otherwise, if automatic
10779         #         publication is switched on, default value is used for result name.
10780         #
10781         #  @return New GEOM.GEOM_Object, containing the imported shape.
10782         #
10783         #  @ref swig_Import_Export "Example"
10784         def ImportBREP(self, theFileName, theName=None):
10785             """
10786             geompy.ImportFile(...) function for BREP format
10787             Import a shape from the BREP file with given name.
10788
10789             Parameters:
10790                 theFileName The file, containing the shape.
10791                 theName Object name; when specified, this parameter is used
10792                         for result publication in the study. Otherwise, if automatic
10793                         publication is switched on, default value is used for result name.
10794
10795             Returns:
10796                 New GEOM.GEOM_Object, containing the imported shape.
10797             """
10798             # Example: see GEOM_TestOthers.py
10799             # note: auto-publishing is done in self.ImportFile()
10800             return self.ImportFile(theFileName, "BREP", theName)
10801
10802         ## Shortcut to ImportFile() for IGES format
10803         #  Import a shape from the IGES file with given name.
10804         #  @param theFileName The file, containing the shape.
10805         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10806         #                     and result model will be scaled, if its units are not meters.
10807         #                     If False (default), file length units will be taken into account.
10808         #  @param theName Object name; when specified, this parameter is used
10809         #         for result publication in the study. Otherwise, if automatic
10810         #         publication is switched on, default value is used for result name.
10811         #
10812         #  @return New GEOM.GEOM_Object, containing the imported shape.
10813         #
10814         #  @ref swig_Import_Export "Example"
10815         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
10816             """
10817             geompy.ImportFile(...) function for IGES format
10818
10819             Parameters:
10820                 theFileName The file, containing the shape.
10821                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10822                             and result model will be scaled, if its units are not meters.
10823                             If False (default), file length units will be taken into account.
10824                 theName Object name; when specified, this parameter is used
10825                         for result publication in the study. Otherwise, if automatic
10826                         publication is switched on, default value is used for result name.
10827
10828             Returns:
10829                 New GEOM.GEOM_Object, containing the imported shape.
10830             """
10831             # Example: see GEOM_TestOthers.py
10832             # note: auto-publishing is done in self.ImportFile()
10833             if ignoreUnits:
10834                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
10835             return self.ImportFile(theFileName, "IGES", theName)
10836
10837         ## Return length unit from given IGES file
10838         #  @param theFileName The file, containing the shape.
10839         #  @return String, containing the units name.
10840         #
10841         #  @ref swig_Import_Export "Example"
10842         @ManageTransactions("InsertOp")
10843         def GetIGESUnit(self, theFileName):
10844             """
10845             Return length units from given IGES file
10846
10847             Parameters:
10848                 theFileName The file, containing the shape.
10849
10850             Returns:
10851                 String, containing the units name.
10852             """
10853             # Example: see GEOM_TestOthers.py
10854             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
10855             return aUnitName
10856
10857         ## Shortcut to ImportFile() for STEP format
10858         #  Import a shape from the STEP file with given name.
10859         #  @param theFileName The file, containing the shape.
10860         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10861         #                     and result model will be scaled, if its units are not meters.
10862         #                     If False (default), file length units will be taken into account.
10863         #  @param theName Object name; when specified, this parameter is used
10864         #         for result publication in the study. Otherwise, if automatic
10865         #         publication is switched on, default value is used for result name.
10866         #
10867         #  @return New GEOM.GEOM_Object, containing the imported shape.
10868         #          If material names are imported it returns the list of
10869         #          objects. The first one is the imported object followed by
10870         #          material groups.
10871         #  @note Auto publishing is allowed for the shape itself. Imported
10872         #        material groups are not automatically published.
10873         #
10874         #  @ref swig_Import_Export "Example"
10875         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10876             """
10877             geompy.ImportFile(...) function for STEP format
10878
10879             Parameters:
10880                 theFileName The file, containing the shape.
10881                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10882                             and result model will be scaled, if its units are not meters.
10883                             If False (default), file length units will be taken into account.
10884                 theName Object name; when specified, this parameter is used
10885                         for result publication in the study. Otherwise, if automatic
10886                         publication is switched on, default value is used for result name.
10887
10888             Returns:
10889                 New GEOM.GEOM_Object, containing the imported shape.
10890                 If material names are imported it returns the list of
10891                 objects. The first one is the imported object followed by
10892                 material groups.
10893             Note:
10894                 Auto publishing is allowed for the shape itself. Imported
10895                 material groups are not automatically published.
10896             """
10897             # Example: see GEOM_TestOthers.py
10898             # note: auto-publishing is done in self.ImportFile()
10899             if ignoreUnits:
10900                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10901             return self.ImportFile(theFileName, "STEP", theName)
10902
10903         ## Return length unit from given IGES or STEP file
10904         #  @param theFileName The file, containing the shape.
10905         #  @return String, containing the units name.
10906         #
10907         #  @ref swig_Import_Export "Example"
10908         @ManageTransactions("InsertOp")
10909         def GetSTEPUnit(self, theFileName):
10910             """
10911             Return length units from given STEP file
10912
10913             Parameters:
10914                 theFileName The file, containing the shape.
10915
10916             Returns:
10917                 String, containing the units name.
10918             """
10919             # Example: see GEOM_TestOthers.py
10920             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10921             return aUnitName
10922
10923         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10924         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10925         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10926         #  @param theStream The BRep binary stream.
10927         #  @param theName Object name; when specified, this parameter is used
10928         #         for result publication in the study. Otherwise, if automatic
10929         #         publication is switched on, default value is used for result name.
10930         #
10931         #  @return New GEOM_Object, containing the shape, read from theStream.
10932         #
10933         #  @ref swig_Import_Export "Example"
10934         @ManageTransactions("InsertOp")
10935         def RestoreShape (self, theStream, theName=None):
10936             """
10937             Read a shape from the binary stream, containing its bounding representation (BRep).
10938
10939             Note:
10940                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10941
10942             Parameters:
10943                 theStream The BRep binary stream.
10944                 theName Object name; when specified, this parameter is used
10945                         for result publication in the study. Otherwise, if automatic
10946                         publication is switched on, default value is used for result name.
10947
10948             Returns:
10949                 New GEOM_Object, containing the shape, read from theStream.
10950             """
10951             # Example: see GEOM_TestOthers.py
10952             anObj = self.InsertOp.RestoreShape(theStream)
10953             RaiseIfFailed("RestoreShape", self.InsertOp)
10954             self._autoPublish(anObj, theName, "restored")
10955             return anObj
10956
10957         ## Export the given shape into a file with given name.
10958         #  @param theObject Shape to be stored in the file.
10959         #  @param theFileName Name of the file to store the given shape in.
10960         #  @param theFormatName Specify format for the shape storage.
10961         #         Available formats can be obtained with
10962         #         geompy.InsertOp.ExportTranslators()[0] method.
10963         #
10964         #  @ref swig_Import_Export "Example"
10965         @ManageTransactions("InsertOp")
10966         def Export(self, theObject, theFileName, theFormatName):
10967             """
10968             Export the given shape into a file with given name.
10969
10970             Parameters:
10971                 theObject Shape to be stored in the file.
10972                 theFileName Name of the file to store the given shape in.
10973                 theFormatName Specify format for the shape storage.
10974                               Available formats can be obtained with
10975                               geompy.InsertOp.ExportTranslators()[0] method.
10976             """
10977             # Example: see GEOM_TestOthers.py
10978             self.InsertOp.Export(theObject, theFileName, theFormatName)
10979             if self.InsertOp.IsDone() == 0:
10980                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10981                 pass
10982             pass
10983
10984         ## Shortcut to Export() for BREP format
10985         #
10986         #  @ref swig_Import_Export "Example"
10987         def ExportBREP(self,theObject, theFileName):
10988             """
10989             geompy.Export(...) function for BREP format
10990             """
10991             # Example: see GEOM_TestOthers.py
10992             return self.Export(theObject, theFileName, "BREP")
10993
10994         ## Shortcut to Export() for IGES format
10995         #
10996         #  @ref swig_Import_Export "Example"
10997         def ExportIGES(self,theObject, theFileName):
10998             """
10999             geompy.Export(...) function for IGES format
11000             """
11001             # Example: see GEOM_TestOthers.py
11002             return self.Export(theObject, theFileName, "IGES")
11003
11004         ## Shortcut to Export() for STEP format
11005         #
11006         #  @ref swig_Import_Export "Example"
11007         def ExportSTEP(self,theObject, theFileName):
11008             """
11009             geompy.Export(...) function for STEP format
11010             """
11011             # Example: see GEOM_TestOthers.py
11012             return self.Export(theObject, theFileName, "STEP")
11013
11014         # end of l2_import_export
11015         ## @}
11016
11017         ## @addtogroup l3_blocks
11018         ## @{
11019
11020         ## Create a quadrangle face from four edges. Order of Edges is not
11021         #  important. It is  not necessary that edges share the same vertex.
11022         #  @param E1,E2,E3,E4 Edges for the face bound.
11023         #  @param theName Object name; when specified, this parameter is used
11024         #         for result publication in the study. Otherwise, if automatic
11025         #         publication is switched on, default value is used for result name.
11026         #
11027         #  @return New GEOM.GEOM_Object, containing the created face.
11028         #
11029         #  @ref tui_building_by_blocks_page "Example"
11030         @ManageTransactions("BlocksOp")
11031         def MakeQuad(self, E1, E2, E3, E4, theName=None):
11032             """
11033             Create a quadrangle face from four edges. Order of Edges is not
11034             important. It is  not necessary that edges share the same vertex.
11035
11036             Parameters:
11037                 E1,E2,E3,E4 Edges for the face bound.
11038                 theName Object name; when specified, this parameter is used
11039                         for result publication in the study. Otherwise, if automatic
11040                         publication is switched on, default value is used for result name.
11041
11042             Returns:
11043                 New GEOM.GEOM_Object, containing the created face.
11044
11045             Example of usage:
11046                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
11047             """
11048             # Example: see GEOM_Spanner.py
11049             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
11050             RaiseIfFailed("MakeQuad", self.BlocksOp)
11051             self._autoPublish(anObj, theName, "quad")
11052             return anObj
11053
11054         ## Create a quadrangle face on two edges.
11055         #  The missing edges will be built by creating the shortest ones.
11056         #  @param E1,E2 Two opposite edges for the face.
11057         #  @param theName Object name; when specified, this parameter is used
11058         #         for result publication in the study. Otherwise, if automatic
11059         #         publication is switched on, default value is used for result name.
11060         #
11061         #  @return New GEOM.GEOM_Object, containing the created face.
11062         #
11063         #  @ref tui_building_by_blocks_page "Example"
11064         @ManageTransactions("BlocksOp")
11065         def MakeQuad2Edges(self, E1, E2, theName=None):
11066             """
11067             Create a quadrangle face on two edges.
11068             The missing edges will be built by creating the shortest ones.
11069
11070             Parameters:
11071                 E1,E2 Two opposite edges for the face.
11072                 theName Object name; when specified, this parameter is used
11073                         for result publication in the study. Otherwise, if automatic
11074                         publication is switched on, default value is used for result name.
11075
11076             Returns:
11077                 New GEOM.GEOM_Object, containing the created face.
11078
11079             Example of usage:
11080                 # create vertices
11081                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11082                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11083                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11084                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11085                 # create edges
11086                 edge1 = geompy.MakeEdge(p1, p2)
11087                 edge2 = geompy.MakeEdge(p3, p4)
11088                 # create a quadrangle face from two edges
11089                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
11090             """
11091             # Example: see GEOM_Spanner.py
11092             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
11093             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
11094             self._autoPublish(anObj, theName, "quad")
11095             return anObj
11096
11097         ## Create a quadrangle face with specified corners.
11098         #  The missing edges will be built by creating the shortest ones.
11099         #  @param V1,V2,V3,V4 Corner vertices for the face.
11100         #  @param theName Object name; when specified, this parameter is used
11101         #         for result publication in the study. Otherwise, if automatic
11102         #         publication is switched on, default value is used for result name.
11103         #
11104         #  @return New GEOM.GEOM_Object, containing the created face.
11105         #
11106         #  @ref tui_building_by_blocks_page "Example 1"
11107         #  \n @ref swig_MakeQuad4Vertices "Example 2"
11108         @ManageTransactions("BlocksOp")
11109         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
11110             """
11111             Create a quadrangle face with specified corners.
11112             The missing edges will be built by creating the shortest ones.
11113
11114             Parameters:
11115                 V1,V2,V3,V4 Corner vertices for the face.
11116                 theName Object name; when specified, this parameter is used
11117                         for result publication in the study. Otherwise, if automatic
11118                         publication is switched on, default value is used for result name.
11119
11120             Returns:
11121                 New GEOM.GEOM_Object, containing the created face.
11122
11123             Example of usage:
11124                 # create vertices
11125                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11126                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11127                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11128                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11129                 # create a quadrangle from four points in its corners
11130                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
11131             """
11132             # Example: see GEOM_Spanner.py
11133             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
11134             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
11135             self._autoPublish(anObj, theName, "quad")
11136             return anObj
11137
11138         ## Create a hexahedral solid, bounded by the six given faces. Order of
11139         #  faces is not important. It is  not necessary that Faces share the same edge.
11140         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11141         #  @param theName Object name; when specified, this parameter is used
11142         #         for result publication in the study. Otherwise, if automatic
11143         #         publication is switched on, default value is used for result name.
11144         #
11145         #  @return New GEOM.GEOM_Object, containing the created solid.
11146         #
11147         #  @ref tui_building_by_blocks_page "Example 1"
11148         #  \n @ref swig_MakeHexa "Example 2"
11149         @ManageTransactions("BlocksOp")
11150         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
11151             """
11152             Create a hexahedral solid, bounded by the six given faces. Order of
11153             faces is not important. It is  not necessary that Faces share the same edge.
11154
11155             Parameters:
11156                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11157                 theName Object name; when specified, this parameter is used
11158                         for result publication in the study. Otherwise, if automatic
11159                         publication is switched on, default value is used for result name.
11160
11161             Returns:
11162                 New GEOM.GEOM_Object, containing the created solid.
11163
11164             Example of usage:
11165                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
11166             """
11167             # Example: see GEOM_Spanner.py
11168             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
11169             RaiseIfFailed("MakeHexa", self.BlocksOp)
11170             self._autoPublish(anObj, theName, "hexa")
11171             return anObj
11172
11173         ## Create a hexahedral solid between two given faces.
11174         #  The missing faces will be built by creating the smallest ones.
11175         #  @param F1,F2 Two opposite faces for the hexahedral solid.
11176         #  @param theName Object name; when specified, this parameter is used
11177         #         for result publication in the study. Otherwise, if automatic
11178         #         publication is switched on, default value is used for result name.
11179         #
11180         #  @return New GEOM.GEOM_Object, containing the created solid.
11181         #
11182         #  @ref tui_building_by_blocks_page "Example 1"
11183         #  \n @ref swig_MakeHexa2Faces "Example 2"
11184         @ManageTransactions("BlocksOp")
11185         def MakeHexa2Faces(self, F1, F2, theName=None):
11186             """
11187             Create a hexahedral solid between two given faces.
11188             The missing faces will be built by creating the smallest ones.
11189
11190             Parameters:
11191                 F1,F2 Two opposite faces for the hexahedral solid.
11192                 theName Object name; when specified, this parameter is used
11193                         for result publication in the study. Otherwise, if automatic
11194                         publication is switched on, default value is used for result name.
11195
11196             Returns:
11197                 New GEOM.GEOM_Object, containing the created solid.
11198
11199             Example of usage:
11200                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
11201             """
11202             # Example: see GEOM_Spanner.py
11203             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
11204             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
11205             self._autoPublish(anObj, theName, "hexa")
11206             return anObj
11207
11208         # end of l3_blocks
11209         ## @}
11210
11211         ## @addtogroup l3_blocks_op
11212         ## @{
11213
11214         ## Get a vertex, found in the given shape by its coordinates.
11215         #  @param theShape Block or a compound of blocks.
11216         #  @param theX,theY,theZ Coordinates of the sought vertex.
11217         #  @param theEpsilon Maximum allowed distance between the resulting
11218         #                    vertex and point with the given coordinates.
11219         #  @param theName Object name; when specified, this parameter is used
11220         #         for result publication in the study. Otherwise, if automatic
11221         #         publication is switched on, default value is used for result name.
11222         #
11223         #  @return New GEOM.GEOM_Object, containing the found vertex.
11224         #
11225         #  @ref swig_GetPoint "Example"
11226         @ManageTransactions("BlocksOp")
11227         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
11228             """
11229             Get a vertex, found in the given shape by its coordinates.
11230
11231             Parameters:
11232                 theShape Block or a compound of blocks.
11233                 theX,theY,theZ Coordinates of the sought vertex.
11234                 theEpsilon Maximum allowed distance between the resulting
11235                            vertex and point with the given coordinates.
11236                 theName Object name; when specified, this parameter is used
11237                         for result publication in the study. Otherwise, if automatic
11238                         publication is switched on, default value is used for result name.
11239
11240             Returns:
11241                 New GEOM.GEOM_Object, containing the found vertex.
11242
11243             Example of usage:
11244                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
11245             """
11246             # Example: see GEOM_TestOthers.py
11247             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
11248             RaiseIfFailed("GetPoint", self.BlocksOp)
11249             self._autoPublish(anObj, theName, "vertex")
11250             return anObj
11251
11252         ## Find a vertex of the given shape, which has minimal distance to the given point.
11253         #  @param theShape Any shape.
11254         #  @param thePoint Point, close to the desired vertex.
11255         #  @param theName Object name; when specified, this parameter is used
11256         #         for result publication in the study. Otherwise, if automatic
11257         #         publication is switched on, default value is used for result name.
11258         #
11259         #  @return New GEOM.GEOM_Object, containing the found vertex.
11260         #
11261         #  @ref swig_GetVertexNearPoint "Example"
11262         @ManageTransactions("BlocksOp")
11263         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
11264             """
11265             Find a vertex of the given shape, which has minimal distance to the given point.
11266
11267             Parameters:
11268                 theShape Any shape.
11269                 thePoint Point, close to the desired vertex.
11270                 theName Object name; when specified, this parameter is used
11271                         for result publication in the study. Otherwise, if automatic
11272                         publication is switched on, default value is used for result name.
11273
11274             Returns:
11275                 New GEOM.GEOM_Object, containing the found vertex.
11276
11277             Example of usage:
11278                 pmidle = geompy.MakeVertex(50, 0, 50)
11279                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
11280             """
11281             # Example: see GEOM_TestOthers.py
11282             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
11283             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
11284             self._autoPublish(anObj, theName, "vertex")
11285             return anObj
11286
11287         ## Get an edge, found in the given shape by two given vertices.
11288         #  @param theShape Block or a compound of blocks.
11289         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
11290         #  @param theName Object name; when specified, this parameter is used
11291         #         for result publication in the study. Otherwise, if automatic
11292         #         publication is switched on, default value is used for result name.
11293         #
11294         #  @return New GEOM.GEOM_Object, containing the found edge.
11295         #
11296         #  @ref swig_GetEdge "Example"
11297         @ManageTransactions("BlocksOp")
11298         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
11299             """
11300             Get an edge, found in the given shape by two given vertices.
11301
11302             Parameters:
11303                 theShape Block or a compound of blocks.
11304                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
11305                 theName Object name; when specified, this parameter is used
11306                         for result publication in the study. Otherwise, if automatic
11307                         publication is switched on, default value is used for result name.
11308
11309             Returns:
11310                 New GEOM.GEOM_Object, containing the found edge.
11311             """
11312             # Example: see GEOM_Spanner.py
11313             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
11314             RaiseIfFailed("GetEdge", self.BlocksOp)
11315             self._autoPublish(anObj, theName, "edge")
11316             return anObj
11317
11318         ## Find an edge of the given shape, which has minimal distance to the given point.
11319         #  @param theShape Block or a compound of blocks.
11320         #  @param thePoint Point, close to the desired edge.
11321         #  @param theName Object name; when specified, this parameter is used
11322         #         for result publication in the study. Otherwise, if automatic
11323         #         publication is switched on, default value is used for result name.
11324         #
11325         #  @return New GEOM.GEOM_Object, containing the found edge.
11326         #
11327         #  @ref swig_GetEdgeNearPoint "Example"
11328         @ManageTransactions("BlocksOp")
11329         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
11330             """
11331             Find an edge of the given shape, which has minimal distance to the given point.
11332
11333             Parameters:
11334                 theShape Block or a compound of blocks.
11335                 thePoint Point, close to the desired edge.
11336                 theName Object name; when specified, this parameter is used
11337                         for result publication in the study. Otherwise, if automatic
11338                         publication is switched on, default value is used for result name.
11339
11340             Returns:
11341                 New GEOM.GEOM_Object, containing the found edge.
11342             """
11343             # Example: see GEOM_TestOthers.py
11344             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
11345             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
11346             self._autoPublish(anObj, theName, "edge")
11347             return anObj
11348
11349         ## Returns a face, found in the given shape by four given corner vertices.
11350         #  @param theShape Block or a compound of blocks.
11351         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11352         #  @param theName Object name; when specified, this parameter is used
11353         #         for result publication in the study. Otherwise, if automatic
11354         #         publication is switched on, default value is used for result name.
11355         #
11356         #  @return New GEOM.GEOM_Object, containing the found face.
11357         #
11358         #  @ref swig_todo "Example"
11359         @ManageTransactions("BlocksOp")
11360         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
11361             """
11362             Returns a face, found in the given shape by four given corner vertices.
11363
11364             Parameters:
11365                 theShape Block or a compound of blocks.
11366                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11367                 theName Object name; when specified, this parameter is used
11368                         for result publication in the study. Otherwise, if automatic
11369                         publication is switched on, default value is used for result name.
11370
11371             Returns:
11372                 New GEOM.GEOM_Object, containing the found face.
11373             """
11374             # Example: see GEOM_Spanner.py
11375             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
11376             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
11377             self._autoPublish(anObj, theName, "face")
11378             return anObj
11379
11380         ## Get a face of block, found in the given shape by two given edges.
11381         #  @param theShape Block or a compound of blocks.
11382         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
11383         #  @param theName Object name; when specified, this parameter is used
11384         #         for result publication in the study. Otherwise, if automatic
11385         #         publication is switched on, default value is used for result name.
11386         #
11387         #  @return New GEOM.GEOM_Object, containing the found face.
11388         #
11389         #  @ref swig_todo "Example"
11390         @ManageTransactions("BlocksOp")
11391         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
11392             """
11393             Get a face of block, found in the given shape by two given edges.
11394
11395             Parameters:
11396                 theShape Block or a compound of blocks.
11397                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
11398                 theName Object name; when specified, this parameter is used
11399                         for result publication in the study. Otherwise, if automatic
11400                         publication is switched on, default value is used for result name.
11401
11402             Returns:
11403                 New GEOM.GEOM_Object, containing the found face.
11404             """
11405             # Example: see GEOM_Spanner.py
11406             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
11407             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
11408             self._autoPublish(anObj, theName, "face")
11409             return anObj
11410
11411         ## Find a face, opposite to the given one in the given block.
11412         #  @param theBlock Must be a hexahedral solid.
11413         #  @param theFace Face of \a theBlock, opposite to the desired face.
11414         #  @param theName Object name; when specified, this parameter is used
11415         #         for result publication in the study. Otherwise, if automatic
11416         #         publication is switched on, default value is used for result name.
11417         #
11418         #  @return New GEOM.GEOM_Object, containing the found face.
11419         #
11420         #  @ref swig_GetOppositeFace "Example"
11421         @ManageTransactions("BlocksOp")
11422         def GetOppositeFace(self, theBlock, theFace, theName=None):
11423             """
11424             Find a face, opposite to the given one in the given block.
11425
11426             Parameters:
11427                 theBlock Must be a hexahedral solid.
11428                 theFace Face of theBlock, opposite to the desired face.
11429                 theName Object name; when specified, this parameter is used
11430                         for result publication in the study. Otherwise, if automatic
11431                         publication is switched on, default value is used for result name.
11432
11433             Returns:
11434                 New GEOM.GEOM_Object, containing the found face.
11435             """
11436             # Example: see GEOM_Spanner.py
11437             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
11438             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
11439             self._autoPublish(anObj, theName, "face")
11440             return anObj
11441
11442         ## Find a face of the given shape, which has minimal distance to the given point.
11443         #  @param theShape Block or a compound of blocks.
11444         #  @param thePoint Point, close to the desired face.
11445         #  @param theName Object name; when specified, this parameter is used
11446         #         for result publication in the study. Otherwise, if automatic
11447         #         publication is switched on, default value is used for result name.
11448         #
11449         #  @return New GEOM.GEOM_Object, containing the found face.
11450         #
11451         #  @ref swig_GetFaceNearPoint "Example"
11452         @ManageTransactions("BlocksOp")
11453         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
11454             """
11455             Find a face of the given shape, which has minimal distance to the given point.
11456
11457             Parameters:
11458                 theShape Block or a compound of blocks.
11459                 thePoint Point, close to the desired face.
11460                 theName Object name; when specified, this parameter is used
11461                         for result publication in the study. Otherwise, if automatic
11462                         publication is switched on, default value is used for result name.
11463
11464             Returns:
11465                 New GEOM.GEOM_Object, containing the found face.
11466             """
11467             # Example: see GEOM_Spanner.py
11468             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
11469             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
11470             self._autoPublish(anObj, theName, "face")
11471             return anObj
11472
11473         ## Find a face of block, whose outside normale has minimal angle with the given vector.
11474         #  @param theBlock Block or a compound of blocks.
11475         #  @param theVector Vector, close to the normale of the desired face.
11476         #  @param theName Object name; when specified, this parameter is used
11477         #         for result publication in the study. Otherwise, if automatic
11478         #         publication is switched on, default value is used for result name.
11479         #
11480         #  @return New GEOM.GEOM_Object, containing the found face.
11481         #
11482         #  @ref swig_todo "Example"
11483         @ManageTransactions("BlocksOp")
11484         def GetFaceByNormale(self, theBlock, theVector, theName=None):
11485             """
11486             Find a face of block, whose outside normale has minimal angle with the given vector.
11487
11488             Parameters:
11489                 theBlock Block or a compound of blocks.
11490                 theVector Vector, close to the normale of the desired face.
11491                 theName Object name; when specified, this parameter is used
11492                         for result publication in the study. Otherwise, if automatic
11493                         publication is switched on, default value is used for result name.
11494
11495             Returns:
11496                 New GEOM.GEOM_Object, containing the found face.
11497             """
11498             # Example: see GEOM_Spanner.py
11499             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
11500             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
11501             self._autoPublish(anObj, theName, "face")
11502             return anObj
11503
11504         ## Find all sub-shapes of type \a theShapeType of the given shape,
11505         #  which have minimal distance to the given point.
11506         #  @param theShape Any shape.
11507         #  @param thePoint Point, close to the desired shape.
11508         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
11509         #  @param theTolerance The tolerance for distances comparison. All shapes
11510         #                      with distances to the given point in interval
11511         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
11512         #  @param theName Object name; when specified, this parameter is used
11513         #         for result publication in the study. Otherwise, if automatic
11514         #         publication is switched on, default value is used for result name.
11515         #
11516         #  @return New GEOM_Object, containing a group of all found shapes.
11517         #
11518         #  @ref swig_GetShapesNearPoint "Example"
11519         @ManageTransactions("BlocksOp")
11520         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
11521             """
11522             Find all sub-shapes of type theShapeType of the given shape,
11523             which have minimal distance to the given point.
11524
11525             Parameters:
11526                 theShape Any shape.
11527                 thePoint Point, close to the desired shape.
11528                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
11529                 theTolerance The tolerance for distances comparison. All shapes
11530                                 with distances to the given point in interval
11531                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
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_Object, containing a group of all found shapes.
11538             """
11539             # Example: see GEOM_TestOthers.py
11540             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
11541             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
11542             self._autoPublish(anObj, theName, "group")
11543             return anObj
11544
11545         # end of l3_blocks_op
11546         ## @}
11547
11548         ## @addtogroup l4_blocks_measure
11549         ## @{
11550
11551         ## Check, if the compound of blocks is given.
11552         #  To be considered as a compound of blocks, the
11553         #  given shape must satisfy the following conditions:
11554         #  - Each element of the compound should be a Block (6 faces and 12 edges).
11555         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11556         #  - The compound should be connexe.
11557         #  - The glue between two quadrangle faces should be applied.
11558         #  @param theCompound The compound to check.
11559         #  @return TRUE, if the given shape is a compound of blocks.
11560         #  If theCompound is not valid, prints all discovered errors.
11561         #
11562         #  @ref tui_measurement_tools_page "Example 1"
11563         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
11564         @ManageTransactions("BlocksOp")
11565         def CheckCompoundOfBlocks(self,theCompound):
11566             """
11567             Check, if the compound of blocks is given.
11568             To be considered as a compound of blocks, the
11569             given shape must satisfy the following conditions:
11570             - Each element of the compound should be a Block (6 faces and 12 edges).
11571             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11572             - The compound should be connexe.
11573             - The glue between two quadrangle faces should be applied.
11574
11575             Parameters:
11576                 theCompound The compound to check.
11577
11578             Returns:
11579                 TRUE, if the given shape is a compound of blocks.
11580                 If theCompound is not valid, prints all discovered errors.
11581             """
11582             # Example: see GEOM_Spanner.py
11583             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
11584             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
11585             if IsValid == 0:
11586                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
11587                 print Descr
11588             return IsValid
11589
11590         ## Retrieve all non blocks solids and faces from \a theShape.
11591         #  @param theShape The shape to explore.
11592         #  @param theName Object name; when specified, this parameter is used
11593         #         for result publication in the study. Otherwise, if automatic
11594         #         publication is switched on, default value is used for result name.
11595         #
11596         #  @return A tuple of two GEOM_Objects. The first object is a group of all
11597         #          non block solids (= not 6 faces, or with 6 faces, but with the
11598         #          presence of non-quadrangular faces). The second object is a
11599         #          group of all non quadrangular faces.
11600         #
11601         #  @ref tui_measurement_tools_page "Example 1"
11602         #  \n @ref swig_GetNonBlocks "Example 2"
11603         @ManageTransactions("BlocksOp")
11604         def GetNonBlocks (self, theShape, theName=None):
11605             """
11606             Retrieve all non blocks solids and faces from theShape.
11607
11608             Parameters:
11609                 theShape The shape to explore.
11610                 theName Object name; when specified, this parameter is used
11611                         for result publication in the study. Otherwise, if automatic
11612                         publication is switched on, default value is used for result name.
11613
11614             Returns:
11615                 A tuple of two GEOM_Objects. The first object is a group of all
11616                 non block solids (= not 6 faces, or with 6 faces, but with the
11617                 presence of non-quadrangular faces). The second object is a
11618                 group of all non quadrangular faces.
11619
11620             Usage:
11621                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
11622             """
11623             # Example: see GEOM_Spanner.py
11624             aTuple = self.BlocksOp.GetNonBlocks(theShape)
11625             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
11626             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
11627             return aTuple
11628
11629         ## Remove all seam and degenerated edges from \a theShape.
11630         #  Unite faces and edges, sharing one surface. It means that
11631         #  this faces must have references to one C++ surface object (handle).
11632         #  @param theShape The compound or single solid to remove irregular edges from.
11633         #  @param doUnionFaces If True, then unite faces. If False (the default value),
11634         #         do not unite faces.
11635         #  @param theName Object name; when specified, this parameter is used
11636         #         for result publication in the study. Otherwise, if automatic
11637         #         publication is switched on, default value is used for result name.
11638         #
11639         #  @return Improved shape.
11640         #
11641         #  @ref swig_RemoveExtraEdges "Example"
11642         @ManageTransactions("BlocksOp")
11643         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
11644             """
11645             Remove all seam and degenerated edges from theShape.
11646             Unite faces and edges, sharing one surface. It means that
11647             this faces must have references to one C++ surface object (handle).
11648
11649             Parameters:
11650                 theShape The compound or single solid to remove irregular edges from.
11651                 doUnionFaces If True, then unite faces. If False (the default value),
11652                              do not unite faces.
11653                 theName Object name; when specified, this parameter is used
11654                         for result publication in the study. Otherwise, if automatic
11655                         publication is switched on, default value is used for result name.
11656
11657             Returns:
11658                 Improved shape.
11659             """
11660             # Example: see GEOM_TestOthers.py
11661             nbFacesOptimum = -1 # -1 means do not unite faces
11662             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
11663             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
11664             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
11665             self._autoPublish(anObj, theName, "removeExtraEdges")
11666             return anObj
11667
11668         ## Performs union faces of \a theShape
11669         #  Unite faces sharing one surface. It means that
11670         #  these faces must have references to one C++ surface object (handle).
11671         #  @param theShape The compound or single solid that contains faces
11672         #         to perform union.
11673         #  @param theName Object name; when specified, this parameter is used
11674         #         for result publication in the study. Otherwise, if automatic
11675         #         publication is switched on, default value is used for result name.
11676         #
11677         #  @return Improved shape.
11678         #
11679         #  @ref swig_UnionFaces "Example"
11680         @ManageTransactions("BlocksOp")
11681         def UnionFaces(self, theShape, theName=None):
11682             """
11683             Performs union faces of theShape.
11684             Unite faces sharing one surface. It means that
11685             these faces must have references to one C++ surface object (handle).
11686
11687             Parameters:
11688                 theShape The compound or single solid that contains faces
11689                          to perform union.
11690                 theName Object name; when specified, this parameter is used
11691                         for result publication in the study. Otherwise, if automatic
11692                         publication is switched on, default value is used for result name.
11693
11694             Returns:
11695                 Improved shape.
11696             """
11697             # Example: see GEOM_TestOthers.py
11698             anObj = self.BlocksOp.UnionFaces(theShape)
11699             RaiseIfFailed("UnionFaces", self.BlocksOp)
11700             self._autoPublish(anObj, theName, "unionFaces")
11701             return anObj
11702
11703         ## Check, if the given shape is a blocks compound.
11704         #  Fix all detected errors.
11705         #    \note Single block can be also fixed by this method.
11706         #  @param theShape The compound to check and improve.
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 compound.
11712         #
11713         #  @ref swig_CheckAndImprove "Example"
11714         @ManageTransactions("BlocksOp")
11715         def CheckAndImprove(self, theShape, theName=None):
11716             """
11717             Check, if the given shape is a blocks compound.
11718             Fix all detected errors.
11719
11720             Note:
11721                 Single block can be also fixed by this method.
11722
11723             Parameters:
11724                 theShape The compound to check and improve.
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 compound.
11731             """
11732             # Example: see GEOM_TestOthers.py
11733             anObj = self.BlocksOp.CheckAndImprove(theShape)
11734             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
11735             self._autoPublish(anObj, theName, "improved")
11736             return anObj
11737
11738         # end of l4_blocks_measure
11739         ## @}
11740
11741         ## @addtogroup l3_blocks_op
11742         ## @{
11743
11744         ## Get all the blocks, contained in the given compound.
11745         #  @param theCompound The compound to explode.
11746         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
11747         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
11748         #  @param theName Object name; when specified, this parameter is used
11749         #         for result publication in the study. Otherwise, if automatic
11750         #         publication is switched on, default value is used for result name.
11751         #
11752         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11753         #
11754         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
11755         #
11756         #  @ref tui_explode_on_blocks "Example 1"
11757         #  \n @ref swig_MakeBlockExplode "Example 2"
11758         @ManageTransactions("BlocksOp")
11759         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
11760             """
11761             Get all the blocks, contained in the given compound.
11762
11763             Parameters:
11764                 theCompound The compound to explode.
11765                 theMinNbFaces If solid has lower number of faces, it is not a block.
11766                 theMaxNbFaces If solid has higher number of faces, it is not a block.
11767                 theName Object name; when specified, this parameter is used
11768                         for result publication in the study. Otherwise, if automatic
11769                         publication is switched on, default value is used for result name.
11770
11771             Note:
11772                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11773
11774             Returns:
11775                 List of GEOM.GEOM_Object, containing the retrieved blocks.
11776             """
11777             # Example: see GEOM_TestOthers.py
11778             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
11779             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
11780             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
11781             for anObj in aList:
11782                 anObj.SetParameters(Parameters)
11783                 pass
11784             self._autoPublish(aList, theName, "block")
11785             return aList
11786
11787         ## Find block, containing the given point inside its volume or on boundary.
11788         #  @param theCompound Compound, to find block in.
11789         #  @param thePoint Point, close to the desired block. If the point lays on
11790         #         boundary between some blocks, we return block with nearest center.
11791         #  @param theName Object name; when specified, this parameter is used
11792         #         for result publication in the study. Otherwise, if automatic
11793         #         publication is switched on, default value is used for result name.
11794         #
11795         #  @return New GEOM.GEOM_Object, containing the found block.
11796         #
11797         #  @ref swig_todo "Example"
11798         @ManageTransactions("BlocksOp")
11799         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
11800             """
11801             Find block, containing the given point inside its volume or on boundary.
11802
11803             Parameters:
11804                 theCompound Compound, to find block in.
11805                 thePoint Point, close to the desired block. If the point lays on
11806                          boundary between some blocks, we return block with nearest center.
11807                 theName Object name; when specified, this parameter is used
11808                         for result publication in the study. Otherwise, if automatic
11809                         publication is switched on, default value is used for result name.
11810
11811             Returns:
11812                 New GEOM.GEOM_Object, containing the found block.
11813             """
11814             # Example: see GEOM_Spanner.py
11815             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
11816             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
11817             self._autoPublish(anObj, theName, "block")
11818             return anObj
11819
11820         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11821         #  @param theCompound Compound, to find block in.
11822         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
11823         #  @param theName Object name; when specified, this parameter is used
11824         #         for result publication in the study. Otherwise, if automatic
11825         #         publication is switched on, default value is used for result name.
11826         #
11827         #  @return New GEOM.GEOM_Object, containing the found block.
11828         #
11829         #  @ref swig_GetBlockByParts "Example"
11830         @ManageTransactions("BlocksOp")
11831         def GetBlockByParts(self, theCompound, theParts, theName=None):
11832             """
11833              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11834
11835              Parameters:
11836                 theCompound Compound, to find block in.
11837                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11838                 theName Object name; when specified, this parameter is used
11839                         for result publication in the study. Otherwise, if automatic
11840                         publication is switched on, default value is used for result name.
11841
11842             Returns:
11843                 New GEOM_Object, containing the found block.
11844             """
11845             # Example: see GEOM_TestOthers.py
11846             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11847             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11848             self._autoPublish(anObj, theName, "block")
11849             return anObj
11850
11851         ## Return all blocks, containing all the elements, passed as the parts.
11852         #  @param theCompound Compound, to find blocks in.
11853         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11854         #  @param theName Object name; when specified, this parameter is used
11855         #         for result publication in the study. Otherwise, if automatic
11856         #         publication is switched on, default value is used for result name.
11857         #
11858         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11859         #
11860         #  @ref swig_todo "Example"
11861         @ManageTransactions("BlocksOp")
11862         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11863             """
11864             Return all blocks, containing all the elements, passed as the parts.
11865
11866             Parameters:
11867                 theCompound Compound, to find blocks in.
11868                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11869                 theName Object name; when specified, this parameter is used
11870                         for result publication in the study. Otherwise, if automatic
11871                         publication is switched on, default value is used for result name.
11872
11873             Returns:
11874                 List of GEOM.GEOM_Object, containing the found blocks.
11875             """
11876             # Example: see GEOM_Spanner.py
11877             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11878             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11879             self._autoPublish(aList, theName, "block")
11880             return aList
11881
11882         ## Multi-transformate block and glue the result.
11883         #  Transformation is defined so, as to superpose direction faces.
11884         #  @param Block Hexahedral solid to be multi-transformed.
11885         #  @param DirFace1 ID of First direction face.
11886         #  @param DirFace2 ID of Second direction face.
11887         #  @param NbTimes Quantity of transformations to be done.
11888         #  @param theName Object name; when specified, this parameter is used
11889         #         for result publication in the study. Otherwise, if automatic
11890         #         publication is switched on, default value is used for result name.
11891         #
11892         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11893         #
11894         #  @return New GEOM.GEOM_Object, containing the result shape.
11895         #
11896         #  @ref tui_multi_transformation "Example"
11897         @ManageTransactions("BlocksOp")
11898         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11899             """
11900             Multi-transformate block and glue the result.
11901             Transformation is defined so, as to superpose direction faces.
11902
11903             Parameters:
11904                 Block Hexahedral solid to be multi-transformed.
11905                 DirFace1 ID of First direction face.
11906                 DirFace2 ID of Second direction face.
11907                 NbTimes Quantity of transformations to be done.
11908                 theName Object name; when specified, this parameter is used
11909                         for result publication in the study. Otherwise, if automatic
11910                         publication is switched on, default value is used for result name.
11911
11912             Note:
11913                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11914
11915             Returns:
11916                 New GEOM.GEOM_Object, containing the result shape.
11917             """
11918             # Example: see GEOM_Spanner.py
11919             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11920             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11921             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11922             anObj.SetParameters(Parameters)
11923             self._autoPublish(anObj, theName, "transformed")
11924             return anObj
11925
11926         ## Multi-transformate block and glue the result.
11927         #  @param Block Hexahedral solid to be multi-transformed.
11928         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11929         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11930         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11931         #  @param theName Object name; when specified, this parameter is used
11932         #         for result publication in the study. Otherwise, if automatic
11933         #         publication is switched on, default value is used for result name.
11934         #
11935         #  @return New GEOM.GEOM_Object, containing the result shape.
11936         #
11937         #  @ref tui_multi_transformation "Example"
11938         @ManageTransactions("BlocksOp")
11939         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11940                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11941             """
11942             Multi-transformate block and glue the result.
11943
11944             Parameters:
11945                 Block Hexahedral solid to be multi-transformed.
11946                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11947                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11948                 NbTimesU,NbTimesV Quantity of transformations to be done.
11949                 theName Object name; when specified, this parameter is used
11950                         for result publication in the study. Otherwise, if automatic
11951                         publication is switched on, default value is used for result name.
11952
11953             Returns:
11954                 New GEOM.GEOM_Object, containing the result shape.
11955             """
11956             # Example: see GEOM_Spanner.py
11957             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11958               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11959             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11960                                                             DirFace1V, DirFace2V, NbTimesV)
11961             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11962             anObj.SetParameters(Parameters)
11963             self._autoPublish(anObj, theName, "transformed")
11964             return anObj
11965
11966         ## Build all possible propagation groups.
11967         #  Propagation group is a set of all edges, opposite to one (main)
11968         #  edge of this group directly or through other opposite edges.
11969         #  Notion of Opposite Edge make sence only on quadrangle face.
11970         #  @param theShape Shape to build propagation groups on.
11971         #  @param theName Object name; when specified, this parameter is used
11972         #         for result publication in the study. Otherwise, if automatic
11973         #         publication is switched on, default value is used for result name.
11974         #
11975         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11976         #
11977         #  @ref swig_Propagate "Example"
11978         @ManageTransactions("BlocksOp")
11979         def Propagate(self, theShape, theName=None):
11980             """
11981             Build all possible propagation groups.
11982             Propagation group is a set of all edges, opposite to one (main)
11983             edge of this group directly or through other opposite edges.
11984             Notion of Opposite Edge make sence only on quadrangle face.
11985
11986             Parameters:
11987                 theShape Shape to build propagation groups on.
11988                 theName Object name; when specified, this parameter is used
11989                         for result publication in the study. Otherwise, if automatic
11990                         publication is switched on, default value is used for result name.
11991
11992             Returns:
11993                 List of GEOM.GEOM_Object, each of them is a propagation group.
11994             """
11995             # Example: see GEOM_TestOthers.py
11996             listChains = self.BlocksOp.Propagate(theShape)
11997             RaiseIfFailed("Propagate", self.BlocksOp)
11998             self._autoPublish(listChains, theName, "propagate")
11999             return listChains
12000
12001         # end of l3_blocks_op
12002         ## @}
12003
12004         ## @addtogroup l3_groups
12005         ## @{
12006
12007         ## Creates a new group which will store sub-shapes of theMainShape
12008         #  @param theMainShape is a GEOM object on which the group is selected
12009         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
12010         #  @param theName Object name; when specified, this parameter is used
12011         #         for result publication in the study. Otherwise, if automatic
12012         #         publication is switched on, default value is used for result name.
12013         #
12014         #  @return a newly created GEOM group (GEOM.GEOM_Object)
12015         #
12016         #  @ref tui_working_with_groups_page "Example 1"
12017         #  \n @ref swig_CreateGroup "Example 2"
12018         @ManageTransactions("GroupOp")
12019         def CreateGroup(self, theMainShape, theShapeType, theName=None):
12020             """
12021             Creates a new group which will store sub-shapes of theMainShape
12022
12023             Parameters:
12024                theMainShape is a GEOM object on which the group is selected
12025                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
12026                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
12027                 theName Object name; when specified, this parameter is used
12028                         for result publication in the study. Otherwise, if automatic
12029                         publication is switched on, default value is used for result name.
12030
12031             Returns:
12032                a newly created GEOM group
12033
12034             Example of usage:
12035                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
12036
12037             """
12038             # Example: see GEOM_TestOthers.py
12039             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
12040             RaiseIfFailed("CreateGroup", self.GroupOp)
12041             self._autoPublish(anObj, theName, "group")
12042             return anObj
12043
12044         ## Adds a sub-object with ID theSubShapeId to the group
12045         #  @param theGroup is a GEOM group to which the new sub-shape is added
12046         #  @param theSubShapeID is a sub-shape ID in the main object.
12047         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12048         #
12049         #  @ref tui_working_with_groups_page "Example"
12050         @ManageTransactions("GroupOp")
12051         def AddObject(self,theGroup, theSubShapeID):
12052             """
12053             Adds a sub-object with ID theSubShapeId to the group
12054
12055             Parameters:
12056                 theGroup       is a GEOM group to which the new sub-shape is added
12057                 theSubShapeID  is a sub-shape ID in the main object.
12058
12059             Note:
12060                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12061             """
12062             # Example: see GEOM_TestOthers.py
12063             self.GroupOp.AddObject(theGroup, theSubShapeID)
12064             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
12065                 RaiseIfFailed("AddObject", self.GroupOp)
12066                 pass
12067             pass
12068
12069         ## Removes a sub-object with ID \a theSubShapeId from the group
12070         #  @param theGroup is a GEOM group from which the new sub-shape is removed
12071         #  @param theSubShapeID is a sub-shape ID in the main object.
12072         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12073         #
12074         #  @ref tui_working_with_groups_page "Example"
12075         @ManageTransactions("GroupOp")
12076         def RemoveObject(self,theGroup, theSubShapeID):
12077             """
12078             Removes a sub-object with ID theSubShapeId from the group
12079
12080             Parameters:
12081                 theGroup is a GEOM group from which the new sub-shape is removed
12082                 theSubShapeID is a sub-shape ID in the main object.
12083
12084             Note:
12085                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12086             """
12087             # Example: see GEOM_TestOthers.py
12088             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
12089             RaiseIfFailed("RemoveObject", self.GroupOp)
12090             pass
12091
12092         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12093         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12094         #  @param theSubShapes is a list of sub-shapes to be added.
12095         #
12096         #  @ref tui_working_with_groups_page "Example"
12097         @ManageTransactions("GroupOp")
12098         def UnionList (self,theGroup, theSubShapes):
12099             """
12100             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12101
12102             Parameters:
12103                 theGroup is a GEOM group to which the new sub-shapes are added.
12104                 theSubShapes is a list of sub-shapes to be added.
12105             """
12106             # Example: see GEOM_TestOthers.py
12107             self.GroupOp.UnionList(theGroup, theSubShapes)
12108             RaiseIfFailed("UnionList", self.GroupOp)
12109             pass
12110
12111         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12112         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12113         #  @param theSubShapes is a list of indices of sub-shapes to be added.
12114         #
12115         #  @ref swig_UnionIDs "Example"
12116         @ManageTransactions("GroupOp")
12117         def UnionIDs(self,theGroup, theSubShapes):
12118             """
12119             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12120
12121             Parameters:
12122                 theGroup is a GEOM group to which the new sub-shapes are added.
12123                 theSubShapes is a list of indices of sub-shapes to be added.
12124             """
12125             # Example: see GEOM_TestOthers.py
12126             self.GroupOp.UnionIDs(theGroup, theSubShapes)
12127             RaiseIfFailed("UnionIDs", self.GroupOp)
12128             pass
12129
12130         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12131         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12132         #  @param theSubShapes is a list of sub-shapes to be removed.
12133         #
12134         #  @ref tui_working_with_groups_page "Example"
12135         @ManageTransactions("GroupOp")
12136         def DifferenceList (self,theGroup, theSubShapes):
12137             """
12138             Removes from the group all the given shapes. No errors, if some shapes are not included.
12139
12140             Parameters:
12141                 theGroup is a GEOM group from which the sub-shapes are removed.
12142                 theSubShapes is a list of sub-shapes to be removed.
12143             """
12144             # Example: see GEOM_TestOthers.py
12145             self.GroupOp.DifferenceList(theGroup, theSubShapes)
12146             RaiseIfFailed("DifferenceList", self.GroupOp)
12147             pass
12148
12149         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12150         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12151         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
12152         #
12153         #  @ref swig_DifferenceIDs "Example"
12154         @ManageTransactions("GroupOp")
12155         def DifferenceIDs(self,theGroup, theSubShapes):
12156             """
12157             Removes from the group all the given shapes. No errors, if some shapes are not included.
12158
12159             Parameters:
12160                 theGroup is a GEOM group from which the sub-shapes are removed.
12161                 theSubShapes is a list of indices of sub-shapes to be removed.
12162             """
12163             # Example: see GEOM_TestOthers.py
12164             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
12165             RaiseIfFailed("DifferenceIDs", self.GroupOp)
12166             pass
12167
12168         ## Union of two groups.
12169         #  New group is created. It will contain all entities
12170         #  which are present in groups theGroup1 and theGroup2.
12171         #  @param theGroup1, theGroup2 are the initial GEOM groups
12172         #                              to create the united group from.
12173         #  @param theName Object name; when specified, this parameter is used
12174         #         for result publication in the study. Otherwise, if automatic
12175         #         publication is switched on, default value is used for result name.
12176         #
12177         #  @return a newly created GEOM group.
12178         #
12179         #  @ref tui_union_groups_anchor "Example"
12180         @ManageTransactions("GroupOp")
12181         def UnionGroups (self, theGroup1, theGroup2, theName=None):
12182             """
12183             Union of two groups.
12184             New group is created. It will contain all entities
12185             which are present in groups theGroup1 and theGroup2.
12186
12187             Parameters:
12188                 theGroup1, theGroup2 are the initial GEOM groups
12189                                      to create the united group from.
12190                 theName Object name; when specified, this parameter is used
12191                         for result publication in the study. Otherwise, if automatic
12192                         publication is switched on, default value is used for result name.
12193
12194             Returns:
12195                 a newly created GEOM group.
12196             """
12197             # Example: see GEOM_TestOthers.py
12198             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
12199             RaiseIfFailed("UnionGroups", self.GroupOp)
12200             self._autoPublish(aGroup, theName, "group")
12201             return aGroup
12202
12203         ## Intersection of two groups.
12204         #  New group is created. It will contain only those entities
12205         #  which are present in both groups theGroup1 and theGroup2.
12206         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12207         #  @param theName Object name; when specified, this parameter is used
12208         #         for result publication in the study. Otherwise, if automatic
12209         #         publication is switched on, default value is used for result name.
12210         #
12211         #  @return a newly created GEOM group.
12212         #
12213         #  @ref tui_intersect_groups_anchor "Example"
12214         @ManageTransactions("GroupOp")
12215         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
12216             """
12217             Intersection of two groups.
12218             New group is created. It will contain only those entities
12219             which are present in both groups theGroup1 and theGroup2.
12220
12221             Parameters:
12222                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12223                 theName Object name; when specified, this parameter is used
12224                         for result publication in the study. Otherwise, if automatic
12225                         publication is switched on, default value is used for result name.
12226
12227             Returns:
12228                 a newly created GEOM group.
12229             """
12230             # Example: see GEOM_TestOthers.py
12231             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
12232             RaiseIfFailed("IntersectGroups", self.GroupOp)
12233             self._autoPublish(aGroup, theName, "group")
12234             return aGroup
12235
12236         ## Cut of two groups.
12237         #  New group is created. It will contain entities which are
12238         #  present in group theGroup1 but are not present in group theGroup2.
12239         #  @param theGroup1 is a GEOM group to include elements of.
12240         #  @param theGroup2 is a GEOM group to exclude elements of.
12241         #  @param theName Object name; when specified, this parameter is used
12242         #         for result publication in the study. Otherwise, if automatic
12243         #         publication is switched on, default value is used for result name.
12244         #
12245         #  @return a newly created GEOM group.
12246         #
12247         #  @ref tui_cut_groups_anchor "Example"
12248         @ManageTransactions("GroupOp")
12249         def CutGroups (self, theGroup1, theGroup2, theName=None):
12250             """
12251             Cut of two groups.
12252             New group is created. It will contain entities which are
12253             present in group theGroup1 but are not present in group theGroup2.
12254
12255             Parameters:
12256                 theGroup1 is a GEOM group to include elements of.
12257                 theGroup2 is a GEOM group to exclude elements of.
12258                 theName Object name; when specified, this parameter is used
12259                         for result publication in the study. Otherwise, if automatic
12260                         publication is switched on, default value is used for result name.
12261
12262             Returns:
12263                 a newly created GEOM group.
12264             """
12265             # Example: see GEOM_TestOthers.py
12266             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
12267             RaiseIfFailed("CutGroups", self.GroupOp)
12268             self._autoPublish(aGroup, theName, "group")
12269             return aGroup
12270
12271         ## Union of list of groups.
12272         #  New group is created. It will contain all entities that are
12273         #  present in groups listed in theGList.
12274         #  @param theGList is a list of GEOM groups to create the united group from.
12275         #  @param theName Object name; when specified, this parameter is used
12276         #         for result publication in the study. Otherwise, if automatic
12277         #         publication is switched on, default value is used for result name.
12278         #
12279         #  @return a newly created GEOM group.
12280         #
12281         #  @ref tui_union_groups_anchor "Example"
12282         @ManageTransactions("GroupOp")
12283         def UnionListOfGroups (self, theGList, theName=None):
12284             """
12285             Union of list of groups.
12286             New group is created. It will contain all entities that are
12287             present in groups listed in theGList.
12288
12289             Parameters:
12290                 theGList is a list of GEOM groups to create the united group from.
12291                 theName Object name; when specified, this parameter is used
12292                         for result publication in the study. Otherwise, if automatic
12293                         publication is switched on, default value is used for result name.
12294
12295             Returns:
12296                 a newly created GEOM group.
12297             """
12298             # Example: see GEOM_TestOthers.py
12299             aGroup = self.GroupOp.UnionListOfGroups(theGList)
12300             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
12301             self._autoPublish(aGroup, theName, "group")
12302             return aGroup
12303
12304         ## Cut of lists of groups.
12305         #  New group is created. It will contain only entities
12306         #  which are present in groups listed in theGList.
12307         #  @param theGList is a list of GEOM groups to include elements of.
12308         #  @param theName Object name; when specified, this parameter is used
12309         #         for result publication in the study. Otherwise, if automatic
12310         #         publication is switched on, default value is used for result name.
12311         #
12312         #  @return a newly created GEOM group.
12313         #
12314         #  @ref tui_intersect_groups_anchor "Example"
12315         @ManageTransactions("GroupOp")
12316         def IntersectListOfGroups (self, theGList, theName=None):
12317             """
12318             Cut of lists of groups.
12319             New group is created. It will contain only entities
12320             which are present in groups listed in theGList.
12321
12322             Parameters:
12323                 theGList is a list of GEOM groups to include elements of.
12324                 theName Object name; when specified, this parameter is used
12325                         for result publication in the study. Otherwise, if automatic
12326                         publication is switched on, default value is used for result name.
12327
12328             Returns:
12329                 a newly created GEOM group.
12330             """
12331             # Example: see GEOM_TestOthers.py
12332             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
12333             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
12334             self._autoPublish(aGroup, theName, "group")
12335             return aGroup
12336
12337         ## Cut of lists of groups.
12338         #  New group is created. It will contain only entities
12339         #  which are present in groups listed in theGList1 but
12340         #  are not present in groups from theGList2.
12341         #  @param theGList1 is a list of GEOM groups to include elements of.
12342         #  @param theGList2 is a list of GEOM groups to exclude elements of.
12343         #  @param theName Object name; when specified, this parameter is used
12344         #         for result publication in the study. Otherwise, if automatic
12345         #         publication is switched on, default value is used for result name.
12346         #
12347         #  @return a newly created GEOM group.
12348         #
12349         #  @ref tui_cut_groups_anchor "Example"
12350         @ManageTransactions("GroupOp")
12351         def CutListOfGroups (self, theGList1, theGList2, theName=None):
12352             """
12353             Cut of lists of groups.
12354             New group is created. It will contain only entities
12355             which are present in groups listed in theGList1 but
12356             are not present in groups from theGList2.
12357
12358             Parameters:
12359                 theGList1 is a list of GEOM groups to include elements of.
12360                 theGList2 is a list of GEOM groups to exclude elements of.
12361                 theName Object name; when specified, this parameter is used
12362                         for result publication in the study. Otherwise, if automatic
12363                         publication is switched on, default value is used for result name.
12364
12365             Returns:
12366                 a newly created GEOM group.
12367             """
12368             # Example: see GEOM_TestOthers.py
12369             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
12370             RaiseIfFailed("CutListOfGroups", self.GroupOp)
12371             self._autoPublish(aGroup, theName, "group")
12372             return aGroup
12373
12374         ## Returns a list of sub-objects ID stored in the group
12375         #  @param theGroup is a GEOM group for which a list of IDs is requested
12376         #
12377         #  @ref swig_GetObjectIDs "Example"
12378         @ManageTransactions("GroupOp")
12379         def GetObjectIDs(self,theGroup):
12380             """
12381             Returns a list of sub-objects ID stored in the group
12382
12383             Parameters:
12384                 theGroup is a GEOM group for which a list of IDs is requested
12385             """
12386             # Example: see GEOM_TestOthers.py
12387             ListIDs = self.GroupOp.GetObjects(theGroup)
12388             RaiseIfFailed("GetObjects", self.GroupOp)
12389             return ListIDs
12390
12391         ## Returns a type of sub-objects stored in the group
12392         #  @param theGroup is a GEOM group which type is returned.
12393         #
12394         #  @ref swig_GetType "Example"
12395         @ManageTransactions("GroupOp")
12396         def GetType(self,theGroup):
12397             """
12398             Returns a type of sub-objects stored in the group
12399
12400             Parameters:
12401                 theGroup is a GEOM group which type is returned.
12402             """
12403             # Example: see GEOM_TestOthers.py
12404             aType = self.GroupOp.GetType(theGroup)
12405             RaiseIfFailed("GetType", self.GroupOp)
12406             return aType
12407
12408         ## Convert a type of geom object from id to string value
12409         #  @param theId is a GEOM obect type id.
12410         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12411         #  @ref swig_GetType "Example"
12412         def ShapeIdToType(self, theId):
12413             """
12414             Convert a type of geom object from id to string value
12415
12416             Parameters:
12417                 theId is a GEOM obect type id.
12418
12419             Returns:
12420                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12421             """
12422             if theId == 0:
12423                 return "COPY"
12424             if theId == 1:
12425                 return "IMPORT"
12426             if theId == 2:
12427                 return "POINT"
12428             if theId == 3:
12429                 return "VECTOR"
12430             if theId == 4:
12431                 return "PLANE"
12432             if theId == 5:
12433                 return "LINE"
12434             if theId == 6:
12435                 return "TORUS"
12436             if theId == 7:
12437                 return "BOX"
12438             if theId == 8:
12439                 return "CYLINDER"
12440             if theId == 9:
12441                 return "CONE"
12442             if theId == 10:
12443                 return "SPHERE"
12444             if theId == 11:
12445                 return "PRISM"
12446             if theId == 12:
12447                 return "REVOLUTION"
12448             if theId == 13:
12449                 return "BOOLEAN"
12450             if theId == 14:
12451                 return "PARTITION"
12452             if theId == 15:
12453                 return "POLYLINE"
12454             if theId == 16:
12455                 return "CIRCLE"
12456             if theId == 17:
12457                 return "SPLINE"
12458             if theId == 18:
12459                 return "ELLIPSE"
12460             if theId == 19:
12461                 return "CIRC_ARC"
12462             if theId == 20:
12463                 return "FILLET"
12464             if theId == 21:
12465                 return "CHAMFER"
12466             if theId == 22:
12467                 return "EDGE"
12468             if theId == 23:
12469                 return "WIRE"
12470             if theId == 24:
12471                 return "FACE"
12472             if theId == 25:
12473                 return "SHELL"
12474             if theId == 26:
12475                 return "SOLID"
12476             if theId == 27:
12477                 return "COMPOUND"
12478             if theId == 28:
12479                 return "SUBSHAPE"
12480             if theId == 29:
12481                 return "PIPE"
12482             if theId == 30:
12483                 return "ARCHIMEDE"
12484             if theId == 31:
12485                 return "FILLING"
12486             if theId == 32:
12487                 return "EXPLODE"
12488             if theId == 33:
12489                 return "GLUED"
12490             if theId == 34:
12491                 return "SKETCHER"
12492             if theId == 35:
12493                 return "CDG"
12494             if theId == 36:
12495                 return "FREE_BOUNDS"
12496             if theId == 37:
12497                 return "GROUP"
12498             if theId == 38:
12499                 return "BLOCK"
12500             if theId == 39:
12501                 return "MARKER"
12502             if theId == 40:
12503                 return "THRUSECTIONS"
12504             if theId == 41:
12505                 return "COMPOUNDFILTER"
12506             if theId == 42:
12507                 return "SHAPES_ON_SHAPE"
12508             if theId == 43:
12509                 return "ELLIPSE_ARC"
12510             if theId == 44:
12511                 return "3DSKETCHER"
12512             if theId == 45:
12513                 return "FILLET_2D"
12514             if theId == 46:
12515                 return "FILLET_1D"
12516             if theId == 201:
12517                 return "PIPETSHAPE"
12518             return "Shape Id not exist."
12519
12520         ## Returns a main shape associated with the group
12521         #  @param theGroup is a GEOM group for which a main shape object is requested
12522         #  @return a GEOM object which is a main shape for theGroup
12523         #
12524         #  @ref swig_GetMainShape "Example"
12525         @ManageTransactions("GroupOp")
12526         def GetMainShape(self,theGroup):
12527             """
12528             Returns a main shape associated with the group
12529
12530             Parameters:
12531                 theGroup is a GEOM group for which a main shape object is requested
12532
12533             Returns:
12534                 a GEOM object which is a main shape for theGroup
12535
12536             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
12537             """
12538             # Example: see GEOM_TestOthers.py
12539             anObj = self.GroupOp.GetMainShape(theGroup)
12540             RaiseIfFailed("GetMainShape", self.GroupOp)
12541             return anObj
12542
12543         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
12544         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12545         #  @param theShape given shape (see GEOM.GEOM_Object)
12546         #  @param min_length minimum length of edges of theShape
12547         #  @param max_length maximum length of edges of theShape
12548         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12549         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12550         #  @param theName Object name; when specified, this parameter is used
12551         #         for result publication in the study. Otherwise, if automatic
12552         #         publication is switched on, default value is used for result name.
12553         #
12554         #  @return a newly created GEOM group of edges
12555         #
12556         #  @@ref swig_todo "Example"
12557         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
12558             """
12559             Create group of edges of theShape, whose length is in range [min_length, max_length].
12560             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12561
12562             Parameters:
12563                 theShape given shape
12564                 min_length minimum length of edges of theShape
12565                 max_length maximum length of edges of theShape
12566                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12567                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12568                 theName Object name; when specified, this parameter is used
12569                         for result publication in the study. Otherwise, if automatic
12570                         publication is switched on, default value is used for result name.
12571
12572              Returns:
12573                 a newly created GEOM group of edges.
12574             """
12575             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
12576             edges_in_range = []
12577             for edge in edges:
12578                 Props = self.BasicProperties(edge)
12579                 if min_length <= Props[0] and Props[0] <= max_length:
12580                     if (not include_min) and (min_length == Props[0]):
12581                         skip = 1
12582                     else:
12583                         if (not include_max) and (Props[0] == max_length):
12584                             skip = 1
12585                         else:
12586                             edges_in_range.append(edge)
12587
12588             if len(edges_in_range) <= 0:
12589                 print "No edges found by given criteria"
12590                 return None
12591
12592             # note: auto-publishing is done in self.CreateGroup()
12593             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
12594             self.UnionList(group_edges, edges_in_range)
12595
12596             return group_edges
12597
12598         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
12599         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12600         #  @param min_length minimum length of edges of selected shape
12601         #  @param max_length maximum length of edges of selected shape
12602         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12603         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12604         #  @return a newly created GEOM group of edges
12605         #  @ref swig_todo "Example"
12606         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
12607             """
12608             Create group of edges of selected shape, whose length is in range [min_length, max_length].
12609             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12610
12611             Parameters:
12612                 min_length minimum length of edges of selected shape
12613                 max_length maximum length of edges of selected shape
12614                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12615                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12616
12617              Returns:
12618                 a newly created GEOM group of edges.
12619             """
12620             nb_selected = sg.SelectedCount()
12621             if nb_selected < 1:
12622                 print "Select a shape before calling this function, please."
12623                 return 0
12624             if nb_selected > 1:
12625                 print "Only one shape must be selected"
12626                 return 0
12627
12628             id_shape = sg.getSelected(0)
12629             shape = IDToObject( id_shape )
12630
12631             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
12632
12633             left_str  = " < "
12634             right_str = " < "
12635             if include_min: left_str  = " <= "
12636             if include_max: right_str  = " <= "
12637
12638             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
12639                                     + left_str + "length" + right_str + `max_length`)
12640
12641             sg.updateObjBrowser(1)
12642
12643             return group_edges
12644
12645         # end of l3_groups
12646         ## @}
12647
12648         ## @addtogroup l4_advanced
12649         ## @{
12650
12651         ## Create a T-shape object with specified caracteristics for the main
12652         #  and the incident pipes (radius, width, half-length).
12653         #  The extremities of the main pipe are located on junctions points P1 and P2.
12654         #  The extremity of the incident pipe is located on junction point P3.
12655         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12656         #  the main plane of the T-shape is XOY.
12657         #
12658         #  @param theR1 Internal radius of main pipe
12659         #  @param theW1 Width of main pipe
12660         #  @param theL1 Half-length of main pipe
12661         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12662         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12663         #  @param theL2 Half-length of incident pipe
12664         #
12665         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12666         #  @param theP1 1st junction point of main pipe
12667         #  @param theP2 2nd junction point of main pipe
12668         #  @param theP3 Junction point of incident pipe
12669         #
12670         #  @param theRL Internal radius of left thickness reduction
12671         #  @param theWL Width of left thickness reduction
12672         #  @param theLtransL Length of left transition part
12673         #  @param theLthinL Length of left thin part
12674         #
12675         #  @param theRR Internal radius of right thickness reduction
12676         #  @param theWR Width of right thickness reduction
12677         #  @param theLtransR Length of right transition part
12678         #  @param theLthinR Length of right thin part
12679         #
12680         #  @param theRI Internal radius of incident thickness reduction
12681         #  @param theWI Width of incident thickness reduction
12682         #  @param theLtransI Length of incident transition part
12683         #  @param theLthinI Length of incident thin part
12684         #
12685         #  @param theName Object name; when specified, this parameter is used
12686         #         for result publication in the study. Otherwise, if automatic
12687         #         publication is switched on, default value is used for result name.
12688         #
12689         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12690         #
12691         #  @ref tui_creation_pipetshape "Example"
12692         @ManageTransactions("AdvOp")
12693         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
12694                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
12695                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12696                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12697                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12698                             theName=None):
12699             """
12700             Create a T-shape object with specified caracteristics for the main
12701             and the incident pipes (radius, width, half-length).
12702             The extremities of the main pipe are located on junctions points P1 and P2.
12703             The extremity of the incident pipe is located on junction point P3.
12704             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12705             the main plane of the T-shape is XOY.
12706
12707             Parameters:
12708                 theR1 Internal radius of main pipe
12709                 theW1 Width of main pipe
12710                 theL1 Half-length of main pipe
12711                 theR2 Internal radius of incident pipe (R2 < R1)
12712                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12713                 theL2 Half-length of incident pipe
12714                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12715                 theP1 1st junction point of main pipe
12716                 theP2 2nd junction point of main pipe
12717                 theP3 Junction point of incident pipe
12718
12719                 theRL Internal radius of left thickness reduction
12720                 theWL Width of left thickness reduction
12721                 theLtransL Length of left transition part
12722                 theLthinL Length of left thin part
12723
12724                 theRR Internal radius of right thickness reduction
12725                 theWR Width of right thickness reduction
12726                 theLtransR Length of right transition part
12727                 theLthinR Length of right thin part
12728
12729                 theRI Internal radius of incident thickness reduction
12730                 theWI Width of incident thickness reduction
12731                 theLtransI Length of incident transition part
12732                 theLthinI Length of incident thin part
12733
12734                 theName Object name; when specified, this parameter is used
12735                         for result publication in the study. Otherwise, if automatic
12736                         publication is switched on, default value is used for result name.
12737
12738             Returns:
12739                 List of GEOM_Object, containing the created shape and propagation groups.
12740
12741             Example of usage:
12742                 # create PipeTShape object
12743                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
12744                 # create PipeTShape object with position
12745                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
12746                 # create PipeTShape object with left thickness reduction
12747                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
12748             """
12749             theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
12750             if (theP1 and theP2 and theP3):
12751                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12752                                                                 theRL, theWL, theLtransL, theLthinL,
12753                                                                 theRR, theWR, theLtransR, theLthinR,
12754                                                                 theRI, theWI, theLtransI, theLthinI,
12755                                                                 theHexMesh, theP1, theP2, theP3)
12756             else:
12757                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
12758                                                     theRL, theWL, theLtransL, theLthinL,
12759                                                     theRR, theWR, theLtransR, theLthinR,
12760                                                     theRI, theWI, theLtransI, theLthinI,
12761                                                     theHexMesh)
12762             RaiseIfFailed("MakePipeTShape", self.AdvOp)
12763             if Parameters: anObj[0].SetParameters(Parameters)
12764             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12765             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12766             return anObj
12767
12768         ## Create a T-shape object with chamfer and with specified caracteristics for the main
12769         #  and the incident pipes (radius, width, half-length). The chamfer is
12770         #  created on the junction of the pipes.
12771         #  The extremities of the main pipe are located on junctions points P1 and P2.
12772         #  The extremity of the incident pipe is located on junction point P3.
12773         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12774         #  the main plane of the T-shape is XOY.
12775         #  @param theR1 Internal radius of main pipe
12776         #  @param theW1 Width of main pipe
12777         #  @param theL1 Half-length of main pipe
12778         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12779         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12780         #  @param theL2 Half-length of incident pipe
12781         #  @param theH Height of the chamfer.
12782         #  @param theW Width of the chamfer.
12783         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12784         #  @param theP1 1st junction point of main pipe
12785         #  @param theP2 2nd junction point of main pipe
12786         #  @param theP3 Junction point of incident pipe
12787         #
12788         #  @param theRL Internal radius of left thickness reduction
12789         #  @param theWL Width of left thickness reduction
12790         #  @param theLtransL Length of left transition part
12791         #  @param theLthinL Length of left thin part
12792         #
12793         #  @param theRR Internal radius of right thickness reduction
12794         #  @param theWR Width of right thickness reduction
12795         #  @param theLtransR Length of right transition part
12796         #  @param theLthinR Length of right thin part
12797         #
12798         #  @param theRI Internal radius of incident thickness reduction
12799         #  @param theWI Width of incident thickness reduction
12800         #  @param theLtransI Length of incident transition part
12801         #  @param theLthinI Length of incident thin part
12802         #
12803         #  @param theName Object name; when specified, this parameter is used
12804         #         for result publication in the study. Otherwise, if automatic
12805         #         publication is switched on, default value is used for result name.
12806         #
12807         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12808         #
12809         #  @ref tui_creation_pipetshape "Example"
12810         @ManageTransactions("AdvOp")
12811         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
12812                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12813                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12814                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12815                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12816                                    theName=None):
12817             """
12818             Create a T-shape object with chamfer and with specified caracteristics for the main
12819             and the incident pipes (radius, width, half-length). The chamfer is
12820             created on the junction of the pipes.
12821             The extremities of the main pipe are located on junctions points P1 and P2.
12822             The extremity of the incident pipe is located on junction point P3.
12823             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12824             the main plane of the T-shape is XOY.
12825
12826             Parameters:
12827                 theR1 Internal radius of main pipe
12828                 theW1 Width of main pipe
12829                 theL1 Half-length of main pipe
12830                 theR2 Internal radius of incident pipe (R2 < R1)
12831                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12832                 theL2 Half-length of incident pipe
12833                 theH Height of the chamfer.
12834                 theW Width of the chamfer.
12835                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12836                 theP1 1st junction point of main pipe
12837                 theP2 2nd junction point of main pipe
12838                 theP3 Junction point of incident pipe
12839
12840                 theRL Internal radius of left thickness reduction
12841                 theWL Width of left thickness reduction
12842                 theLtransL Length of left transition part
12843                 theLthinL Length of left thin part
12844
12845                 theRR Internal radius of right thickness reduction
12846                 theWR Width of right thickness reduction
12847                 theLtransR Length of right transition part
12848                 theLthinR Length of right thin part
12849
12850                 theRI Internal radius of incident thickness reduction
12851                 theWI Width of incident thickness reduction
12852                 theLtransI Length of incident transition part
12853                 theLthinI Length of incident thin part
12854
12855                 theName Object name; when specified, this parameter is used
12856                         for result publication in the study. Otherwise, if automatic
12857                         publication is switched on, default value is used for result name.
12858
12859             Returns:
12860                 List of GEOM_Object, containing the created shape and propagation groups.
12861
12862             Example of usage:
12863                 # create PipeTShape with chamfer object
12864                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
12865                 # create PipeTShape with chamfer object with position
12866                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
12867                 # create PipeTShape with chamfer object with left thickness reduction
12868                 pipetshapechamfer_thr = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
12869             """
12870             theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
12871             if (theP1 and theP2 and theP3):
12872               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12873                                                                      theRL, theWL, theLtransL, theLthinL,
12874                                                                      theRR, theWR, theLtransR, theLthinR,
12875                                                                      theRI, theWI, theLtransI, theLthinI,
12876                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
12877             else:
12878               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
12879                                                          theRL, theWL, theLtransL, theLthinL,
12880                                                          theRR, theWR, theLtransR, theLthinR,
12881                                                          theRI, theWI, theLtransI, theLthinI,
12882                                                          theH, theW, theHexMesh)
12883             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
12884             if Parameters: anObj[0].SetParameters(Parameters)
12885             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12886             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12887             return anObj
12888
12889         ## Create a T-shape object with fillet and with specified caracteristics for the main
12890         #  and the incident pipes (radius, width, half-length). The fillet is
12891         #  created on the junction of the pipes.
12892         #  The extremities of the main pipe are located on junctions points P1 and P2.
12893         #  The extremity of the incident pipe is located on junction point P3.
12894         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12895         #  the main plane of the T-shape is XOY.
12896         #  @param theR1 Internal radius of main pipe
12897         #  @param theW1 Width of main pipe
12898         #  @param theL1 Half-length of main pipe
12899         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12900         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12901         #  @param theL2 Half-length of incident pipe
12902         #  @param theRF Radius of curvature of fillet.
12903         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12904         #  @param theP1 1st junction point of main pipe
12905         #  @param theP2 2nd junction point of main pipe
12906         #  @param theP3 Junction point of incident pipe
12907         #
12908         #  @param theRL Internal radius of left thickness reduction
12909         #  @param theWL Width of left thickness reduction
12910         #  @param theLtransL Length of left transition part
12911         #  @param theLthinL Length of left thin part
12912         #
12913         #  @param theRR Internal radius of right thickness reduction
12914         #  @param theWR Width of right thickness reduction
12915         #  @param theLtransR Length of right transition part
12916         #  @param theLthinR Length of right thin part
12917         #
12918         #  @param theRI Internal radius of incident thickness reduction
12919         #  @param theWI Width of incident thickness reduction
12920         #  @param theLtransI Length of incident transition part
12921         #  @param theLthinI Length of incident thin part
12922         #
12923         #  @param theName Object name; when specified, this parameter is used
12924         #         for result publication in the study. Otherwise, if automatic
12925         #         publication is switched on, default value is used for result name.
12926         #
12927         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12928         #
12929         #  @ref tui_creation_pipetshape "Example"
12930         @ManageTransactions("AdvOp")
12931         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12932                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12933                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12934                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12935                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12936                                   theName=None):
12937             """
12938             Create a T-shape object with fillet and with specified caracteristics for the main
12939             and the incident pipes (radius, width, half-length). The fillet is
12940             created on the junction of the pipes.
12941             The extremities of the main pipe are located on junctions points P1 and P2.
12942             The extremity of the incident pipe is located on junction point P3.
12943
12944             Parameters:
12945                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12946                 the main plane of the T-shape is XOY.
12947                 theR1 Internal radius of main pipe
12948                 theW1 Width of main pipe
12949                 heL1 Half-length of main pipe
12950                 theR2 Internal radius of incident pipe (R2 < R1)
12951                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12952                 theL2 Half-length of incident pipe
12953                 theRF Radius of curvature of fillet.
12954                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12955                 theP1 1st junction point of main pipe
12956                 theP2 2nd junction point of main pipe
12957                 theP3 Junction point of incident pipe
12958
12959                 theRL Internal radius of left thickness reduction
12960                 theWL Width of left thickness reduction
12961                 theLtransL Length of left transition part
12962                 theLthinL Length of left thin part
12963
12964                 theRR Internal radius of right thickness reduction
12965                 theWR Width of right thickness reduction
12966                 theLtransR Length of right transition part
12967                 theLthinR Length of right thin part
12968
12969                 theRI Internal radius of incident thickness reduction
12970                 theWI Width of incident thickness reduction
12971                 theLtransI Length of incident transition part
12972                 theLthinI Length of incident thin part
12973
12974                 theName Object name; when specified, this parameter is used
12975                         for result publication in the study. Otherwise, if automatic
12976                         publication is switched on, default value is used for result name.
12977
12978             Returns:
12979                 List of GEOM_Object, containing the created shape and propagation groups.
12980
12981             Example of usage:
12982                 # create PipeTShape with fillet object
12983                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12984                 # create PipeTShape with fillet object with position
12985                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12986                 # create PipeTShape with fillet object with left thickness reduction
12987                 pipetshapefillet_thr = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
12988             """
12989             theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
12990             if (theP1 and theP2 and theP3):
12991               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12992                                                                     theRL, theWL, theLtransL, theLthinL,
12993                                                                     theRR, theWR, theLtransR, theLthinR,
12994                                                                     theRI, theWI, theLtransI, theLthinI,
12995                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12996             else:
12997               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12998                                                         theRL, theWL, theLtransL, theLthinL,
12999                                                         theRR, theWR, theLtransR, theLthinR,
13000                                                         theRI, theWI, theLtransI, theLthinI,
13001                                                         theRF, theHexMesh)
13002             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
13003             if Parameters: anObj[0].SetParameters(Parameters)
13004             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
13005             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
13006             return anObj
13007
13008         ## This function allows creating a disk already divided into blocks. It
13009         #  can be used to create divided pipes for later meshing in hexaedra.
13010         #  @param theR Radius of the disk
13011         #  @param theOrientation Orientation of the plane on which the disk will be built
13012         #         1 = XOY, 2 = OYZ, 3 = OZX
13013         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
13014         #  @param theName Object name; when specified, this parameter is used
13015         #         for result publication in the study. Otherwise, if automatic
13016         #         publication is switched on, default value is used for result name.
13017         #
13018         #  @return New GEOM_Object, containing the created shape.
13019         #
13020         #  @ref tui_creation_divideddisk "Example"
13021         @ManageTransactions("AdvOp")
13022         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
13023             """
13024             Creates a disk, divided into blocks. It can be used to create divided pipes
13025             for later meshing in hexaedra.
13026
13027             Parameters:
13028                 theR Radius of the disk
13029                 theOrientation Orientation of the plane on which the disk will be built:
13030                                1 = XOY, 2 = OYZ, 3 = OZX
13031                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
13032                 theName Object name; when specified, this parameter is used
13033                         for result publication in the study. Otherwise, if automatic
13034                         publication is switched on, default value is used for result name.
13035
13036             Returns:
13037                 New GEOM_Object, containing the created shape.
13038             """
13039             theR, Parameters = ParseParameters(theR)
13040             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
13041             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
13042             if Parameters: anObj.SetParameters(Parameters)
13043             self._autoPublish(anObj, theName, "dividedDisk")
13044             return anObj
13045
13046         ## This function allows creating a disk already divided into blocks. It
13047         #  can be used to create divided pipes for later meshing in hexaedra.
13048         #  @param theCenter Center of the disk
13049         #  @param theVector Normal vector to the plane of the created disk
13050         #  @param theRadius Radius of the disk
13051         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
13052         #  @param theName Object name; when specified, this parameter is used
13053         #         for result publication in the study. Otherwise, if automatic
13054         #         publication is switched on, default value is used for result name.
13055         #
13056         #  @return New GEOM_Object, containing the created shape.
13057         #
13058         #  @ref tui_creation_divideddisk "Example"
13059         @ManageTransactions("AdvOp")
13060         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
13061             """
13062             Creates a disk already divided into blocks. It can be used to create divided pipes
13063             for later meshing in hexaedra.
13064
13065             Parameters:
13066                 theCenter Center of the disk
13067                 theVector Normal vector to the plane of the created disk
13068                 theRadius Radius of the disk
13069                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
13070                 theName Object name; when specified, this parameter is used
13071                         for result publication in the study. Otherwise, if automatic
13072                         publication is switched on, default value is used for result name.
13073
13074             Returns:
13075                 New GEOM_Object, containing the created shape.
13076             """
13077             theRadius, Parameters = ParseParameters(theRadius)
13078             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
13079             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
13080             if Parameters: anObj.SetParameters(Parameters)
13081             self._autoPublish(anObj, theName, "dividedDisk")
13082             return anObj
13083
13084         ## Builds a cylinder prepared for hexa meshes
13085         #  @param theR Radius of the cylinder
13086         #  @param theH Height of the cylinder
13087         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
13088         #  @param theName Object name; when specified, this parameter is used
13089         #         for result publication in the study. Otherwise, if automatic
13090         #         publication is switched on, default value is used for result name.
13091         #
13092         #  @return New GEOM_Object, containing the created shape.
13093         #
13094         #  @ref tui_creation_dividedcylinder "Example"
13095         @ManageTransactions("AdvOp")
13096         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
13097             """
13098             Builds a cylinder prepared for hexa meshes
13099
13100             Parameters:
13101                 theR Radius of the cylinder
13102                 theH Height of the cylinder
13103                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
13104                 theName Object name; when specified, this parameter is used
13105                         for result publication in the study. Otherwise, if automatic
13106                         publication is switched on, default value is used for result name.
13107
13108             Returns:
13109                 New GEOM_Object, containing the created shape.
13110             """
13111             theR, theH, Parameters = ParseParameters(theR, theH)
13112             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
13113             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
13114             if Parameters: anObj.SetParameters(Parameters)
13115             self._autoPublish(anObj, theName, "dividedCylinder")
13116             return anObj
13117
13118         ## Create a surface from a cloud of points
13119         #  @param thelPoints list of points. Compounds of points are
13120         #         accepted as well.
13121         #  @param theNbMax maximum number of Bezier pieces in the resulting
13122         #         surface.
13123         #  @param theDegMax maximum degree of the resulting BSpline surface.
13124         #  @param theDMax 3D tolerance of initial approximation.
13125         #  @param theName Object name; when specified, this parameter is used
13126         #         for result publication in the study. Otherwise, if automatic
13127         #         publication is switched on, default value is used for result name.
13128         #  @return New GEOM_Object, containing the created shape.
13129         #  @note 3D tolerance of initial approximation represents a tolerance of
13130         #        initial plate surface approximation. If this parameter is equal
13131         #        to 0 (default value) it is computed. In this case an error of
13132         #        initial plate surface computation is used as the approximation
13133         #        tolerance. This error represents a maximal distance between
13134         #        computed plate surface and given points.
13135         #
13136         #  @ref tui_creation_smoothingsurface "Example"
13137         @ManageTransactions("AdvOp")
13138         def MakeSmoothingSurface(self, thelPoints, theNbMax=2, theDegMax=8,
13139                                  theDMax=0.0, theName=None):
13140             """
13141             Create a surface from a cloud of points
13142
13143             Parameters:
13144                 thelPoints list of points. Compounds of points are
13145                            accepted as well.
13146                 theNbMax maximum number of Bezier pieces in the resulting
13147                          surface.
13148                 theDegMax maximum degree of the resulting BSpline surface.
13149                 theDMax 3D tolerance of initial approximation.
13150                 theName Object name; when specified, this parameter is used
13151                         for result publication in the study. Otherwise, if automatic
13152                         publication is switched on, default value is used for result name.
13153
13154             Returns:
13155                 New GEOM_Object, containing the created shape.
13156
13157             Note:
13158                 3D tolerance of initial approximation represents a tolerance of
13159                 initial plate surface approximation. If this parameter is equal
13160                 to 0 (default value) it is computed. In this case an error of
13161                 initial plate surface computation is used as the approximation
13162                 tolerance. This error represents a maximal distance between
13163                 computed plate surface and given points.
13164             """
13165             anObj = self.AdvOp.MakeSmoothingSurface(thelPoints, theNbMax,
13166                                                     theDegMax, theDMax)
13167             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
13168             self._autoPublish(anObj, theName, "smoothing")
13169             return anObj
13170
13171         ## Export a shape to XAO format
13172         #  @param shape The shape to export
13173         #  @param groups The list of groups to export
13174         #  @param fields The list of fields to export
13175         #  @param author The author of the export
13176         #  @param fileName The name of the file to export
13177         #  @return boolean
13178         #
13179         #  @ref tui_exportxao "Example"
13180         @ManageTransactions("InsertOp")
13181         def ExportXAO(self, shape, groups, fields, author, fileName):
13182             res = self.InsertOp.ExportXAO(shape, groups, fields, author, fileName)
13183             RaiseIfFailed("ExportXAO", self.InsertOp)
13184             return res
13185
13186         ## Import a shape from XAO format
13187         #  @param shape Shape to export
13188         #  @param fileName The name of the file to import
13189         #  @return tuple (res, shape, subShapes, groups, fields)
13190         #       res Flag indicating if the import was successful
13191         #       shape The imported shape
13192         #       subShapes The list of imported subShapes
13193         #       groups The list of imported groups
13194         #       fields The list of imported fields
13195         #
13196         #  @ref tui_importxao "Example"
13197         @ManageTransactions("InsertOp")
13198         def ImportXAO(self, fileName):
13199             res = self.InsertOp.ImportXAO(fileName)
13200             RaiseIfFailed("ImportXAO", self.InsertOp)
13201             return res
13202
13203         #@@ insert new functions before this line @@ do not remove this line @@#
13204
13205         # end of l4_advanced
13206         ## @}
13207
13208         ## Create a copy of the given object
13209         #
13210         #  @param theOriginal geometry object for copy
13211         #  @param theName Object name; when specified, this parameter is used
13212         #         for result publication in the study. Otherwise, if automatic
13213         #         publication is switched on, default value is used for result name.
13214         #
13215         #  @return New GEOM_Object, containing the copied shape.
13216         #
13217         #  @ingroup l1_geomBuilder_auxiliary
13218         #  @ref swig_MakeCopy "Example"
13219         @ManageTransactions("InsertOp")
13220         def MakeCopy(self, theOriginal, theName=None):
13221             """
13222             Create a copy of the given object
13223
13224             Parameters:
13225                 theOriginal geometry object for copy
13226                 theName Object name; when specified, this parameter is used
13227                         for result publication in the study. Otherwise, if automatic
13228                         publication is switched on, default value is used for result name.
13229
13230             Returns:
13231                 New GEOM_Object, containing the copied shape.
13232
13233             Example of usage: Copy = geompy.MakeCopy(Box)
13234             """
13235             # Example: see GEOM_TestAll.py
13236             anObj = self.InsertOp.MakeCopy(theOriginal)
13237             RaiseIfFailed("MakeCopy", self.InsertOp)
13238             self._autoPublish(anObj, theName, "copy")
13239             return anObj
13240
13241         ## Add Path to load python scripts from
13242         #  @param Path a path to load python scripts from
13243         #  @ingroup l1_geomBuilder_auxiliary
13244         def addPath(self,Path):
13245             """
13246             Add Path to load python scripts from
13247
13248             Parameters:
13249                 Path a path to load python scripts from
13250             """
13251             if (sys.path.count(Path) < 1):
13252                 sys.path.append(Path)
13253                 pass
13254             pass
13255
13256         ## Load marker texture from the file
13257         #  @param Path a path to the texture file
13258         #  @return unique texture identifier
13259         #  @ingroup l1_geomBuilder_auxiliary
13260         @ManageTransactions("InsertOp")
13261         def LoadTexture(self, Path):
13262             """
13263             Load marker texture from the file
13264
13265             Parameters:
13266                 Path a path to the texture file
13267
13268             Returns:
13269                 unique texture identifier
13270             """
13271             # Example: see GEOM_TestAll.py
13272             ID = self.InsertOp.LoadTexture(Path)
13273             RaiseIfFailed("LoadTexture", self.InsertOp)
13274             return ID
13275
13276         ## Get internal name of the object based on its study entry
13277         #  @note This method does not provide an unique identifier of the geometry object.
13278         #  @note This is internal function of GEOM component, though it can be used outside it for
13279         #  appropriate reason (e.g. for identification of geometry object).
13280         #  @param obj geometry object
13281         #  @return unique object identifier
13282         #  @ingroup l1_geomBuilder_auxiliary
13283         def getObjectID(self, obj):
13284             """
13285             Get internal name of the object based on its study entry.
13286             Note: this method does not provide an unique identifier of the geometry object.
13287             It is an internal function of GEOM component, though it can be used outside GEOM for
13288             appropriate reason (e.g. for identification of geometry object).
13289
13290             Parameters:
13291                 obj geometry object
13292
13293             Returns:
13294                 unique object identifier
13295             """
13296             ID = ""
13297             entry = salome.ObjectToID(obj)
13298             if entry is not None:
13299                 lst = entry.split(":")
13300                 if len(lst) > 0:
13301                     ID = lst[-1] # -1 means last item in the list
13302                     return "GEOM_" + ID
13303             return ID
13304
13305
13306
13307         ## Add marker texture. @a Width and @a Height parameters
13308         #  specify width and height of the texture in pixels.
13309         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13310         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13311         #  parameter should be unpacked string, in which '1' symbols represent opaque
13312         #  pixels and '0' represent transparent pixels of the texture bitmap.
13313         #
13314         #  @param Width texture width in pixels
13315         #  @param Height texture height in pixels
13316         #  @param Texture texture data
13317         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13318         #  @return unique texture identifier
13319         #  @ingroup l1_geomBuilder_auxiliary
13320         @ManageTransactions("InsertOp")
13321         def AddTexture(self, Width, Height, Texture, RowData=False):
13322             """
13323             Add marker texture. Width and Height parameters
13324             specify width and height of the texture in pixels.
13325             If RowData is True, Texture parameter should represent texture data
13326             packed into the byte array. If RowData is False (default), Texture
13327             parameter should be unpacked string, in which '1' symbols represent opaque
13328             pixels and '0' represent transparent pixels of the texture bitmap.
13329
13330             Parameters:
13331                 Width texture width in pixels
13332                 Height texture height in pixels
13333                 Texture texture data
13334                 RowData if True, Texture data are packed in the byte stream
13335
13336             Returns:
13337                 return unique texture identifier
13338             """
13339             if not RowData: Texture = PackData(Texture)
13340             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13341             RaiseIfFailed("AddTexture", self.InsertOp)
13342             return ID
13343
13344         ## Creates a new folder object. It is a container for any GEOM objects.
13345         #  @param Name name of the container
13346         #  @param Father parent object. If None,
13347         #         folder under 'Geometry' root object will be created.
13348         #  @return a new created folder
13349         #  @ingroup l1_publish_data
13350         def NewFolder(self, Name, Father=None):
13351             """
13352             Create a new folder object. It is an auxiliary container for any GEOM objects.
13353
13354             Parameters:
13355                 Name name of the container
13356                 Father parent object. If None,
13357                 folder under 'Geometry' root object will be created.
13358
13359             Returns:
13360                 a new created folder
13361             """
13362             if not Father: Father = self.father
13363             return self.CreateFolder(Name, Father)
13364
13365         ## Move object to the specified folder
13366         #  @param Object object to move
13367         #  @param Folder target folder
13368         #  @ingroup l1_publish_data
13369         def PutToFolder(self, Object, Folder):
13370             """
13371             Move object to the specified folder
13372
13373             Parameters:
13374                 Object object to move
13375                 Folder target folder
13376             """
13377             self.MoveToFolder(Object, Folder)
13378             pass
13379
13380         ## Move list of objects to the specified folder
13381         #  @param ListOfSO list of objects to move
13382         #  @param Folder target folder
13383         #  @ingroup l1_publish_data
13384         def PutListToFolder(self, ListOfSO, Folder):
13385             """
13386             Move list of objects to the specified folder
13387
13388             Parameters:
13389                 ListOfSO list of objects to move
13390                 Folder target folder
13391             """
13392             self.MoveListToFolder(ListOfSO, Folder)
13393             pass
13394
13395         ## @addtogroup l2_field
13396         ## @{
13397
13398         ## Creates a field
13399         #  @param shape the shape the field lies on
13400         #  @param name the field name
13401         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13402         #  @param dimension dimension of the shape the field lies on
13403         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13404         #  @param componentNames names of components
13405         #  @return a created field
13406         @ManageTransactions("FieldOp")
13407         def CreateField(self, shape, name, type, dimension, componentNames):
13408             """
13409             Creates a field
13410
13411             Parameters:
13412                 shape the shape the field lies on
13413                 name  the field name
13414                 type  type of field data
13415                 dimension dimension of the shape the field lies on
13416                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13417                 componentNames names of components
13418
13419             Returns:
13420                 a created field
13421             """
13422             if isinstance( type, int ):
13423                 if type < 0 or type > 3:
13424                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
13425                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13426
13427             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13428             RaiseIfFailed("CreateField", self.FieldOp)
13429             global geom
13430             geom._autoPublish( f, "", name)
13431             return f
13432
13433         ## Removes a field from the GEOM component
13434         #  @param field the field to remove
13435         def RemoveField(self, field):
13436             "Removes a field from the GEOM component"
13437             global geom
13438             if isinstance( field, GEOM._objref_GEOM_Field ):
13439                 geom.RemoveObject( field )
13440             elif isinstance( field, geomField ):
13441                 geom.RemoveObject( field.field )
13442             else:
13443                 raise RuntimeError, "RemoveField() : the object is not a field"
13444             return
13445
13446         ## Returns number of fields on a shape
13447         @ManageTransactions("FieldOp")
13448         def CountFields(self, shape):
13449             "Returns number of fields on a shape"
13450             nb = self.FieldOp.CountFields( shape )
13451             RaiseIfFailed("CountFields", self.FieldOp)
13452             return nb
13453
13454         ## Returns all fields on a shape
13455         @ManageTransactions("FieldOp")
13456         def GetFields(self, shape):
13457             "Returns all fields on a shape"
13458             ff = self.FieldOp.GetFields( shape )
13459             RaiseIfFailed("GetFields", self.FieldOp)
13460             return ff
13461
13462         ## Returns a field on a shape by its name
13463         @ManageTransactions("FieldOp")
13464         def GetField(self, shape, name):
13465             "Returns a field on a shape by its name"
13466             f = self.FieldOp.GetField( shape, name )
13467             RaiseIfFailed("GetField", self.FieldOp)
13468             return f
13469
13470         # end of l2_field
13471         ## @}
13472
13473
13474 import omniORB
13475 # Register the new proxy for GEOM_Gen
13476 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13477
13478
13479 ## Field on Geometry
13480 #  @ingroup l2_field
13481 class geomField( GEOM._objref_GEOM_Field ):
13482
13483     def __init__(self):
13484         GEOM._objref_GEOM_Field.__init__(self)
13485         self.field = GEOM._objref_GEOM_Field
13486         return
13487
13488     ## Returns the shape the field lies on
13489     def getShape(self):
13490         "Returns the shape the field lies on"
13491         return self.field.GetShape(self)
13492
13493     ## Returns the field name
13494     def getName(self):
13495         "Returns the field name"
13496         return self.field.GetName(self)
13497
13498     ## Returns type of field data as integer [0-3]
13499     def getType(self):
13500         "Returns type of field data"
13501         return self.field.GetDataType(self)._v
13502
13503     ## Returns type of field data:
13504     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13505     def getTypeEnum(self):
13506         "Returns type of field data"
13507         return self.field.GetDataType(self)
13508
13509     ## Returns dimension of the shape the field lies on:
13510     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13511     def getDimension(self):
13512         """Returns dimension of the shape the field lies on:
13513         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13514         return self.field.GetDimension(self)
13515
13516     ## Returns names of components
13517     def getComponents(self):
13518         "Returns names of components"
13519         return self.field.GetComponents(self)
13520
13521     ## Adds a time step to the field
13522     #  @param step the time step number further used as the step identifier
13523     #  @param stamp the time step time
13524     #  @param values the values of the time step
13525     def addStep(self, step, stamp, values):
13526         "Adds a time step to the field"
13527         stp = self.field.AddStep( self, step, stamp )
13528         if not stp:
13529             raise RuntimeError, \
13530                   "Field.addStep() : Error: step %s already exists in this field"%step
13531         global geom
13532         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13533         self.setValues( step, values )
13534         return stp
13535
13536     ## Remove a time step from the field
13537     def removeStep(self,step):
13538         "Remove a time step from the field"
13539         stepSO = None
13540         try:
13541             stepObj = self.field.GetStep( self, step )
13542             if stepObj:
13543                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13544         except:
13545             #import traceback
13546             #traceback.print_exc()
13547             pass
13548         self.field.RemoveStep( self, step )
13549         if stepSO:
13550             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13551         return
13552
13553     ## Returns number of time steps in the field
13554     def countSteps(self):
13555         "Returns number of time steps in the field"
13556         return self.field.CountSteps(self)
13557
13558     ## Returns a list of time step IDs in the field
13559     def getSteps(self):
13560         "Returns a list of time step IDs in the field"
13561         return self.field.GetSteps(self)
13562
13563     ## Returns a time step by its ID
13564     def getStep(self,step):
13565         "Returns a time step by its ID"
13566         stp = self.field.GetStep(self, step)
13567         if not stp:
13568             raise RuntimeError, "Step %s is missing from this field"%step
13569         return stp
13570
13571     ## Returns the time of the field step
13572     def getStamp(self,step):
13573         "Returns the time of the field step"
13574         return self.getStep(step).GetStamp()
13575
13576     ## Changes the time of the field step
13577     def setStamp(self, step, stamp):
13578         "Changes the time of the field step"
13579         return self.getStep(step).SetStamp(stamp)
13580
13581     ## Returns values of the field step
13582     def getValues(self, step):
13583         "Returns values of the field step"
13584         return self.getStep(step).GetValues()
13585
13586     ## Changes values of the field step
13587     def setValues(self, step, values):
13588         "Changes values of the field step"
13589         stp = self.getStep(step)
13590         errBeg = "Field.setValues(values) : Error: "
13591         try:
13592             ok = stp.SetValues( values )
13593         except Exception, e:
13594             excStr = str(e)
13595             if excStr.find("WrongPythonType") > 0:
13596                 raise RuntimeError, errBeg +\
13597                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
13598             raise RuntimeError, errBeg + str(e)
13599         if not ok:
13600             nbOK = self.field.GetArraySize(self)
13601             nbKO = len(values)
13602             if nbOK != nbKO:
13603                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
13604             else:
13605                 raise RuntimeError, errBeg + "failed"
13606         return
13607
13608     pass # end of class geomField
13609
13610 # Register the new proxy for GEOM_Field
13611 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
13612
13613
13614 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
13615 #  interface to GEOM operations.
13616 #
13617 #  Typical use is:
13618 #  \code
13619 #    import salome
13620 #    salome.salome_init()
13621 #    from salome.geom import geomBuilder
13622 #    geompy = geomBuilder.New(salome.myStudy)
13623 #  \endcode
13624 #  @param  study     SALOME study, generally obtained by salome.myStudy.
13625 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13626 #  @return geomBuilder instance
13627 def New( study, instance=None):
13628     """
13629     Create a new geomBuilder instance.The geomBuilder class provides the Python
13630     interface to GEOM operations.
13631
13632     Typical use is:
13633         import salome
13634         salome.salome_init()
13635         from salome.geom import geomBuilder
13636         geompy = geomBuilder.New(salome.myStudy)
13637
13638     Parameters:
13639         study     SALOME study, generally obtained by salome.myStudy.
13640         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13641     Returns:
13642         geomBuilder instance
13643     """
13644     #print "New geomBuilder ", study, instance
13645     global engine
13646     global geom
13647     global doLcc
13648     engine = instance
13649     if engine is None:
13650       doLcc = True
13651     geom = geomBuilder()
13652     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13653     geom.init_geom(study)
13654     return geom