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